Skip to main content

Reference

Important Note

This series of Wacom products is now discontinued and support for them is no longer offered.

WacomManager Class

Class InterfaceDescription
@interface WacomManager: NSObjectThis class is a manager that acts as a singleton used to access devices and provide notifications.

isDiscoveryInProgress

Syntax

@property (readonly) BOOL isDiscoveryInProgres

Tells you if discovery is in progress or not.

Return Value
YES when discovery is in progress; otherwise NO.

getManager

Syntax

+ (WacomManager *) getManager

This function provides a singleton instance of the WacomManager.

Return Value
Returns a pointer to the WacomManager.

getDevices

Syntax

- (NSArray *) getDevices

Obtains an array of stylus products that were discovered by the iPad or iPhone.

Return Value
A pointer to an array of stylus products.

registerForNotifications

Syntax

- (int) registerForNotifications: (id)registrant_I

Register with the WacomManager to receive notifications.

ParameterTypeDescription
registrant_IidThis is the receiver of the notifications. To receive the notifications, the registrant must add the method:
- (void) stylusEvent: (WacomStylusEvent *) stylusEvent.

Return Value
WAC_SUCCESS if successfully registered; otherwise WAC_ERROR.

deregisterForNotifications

Syntax

- (int) deregisterForNotifications: (id)registrant_I

Use this method to unregister for notifications.

ParameterTypeDescription
registrant_IidThis is the receiver of the notifications.

Return Value
WAC_SUCCESS if successfully unregistered; otherwise WAC_ERROR.

setMinimumSignalStrength

Syntax

- (void) setMinimumSignalStrength: (int)minimum_I

Register with the WacomManager to receive notifications.

ParameterTypeDescription
minimum_IintSets the minimum signal strength. Adjust the RSSI settings to make pairing easier, which is required by a stylus to be discovered.

Return Value
Returns nothing.

getMinimumSignalStrength

Syntax

- (int) getMinimumSignalStrength

Get the current minimum signal strength required by a stylus to be discovered.

Return Value
The current minimum signal strength.

startDeviceDiscovery

Syntax

- (int) startDeviceDiscovery

Start discovering stylus products that can be paired to the iPad or iPhone.

Return Value
WAC_SUCCESS if discovery has started; otherwise WAC_ERROR. If successful, query the WacomManager for any discovered stylus products using getDevices.

stopDeviceDiscovery

Syntax

- (int) stopDeviceDiscovery

Use this to stop the discovery of stylus products.

Return Value
WAC_SUCCESS if discovery has stopped; otherwise WAC_ERROR.

reconnectToStoredDevices

Syntax

- (void) reconnectToStoredDevices

Use this to tell the WacomManager to automatically reconnect to stylus products that the iPad or iPhone was previously connected to.

Return Value
Returns nothing.

clearStoredDevices

Syntax

- (void) clearStoredDevices

The SDK stores a list of stylus products that the iPad was previously connected to. Use this to clear that list of stylus products.

Important: This will disconnect any currently connected stylus.

Return Value
Returns nothing.

selectDevice

Syntax

- (int) selectDevice: (WacomDevice *)device

Use this method to start receiving information from a discovered stylus.

ParameterTypeDescription
deviceWacomDevice *discovered stylus.

Return Value
WAC_SUCCESS if your app is receiving updates from the stylus; otherwise WAC_ERROR.

deselectDevice

Syntax

- (int) deselectDevice: (WacomDevice *)device

Use this method to stop receiving information from a discovered stylus.

ParameterTypeDescription
deviceWacomDevice *discovered stylus.

Return Value
WAC_SUCCESS if the stylus updates have stopped; otherwise WAC_ERROR.

getSelectedDevice

Syntax

- (WacomDevice *) getSelectedDevice

Return Value
A pointer to the selected stylus.

isADeviceSelected

Syntax

- (BOOL) isADeviceSelected

Return Value
Returns YES if a stylus has been selected; otherwise NO.

getSDKVersion

Syntax

