diff --git a/Brushes.xcodeproj/project.pbxproj b/Brushes.xcodeproj/project.pbxproj index 2c2dc71..45108cd 100755 --- a/Brushes.xcodeproj/project.pbxproj +++ b/Brushes.xcodeproj/project.pbxproj @@ -411,6 +411,8 @@ C01FCF5008A9545400542493 /* WDUpdateLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = C01FCF5008A9545400542492 /* WDUpdateLayer.m */; }; C01FCF5008A9545400542499 /* WDDocumentChange.m in Sources */ = {isa = PBXBuildFile; fileRef = C01FCF5008A9545400542498 /* WDDocumentChange.m */; }; C01FCF5008A95454005424A5 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C01FCF5008A95454005424A4 /* Accelerate.framework */; }; + E7F79FE91890395100999BE2 /* JotTouchSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7F79FE81890395100999BE2 /* JotTouchSDK.framework */; }; + E7F79FEB1890395F00999BE2 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7F79FEA1890395F00999BE2 /* CoreMotion.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -985,6 +987,8 @@ C01FCF5008A9545400542492 /* WDUpdateLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WDUpdateLayer.m; sourceTree = ""; }; C01FCF5008A9545400542498 /* WDDocumentChange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WDDocumentChange.m; sourceTree = ""; }; C01FCF5008A95454005424A4 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + E7F79FE81890395100999BE2 /* JotTouchSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JotTouchSDK.framework; sourceTree = ""; }; + E7F79FEA1890395F00999BE2 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -992,6 +996,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + E7F79FEB1890395F00999BE2 /* CoreMotion.framework in Frameworks */, + 6BDB83D01593D2920037E10B /* CoreBluetooth.framework in Frameworks */, + E7F79FE91890395100999BE2 /* JotTouchSDK.framework in Frameworks */, 29E41AC213F9B229000C3305 /* libz.dylib in Frameworks */, 29FF9389145223600000B6BB /* AudioToolbox.framework in Frameworks */, 6BD7072012AD011F004E07C9 /* CoreGraphics.framework in Frameworks */, @@ -1009,7 +1016,6 @@ 6B6240511561B941003EB9B3 /* DropboxSDK.framework in Frameworks */, 6BDB83CA1593CDC10037E10B /* libT1PogoManager.a in Frameworks */, 6BDB83CE1593D2710037E10B /* AVFoundation.framework in Frameworks */, - 6BDB83D01593D2920037E10B /* CoreBluetooth.framework in Frameworks */, 6B29083616013C2400593812 /* Social.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1084,6 +1090,8 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + E7F79FEA1890395F00999BE2 /* CoreMotion.framework */, + E7F79FE81890395100999BE2 /* JotTouchSDK.framework */, 29E41AC113F9B229000C3305 /* libz.dylib */, 6BDB83C11593CDC10037E10B /* T1PogoManager */, C01FCF5008A95454005424A4 /* Accelerate.framework */, @@ -1893,7 +1901,7 @@ ORGANIZATIONNAME = "Taptrix, Inc."; TargetAttributes = { 1D6058900D05DD3D006BFB54 = { - DevelopmentTeam = CQ46W8F62S; + DevelopmentTeam = U23H35XF22; SystemCapabilities = { com.apple.GameCenter = { enabled = 0; @@ -2384,6 +2392,7 @@ "$(inherited)", "$(SRCROOT)", /Users/sprang/Development/Brushes, + /Users/alan/dev/Brushes, ); GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -2397,6 +2406,10 @@ "$(inherited)", "\"$(SRCROOT)/T1PogoManager\"", ); + OTHER_LDFLAGS = ( + "-lxml2", + "-ObjC", + ); PRODUCT_NAME = Brushes; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; @@ -2418,6 +2431,7 @@ "$(inherited)", "$(SRCROOT)", /Users/sprang/Development/Brushes, + /Users/alan/dev/Brushes, ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Brushes_Prefix.pch; @@ -2429,6 +2443,10 @@ "$(inherited)", "\"$(SRCROOT)/T1PogoManager\"", ); + OTHER_LDFLAGS = ( + "-lxml2", + "-ObjC", + ); PRODUCT_NAME = Brushes; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; @@ -2471,6 +2489,7 @@ "$(inherited)", "$(SRCROOT)", /Users/sprang/Development/Brushes, + /Users/alan/dev/Brushes, ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Brushes_Prefix.pch; @@ -2482,6 +2501,10 @@ "$(inherited)", "\"$(SRCROOT)/T1PogoManager\"", ); + OTHER_LDFLAGS = ( + "-lxml2", + "-ObjC", + ); PRODUCT_NAME = Brushes; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; @@ -2528,6 +2551,7 @@ "$(inherited)", "$(SRCROOT)", /Users/sprang/Development/Brushes, + /Users/alan/dev/Brushes, ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Brushes_Prefix.pch; @@ -2540,6 +2564,10 @@ "$(inherited)", "\"$(SRCROOT)/T1PogoManager\"", ); + OTHER_LDFLAGS = ( + "-lxml2", + "-ObjC", + ); PRODUCT_NAME = Brushes; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; diff --git a/Classes/WDAddPath.m b/Classes/WDAddPath.m index 6e3ea0d..d736075 100644 --- a/Classes/WDAddPath.m +++ b/Classes/WDAddPath.m @@ -138,7 +138,7 @@ - (void) endAnimation:(WDPainting *)painting WDLayer *layer = [painting layerWithUUID:self.layerUUID]; [layer commitStroke:pathBounds_ color:path.color erase:erase undoable:undoable_]; } else if ([path.nodes count] > 0) { - WDLog(@"Empty path bounds with path of length %d", [path.nodes count]); + WDLog(@"Empty path bounds with path of length %lu", (unsigned long)[path.nodes count]); } painting.activePath = nil; } diff --git a/Classes/WDStylusManager.h b/Classes/WDStylusManager.h index 8cc3bb7..b264cef 100644 --- a/Classes/WDStylusManager.h +++ b/Classes/WDStylusManager.h @@ -13,9 +13,13 @@ // Pogo Connect (Blue Tiger) #import "T1PogoManager.h" +// Jot Touch 4 +#import + typedef enum { WDNoStylus = 0, WDPogoConnectStylus, + WDJotTouchStylus, WDMaxStylusTypes } WDStylusType; @@ -35,6 +39,7 @@ typedef enum { @interface WDStylusManager : NSObject @property (nonatomic) T1PogoManager *pogoManager; +@property (nonatomic) JotStylusManager *jotManager; @property (nonatomic, readonly) NSUInteger numberOfStylusTypes; @property (nonatomic) WDStylusType mode; @property (nonatomic) WDBlueToothState blueToothState; diff --git a/Classes/WDStylusManager.m b/Classes/WDStylusManager.m index 1d65f14..2b7ce73 100644 --- a/Classes/WDStylusManager.m +++ b/Classes/WDStylusManager.m @@ -37,6 +37,7 @@ @interface WDStylusManager () @implementation WDStylusManager @synthesize pogoManager; +@synthesize jotManager; @synthesize newlyDiscoveredPen; @synthesize centralBlueToothManager; @synthesize blueToothState; @@ -128,6 +129,10 @@ - (WDStylusData *) dataForStylusType:(WDStylusType)type atIndex:(NSUInteger)inde data.connected = pen.isConnected; data.pogoPen = pen; } + } else if (type == WDJotTouchStylus) { + data.productName = NSLocalizedString(@"Jot Touch", @"Jot Touch"); + data.connected = (jotManager.connectionStatus == JotConnectionStatusConnected); + data.batteryLevel = @(jotManager.batteryLevel / 100.0f); } return data; @@ -146,6 +151,12 @@ - (float) pressureForTouch:(UITouch *)touch realPressue:(BOOL *)isRealPressure if ((mode == WDPogoConnectStylus) && [pogoManager oneOrMorePensAreConnected]) { isReal = YES; pressure = [pogoManager pressureForTouch:touch]; + } else if ((mode == WDJotTouchStylus) && ([jotManager connectionStatus] == JotConnectionStatusConnected)) { + isReal = YES; + NSLog(@"Pressure: %lu", (unsigned long)[jotManager getPressure]); + pressure = [jotManager getPressure] / 2047.0f; + + } else if (mode != WDNoStylus) { isReal = YES; // since we're in stylus mode, but no styli are active, use 1.0 pressure @@ -194,6 +205,52 @@ - (void) didDisconnectStylus:(NSString *)stylus [self postNotificationOnMainQueue:WDStylusDidDisconnectNotification userInfo:userInfo]; } +#pragma mark -- Jot Touch +- (void)jotConnectionChange:(NSNotification *) note +{ + switch([[JotStylusManager sharedInstance] connectionStatus]) + { + case JotConnectionStatusOff: + break; + case JotConnectionStatusScanning: + break; + case JotConnectionStatusPairing: + break; + case JotConnectionStatusConnected: + [self didConnectStylus:NSLocalizedString(@"Jot Touch", @"Jot Touch")]; + break; + case JotConnectionStatusDisconnected: + [self didDisconnectStylus:NSLocalizedString(@"Jot Touch", @"Jot Touch")]; + break; + default: + break; + } +} + +-(void)jotStylusTouchBegan:(NSSet*)jotTouches{ + // a Jot stylus has begun to draw on the screen +} +-(void)jotStylusTouchMoved:(NSSet*)jotTouches{ + // a Jot stylus is moving on the screen +} +-(void)jotStylusTouchEnded:(NSSet*)jotTouches{ + // a Jot stylus has ended normally on the screen +} +-(void)jotStylusTouchCancelled:(NSSet*)jotTouches{ + // a stylus event has been cancelled on the screen +} +-(void)jotSuggestsToDisableGestures{ + // the Jot Touch SDK has determined that the user’s palm is likely + // resting on the screen or the user is actively drawing with the + // Jot stylus, and we recommend to disable any other gestures + // that might be attached to that UIView, such as a pinch-to-zoom + // gesture +} +-(void)jotSuggestsToEnableGestures{ + // The user’s palm has lifted and drawing has stopped, so it is + // safe to re-enable any other gestures on the UIView +} + #pragma mark -- Pogo Connect - (NSString *) defaultPogoConnectName @@ -255,9 +312,24 @@ - (void) setBlueToothState:(WDBlueToothState)inBlueToothState blueToothState = inBlueToothState; - if (blueToothState == WDBlueToothLowEnergy && !pogoManager) { - pogoManager = [T1PogoManager pogoManagerWithDelegate:self]; - pogoManager.enablePenInputOverNetworkIfIncompatiblePad = YES; + if (blueToothState == WDBlueToothLowEnergy) { + if (!pogoManager) { + pogoManager = [T1PogoManager pogoManagerWithDelegate:self]; + pogoManager.enablePenInputOverNetworkIfIncompatiblePad = YES; + } + + if (!jotManager) { + jotManager = [JotStylusManager sharedInstance]; + + [[NSNotificationCenter defaultCenter] addObserver: self + selector:@selector(jotConnectionChange:) + name: JotStylusManagerDidChangeConnectionStatus + object:nil]; + jotManager.rejectMode = NO; + jotManager.enabled = YES; + + + } } [[NSNotificationCenter defaultCenter] postNotificationName:WDBlueToothStateChangedNotification object:self]; diff --git a/JotTouchSDK.framework/Headers b/JotTouchSDK.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/JotTouchSDK.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/JotTouchSDK.framework/JotTouchSDK b/JotTouchSDK.framework/JotTouchSDK new file mode 120000 index 0000000..054824b --- /dev/null +++ b/JotTouchSDK.framework/JotTouchSDK @@ -0,0 +1 @@ +Versions/Current/JotTouchSDK \ No newline at end of file diff --git a/JotTouchSDK.framework/Resources b/JotTouchSDK.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/JotTouchSDK.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotConstants.h b/JotTouchSDK.framework/Versions/A/Headers/JotConstants.h new file mode 100644 index 0000000..8d6c8ed --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotConstants.h @@ -0,0 +1,85 @@ +// +// JotConstants.h +// JotTouchSDK +// +// Created on 6/27/13. +// Copyright (c) 2013 Adonit. All rights reserved. +// + +#import + +#define JOT_MIN_PRESSURE 0 +#define JOT_MAX_PRESSURE 2047 + +#define DistanceOfTransmitterFromTipInInches 0.2893168033 + +#define JotStylusManagerDidChangeConnectionStatus @"jotStylusManagerDidChangeConnectionStatus" +#define JotStylusManagerDidPairWithStylus @"jotStylusManagerDidPairWithStylus" +#define JotStylusManagerDidChangeBatteryLevel @"jotStylusManagerDidChangeBatteryLevel" + +#define JotStylusButton1Down @"jotStylusButton1Down" +#define JotStylusButton1Up @"jotStylusButton1Up" +#define JotStylusButton2Down @"jotStylusButton2Down" +#define JotStylusButton2Up @"jotStylusButton2Up" + +#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE 45 +#define JOT_STYLUS_LEFTHANDED_REJECTION_ANGLE 135 + +#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleRightUp 45 +#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleRightMiddle 0 +#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleRightDown -45 +#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleLeftUp 225 +#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleLeftMiddle 180 +#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleLeftDown 135 + + +typedef NS_ENUM(NSUInteger, JotModel) { + JotModelUndefined = 0, + JotModelJT2 = 1, + JotModelJT4 = 2, + JotModelJS = 3, + JotModelJTPP = 4, + JotModelMighty = 5, +}; + +typedef NS_ENUM(NSUInteger, JotStylusTipStatus) { + JotStylusTipStatusOffScreen = 0, + JotStylusTipStatusOnScreen = 1 + +}; + +typedef NS_ENUM(NSUInteger, JotPalmRejectionOrientation) { + JotPalmRejectionLeftHanded, + JotPalmRejectionRightHanded +}; + +typedef NS_ENUM(NSUInteger, JotWritingStyle) { + JotWritingStyleRightUp, + JotWritingStyleRightMiddle, + JotWritingStyleRightDown, + JotWritingStyleLeftUp, + JotWritingStyleLeftMiddle, + JotWritingStyleLeftDown, +}; + +typedef NS_ENUM(NSUInteger, JotConnectionStatus) { + JotConnectionStatusOff, + JotConnectionStatusScanning, + JotConnectionStatusPairing, + JotConnectionStatusConnected, + JotConnectionStatusDisconnected +}; + +typedef NS_ENUM(NSUInteger, JotPreferredStylusType) { + JotPreferredStylusBT21, + JotPreferredStylusBT40, + JotNoPreferredStylus, +}; + +extern NSString * const Connection_BT21; +extern NSString * const Connection_BT40; +extern NSString * const Model_JT2; +extern NSString * const Model_JT4; +extern NSString * const Model_JS; +extern NSString * const Model_JTPP; +extern NSString * const Model_Mighty; diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotPalmRejectionDelegate.h b/JotTouchSDK.framework/Versions/A/Headers/JotPalmRejectionDelegate.h new file mode 100644 index 0000000..0256555 --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotPalmRejectionDelegate.h @@ -0,0 +1,46 @@ +// +// PalmRejectionDelegate.h +// PalmRejectionExampleApp +// +// Created on 9/14/12. +// Copyright (c) 2012 Adonit. All rights reserved. +// + +#import +#import +#import "JotTouch.h" + +@class JotPalmGestureRecognizer; + +@protocol JotPalmRejectionDelegate + +/*! Sets the initial touches of a jot stylus. + * \param touches Sets of initial touches where stylus begins touching + */ +-(void)jotStylusTouchBegan:(NSSet *) touches; + +/*! Sets the movement of touches of a jot stylus. + * \param touches Sets of touches where stylus is moving + */ +-(void)jotStylusTouchMoved:(NSSet *) touches; + +/*! Sets the end touches of a jot stylus. + * \param touches Sets of touches where stylus ends + */ +-(void)jotStylusTouchEnded:(NSSet *) touches; + +/*! Sets cancelled touches of a jot stylus. + * \param touches Sets of touches where stylus cancels + */ +-(void)jotStylusTouchCancelled:(NSSet *) touches; + +/*! Suggest to disable gestures when the pen is down to prevent conflict. + */ +-(void)jotSuggestsToDisableGestures; + +/*! Suggest to enable gestures when the pen is not down as there are no potential conflicts. + */ +-(void)jotSuggestsToEnableGestures; + +@end + diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotSDKLibrary.h b/JotTouchSDK.framework/Versions/A/Headers/JotSDKLibrary.h new file mode 100644 index 0000000..22a0e46 --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotSDKLibrary.h @@ -0,0 +1,13 @@ +// +// JotSDKLibrary.h +// JotSDKLibrary +// +// Created on 11/13/12. +// Copyright (c) 2012 Adonit. All rights reserved. +// + +#import + +@interface JotSDKLibrary : NSObject + +@end diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotSettingsViewController.h b/JotTouchSDK.framework/Versions/A/Headers/JotSettingsViewController.h new file mode 100644 index 0000000..1677217 --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotSettingsViewController.h @@ -0,0 +1,23 @@ +// +// SettingsViewController.h +// JotTouchSDK +// +// Created on 3/3/13. +// Copyright (c) 2013 Adonit. All rights reserved. +// + +#import + +@interface JotSettingsViewController : UINavigationController + +/*! Initialization of settings view controller with or without adonit jot family toggle. + * \param showSwitch A boolean that determines whether to show jot family toggle. + */ +-(id)initWithOnOffSwitch:(BOOL)showSwitch; + +/*! Initialization of settings view controller with or without adonit jot family toggle and palm rejection toggle. + * \param showSwitch A boolean that determines whether to show jot family toggle + * \param showPalmRejection A boolean that determines whether to show palm rejection toggle + */ +-(id)initWithOnOffSwitch:(BOOL)showSwitch andShowPalmRejection:(BOOL)showPalmRejection; +@end diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotShortcut.h b/JotTouchSDK.framework/Versions/A/Headers/JotShortcut.h new file mode 100644 index 0000000..672287b --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotShortcut.h @@ -0,0 +1,51 @@ +// +// Shortcut.h +// JotSDKLibrary +// +// Created on 11/19/12. +// Copyright (c) 2012 Adonit. All rights reserved. +// + +#import + +@interface JotShortcut : NSObject + +/*! Short string representation of the shortcut. + */ +@property (readwrite,copy) NSString *descriptiveText; +/*! Key to access this shortcut. + */ +@property (readwrite,copy) NSString *key; + +/*! Selector that is associated with the created shortcut. + */ +@property (readwrite) SEL selector; + +/*! Target that is associated with the created shortcut. + */ +@property (readwrite,assign) id target; + +/*! Specifies whether the shortcut should be continously repeated. + */ +@property (readwrite) BOOL repeat; + +/*! Specifies the rate at which the shortcut will be repeated. + */ +@property (readwrite) NSTimeInterval repeatRate; + +/*! Determines if shortcut is usable while the stylus is being pressed. + */ +@property (readwrite) BOOL usableWhenStylusDepressed; + +-(id)initWithDescriptiveText:(NSString *)descriptiveText key:(NSString *)key target:(id)target selector:(SEL)selector; +-(id)initWithDescriptiveText:(NSString *)descriptiveText key:(NSString *)key target:(id)target selector:(SEL)selector repeatRate:(NSTimeInterval)repeatRate; +-(id)initWithDescriptiveText:(NSString *)descriptiveText key:(NSString *)key target:(id)target selector:(SEL)selector usableWithStylusDepressed:(BOOL)usableWhenStylusDepressed; +-(id)initWithDescriptiveText:(NSString *)descriptiveText key:(NSString *)key target:(id)target selector:(SEL)selector repeatRate:(NSTimeInterval)repeatRate usableWithStylusDepressed:(BOOL)usableWhenStylusDepressed;; + +-(void)start; + +/*! Stop the timer for repeating shortcuts. + */ +-(void)stop; + +@end diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotStylusConnectionDelegate.h b/JotTouchSDK.framework/Versions/A/Headers/JotStylusConnectionDelegate.h new file mode 100644 index 0000000..dc9dcd1 --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotStylusConnectionDelegate.h @@ -0,0 +1,38 @@ +// +// StylusConnectionDelegate.h +// PalmRejectionExampleApp +// +// Created on 9/14/12. +// Copyright (c) 2012 Adonit. All rights reserved. +// + +#import +#import + +@class JotStylus; +@protocol JotStylusConnection; + +@protocol JotStylusConnectionDelegate + +/*! Sent to update the status of stylus to pairing. + */ +-(void)jotStylusPairing:(JotStylus *)stylus; + +/*! Sent to update the status of stylus to connected. + */ +-(void)jotStylusConnected:(JotStylus *)stylus; + +/*! Sent to update the status of stylus to disconnected. + */ +-(void)jotStylusDisconnected:(JotStylus *)stylus; + +/*! Sent to update the level of battery remaining. + * \param batteryLevel Positive integer specifying the remaining battery of connected device + */ +-(void)jotStylus:(JotStylus *)stylus batteryLevelUpdate:(NSUInteger)batteryLevel; + +/*! Sent when the device does not support bluetooth 4 + */ +- (void)jotStylusUnsupported; +@end + diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotStylusManager.h b/JotTouchSDK.framework/Versions/A/Headers/JotStylusManager.h new file mode 100644 index 0000000..a9d59b9 --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotStylusManager.h @@ -0,0 +1,158 @@ +// +// JotStylusManager.h +// PalmRejectionExampleApp +// +// Created on 8/20/12. +// Copyright (c) 2012 Adonit. All rights reserved. +// + +#import +#import "JotStylusConnectionDelegate.h" +#import "JotPalmRejectionDelegate.h" +#import "JotStylusStateDelegate.h" +#import +#import +#import "JotShortcut.h" +#import "JotSettingsViewController.h" +#import "JotConstants.h" + +@class JotPreferredStylus; +@interface JotStylusManager : NSObject + ++ (JotStylusManager*)sharedInstance; + +-(void)touchesBegan:(NSSet *)touches; +-(void)touchesMoved:(NSSet *)touches; +-(void)touchesEnded:(NSSet *)touches; +-(void)touchesCancelled:(NSSet *)touches; + +/*! Adds a shortcut option that is accessibile and can be specified by the user. + * \param shortcut A shortcut to be added to the settings interface + */ +-(void)addShortcutOption:(JotShortcut *)shortcut; + +/*! Sets the default option state for the first shortcut that will used when initially loading the interface. + * \param shortcut The default option of the second stylus button shortcut to be added to the settings interface + */ +-(void)addShortcutOptionButton1Default:(JotShortcut *)shortcut; + +/*! Sets the default option state for the second shortcut that will used when initially loading the interface. + * \param shortcut The default option of the second stylus button shortcut to be added to the settings interface + */ +-(void)addShortcutOptionButton2Default:(JotShortcut *)shortcut; + +/*! Obtains pressure data of the stylus currently connected. + * \returns If connected, returns positive integer value of connected pressure data. If not connected, returns the unconnected pressure data. + */ +-(NSUInteger)getPressure; + +/*! Determines if a stylus is currently connected. + * \returns A boolean specifying if a stylus is connected + */ +-(BOOL)isStylusConnected; + +/*! Number of stylus connected to BT, including those still pairing + * \returns A NSUInteger with the total count of stylus connected and/or pairing + */ +-(NSUInteger)totalNumberOfStylusesConnected; + + +/*! Removes the current connected stylus and stop receiving data from it. + */ +-(void)forgetAndTurnOffStylus; + +/*! Sets a view to receive touch events from Jot styluses. + * \param view A view that will be supplied touch events from Jot styluses + */ +-(void)registerView:(UIView*)view; + +/*! Removes view from receiving touch events from Jot styluses. + * \param view A view that will no longer receiver touch events from Jot styluses + */ +-(void)unregisterView:(UIView*)view; + +/*! Links to Safari and appropriate help site for the stylus currently connected. + */ +-(void)launchHelp; + +-(void)setOptionValue:(id)value forKey:(NSString *)key; + +#pragma mark - properties + +/*! Delays used to tune re-enabling gestures when a stylus is lifted from the screen. + */ +@property (readwrite) CGFloat palmDetectionTouchDelay; +@property (nonatomic) CGFloat palmDetectionTouchDelayNoPressure; +@property (readwrite) NSUInteger unconnectedPressure; + +/*! Array of JotShortcuts utilized in the settings interface. + */ +@property (readonly) NSArray *shortcuts; + +/*! The current button 1 shortcut of the preferred stylus. + */ +@property (readwrite,assign) JotShortcut *button1Shortcut; + +/*! The current button 2 shortcut of the preferred stylus. + */ +@property (readwrite,assign) JotShortcut *button2Shortcut; + +/*! Palm rejection delegate capturing touch events for palm rejection. + */ +@property (readwrite,assign) id palmRejectorDelegate; + +@property (nonatomic) BOOL enabled; + +/*! A string representation of the current version of the SDK being used. + */ +@property (readonly) NSString *SDKVersion; + +/*! A string representation of the current build number of the SDK being used. + */ +@property (readonly) NSString *SDKBuildVersion; + +/*! A boolean specifying whether palm rejection is on. + */ +@property (readwrite) BOOL rejectMode; + +/*! A positive integer specifying the amount of battery remaining. + */ +@property (readonly) NSUInteger batteryLevel; + +/*! An enum specifying the current selected palm rejection orientation (left vs. right) + * Deprecated in v2.0, moving forward please use palmRejectionOrientation + */ +@property (readwrite) JotPalmRejectionOrientation palmRejectionOrientation; + +/*! An enum specifying the current writing style and prefered writing hand. Default to JotWritingStyleRightDown + */ +@property (readwrite) JotWritingStyle writingStyle; + +/*! An enum specifying the current status of pairing styluses. + */ +@property (readonly) JotConnectionStatus connectionStatus; + +/*! An enum specifying the type of the preferred stylus. + * Deprecated in v2.0 + */ +@property (readonly) JotPreferredStylusType preferredStylusType; + +/*! An enum specifying the model of the preferred and connected stylus. + */ +@property (readonly) JotModel preferredStylusModel; + +/*! An enum specifying the preferred stylus. + */ +@property (readonly) JotPreferredStylus *preferredStylus; + + +/*! NSString representing the firmware version for the connected pen + */ +@property (readonly) NSString *firmwareVersion; + +/*! NSString representing the hardware version for the connected pen + */ +@property (readonly) NSString *hardwareVersion; + + +@end diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotStylusStateDelegate.h b/JotTouchSDK.framework/Versions/A/Headers/JotStylusStateDelegate.h new file mode 100644 index 0000000..563edf5 --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotStylusStateDelegate.h @@ -0,0 +1,45 @@ +// +// StylusStateDelegate.h +// PalmRejectionExampleApp +// +// Created on 10/14/12. +// +// + +#import + +@protocol JotStylusStateDelegate + +/*! Message that the jot has been pressed. + */ +-(void)jotStylusPressed; + +/*! Message that the jot has been released after press. + */ +-(void)jotStylusReleased; + +/*! Message that the button 1 is pressed. + */ +-(void)jotStylusButton1Pressed; + +/*! Message that the button 1 is released after press. + */ +-(void)jotStylusButton1Released; + +/*! Message that the button 2 is pressed. + */ +-(void)jotStylusButton2Pressed; + +/*! Message that the button 2 is released after press. + */ +-(void)jotStylusButton2Released; + +/*! Messaged that the jot stylus pressure is updated. + */ +-(void)jotStylusPressureUpdate:(NSUInteger)pressure; + +/*! Messaged that the jot stylus battery level is updated. + */ +-(void)jotStylus:(JotStylus*)stylus batteryLevelUpdate:(NSUInteger)battery; + +@end diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotTouch.h b/JotTouchSDK.framework/Versions/A/Headers/JotTouch.h new file mode 100644 index 0000000..aed09f1 --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotTouch.h @@ -0,0 +1,65 @@ +// +// JotTouch.h +// JotSDKLibrary +// +// Created on 11/30/12. +// Copyright (c) 2012 Adonit. All rights reserved. +// + +#import +#import +#import + +@interface JotTouch : NSObject + ++(JotTouch *)jotTouchFor:(UITouch *)touch; ++(void)cleanJotTouchFor:(UITouch *)touch; ++(void)cleanJotTouches:(NSSet *)jotTouches; +/*! Returns a offset correct point location in input view + * \param touch A UITouch object that is used to init JotTouch object. + */ +-(id)initWithTouch:(UITouch *)touch; + +/*! Returns point location in input view. + * \param view The view from which the touch occurs + * \return The point of the touch within the input view + */ +-(CGPoint)locationInView:(UIView *)view; + +/*! Returns previous point location in input view. + * \param view The view from which the touch occurs + * \return The point of the previous touch within the input view + */ +-(CGPoint)previousLocationInView:(UIView *)view; + +/*! Syncs pressure value to specific JotTouch object. + * \param pressure The current pressure value while the touch is being captured + */ +-(void)syncToTouchWithPressure:(NSUInteger)pressure; + +/*! The touch associated with this object. + */ +@property (readonly) UITouch* touch; + +/*! The pressure associated with the touch. + */ +@property (readwrite) NSUInteger pressure; + +/*! The point of the touch within the window. + */ +@property (readwrite) CGPoint windowPosition; + +/*! The previous point of the touch within the window. + */ +@property (readwrite) CGPoint previousWindowPosition; + +/*! The time at which the touch occurred. + */ +@property (readwrite) NSTimeInterval timestamp; + + +#pragma mark - Debug +@property (readwrite) BOOL fromQueue; +@property (readwrite) BOOL fromQuickPickup; + +@end diff --git a/JotTouchSDK.framework/Versions/A/Headers/JotTouchMoment.h b/JotTouchSDK.framework/Versions/A/Headers/JotTouchMoment.h new file mode 100644 index 0000000..5680557 --- /dev/null +++ b/JotTouchSDK.framework/Versions/A/Headers/JotTouchMoment.h @@ -0,0 +1,21 @@ +// +// TouchMoment.h +// JotSDKLibrary +// +// Created on 11/30/12. +// Copyright (c) 2012 Adonit. All rights reserved. +// + +#import +#import +#import +@interface JotTouchMoment : NSObject +@property (readwrite) CGPoint point; +@property (readwrite) NSTimeInterval timestamp; +@property (readwrite) NSUInteger pressure; +@property (readwrite) BOOL isTouchEnd; +@property (readwrite) UITouch *touch; +-(id) initWithTouch:(UITouch *) touch withPoint:(CGPoint)point withPressure:(NSUInteger)pressure withTimestamp:(NSTimeInterval)timestamp; ++(JotTouchMoment *)touchEnd; + +@end diff --git a/JotTouchSDK.framework/Versions/A/JotTouchSDK b/JotTouchSDK.framework/Versions/A/JotTouchSDK new file mode 100644 index 0000000..f7295f9 Binary files /dev/null and b/JotTouchSDK.framework/Versions/A/JotTouchSDK differ diff --git a/JotTouchSDK.framework/Versions/A/Resources/Info.plist b/JotTouchSDK.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..c8178ce Binary files /dev/null and b/JotTouchSDK.framework/Versions/A/Resources/Info.plist differ diff --git a/JotTouchSDK.framework/Versions/A/Resources/en.lproj/InfoPlist.strings b/JotTouchSDK.framework/Versions/A/Resources/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..3967e06 Binary files /dev/null and b/JotTouchSDK.framework/Versions/A/Resources/en.lproj/InfoPlist.strings differ diff --git a/JotTouchSDK.framework/Versions/Current b/JotTouchSDK.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/JotTouchSDK.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/en.lproj/Localizable.strings b/en.lproj/Localizable.strings index b256b60..f1f3100 100644 Binary files a/en.lproj/Localizable.strings and b/en.lproj/Localizable.strings differ