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

Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Wed, 13 Aug 2008 23:14:36 +0000
parents 8cd70487d040
children 491958a6c881
rev   line source
2409
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
1 /*
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
4
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
9
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
13 Lesser General Public License for more details.
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
14
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
18
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
19 Sam Lantinga
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
20 slouken@libsdl.org
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
21 */
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
22
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
23 #import <UIKit/UIKit.h>
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
24 #include "SDL_stdinc.h"
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
25 #include "SDL_mouse.h"
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
26 #include "SDL_mouse_c.h"
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
27 #include "SDL_events.h"
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
28
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
29 #define MAX_SIMULTANEOUS_TOUCHES 5
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
30
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
31 @interface SDL_uikitview : UIView<UITextFieldDelegate> {
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
32
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
33 SDL_Mouse mice[MAX_SIMULTANEOUS_TOUCHES];
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
34
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
35 #if SDL_IPHONE_KEYBOARD
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
36 UITextField *textField;
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
37 BOOL keyboardVisible;
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
38 #endif
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
39
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
40 }
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
41 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
42 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
43 - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
44
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: 2409
diff changeset
45 #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: 2409
diff changeset
46 - (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: 2409
diff changeset
47 - (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: 2409
diff changeset
48 - (void)initializeKeyboard;
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2409
diff changeset
49 @property (readonly) 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: 2409
diff changeset
50 #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: 2409
diff changeset
51
2409
8cd70487d040 This is the header file for SDL_uikitview.m ... somehow this file was not committed.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
52 @end
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: 2409
diff changeset
53
ab89ff6e97af Originally keyboard support was in the form of a category of the class SDL_uikitview. It turns out this can cause problems with compilation where the code is not actually included and doesn't fail until dynamic dispatch. This is just awful, so I've moved to the code into the SDL_uikitview class itself.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents: 2409
diff changeset
54 #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: 2409
diff changeset
55 extern DECLSPEC int SDLCALL 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: 2409
diff changeset
56 extern DECLSPEC int SDLCALL 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: 2409
diff changeset
57 extern DECLSPEC SDL_bool SDLCALL 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: 2409
diff changeset
58 extern DECLSPEC int SDLCALL 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: 2409
diff changeset
59 #endif