Mercurial > sdl-ios-xcode
annotate src/video/uikit/SDL_uikitview.m @ 2435:775e061e9440 gsoc2008_iphone
changed #ifndef statment to _SDL_config_iphoneos_h instead of _SDL_config_minimal_h.
author | Holmes Futrell <hfutrell@umail.ucsb.edu> |
---|---|
date | Fri, 15 Aug 2008 18:22:12 +0000 |
parents | 491958a6c881 |
children | 96124abbcede |
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 { |
2425
491958a6c881
Removed log messages (printf and NSLog)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2419
diff
changeset
|
147 |
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
|
148 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
|
149 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
|
150 /* 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
|
151 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
|
152 |
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 /* 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
|
154 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
|
155 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
|
156 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
|
157 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
|
158 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
|
159 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
|
160 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
|
161 |
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.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
|
163 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
|
164 [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
|
165 |
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 /* |
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 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
|
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 |
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 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
|
171 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
|
172 //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
|
173 /* |
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 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
|
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 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
|
177 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
|
178 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
|
179 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
|
180 |
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 } |
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 - (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
|
184 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
|
185 [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
|
186 } |
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 |
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 - (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
|
189 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
|
190 [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
|
191 } |
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 |
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 - (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
|
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 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
|
196 /* 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
|
197 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
|
198 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
|
199 } |
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 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
|
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 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
|
203 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
|
204 |
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 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
|
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 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
|
208 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
|
209 |
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 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
|
211 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
|
212 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
|
213 } |
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 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
|
215 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
|
216 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
|
217 } |
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 |
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 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
|
220 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
|
221 } |
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, 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
|
223 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
|
224 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
|
225 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
|
226 } |
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 |
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 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
|
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 |
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 /* 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
|
235 - (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
|
236 [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
|
237 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
|
238 } |
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 |
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 #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
|
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 @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
|
243 |
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
|
244 |
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
|
245 |
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
|
246 /* 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
|
247 #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
|
248 |
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 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
|
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 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
|
252 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
|
253 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
|
254 |
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 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
|
256 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
|
257 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
|
258 } |
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 |
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 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
|
261 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
|
262 |
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 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
|
264 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
|
265 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
|
266 } |
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 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
|
268 [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
|
269 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
|
270 } |
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 } |
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 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
|
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 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
|
276 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
|
277 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
|
278 |
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 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
|
280 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
|
281 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
|
282 } |
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 |
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 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
|
285 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
|
286 |
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 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
|
288 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
|
289 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
|
290 } |
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 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
|
292 [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
|
293 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
|
294 } |
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 } |
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 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
|
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_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
|
300 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
|
301 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
|
302 |
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 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
|
304 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
|
305 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
|
306 } |
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 |
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 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
|
309 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
|
310 |
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 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
|
312 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
|
313 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
|
314 } |
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 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
|
316 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
|
317 } |
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 } |
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 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
|
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 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
|
323 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
|
324 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
|
325 |
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 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
|
327 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
|
328 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
|
329 } |
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 |
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 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
|
332 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
|
333 |
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 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
|
335 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
|
336 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
|
337 } |
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 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
|
339 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
|
340 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
|
341 } |
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 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
|
343 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
|
344 } |
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 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
|
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 } |
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 #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
|
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 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
|
352 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
|
353 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
|
354 } |
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 |
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 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
|
357 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
|
358 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
|
359 } |
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 |
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 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
|
362 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
|
363 } |
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 |
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 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
|
366 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
|
367 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
|
368 } |
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 |
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 #endif /* SDL_IPHONE_KEYBOARD */ |