src/video/uikit/SDL_uikitview.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 24 Jan 2010 21:10:53 +0000
changeset 3697 f7b03b6838cb
parent 3487 24d13328c44a
child 4465 3e69e077cb95
child 4660 b15e7017409b
permissions -rw-r--r--
Fixed bug #926

Updated copyright to LGPL version 2.1 and year 2010
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_mouse.h"
slouken@2765
    26
#include "SDL_mouse_c.h"
slouken@2765
    27
#include "SDL_events.h"
slouken@2765
    28
slouken@2765
    29
#if SDL_IPHONE_MULTIPLE_MICE
slouken@2765
    30
#define MAX_SIMULTANEOUS_TOUCHES 5
slouken@2765
    31
#else
slouken@2765
    32
#define MAX_SIMULTANEOUS_TOUCHES 1
slouken@2765
    33
#endif
slouken@2765
    34
slouken@2765
    35
/* *INDENT-OFF* */
slouken@3487
    36
#if SDL_IPHONE_KEYBOARD
slouken@2765
    37
@interface SDL_uikitview : UIView<UITextFieldDelegate> {
slouken@3487
    38
#else
slouken@3487
    39
@interface SDL_uikitview : UIView {
slouken@3487
    40
#endif
slouken@2765
    41
		
slouken@2765
    42
	SDL_Mouse mice[MAX_SIMULTANEOUS_TOUCHES];
slouken@2765
    43
slouken@2765
    44
#if SDL_IPHONE_KEYBOARD
slouken@2765
    45
	UITextField *textField;
slouken@2765
    46
	BOOL keyboardVisible;
slouken@2765
    47
#endif	
slouken@2765
    48
	
slouken@2765
    49
}
slouken@2765
    50
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
slouken@2765
    51
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
slouken@2765
    52
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
slouken@2765
    53
slouken@2765
    54
#if SDL_IPHONE_KEYBOARD
slouken@2765
    55
- (void)showKeyboard;
slouken@2765
    56
- (void)hideKeyboard;
slouken@2765
    57
- (void)initializeKeyboard;
slouken@2765
    58
@property (readonly) BOOL keyboardVisible;
slouken@2765
    59
#endif 
slouken@2765
    60
slouken@2765
    61
@end
slouken@2765
    62
/* *INDENT-ON* */