组合 OCC 和 Apple 事件
如何关闭光标移动?
使用上下文路由表为属性pContextMovesSystemCursor发送布尔值。
我如何获得平板电脑的尺寸?
使用上下文路由表从驱动程序请求 pTabletSize。ScribbleDemo - 入门文档有一个如何执行此操作的示例。
如何获取驱动程序的版本?
以下代码是如何查询驱动程序版本的示例:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
typedef enum : unsigned char
{
EUnknownVersion = 0,
EAlphaVersion,
EBetaVersion,
EWebVersion,
EDevelopmentVersion,
EFinalVersion
} ERELEASE;
struct FileVersion
{
uint8 major_I;
uint8 minor_I;
uint8 variation_I;
ERELEASE release_I;
uint8 build_I;
};
struct FileVersion *theVersion = NULL;
NSAppleEventDescriptor *version = [WacomTabletDriver dataForAttribute:pVersion
ofType:typeVersion
routingTable:[WacomTabletDriver routingTableForDriver]];
NSData *verData = [version data];
theVersion = (struct FileVersion*)[verData bytes];
if (theVersion)
{
NSString *verString = [NSString stringWithFormat:@"%d.%d.%d", theVersion->major_I,
theVersion->minor_I, theVersion->variation_I];
[driverVersion setStringValue:verString];
}
}