Reference
Context Management
createContextForTablet:type
Syntax
+ (UInt32) createContextForTablet:(UInt32)index type:(AEContextType)contextType
This function requests the driver create a context for a tablet.
Parameter | Type | Description |
---|---|---|
index | UInt32 | The index of the tablet of interest. |
contextType | AEContextType | How the context is initialized. |
Return Value
Returns a unique UInt32 value that represents the context created for the application or 0 in case of error.
Comments
An application needs to create a context before it can query or override functions of tablet controls.
See Also
Type definitions, AEContextType.
destroyContext
Syntax
+ (void)destroyContext:(UInt32)context
This function requests the driver delete a context created for a tablet.
Parameter | Type | Description |
---|---|---|
context | UInt32 | The context to be deleted. |
Return Value
None
Comments
An application must destroy the context it creates when it's done with the context or upon termination.
Get Data
dataForAttribute:ofType:routingTable:
Syntax
+ (NSAppleEventDescriptor*) dataForAttribute:(DescType)attribute ofType:(DescType)dataType routingTable:(NSAppleEventDescriptor *)routingDesc
Query for an attribute in the Wacom tablet driver.
Parameter | Type | Description |
---|---|---|
attribute | DescType | ID of an attribute exposed by some object in the driver (e.g. pName for tablet name). |
dataType | DescType | Type of data (e.g. typeUTF8Text for name). |
routingDesc | NSAppleEventDescriptor | How to find the object which contains the attribute in the driver object hierarchy. Pass the result of one of the +routingTableForXXX methods defined below. |
Return Value
Returns an autoreleased NSAppleEventDescriptor that contains the data for the attribute or nil in case of error.
Comments
In order to pick which attribute to get, you must supply an Apple Event routing table which directs this request within the driver's object hierarchy. A number of methods are defined in this class to create routing tables for various structures.
controlCountOfContext:forControlType:
Syntax
+ (UInt32) controlCountOfContext:(UInt32)context forControlType:(eAETabletControlType)controlType
This function requests the number of tablet controls of the specified type on a tablet.
Parameter | Type | Description |
---|---|---|
context | UInt32 | The context for the tablet of interest. |
contextType | AEContextType | How the context is initialized. |
Return Value
Returns the number of tablet controls of the specified type on a tablet.
See Also
createContextForTablet
AEContextType
eAETabletControlType
functionCountOfControl:ofContext:forControlType:
Syntax
+ (UInt32) functionCountOfControl:(UInt32)control ofContext:(UInt32)context forControlType:(eAETabletControlType)controlType
This function requests the number of functions for a specific tablet control.
Parameter | Type | Description |
---|---|---|
control | UInt32 | The index of the control of interest. |
context | UInt32 | The context for the tablet of interest |
controlType | eAETabletControl | Type Type of tablet control of interest. |
Return Value
Returns the number of functions for a specific tablet control.
See Also
eAETabletControlType
tabletCount
Syntax
+ (UInt32) tabletCount
This function requests the number of tablets.
Parameter | Type | Description |
---|---|---|
tablet | UInt32 | The index of the tablet of interest. |
Return Value
Returns the number of tablets.
Set Data
setBytes:ofSize:ofType:forAttribute:routingTable:
Syntax
+ (BOOL) setBytes:(void*)bytes ofSize:(UInt32)size ofType:(DescType)dataType forAttribute:(DescType)attribute routingTable:(NSAppleEventDescriptor *)routingDesc
This function sets the value of an attribute in the Wacom tablet driver.
Parameter | Type | Description |
---|---|---|
size | UInt32 | Number of bytes of the attribute data. |
dataType | DescType | Data type for the attribute of interest. |
attribute | DescType | Attribute ID. |
routingDesc | NSAppleEventDescriptor | How to get to the attribute. Pass the result of one of the +routingTableForXXX methods. |
Return Value
Returns a true on success.
Comments
In order to pick which attribute to set, you must supply an Apple Event routing table which directs this request within the driver's object hierarchy. A number of methods are defined in this class to create routing tables for various structures.
See Also
AEContextType
Raw Routing Tables
If you use the raw routing tables to set an attribute. That would change the GLOBAL tablet object, so the changes you make will affect ALL applications.
routingTableForDriver
Syntax
+ (NSAppleEventDescriptor *)routingTableForDriver
Request a routing table to send commands to the driver.
Return Value
Returns an autoreleased NSAppleEventDescriptor representing the tablet driver AppleEvent object.
routingTableForTablet
Syntax
+ (NSAppleEventDescriptor *) routingTableForTablet:(UInt32)tablet
Requests a routing table to send commands to the tablet object in the driver.
Parameter | Type | Description |
---|---|---|
tablet | UInt32 | tablet index, 1-relative |
Return Value
Returns an Apple Event descriptor which will send commands to the tablet object in the driver.
Comments
-
You should ALMOST NEVER use this routing table to set an attribute. That would change the GLOBAL tablet object, so the changes you make will affect ALL applications.
-
However, you may need this to get certain attributes.
routingTableForTablet:transducer
Syntax
+ (NSAppleEventDescriptor *) routingTableForTablet:(UInt32)tablet transducer:(UInt32)transducer
Requests a routing table to send commands to a transducer in the given tablet.
Parameter | Type | Description |
---|---|---|
tablet | UInt32 | tablet index, 1-relative |
transducer | UInt32 | transducer index, 1-relative |
Return Value
Returns an Apple Event descriptor which will send commands to a transducer in the given tablet.
Context-Based
-
You should always set attributes within a context, so that your settings do not affect other applications. (So these are the methods you generally want to use!)
-
These require you to have created a context with +createContextForTablet.
routingTableForContext
Syntax
+ (NSAppleEventDescriptor *) routingTableForContext:(UInt32)context
Requests a routing table to send commands to context object in the driver.
Parameter | Type | Description |
---|---|---|
context | UInt32 | ID of custom context created by +createContextForTablet:type: |
Return Value
Returns an Apple Event descriptor which will send commands to the context object in the driver.
Comments
Your application should create a context to issue set requests.
See Also
createContextForTablet
routingTableForContext:control:controlType:
Syntax
+ (NSAppleEventDescriptor *) routingTableForContext:(UInt32)context control:(UInt32)control controlType:(eAETabletControlType)controlType
Requests a routing table to send commands to a tablet control object in the driver.
Parameter | Type | Description |
---|---|---|
context | UInt32 | ID of custom context created by +createContextForTablet:type: |
control | ID of control to be targeted. | |
controlType | Type of control being targeted. |
Return Value
Returns an Apple Event descriptor which will send commands to a tablet control object in the driver.
Comments
Your application should create a context to issue set requests.
See Also
eAETabletControlType
routingTableForContext:control:function:forControlType
Syntax
+ (NSAppleEventDescriptor *) routingTableForContext:(UInt32)context control:(UInt32)control controlType:(eAETabletControlType)controlType function:(UInt32)function
Requests a routing table to send commands to a function of a tablet control object.
Parameter | Type | Description |
---|---|---|
Context | UInt32 | ID of custom context created by +createContextForTablet:type: |
control | UInt32 | ID of control to be targeted. |
controlType | eAETabletControlType | Type of control being targeted. |
function | UInt32 | Function index to be targeted. |
Return Value
Returns an Apple Event descriptor which will send commands to a function of a tablet control object in the driver.
Comments
Your application should create a context to issue set requests.
See Also
eAETabletControlType
Type Definitions
AEContextType
Label | Description |
---|---|
pContextTypeDefault | Tablet output areas are reset to full size, current transducers are acquired, the context is marked non-customizable (control panel mapping changes don't affect it), and the context is enabled. This is the appropriate type for applications which want to take over tablet mapping. |
pContextTypeBlank | The context is enabled, but the rest of the work done in creating a default context is skipped. This is appropriate for contexts which only customize buttons, and should still track other user changes in the control panel. |
eAETabletControlType
Cross-process notifications control type
Label | Description |
---|---|
eAETouchRing | TouchRing control |
eAETouchStrip | TouchStrip control |
eAEExpressKey | essKey control |
Properties
Driver Properties
Label | Type | Permission |
---|---|---|
pVersion | typeVersion | read only |
pRate | typeUInt16 | read only |
pTabletDriverPrefs | used with a save event | not applicable |
Tablet Properties
Label | Type | Permission |
---|---|---|
pVersion | typeVersion | read only |
pName | typeUTF8Text | read only |
pIsConnected | typeBoolean | read only |
pTabletModel | typeSInt16 | read only |
pXDimension | typeSInt32 | read only |
pYDimension | typeSInt32 | read only |
pResolution | typeSInt32 | read only |
pTabletSize | typeLongRectangle | read only |
pOrientation | typeEnumerated (eOrientation) | read/write |
pTiltLevels | typeSInt16 | read only |
Tablet Controls (TouchRing, ExpressKeys and TouchStrip)
Label | Type | Permission |
---|---|---|
pVersion | typeVersion | read only |
pFunctionAvailable | typeBoolean | read only |
pControlMinValue | typeUInt32 | read only |
pControlMaxValue | typeUInt32 | read only |
pControlLocation | typeUInt32 | read only |
pIconWidth | typeUInt32 | read only |
pIconPixelFormat | typeBoolean | read only |
pOverrideFlag | typeBoolean | read/write |
pOverrideName | typeUTF8Text | read/write |
pOverrideIcon | typeWTDData | write only |
Application Properties
Label | Type | Permission |
---|---|---|
pAppID | typeUInt32 (4 char code) | read only |
pAppName | typeUTF8Text} | read only |
Pen Properties
Label | Type | Permission |
---|---|---|
pName | typeUTF8Text | read only |
pTiltSens | typeSInt16 | read/write |
pClickAssist | typeBoolean | read/write |
pAssistDistance | typeUInt32 | read/write |
pAssistTime | typeUInt32 | read/write |
pType | typeUInt16 | read only |
pSerialNumber | typeUInt32 | read only |
pUniqueID | typeLongPoint | read only |
pPositioningMode | typeEnumerated (ePositioningMode) | read/write |
pMapScreenArea | typeQDRectangle | read/write |
pMapTabletArea | typeLongRectangle | read/write |
pMapDisplayNum | typeUInt32 | write only |
Button Properties
Label | Type | Permission |
---|---|---|
pName | typeUTF8Text | read only |
pButtonFunction | typeSInt32 | read only |
pPressLevels | typeSInt32 | read only |
pClickPressure | typeSInt16 | read/write |
pPressureSen | typeEnumerated (ePressureRange) | read/write |
pForceRange | typeSInt16 | read/write |
pForceMin | typeSInt16 | read/write |
pForceMax | typeSInt16 | read/write |
pButtonKeys | typeUTF8Text | read/write |
pButtonRun | typeUTF8Text | read/write |
pButtonModifiers | typeUInt32 | read/write |
Wheel Properties
Label | Type | Permission |
---|---|---|
pWheelFunction | typeEnumerated (eWheelFunction) | read/write |
pWheelReverseDirection | typeBoolean | read/write |
pWheelLinesPerNotch | typeSInt32 | read/write |
pWheelKeysUp | typeUTF8Text | read/write |
pWheelKeysDown | typeUTF8Text | read/write |
Roller Properties
Label | Type | Permission |
---|---|---|
pRollerFunction | ttypeEnumerated (eRollerFunction) | read/write |
pRollerSen | typeEnumerated (eRollerRange) | read/write |
pRollerReverseDirection | typeUTF8Text | read/write |
pRollerKeysDown | typeUTF8Text | read/write |
Menu Strip Properties
Label | Type | Permission |
---|---|---|
pName | typeUTF8Text | read only |
pMenuFunction | typeEnumerated (eMenuFunction) | read/write |
pMenuKeys | typeUTF8Text | read/write |
pMenuRun | typeUTF8Text | read/write |
Popup Menu Properties
Label | Type | Permission |
---|---|---|
pPopupFunction | typeEnumerated (ePopupFunction) | read/write |
pPopupKeys | typeUTF8Text | read/write |
pPopupRun | typeUTF8Text | read/write |
Enumerations
Tablet Orientation Enums
eOrientation
eOrientLandscape
eOrientPortrait
eOrientLandscapeFlipped
eOrientPortraitFlipped
Cursor Positioning Mode Enums
ePositioningMode
ePositioningAbsolute
ePositioningRelative
Tip Pressure Sensitivity Enums
ePressureRange
ePressureSoftest
ePressureSofter
ePressureSoft
ePressureNormal
ePressureFirm
ePressureFirmer
ePressureFirmest
Button Function Enums
eButtonFunction
eButtonFuncIgnore
eButtonLeftClick
eButtonMiddleClick
eButtonRightClick
eButtonLeftDoubleClick
eButtonMiddleDoubleClick
eButtonRightDoubleClick
eButtonLeftClickLock
eButtonKeystrokes
eButtonModifiers
eButtonPressureHold
eButtonModeToggle
eButtonMacro
eButtonScreenMacro
eButtonAutoErase
eButtonBumbleFree
eButtonEraseKeystroke
eButtonEraseModifier
eButtonEraseMacro
eButtonButton4Click
eButtonButton5Click
eButtonMiddleClickLock
eButtonRightClickLock
eButtonRunApplication
eButtonToggleInkAnywhere
eButtonDisplayToggle
eButtonPanScroll
eButtonBack
eButtonForward
eButtonShowDesktop
eButtonHelp
eButtonRadialMenu
eButtonFinePoint
Wheel Function Enums
eWheelFunction
eWheelLineScroll
eWheelPagecroll
eWheelKeyScroll
eWheelIgnored
Roller Function Enums
eRollerFunction
eRollerZAxis
eRollerPressure
eRollerScroll
eRoller15Button
eRollerKeyScroll
eRollerIgnored
Roller Sensitivity Range Enums
eRollerRange
eRangeMax
eRangeMed
eRangeMin
Tablet Menu Function Enums
eMenuFunction
eMenuFuncIgnored
eMenuKeystrokes
eMenuMacro
eMenuRunApplication
eMenuAbsolute
eMenuRelative
eMenuQuickPoint
eMenuToggleInkAnywhere
eMenuSoftPressure
eMenuNormalPressure
eMenuFirmPressure
Popup Menu Function Enums
ePopupFunction
ePopupKeystrokes
ePopupMacro
ePopupRunApplication
ePopupAbsolute
ePopupRelative