• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/IOHIDFamily-606.1.7/IOHIDSystem/

Lines Matching refs:event

197 #define TICKLE_DISPLAY(event) \
200 IOHID_DEBUG(kIOHIDDebugCode_DisplayTickle, event, __LINE__, 0, 0); \
201 if (!DISPLAY_IS_ENABLED) kprintf("IOHIDSystem tickle when screen off for event %d at line %d\n", (int)event, __LINE__); \
202 displayManager->activityTickle(IOHID_DEBUG_CODE(event)); \
473 // events, CG infers that this event comes from the default keyboard,
566 } event;
2081 evg->lleq[i].event.type = 0;
2082 AbsoluteTime_to_scalar(&evg->lleq[i].event.time) = 0;
2083 evg->lleq[i].event.flags = 0;
2099 // Set the event port. The event port is both an ownership token
2146 // RY: Added this check so that the event consumer
2148 // Otherwise the event consumer will never get a
2214 void IOHIDSystem::dispatchEvent(IOHIDEvent *event, IOOptionBits options __unused)
2216 if ( !event || !dataQueueSet)
2226 dataQueue->enqueueEvent(event);
2311 // This routine actually places events in the event queue which is in
2342 // dispatch new event
2345 IOHIDEvent * event = IOHIDEvent::withEventData(ts, what, myData);
2346 if ( event ) {
2347 dispatchEvent(event);
2348 event->release();
2364 && (theLast->event.type == what)
2368 theLast->event.location.x = location->xValue().as64();
2369 theLast->event.location.y = location->yValue().as64();
2370 absolutetime_to_nanoseconds(ts, &theLast->event.time);
2372 theLast->event.data = *myData;
2376 /* store event in tail */
2377 theTail->event.type = what;
2378 // <rdar://problem/12682920> Task: Switch event.service_id to use registry ID
2379 // theTail->event.service_id = (uintptr_t)sender;
2380 theTail->event.service_id = 0;
2384 theTail->event.service_id = altSender->unsigned64BitValue();
2389 theTail->event.service_id = (uintptr_t)entry->getRegistryEntryID();
2392 theTail->event.service_id = getRegistryEntryID();
2397 theTail->event.service_id = getRegistryEntryID();
2399 theTail->event.ext_pid = extPID;
2400 theTail->event.location.x = location->xValue().as64();
2401 theTail->event.location.y = location->yValue().as64();
2402 theTail->event.flags = evg->eventFlags;
2403 absolutetime_to_nanoseconds(ts, &theLast->event.time);
2404 theTail->event.window = 0;
2407 theTail->event.data = *myData;
2411 theTail->event.data.mouse.eventNum =
2415 theTail->event.data.mouse.eventNum =
2419 theTail->event.data.mouse.eventNum = leftENum;
2425 theTail->event.data.mouse.eventNum = rightENum;
2435 IOLog("%s: postEvent unknown pressure event, cannot fill pressure.\n", registryName);
2446 theTail->event.data.mouse.click = ++clickState;
2449 theTail->event.data.mouse.click = clickState;
2456 theTail->event.data.mouse.click = clickState;
2459 theTail->event.data.mouse.click = 0;
2470 if ( ! wereEvents ) // Events available, so wake event consumer
2475 * if queue is full, ignore event, too hard to take care of all cases
2499 * Try to send a message out to let the event consumer know that
2593 * Note that we perform a non-blocking send. The Event port in the event
2595 * message, it runs until the event queue is exhausted before trying to read
2599 * the event driver.
2649 // we have an event scheduled in the next MS. Do not reschedule.
2712 // do not schedule the event too soon.
2751 clock_get_uptime(&_periodicEventLast); // update last event
2752 _periodicEventNext = kIOHIDSystenDistantFuture; // currently no next event
2968 // API used to drive event state out to attached screens
2988 // Attach the default event sources.
3012 // Detach all event sources
3124 kprintf("IOHIDSystem tickle when screen off for event %ld\n", nxEvent);
3135 kprintf("IOHIDSystem tickle when screen off for hardware event from %08llx\n",
3142 IOLog("kIOHIDSystemActivityTickle message for unsupported event %ld sent from %08llx\n",
3428 // either we are not posting currently or this event is overdue.
3583 // initialize the proximity and tablet event structs
3613 // when handling a button event. Unfortunately,
3977 // if there is phase, we will allow this event to go through
4260 // Don't dispatch an event if they can be embedded in pointing events
4429 keyboardEQElement->event.keyboard.eventType = eventType;
4430 keyboardEQElement->event.keyboard.flags = flags;
4431 keyboardEQElement->event.keyboard.key = key;
4432 keyboardEQElement->event.keyboard.charCode = charCode;
4433 keyboardEQElement->event.keyboard.charSet = charSet;
4434 keyboardEQElement->event.keyboard.origCharCode = origCharCode;
4435 keyboardEQElement->event.keyboard.origCharSet = origCharSet;
4436 keyboardEQElement->event.keyboard.keyboardType = keyboardType;
4437 keyboardEQElement->event.keyboard.repeat = repeat;
4454 unsigned eventType = keyboardEQElement->event.keyboard.eventType;
4455 unsigned flags = keyboardEQElement->event.keyboard.flags;
4456 unsigned key = keyboardEQElement->event.keyboard.key;
4457 unsigned charCode = keyboardEQElement->event.keyboard.charCode;
4458 unsigned charSet = keyboardEQElement->event.keyboard.charSet;
4459 unsigned origCharCode = keyboardEQElement->event.keyboard.origCharCode;
4460 unsigned origCharSet = keyboardEQElement->event.keyboard.origCharSet;
4461 unsigned keyboardType = keyboardEQElement->event.keyboard.keyboardType;
4462 bool repeat = keyboardEQElement->event.keyboard.repeat;
4471 * key down event was consumed and its corresponding key up must be consumed.
4535 /* If we get a key up event, check the consumedKeys array to see if it
4548 * wakes the machine from posting event. Second, we want to consume any key
4597 IOLog("IOHIDSystem posted stackshot event 0x%02x\n", (unsigned)keycode);
4603 /* If the display is off, we consume a key down event and send a tickle to
4739 keyboardEQElement->event.keyboardSpecial.eventType = eventType;
4740 keyboardEQElement->event.keyboardSpecial.flags = flags;
4741 keyboardEQElement->event.keyboardSpecial.key = key;
4742 keyboardEQElement->event.keyboardSpecial.flavor = flavor;
4743 keyboardEQElement->event.keyboardSpecial.guid = guid;
4744 keyboardEQElement->event.keyboardSpecial.repeat = repeat;
4762 unsigned eventType = keyboardEQElement->event.keyboardSpecial.eventType;
4763 unsigned flags = keyboardEQElement->event.keyboardSpecial.flags;
4764 unsigned key = keyboardEQElement->event.keyboardSpecial.key;
4765 unsigned flavor = keyboardEQElement->event.keyboardSpecial.flavor;
4766 UInt64 guid = keyboardEQElement->event.keyboardSpecial.guid;
4767 bool repeat = keyboardEQElement->event.keyboardSpecial.repeat;
4775 /* event */ unsigned eventType,
4813 // clear event record
4820 // was this a keydown event
4842 // Post a power key event, Classic should pick this up and
4865 // Post the sleep now event. Someone else will handle the actual call.
4884 // Post the shutdown now event. Someone else will handle the actual call.
4904 // Post the Restart now event. Someone else will handle the actual call.
4923 // Set the event flags to zero, because the system will not do the right
4924 // thing if we don't zero this out (it will ignore the power key event
4929 // Post the power keydown event.
4944 // system defined eject event. This way we can have anyone who's watching
4945 // for this event (aka LoginWindow) route this event to the right target
4950 // Post the eject keydown event.
4965 // first issue a power key down event
4977 // Now the special event
5053 if ( level != -1 ) // An interesting special key event occurred
5063 * Update current event flags. Restricted to keyboard flags only, this
5066 * a flags-changed event for such keys. This method is also used to clear
5095 keyboardEQElement->event.flagsChanged.flags = flags;
5110 unsigned flags = keyboardEQElement->event.flagsChanged.flags;
5166 // Magic uber-mouse buttons changed event so we can get all of the buttons...
5170 /* I'd like to keep the event button mapping linear, so
5189 // End Magic uber-mouse buttons changed event
5197 // into a button event. Prior to this we were sending null data to
5198 // post event. This won't be much different as the only non-zero
5199 // contents should be the tablet area of the event.
5231 // After entering initial up/down event, set up
5263 // mouse moved/dragged events are generated using the given event mask,
5264 // and a mouse-exited event may be generated. The cursor image is
5290 // relative pointer device routines, or on a timed event callback.
5572 // into the mouseMove event.
5890 struct evioLLEvent * event = (struct evioLLEvent *)p1;
5898 UInt32 typeMask = EventCodeMask(event->type);
5903 IOHID_DEBUG(kIOHIDDebugCode_ExtPostEvent, event->type, *(UInt32*)&(event->location), event->setFlags, event->flags);
5906 if (event->type != NX_NULLEVENT && mac_iokit_check_hid_control(kauth_cred_get()))
5914 TICKLE_DISPLAY(event->type);
5925 TICKLE_DISPLAY(event->type);
5930 TICKLE_DISPLAY(event->type);
5937 // We have mouse move event without a specified pressure value and an embedded tablet event
5939 if ((event->data.mouseMove.subType == NX_SUBTYPE_TABLET_POINT) && (event->data.mouseMove.reserved1 == 0))
5941 event->data.mouseMove.reserved1 = ScalePressure(event->data.mouseMove.tablet.point.pressure);
5944 // We have mouse event without a specified pressure value and an embedded tablet event
5947 (event->data.mouse.subType == NX_SUBTYPE_TABLET_POINT) && (event->data.mouse.pressure == 0))
5949 event->data.mouse.pressure = ScalePressure(event->data.mouse.tablet.point.pressure);
5952 if( event->setCursor)
5955 // mouse moved events if this event is itself a mouse move event
5963 if (( event->type == NX_MOUSEMOVED ) &&
5964 ( event->setCursor & kIOHIDSetRelativeCursorPosition ))
5967 move.x = (event->data.mouseMove.dx * 256);
5968 move.y = (event->data.mouseMove.dy * 256);
5979 else if ( event->setCursor & kIOHIDSetCursorPosition )
5981 setCursorPosition(&event->location, false);
5988 // RY: This event is not moving the cursor, but we should
6012 event->location.x = (event->location.x < cursorPin.minx) ?
6013 cursorPin.minx : ((event->location.x > cursorPin.maxx) ?
6014 cursorPin.maxx : event->location.x);
6015 event->location.y = (event->location.y < cursorPin.miny) ?
6016 cursorPin.miny : ((event->location.y > cursorPin.maxy) ?
6017 cursorPin.maxy : event->location.y);
6022 ((event->type == NX_SYSDEFINED) && (event->data.compound.subType == NX_SUBTYPE_AUX_MOUSE_BUTTONS)))
6028 switch ( event->type )
6043 CONVERT_HW_TO_WV_BUTTONS(event->data.compound.misc.L[1], buttonState);
6051 if( event->setFlags & kIOHIDSetGlobalEventFlags)
6054 | (event->flags & KEYBOARD_FLAGSMASK);
6057 if ( event->setFlags & kIOHIDPostHIDManagerEvent )
6069 dx = event->data.mouseMove.dx;
6070 dy = event->data.mouseMove.dy;
6072 else if ( event->type == NX_SCROLLWHEELMOVED )
6074 wheel = event->data.scrollWheel.deltaAxis1;
6091 if ((event->type != NX_FLAGSCHANGED) && (event->data.key.repeat == 0))
6093 _hidKeyboardDevice->postKeyboardEvent(event->data.key.keyCode, (event->type == NX_KEYDOWN));
6102 postEvent( event->type,
6105 /* withData */ &event->data,
6971 struct evioLLEvent event;
6973 // clear event record
6974 bzero( (void *)&event, sizeof event);
6976 event.data.compound.subType = NX_SUBTYPE_HIDPARAMETER_MODIFIED;
6978 postEvent(NX_SYSDEFINED, &_cursorHelper.desktopLocation(), ts, &(event.data));