- (NSString *) getSDKVersion

Return Value
Returns the current version of the SDK that is in use.

WacomDevice Class

Class InterfaceDescription
@interface WacomDevice : NSObject <NSCopying>This class is a representation of a stylus that shows information such as name and serial number.

getMacAddress

Syntax

- (NSString *) getMacAddress

Return Value
Returns Bluetooth address.

getButtonCount

Syntax

- (uint) getButtonCount

Gets the count of the buttons on the stylus. This value can be used to loop through each button one-at-a-time.

Return Value
Button count of stylus.

getButtonStateWithButton

Syntax

- (WacomStylusButtonState) getButtonStateWithButton: (uint) button_I

Get whether the current stylus button is pressed or not.

ParameterTypeDescription
button_IuintThe button identifier.

Return Value
Returns the WacomStylusButtonState.

getMaximumPressure

Syntax

- (NSInteger) getMaximumPressure

The maximum pressure that can be supplied by the stylus. The range starts at 0.

Return Value
The maximum pressure of stylus.

getMinimumPressure

Syntax

- (NSInteger) getMinimumPressure

The minimum pressure that can be supplied by the stylus.

Return Value
Always returns 0.

getModel

Syntax

- (WacomDeviceModel) getModel

Return Value
The model enumeration value of WacomDeviceModel.

getName

Syntax

- (NSString *) getName

Return Value
Returns the stylus name.

getShortName

Syntax

- (NSString *) getShortName

Use this to return a shortened form of the name of the stylus.

Return Value
Returns either Wacom or Bamboo, depending on the stylus.

getManufacturerName

Syntax

- (NSString *) getManufacturerName

Use this to return the manufacturer of the device.

Return Value
Returns Wacom Co. Ltd.

getFirmwareVersion

Syntax

- (NSString *) getFirmwareVersion

Return Value
Returns the firmware version.

getSoftwareVersion

Syntax

- (NSString *) getSoftwareVersion

Return Value
Returns the software version.

getESerialNumber

Syntax

- (NSString *) getESerialNumber

Return Value
Returns the string value of the e-serial number.

getPenID

Syntax

- (uint64_t) getPenID

Return Value
Returns the identifier of the stylus.

getUUIDAsNSString

Syntax

- (NSString *) getUUIDAsNSString

Return Value
Returns the UUID of the stylus.

printDeviceInfo

Syntax

- (void) printDeviceInfo

Prints out information about the stylus.

Return Value
Returns nothing.

isCurrentlyConnected

Syntax

- (BOOL) isCurrentlyConnected

Use this to return if the stylus selected by selectDevice is currently connected or not.

Return Value
Returns YES if the stylus is connected; otherwise NO.

getPeripheral

Syntax

- (CBPeripheral *) getPeripheral

Return Value
Returns CBPeripheral provided by the Core Bluetooth code.

The Stylus Button States

typedef enum
{
eButtonState_Invalid,
eButtonState_Down,
eButtonState_Up
} WacomStylusButtonState;

Stylus Models


typedef NS_ENUM(NSUInteger, WacomDeviceModel)
{
eNone,
eIntuosCreativeStylus,
eIntuosCreativeStylus2,
eBambooStylusFineline,
eBambooFineline2,
eBambooFineline
};

WacomStylus Event Class

Class InterfaceDescription
@interface WacomStylusEvent : NSNotification <NSCopying>This class supplies information about the events occurring to the stylus, such as pressure changes and button number information.

getType

Syntax

- (WacomStylusEventType) getType

Get the type of event that is occurring to the stylus.

Return Value
Returns a WacomStylusEventType.

getPressure

Syntax

- (CGFloat) getPressure

Get the stylus tip pressure.

Return Value
Returns the pressure .

getButton

Syntax

- (unsigned long) getButton

Use this to get stylus button number when either eStylusEventType_ButtonPressed or eStylusEventType_ButtonReleased occurs.

Return Value
Stylus button identifier.

getBatteryLevel

Syntax

