diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/joystick/iphoneos/SDLUIAccelerationDelegate.h	Fri Jul 18 17:46:17 2008 +0000
@@ -0,0 +1,30 @@
+//
+//  SDLUIAccelerationDelegate.h
+//  iPodSDL
+//
+//  Created by Holmes Futrell on 6/21/08.
+//  Copyright 2008 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "SDL_stdinc.h"
+
+@interface SDLUIAccelerationDelegate: NSObject <UIAccelerometerDelegate> {
+
+	UIAccelerationValue x, y, z;
+	//NSTimeInterval timestamp;
+	BOOL isRunning;
+	BOOL hasNewData;
+	
+}
+
++(SDLUIAccelerationDelegate *)sharedDelegate;
+-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration;
+-(void)getLastOrientation:(Sint16 *)data;
+-(void)startup;
+-(void)shutdown;
+-(BOOL)isRunning;
+-(BOOL)hasNewData;
+-(void)setHasNewData:(BOOL)value;
+
+@end