view 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 source

//
//  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