(unsigned long) getBatteryLevel

Use this to obtain information about how much battery life remains in the stylus.

Return Value
The percent of remaining battery life.

getMACAddress

Syntax

- (NSString *) getMACAddress

Return Value
Returns the MAC address of the stylus.

getFirmwareVersion

Syntax

- (NSString *) getFirmwareVersion

Return Value
Returns the firmware version of the stylus.

getName

Syntax

- (NSString *) getName

Return Value
Returns the device name of the stylus.

getManufacturer

Syntax

- (NSString *) getManufacturer

Return Value
Returns the manufacturer of the stylus.

getSoftwareVersion

Syntax

- (NSString *) getSoftwareVersion

Return Value
Returns the software version of the stylus.

getESerialNumber

Syntax

- (NSString *) getESerialNumber

Return Value
Returns the e-serial number of the stylus.

Stylus Event Types

{
eStylusEventType_PressureChange,
eStylusEventType_ButtonPressed = 1,
eStylusEventType_ButtonReleased = 2,
eStylusEventType_BatteryLevelChanged = 3,
eStylusEventType_MACAddressAvaiable = 4,
eStylusEventType_NameUpdated = 5,
eStylusEventType_ManufacturerUpdated = 6,
eStylusEventType_FirmwareVersionUpdated = 7,
eStylusEventType_SoftwareVersionUpdated = 8,
eStylusEventType_ESerialNumberUpdated = 9
} WacomStylusEventType

TouchManager Class

Class InterfaceDescription
@interface TouchManager : NSObjectThe TouchManager is a singleton that acts as a container for TrackedTouches so you can query them. It also provides information that supports touch rejection.

theStylusTouch

Syntax

@property (readonly) TrackedTouch* theStylusTouch

Provides access to the TrackedTouch class.

Return Value
Pointer to the TrackedTouch.

Note: If the pointer returns null, then the stylus has not been identified yet.

touchRejectionEnabled

Syntax

@property (readwrite) BOOL touchRejectionEnabled

Enable or disable touch rejection.

Return Value
Returns Nothing.

filteringEnabled

Syntax

@property (readwrite) BOOL filteringEnabled

Use this to enable or disable touch point filtering. Filtering corrects inaccuracies in raw touch data. This is enabled by default.

Important: This is not supported on iPhones.

Return Value
Returns Nothing.

GetTouchManager

Syntax

+ (TouchManager *) GetTouchManager

Return Value
Returns a pointer to the TouchManager.

count

Syntax

- (NSUInteger) count

Return Value
Returns the number of TrackedTouches contained in the TouchManager.

addTouches

Syntax

- (void) addTouches: (NSSet *)touches_I view:(UIView *)view_I event:(UIEvent *)event_I

Use this to take touches from touchesBegan and add them to the list of TrackedTouches so that they can be tracked. You can register the UIView and addTouches will be handled by the SDK.

ParameterTypeDescription
touches_INSSet *A collection of UITouch.
view_IUIView *The view where the touch occurs.
event_IUIEvent *The event that has occurred.

Return Value
Returns nothing.

moveTouches

Syntax

- (void) moveTouches : (NSSet *)touches_I view:(UIView *)view_I event:(UIEvent *)event_I

Use this to take touches from touchesMoved and add them to the list of TrackedTouches, if necessary, so they can be tracked. The existing touch entries are updated with current and previous location information. You can register the UIView and moveTouches will be handled by the SDK.

ParameterTypeDescription
touches_INSSet *A collection of UITouch.
view_IUIView *The view where the touch occurs.
event_IUIEvent *The event that has occurred.

Return Value
Returns nothing.

removeTouches

Syntax

- (void) removeTouches : (NSSet *)touches_I view:(UIView *)view_I event:(UIEvent *)event_I

Use this to take touches from touchesEnded and remove them from the list of TrackedTouches. You can register the UIView and removeTouches will be handled by the SDK.

ParameterTypeDescription
touches_INSSet *A collection of UITouch.
view_IUIView *The view where the touch occurs.
event_IUIEvent *The event that has occurred.

