Ejemplo n.º 1
0
void IOHIDElement_SetDoubleProperty(IOHIDElementRef inIOHIDElementRef, CFStringRef inKey, double inValue) {
	CFNumberRef tCFNumberRef = CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &inValue);
	if (tCFNumberRef) {
		IOHIDElementSetProperty(inIOHIDElementRef, inKey, tCFNumberRef);
		CFRelease(tCFNumberRef);
	}
} // IOHIDElement_SetDoubleProperty
Ejemplo n.º 2
0
void IOHIDElement_SetUInt32Property(IOHIDElementRef inIOHIDElementRef, CFStringRef inKey, uint32_t inValue) {
	CFNumberRef tCFNumberRef = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &inValue);
	if (tCFNumberRef) {
		IOHIDElementSetProperty(inIOHIDElementRef, inKey, tCFNumberRef);
		CFRelease(tCFNumberRef);
	}
} // IOHIDElement_SetUInt32Property
Ejemplo n.º 3
0
void IOHIDElement_SetLongProperty( IOHIDElementRef inElementRef, CFStringRef inKey, long inValue )
{
	CFNumberRef tCFNumberRef = CFNumberCreate( kCFAllocatorDefault, kCFNumberSInt64Type, &inValue );

	if ( tCFNumberRef ) {
		IOHIDElementSetProperty( inElementRef, inKey, tCFNumberRef );
		CFRelease( tCFNumberRef );
	}
}