Skip to content

Commit 0aa9646

Browse files
committed
Updated JotTouchSDK
1 parent 47eecb9 commit 0aa9646

65 files changed

Lines changed: 1363 additions & 451 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Example/.DS_Store

0 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/Headers
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/JotTouchSDK
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/Resources
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
//
2+
// JotConstants.h
3+
// JotTouchSDK
4+
//
5+
// Created on 6/27/13.
6+
// Copyright (c) 2013 Adonit. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
#define JOT_MIN_PRESSURE 0
12+
#define JOT_MAX_PRESSURE 2047
13+
14+
#define DistanceOfTransmitterFromTipInInches 0.2893168033
15+
16+
#define JotStylusManagerDidChangeConnectionStatus @"jotStylusManagerDidChangeConnectionStatus"
17+
#define JotStylusManagerDidPairWithStylus @"jotStylusManagerDidPairWithStylus"
18+
#define JotStylusManagerDidChangeBatteryLevel @"jotStylusManagerDidChangeBatteryLevel"
19+
20+
#define JotStylusButton1Down @"jotStylusButton1Down"
21+
#define JotStylusButton1Up @"jotStylusButton1Up"
22+
#define JotStylusButton2Down @"jotStylusButton2Down"
23+
#define JotStylusButton2Up @"jotStylusButton2Up"
24+
25+
#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE 45
26+
#define JOT_STYLUS_LEFTHANDED_REJECTION_ANGLE 135
27+
28+
#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleRightUp 45
29+
#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleRightMiddle 0
30+
#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleRightDown -45
31+
#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleLeftUp 225
32+
#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleLeftMiddle 180
33+
#define JOT_STYLUS_RIGHTHANDED_REJECTION_ANGLE_JotWritingStyleLeftDown 135
34+
35+
36+
typedef NS_ENUM(NSUInteger, JotModel) {
37+
JotModelUndefined = 0,
38+
JotModelJT2 = 1,
39+
JotModelJT4 = 2,
40+
JotModelJS = 3,
41+
JotModelJTPP = 4,
42+
JotModelMighty = 5,
43+
};
44+
45+
typedef NS_ENUM(NSUInteger, JotStylusTipStatus) {
46+
JotStylusTipStatusOffScreen = 0,
47+
JotStylusTipStatusOnScreen = 1
48+
49+
};
50+
51+
typedef NS_ENUM(NSUInteger, JotPalmRejectionOrientation) {
52+
JotPalmRejectionLeftHanded,
53+
JotPalmRejectionRightHanded
54+
};
55+
56+
typedef NS_ENUM(NSUInteger, JotWritingStyle) {
57+
JotWritingStyleRightUp,
58+
JotWritingStyleRightMiddle,
59+
JotWritingStyleRightDown,
60+
JotWritingStyleLeftUp,
61+
JotWritingStyleLeftMiddle,
62+
JotWritingStyleLeftDown,
63+
};
64+
65+
typedef NS_ENUM(NSUInteger, JotConnectionStatus) {
66+
JotConnectionStatusOff,
67+
JotConnectionStatusScanning,
68+
JotConnectionStatusPairing,
69+
JotConnectionStatusConnected,
70+
JotConnectionStatusDisconnected
71+
};
72+
73+
typedef NS_ENUM(NSUInteger, JotPreferredStylusType) {
74+
JotPreferredStylusBT21,
75+
JotPreferredStylusBT40,
76+
JotNoPreferredStylus,
77+
};
78+
79+
extern NSString * const Connection_BT21;
80+
extern NSString * const Connection_BT40;
81+
extern NSString * const Model_JT2;
82+
extern NSString * const Model_JT4;
83+
extern NSString * const Model_JS;
84+
extern NSString * const Model_JTPP;
85+
extern NSString * const Model_Mighty;
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// PalmRejectionDelegate.h
3+
// PalmRejectionExampleApp
4+
//
5+
// Created on 9/14/12.
6+
// Copyright (c) 2012 Adonit. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <UIKit/UIKit.h>
11+
#import "JotTouch.h"
12+
13+
@class JotPalmGestureRecognizer;
14+
15+
@protocol JotPalmRejectionDelegate <NSObject>
16+
17+
/*! Sets the initial touches of a jot stylus.
18+
* \param touches Sets of initial touches where stylus begins touching
19+
*/
20+
-(void)jotStylusTouchBegan:(NSSet *) touches;
21+
22+
/*! Sets the movement of touches of a jot stylus.
23+
* \param touches Sets of touches where stylus is moving
24+
*/
25+
-(void)jotStylusTouchMoved:(NSSet *) touches;
26+
27+
/*! Sets the end touches of a jot stylus.
28+
* \param touches Sets of touches where stylus ends
29+
*/
30+
-(void)jotStylusTouchEnded:(NSSet *) touches;
31+
32+
/*! Sets cancelled touches of a jot stylus.
33+
* \param touches Sets of touches where stylus cancels
34+
*/
35+
-(void)jotStylusTouchCancelled:(NSSet *) touches;
36+
37+
/*! Suggest to disable gestures when the pen is down to prevent conflict.
38+
*/
39+
-(void)jotSuggestsToDisableGestures;
40+
41+
/*! Suggest to enable gestures when the pen is not down as there are no potential conflicts.
42+
*/
43+
-(void)jotSuggestsToEnableGestures;
44+
45+
@end
46+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// JotSDKLibrary.h
3+
// JotSDKLibrary
4+
//
5+
// Created on 11/13/12.
6+
// Copyright (c) 2012 Adonit. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
@interface JotSDKLibrary : NSObject
12+
13+
@end
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// SettingsViewController.h
3+
// JotTouchSDK
4+
//
5+
// Created on 3/3/13.
6+
// Copyright (c) 2013 Adonit. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface JotSettingsViewController : UINavigationController
12+
13+
/*! Initialization of settings view controller with or without adonit jot family toggle.
14+
* \param showSwitch A boolean that determines whether to show jot family toggle.
15+
*/
16+
-(id)initWithOnOffSwitch:(BOOL)showSwitch;
17+
18+
/*! Initialization of settings view controller with or without adonit jot family toggle and palm rejection toggle.
19+
* \param showSwitch A boolean that determines whether to show jot family toggle
20+
* \param showPalmRejection A boolean that determines whether to show palm rejection toggle
21+
*/
22+
-(id)initWithOnOffSwitch:(BOOL)showSwitch andShowPalmRejection:(BOOL)showPalmRejection;
23+
@end
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//
2+
// Shortcut.h
3+
// JotSDKLibrary
4+
//
5+
// Created on 11/19/12.
6+
// Copyright (c) 2012 Adonit. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
@interface JotShortcut : NSObject
12+
13+
/*! Short string representation of the shortcut.
14+
*/
15+
@property (readwrite,copy) NSString *descriptiveText;
16+
/*! Key to access this shortcut.
17+
*/
18+
@property (readwrite,copy) NSString *key;
19+
20+
/*! Selector that is associated with the created shortcut.
21+
*/
22+
@property (readwrite) SEL selector;
23+
24+
/*! Target that is associated with the created shortcut.
25+
*/
26+
@property (readwrite,assign) id target;
27+
28+
/*! Specifies whether the shortcut should be continously repeated.
29+
*/
30+
@property (readwrite) BOOL repeat;
31+
32+
/*! Specifies the rate at which the shortcut will be repeated.
33+
*/
34+
@property (readwrite) NSTimeInterval repeatRate;
35+
36+
/*! Determines if shortcut is usable while the stylus is being pressed.
37+
*/
38+
@property (readwrite) BOOL usableWhenStylusDepressed;
39+
40+
-(id)initWithDescriptiveText:(NSString *)descriptiveText key:(NSString *)key target:(id)target selector:(SEL)selector;
41+
-(id)initWithDescriptiveText:(NSString *)descriptiveText key:(NSString *)key target:(id)target selector:(SEL)selector repeatRate:(NSTimeInterval)repeatRate;
42+
-(id)initWithDescriptiveText:(NSString *)descriptiveText key:(NSString *)key target:(id)target selector:(SEL)selector usableWithStylusDepressed:(BOOL)usableWhenStylusDepressed;
43+
-(id)initWithDescriptiveText:(NSString *)descriptiveText key:(NSString *)key target:(id)target selector:(SEL)selector repeatRate:(NSTimeInterval)repeatRate usableWithStylusDepressed:(BOOL)usableWhenStylusDepressed;;
44+
45+
-(void)start;
46+
47+
/*! Stop the timer for repeating shortcuts.
48+
*/
49+
-(void)stop;
50+
51+
@end
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// StylusConnectionDelegate.h
3+
// PalmRejectionExampleApp
4+
//
5+
// Created on 9/14/12.
6+
// Copyright (c) 2012 Adonit. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <CoreBluetooth/CoreBluetooth.h>
11+
12+
@class JotStylus;
13+
@protocol JotStylusConnection;
14+
15+
@protocol JotStylusConnectionDelegate <NSObject>
16+
17+
/*! Sent to update the status of stylus to pairing.
18+
*/
19+
-(void)jotStylusPairing:(JotStylus *)stylus;
20+
21+
/*! Sent to update the status of stylus to connected.
22+
*/
23+
-(void)jotStylusConnected:(JotStylus *)stylus;
24+
25+
/*! Sent to update the status of stylus to disconnected.
26+
*/
27+
-(void)jotStylusDisconnected:(JotStylus *)stylus;
28+
29+
/*! Sent to update the level of battery remaining.
30+
* \param batteryLevel Positive integer specifying the remaining battery of connected device
31+
*/
32+
-(void)jotStylus:(JotStylus *)stylus batteryLevelUpdate:(NSUInteger)batteryLevel;
33+
34+
/*! Sent when the device does not support bluetooth 4
35+
*/
36+
- (void)jotStylusUnsupported;
37+
@end
38+

0 commit comments

Comments
 (0)