Return Value
Returns nothing.

getTouches

Syntax

- (NSArray * ) getTouches

Return Value
Returns UITouch information. The information is different depending on whether touch rejection is enabled or not.

getTrackedTouches

Syntax

- (NSArray * ) getTrackedTouches

Return Value
Returns all TrackedTouches.

clearTouches

Syntax

- (void) clearTouches

Use this to clear TrackedTouches in the TouchManager.

Important: Use this if you need to clear TrackedTouches because of a dead zone, such as after a page turn. Do not use this otherwise, as it erases current UITouches from the TouchManager.

Return Value
Returns nothing.

setHandedness

Syntax

- (void) setHandedness : ( ehandedness)handedness

Sets the hand position that the user selected in your app. This information is used by the SDK for tip offset and touch rejection.

ParameterTypeDescription
handednessehandednessThe hand postion.

Return Value
Returns nothing.

getHandedness

Syntax

- (ehandedness)  getHandedness

Return Value
Returns which hand position the user selected.

registerView

Syntax

- (void)  registerView : (UIView*)view

Use this to automatically handle adding, moving, and removing touches from the UIView in the TouchManager.

ParameterTypeDescription
viewUIView*The pointer to the view that receives the UITouch events.

Return Value
Returns nothing.

unregisterView

Syntax

- (void)  unregisterView

If you are experiencing issues with TrackedTouches, use this to unregister the UIView from the TouchManager.

Return Value
Returns nothing.

TrackedTouch Class

Class InterfaceDescription
@interface TrackedTouch : NSObjectTrackedTouch contains a pointer to UITouch and holds corrected touch data for touch rejection.

WacomStylusEventCallback Protocol

Enables callbacks when the TouchManager receives an event from the stylus such as pressure change or button state change.

@protocol WacomStylusEventCallback <NSObject>
@required
- (void)stylusEvent:(WacomStylusEvent *)stylusEvent

WacomDiscoveryCallback Protocol

Notifies you when stylus products are discovered, connected, or disconnected and when Bluetooth is turned off.

@protocol WacomDiscoveryCallback <NSObject>
@required
Notifies that a stylus has been discovered.
- (void)deviceDiscovered:(WacomDevice *)device
Notifies that Bluetooth is turned off.
- (void)discoveryStatePoweredOff

@optional
Notifies that a stylus has been connected.
- (void)deviceConnected:(WacomDevice *)device

Notifies that a stylus has been disconnected.
- (void)deviceDisconnected:(WacomDevice *)device

currentLocation

Syntax

@property (readwrite) CGPoint currentLocation

Return Value
Returns the current location of the TrackedTouch.

previousLocation

Syntax

@property (readwrite) CGPoint previousLocation

Return Value
Returns the previous location of the TrackedTouch.

currentTouchLocation

Syntax

@property (readwrite) CGPoint currentTouchLocation

Return Value
Returns the current location of the UITouch.

previousTouchLocation

Syntax

@property (readwrite) CGPoint previousTouchLocation

Return Value
Returns the previous location of the UITouch.

associatedTouch

Syntax

@property (readwrite) UITouch * associatedTouch

Return Value
Provides access to the UITouch that is currently being tracked.

isStylus

Syntax

-(BOOL) isStylus

Return Value
Returns YES if a touch is a stylus touch; otherwise NO.

isRejected

Syntax

-(BOOL) isRejected

If touch rejection is enabled, use this to return if a touch has been rejected by the touch rejection algorithms included in the SDK.

Return Value
Returns YES if the is rejected; otherwise NO.

getCoalescedTrackedTouches

Syntax

-(NSArray *) getCoalescedTrackedTouches

Return Value
Returns coalesced tracked touch information

Hand Positions

typedef enum
{
eh_Unknown,
eh_Right,
eh_Left,
eh_RightUpward,
eh_RightDownward,
eh_LeftUpward,
eh_LeftDownward
} ehandedness;