annotate src/video/uikit/SDL_uikitview.m @ 2419:ab89ff6e97af gsoc2008_iphone

Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Wed, 13 Aug 2008 23:14:36 +0000
parents 3d0b3a7d3bea
children 491958a6c881
rev   line source
2403
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
1 /*
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
2 SDL - Simple DirectMedia Layer
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
4
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
5 This library is free software; you can redistribute it and/or
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
6 modify it under the terms of the GNU Lesser General Public
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
7 License as published by the Free Software Foundation; either
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
9
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
10 This library is distributed in the hope that it will be useful,
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
13 Lesser General Public License for more details.
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
14
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
15 You should have received a copy of the GNU Lesser General Public
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
16 License along with this library; if not, write to the Free Software
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
18
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
19 Sam Lantinga
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
20 slouken@libsdl.org
e9a1eed243c9 Added standard SDL header comments
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2353
diff changeset
21 */
2405
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
22
2353
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
23 #import "SDL_uikitview.h"
2419
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
24
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
25 #if SDL_IPHONE_KEYBOARD
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
26 #import "SDL_keyboard_c.h"
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
27 #import "keyinfotable.h"
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
28 #import "SDL_uikitappdelegate.h"
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
29 #import "SDL_uikitwindow.h"
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
30 #endif
2353
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
31
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
32 @implementation SDL_uikitview
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
33
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
34 - (void)dealloc {
2405
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
35 #if SDL_IPHONE_KEYBOARD
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
36 [textField release];
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
37 #endif
2353
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
38 [super dealloc];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
39 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
40
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
41 - (id)initWithFrame:(CGRect)frame {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
42
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
43 self = [super initWithFrame: frame];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
44
2405
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
45 #if SDL_IPHONE_KEYBOARD
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
46 [self initializeKeyboard];
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
47 #endif
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
48
2353
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
49 int i;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
50 for (i=0; i<MAX_SIMULTANEOUS_TOUCHES; i++) {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
51 mice[i].driverdata = NULL;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
52 SDL_AddMouse(&(mice[i]), i);
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
53 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
54 self.multipleTouchEnabled = YES;
2405
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
55
2353
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
56 return self;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
57
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
58 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
59
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
60 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
61
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
62 NSEnumerator *enumerator = [touches objectEnumerator];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
63 UITouch *touch=(UITouch*)[enumerator nextObject];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
64
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
65 // associate touches with mice, so long as we have slots
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
66 int i;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
67 int found = 0;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
68 for(i=0; touch && i < MAX_SIMULTANEOUS_TOUCHES; i++) {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
69
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
70 // check if this mouse is already tracking a touch
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
71 if (mice[i].driverdata != NULL) {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
72 continue;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
73 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
74
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
75 found = 1;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
76
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
77 int oldMouse = SDL_SelectMouse(-1);
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
78 SDL_SelectMouse(i);
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
79 CGPoint locationInView = [touch locationInView: self];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
80 mice[i].driverdata = [touch retain];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
81 SDL_SendMouseMotion(i, 0, locationInView.x, locationInView.y);
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
82 SDL_SendMouseButton(i, SDL_PRESSED, SDL_BUTTON_LEFT);
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
83 SDL_GetRelativeMouseState(NULL, NULL);
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
84 touch = (UITouch*)[enumerator nextObject];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
85
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
86 SDL_SelectMouse(oldMouse);
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
87
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
88 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
89 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
90
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
91 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
92
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
93 NSEnumerator *enumerator = [touches objectEnumerator];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
94 UITouch *touch=nil;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
95
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
96 while(touch = (UITouch *)[enumerator nextObject]) {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
97 int i, found = NO;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
98 for (i=0; i<MAX_SIMULTANEOUS_TOUCHES && !found; i++) {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
99 if (mice[i].driverdata == touch) {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
100 [(UITouch*)(mice[i].driverdata) release];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
101 mice[i].driverdata = NULL;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
102 SDL_SendMouseButton(i, SDL_RELEASED, SDL_BUTTON_LEFT);
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
103
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
104 found = YES;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
105 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
106 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
107 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
108 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
109
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
110 - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
111 /*
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
112 this can happen if the user puts more than 5 touches on the screen
2405
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
113 at once, or perhaps in other circumstances. Usually (it seems)
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
114 all active touches are canceled.
2353
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
115 */
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
116 [self touchesEnded: touches withEvent: event];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
117 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
118
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
119 - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
120
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
121 NSEnumerator *enumerator = [touches objectEnumerator];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
122 UITouch *touch=nil;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
123
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
124 while(touch = (UITouch *)[enumerator nextObject]) {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
125 int i, found = NO;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
126 for (i=0; i<MAX_SIMULTANEOUS_TOUCHES && !found; i++) {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
127 if (mice[i].driverdata == touch) {
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
128 CGPoint locationInView = [touch locationInView: self];
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
129 SDL_SendMouseMotion(i, 0, locationInView.x, locationInView.y);
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
130 found = YES;
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
131 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
132 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
133 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
134 }
07acabba25d9 SDL_uikitview is just a generic view class which SDL_uikitopenglview inherits from. The functionality found in this class relates to (right now) mouse/touch input support. The reason for putting it here is that if someone wanted to write a render driver for iPhone based around CoreGraphics rather than OpenGL ES, they could make their Core Graphics view inherit from this class as well.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
135
2419
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
136 /*
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
137 ---- Keyboard related functionality below this line ----
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
138 */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
139 #if SDL_IPHONE_KEYBOARD
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
140
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
141 - (BOOL)keyboardVisible {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
142 return keyboardVisible;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
143 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
144
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
145 /* UITextFieldDelegate related methods */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
146 - (void)initializeKeyboard {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
147
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
148 NSLog(@"Text field init");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
149
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
150 textField = [[UITextField alloc] initWithFrame: CGRectZero];
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
151 textField.delegate = self;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
152 /* placeholder so there is something to delete! */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
153 textField.text = @" ";
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
154
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
155 /* set UITextInputTrait properties, mostly to defaults */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
156 textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
157 textField.autocorrectionType = UITextAutocorrectionTypeNo;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
158 textField.enablesReturnKeyAutomatically = NO;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
159 textField.keyboardAppearance = UIKeyboardAppearanceDefault;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
160 textField.keyboardType = UIKeyboardTypeDefault;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
161 textField.returnKeyType = UIReturnKeyDefault;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
162 textField.secureTextEntry = NO;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
163
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
164 textField.hidden = YES;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
165 keyboardVisible = NO;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
166 [self addSubview: textField];
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
167
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
168 /*
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
169 SDL makes a copy of our keyboard.
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
170 */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
171
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
172 SDL_Keyboard keyboard;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
173 SDL_zero(keyboard);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
174 //data->keyboard = SDL_AddKeyboard(&keyboard, -1);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
175 /*
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
176 We'll need to delete this keyboard ...
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
177 */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
178 SDL_AddKeyboard(&keyboard, 0);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
179 SDLKey keymap[SDL_NUM_SCANCODES];
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
180 SDL_GetDefaultKeymap(keymap);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
181 SDL_SetKeymap(0, 0, keymap, SDL_NUM_SCANCODES);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
182
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
183 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
184
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
185 - (void)showKeyboard {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
186 keyboardVisible = YES;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
187 [textField becomeFirstResponder];
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
188 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
189
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
190 - (void)hideKeyboard {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
191 keyboardVisible = NO;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
192 [textField resignFirstResponder];
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
193 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
194
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
195 - (BOOL)textField:(UITextField *)_textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
196
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
197 if ([string length] == 0) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
198 /* it wants to replace text with nothing, ie a delete */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
199 SDL_SendKeyboardKey( 0, SDL_PRESSED, SDL_SCANCODE_DELETE);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
200 SDL_SendKeyboardKey( 0, SDL_RELEASED, SDL_SCANCODE_DELETE);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
201 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
202 else {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
203
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
204 int i;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
205 for (i=0; i<[string length]; i++) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
206
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
207 unichar c = [string characterAtIndex: i];
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
208
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
209 Uint16 mod = 0;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
210 SDL_scancode code;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
211
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
212 if (c < 127) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
213 code = unicharToUIKeyInfoTable[c].code;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
214 mod = unicharToUIKeyInfoTable[c].mod;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
215 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
216 else {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
217 code = SDL_SCANCODE_UNKNOWN;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
218 mod = 0;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
219 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
220
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
221 if (mod & KMOD_SHIFT) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
222 SDL_SendKeyboardKey( 0, SDL_PRESSED, SDL_SCANCODE_LSHIFT);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
223 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
224 SDL_SendKeyboardKey( 0, SDL_PRESSED, code);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
225 SDL_SendKeyboardKey( 0, SDL_RELEASED, code);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
226 if (mod & KMOD_SHIFT) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
227 SDL_SendKeyboardKey( 0, SDL_RELEASED, SDL_SCANCODE_LSHIFT);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
228 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
229
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
230 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
231
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
232 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
233 return NO; /* don't allow the edit(!) */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
234 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
235
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
236 /* Terminates the editing session */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
237 - (BOOL)textFieldShouldReturn:(UITextField*)_textField {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
238 [self hideKeyboard];
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
239 return YES;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
240 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
241
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
242 #endif
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
243
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
244 @end
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
245
2405
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
246
3d0b3a7d3bea Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2403
diff changeset
247
2419
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
248 /* iPhone keyboard addition functions */
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
249 #if SDL_IPHONE_KEYBOARD
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
250
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
251 int SDL_iPhoneKeyboardShow(SDL_WindowID windowID) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
252
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
253 SDL_Window *window = SDL_GetWindowFromID(windowID);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
254 SDL_WindowData *data;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
255 SDL_uikitview *view;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
256
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
257 if (NULL == window) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
258 SDL_SetError("Window does not exist");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
259 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
260 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
261
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
262 data = (SDL_WindowData *)window->driverdata;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
263 view = data->view;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
264
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
265 if (nil == view) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
266 SDL_SetError("Window has no view");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
267 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
268 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
269 else {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
270 [view showKeyboard];
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
271 return 0;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
272 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
273 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
274
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
275 int SDL_iPhoneKeyboardHide(SDL_WindowID windowID) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
276
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
277 SDL_Window *window = SDL_GetWindowFromID(windowID);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
278 SDL_WindowData *data;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
279 SDL_uikitview *view;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
280
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
281 if (NULL == window) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
282 SDL_SetError("Window does not exist");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
283 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
284 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
285
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
286 data = (SDL_WindowData *)window->driverdata;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
287 view = data->view;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
288
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
289 if (NULL == view) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
290 SDL_SetError("Window has no view");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
291 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
292 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
293 else {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
294 [view hideKeyboard];
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
295 return 0;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
296 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
297 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
298
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
299 SDL_bool SDL_iPhoneKeyboardIsShown(SDL_WindowID windowID) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
300
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
301 SDL_Window *window = SDL_GetWindowFromID(windowID);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
302 SDL_WindowData *data;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
303 SDL_uikitview *view;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
304
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
305 if (NULL == window) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
306 SDL_SetError("Window does not exist");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
307 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
308 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
309
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
310 data = (SDL_WindowData *)window->driverdata;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
311 view = data->view;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
312
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
313 if (NULL == view) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
314 SDL_SetError("Window has no view");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
315 return 0;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
316 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
317 else {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
318 return view.keyboardVisible;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
319 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
320 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
321
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
322 int SDL_iPhoneKeyboardToggle(SDL_WindowID windowID) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
323
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
324 SDL_Window *window = SDL_GetWindowFromID(windowID);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
325 SDL_WindowData *data;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
326 SDL_uikitview *view;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
327
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
328 if (NULL == window) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
329 SDL_SetError("Window does not exist");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
330 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
331 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
332
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
333 data = (SDL_WindowData *)window->driverdata;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
334 view = data->view;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
335
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
336 if (NULL == view) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
337 SDL_SetError("Window has no view");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
338 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
339 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
340 else {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
341 if (SDL_iPhoneKeyboardIsShown(windowID)) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
342 SDL_iPhoneKeyboardHide(windowID);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
343 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
344 else {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
345 SDL_iPhoneKeyboardShow(windowID);
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
346 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
347 return 0;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
348 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
349 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
350
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
351 #else
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
352
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
353 int SDL_iPhoneKeyboardShow(SDL_WindowID windowID) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
354 SDL_SetError("Not compiled with keyboard support");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
355 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
356 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
357
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
358 int SDL_iPhoneKeyboardHide(SDL_WindowID windowID) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
359 SDL_SetError("Not compiled with keyboard support");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
360 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
361 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
362
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
363 SDL_bool SDL_iPhoneKeyboardIsShown(SDL_WindowID windowID) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
364 return 0;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
365 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
366
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
367 int SDL_iPhoneKeyboardToggle(SDL_WindowID windowID) {
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
368 SDL_SetError("Not compiled with keyboard support");
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
369 return -1;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
370 }
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
371
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
372
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2405
diff changeset
373 #endif /* SDL_IPHONE_KEYBOARD */