File:  [Apple XNU] / XNU / iokit / Families / IOHIDSystem / IOHITabletPointer.cpp
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:44:57 2018 UTC (8 years, 2 months ago) by root
Branches: MAIN, Apple
CVS tags: v68_4-1_1, HEAD
xnu-68.4-1.1

#include <IOKit/hidsystem/IOHITabletPointer.h>

OSDefineMetaClassAndStructors(IOHITabletPointer, IOHIDevice)

UInt16 IOHITabletPointer::generateDeviceID()
{
    static _nextDeviceID = 0;
    return _nextDeviceID++;
}

bool IOHITabletPointer::init( OSDictionary *propTable )
{
    if (!IOHIDevice::init(propTable)) {
        return false;
    }

    _deviceID = generateDeviceID();
    setProperty(kIOHITabletPointerDeviceID, (unsigned long long)_deviceID, 16);

    return true;
}

bool IOService::attach( IOService * provider )
{
    if (!IOHIDevice::attach(provider)) {
        return false;
    }

    _tablet = OSDynamicCast(IOHITablet, provider);

    return true;
}

void IOHITabletPointer::dispatchTabletEvent(NXEventData *tabletEvent,
                                            AbsoluteTime ts)
{
    if (_tablet) {
        _tablet->dispatchTabletEvent(tabletEvent, ts);
    }
}

void IOHITabletPointer::dispatchProximityEvent(NXEventData *proximityEvent,
                                               AbsoluteTime ts)
{
    if (_tablet) {
        _tablet->dispatchProximityEvent(proximityEvent, ts);
    }
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.