src/video/uikit/SDL_uikitview.h
author Jim Grandpre <jim.tla@gmail.com>
Mon, 12 Jul 2010 22:03:25 -0400
changeset 4660 b15e7017409b
parent 3697 f7b03b6838cb
child 4661 03dcb795c583
permissions -rw-r--r--
Added Iphone support (untested)
slouken@2765
     1
/*
slouken@2765
     2
    SDL - Simple DirectMedia Layer
slouken@3697
     3
    Copyright (C) 1997-2010 Sam Lantinga
slouken@2765
     4
slouken@2765
     5
    This library is free software; you can redistribute it and/or
slouken@2765
     6
    modify it under the terms of the GNU Lesser General Public
slouken@2765
     7
    License as published by the Free Software Foundation; either
slouken@2765
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@2765
     9
slouken@2765
    10
    This library is distributed in the hope that it will be useful,
slouken@2765
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@2765
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@2765
    13
    Lesser General Public License for more details.
slouken@2765
    14
slouken@2765
    15
    You should have received a copy of the GNU Lesser General Public
slouken@2765
    16
    License along with this library; if not, write to the Free Software
slouken@2765
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@2765
    18
slouken@2765
    19
    Sam Lantinga
slouken@2765
    20
    slouken@libsdl.org
slouken@2765
    21
*/
slouken@2765
    22
slouken@2765
    23
#import <UIKit/UIKit.h>
slouken@2765
    24
#include "SDL_stdinc.h"
slouken@2765
    25
#include "SDL_events.h"
slouken@2765
    26
slouken@2765
    27
#if SDL_IPHONE_MULTIPLE_MICE
slouken@2765
    28
#define MAX_SIMULTANEOUS_TOUCHES 5
slouken@2765
    29
#else
slouken@2765
    30
#define MAX_SIMULTANEOUS_TOUCHES 1
slouken@2765
    31
#endif
slouken@2765
    32
slouken@2765
    33
/* *INDENT-OFF* */
slouken@3487
    34
#if SDL_IPHONE_KEYBOARD
slouken@2765
    35
@interface SDL_uikitview : UIView<UITextFieldDelegate> {
slouken@3487
    36
#else
slouken@3487
    37
@interface SDL_uikitview : UIView {
slouken@3487
    38
#endif
jim@4660
    39
jim@4660
    40
#if FIXME_MULTITOUCH
slouken@2765
    41
	SDL_Mouse mice[MAX_SIMULTANEOUS_TOUCHES];
jim@4660
    42
#endif
jim@4660
    43
jim@4660
    44
#if FIXED_MULTITOUCH
jim@4660
    45
	int touchId;
jim@4660
    46
#endif
slouken@2765
    47
slouken@2765
    48
#if SDL_IPHONE_KEYBOARD
slouken@2765
    49
	UITextField *textField;
slouken@2765
    50
	BOOL keyboardVisible;
slouken@2765
    51
#endif	
slouken@2765
    52
	
slouken@2765
    53
}
slouken@2765
    54
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
slouken@2765
    55
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
slouken@2765
    56
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
slouken@2765
    57
slouken@2765
    58
#if SDL_IPHONE_KEYBOARD
slouken@2765
    59
- (void)showKeyboard;
slouken@2765
    60
- (void)hideKeyboard;
slouken@2765
    61
- (void)initializeKeyboard;
slouken@2765
    62
@property (readonly) BOOL keyboardVisible;
slouken@2765
    63
#endif 
slouken@2765
    64
slouken@2765
    65
@end
slouken@2765
    66
/* *INDENT-ON* */