//
//  JotStylusStateDelegate.h
//  AdonitSDK
//
//  Created on 10/14/12.
//  Copyright (c) 2012 Adonit. All rights reserved.
//

#import <Foundation/Foundation.h>

@class JotStylus;

/** The JotStylusStateDelegate is notified of important events as the user
 * interacts with the stylus
 */
@protocol JotStylusStateDelegate <NSObject>

/** Called when the stylus has been pressed
 */
- (void)jotStylusPressedWithTimestamp:(NSTimeInterval)timestamp;

/** Called when the stylus has been released after a press
 */
- (void)jotStylusReleasedWithTimestamp:(NSTimeInterval)timestamp;

/** Called when button 1 is pressed on the stylus
 */
- (void)jotStylusButton1Pressed;

/** Called when button 1 is released on the stylus
 */
- (void)jotStylusButton1Released;

/** Called when button 2 is pressed on the stylus
 */
- (void)jotStylusButton2Pressed;

/** Called when button 2 is released on the stylus
 */
- (void)jotStylusButton2Released;

/** Called when button 3 is pressed on the stylus
 */
- (void)jotStylusButton3Pressed;

/** Called when button 3 is released on the stylus
 */
- (void)jotStylusButton3Released;

/** Called when button 4 is pressed on the stylus
 */
- (void)jotStylusButton4Pressed;

/** Called when button 4 is released on the stylus
 */
- (void)jotStylusButton4Released;

/** Called when the pressure of the stylus changes
 * @param pressure The updated pressure value
 */
- (void)jotStylusPressureUpdate:(NSUInteger)pressure;

/** Called when the battery level of the stylus changes
 * @param stylus The stylus that this battery level pertains to
 * @param battery The new battery level
 */
- (void)jotStylus:(JotStylus*)stylus batteryLevelUpdate:(NSUInteger)battery;

@end
