annotate src/joystick/iphoneos/SDLUIAccelerationDelegate.h @ 2362:44fc2537ff9e gsoc2008_iphone

These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Fri, 18 Jul 2008 17:46:17 +0000
parents
children 78bddf0c0fa2
rev   line source
2362
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
1 //
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
2 // SDLUIAccelerationDelegate.h
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
3 // iPodSDL
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
4 //
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
5 // Created by Holmes Futrell on 6/21/08.
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
7 //
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
8
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
9 #import <UIKit/UIKit.h>
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
10 #import "SDL_stdinc.h"
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
11
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
12 @interface SDLUIAccelerationDelegate: NSObject <UIAccelerometerDelegate> {
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
13
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
14 UIAccelerationValue x, y, z;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
15 //NSTimeInterval timestamp;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
16 BOOL isRunning;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
17 BOOL hasNewData;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
18
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
19 }
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
20
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
21 +(SDLUIAccelerationDelegate *)sharedDelegate;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
22 -(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
23 -(void)getLastOrientation:(Sint16 *)data;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
24 -(void)startup;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
25 -(void)shutdown;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
26 -(BOOL)isRunning;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
27 -(BOOL)hasNewData;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
28 -(void)setHasNewData:(BOOL)value;
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
29
44fc2537ff9e These files contain the specification for a class which receives updates from the iPhone accelerometer. The class holds the accelerometer information, and is queried by SDL_sysjoystick.m.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
30 @end