src/joystick/iphoneos/SDLUIAccelerationDelegate.h
author David Ludwig <dludwig@pobox.com>
Tue, 24 Dec 2013 21:28:31 -0500
changeset 8552 abd934eac415
parent 7387 85303f85cb70
child 8149 681eb46b8ac4
permissions -rw-r--r--
WinRT: moved ill-performing XInput device-detection calls to a separate thread
slouken@2765
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@6885
     3
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
slouken@3697
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@3697
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@3697
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@3697
    20
*/
slouken@2765
    21
slouken@2765
    22
#import <UIKit/UIKit.h>
icculus@7387
    23
#import <SDL_types.h>
slouken@2765
    24
slouken@2765
    25
/* *INDENT-OFF* */
slouken@2765
    26
@interface SDLUIAccelerationDelegate: NSObject <UIAccelerometerDelegate> {
slouken@2765
    27
slouken@2765
    28
	UIAccelerationValue x, y, z;
slouken@2765
    29
	BOOL isRunning;
slouken@2765
    30
	BOOL hasNewData;
slouken@2765
    31
	
slouken@2765
    32
}
slouken@2765
    33
slouken@2765
    34
+(SDLUIAccelerationDelegate *)sharedDelegate;
slouken@2765
    35
-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration;
slouken@2765
    36
-(void)getLastOrientation:(Sint16 *)data;
slouken@2765
    37
-(void)startup;
slouken@2765
    38
-(void)shutdown;
slouken@2765
    39
-(BOOL)isRunning;
slouken@2765
    40
-(BOOL)hasNewData;
slouken@2765
    41
-(void)setHasNewData:(BOOL)value;
slouken@2765
    42
slouken@2765
    43
@end
slouken@2765
    44
/* *INDENT-ON* */