void ListHookedConsumer::disableNumLock(void) { IOLockWrapper::ScopedLock lk(list_lock_); if (! lk) return; ListHookedConsumer::Item* p = static_cast<ListHookedConsumer::Item*>(get_replaced_nolock()); if (p) { p->disableNumLock(); } }
void ListHookedPointing::apply(const Params_ScrollWheelEventCallback& params) { IOLockWrapper::ScopedLock lk(list_lock_); if (! lk) return; ListHookedPointing::Item* p = static_cast<ListHookedPointing::Item*>(get_replaced_nolock()); if (p) { p->apply(params); } }
void ListHookedConsumer::apply(const Params_KeyboardSpecialEventCallback& params) { IOLockWrapper::ScopedLock lk(list_lock_); if (! lk) return; ListHookedConsumer::Item* p = static_cast<ListHookedConsumer::Item*>(get_replaced_nolock()); if (p) { p->apply(params); } }
void ListHookedPointing::apply(const Params_RelativePointerEventCallback& params) { IOLockWrapper::ScopedLock lk(list_lock_); if (! lk) return; // if all button are released, send event for all devices. if (params.buttons == Buttons(0) && params.dx == 0 && params.dy == 0) { for (Item* p = static_cast<Item*>(list_->front()); p; p = static_cast<Item*>(p->getnext())) { if (! p->isReplaced()) continue; p->apply(params); } } else { ListHookedPointing::Item* p = static_cast<ListHookedPointing::Item*>(get_replaced_nolock()); if (p) { p->apply(params); } } }