Lines Matching defs:event

182     RawEvent* event = buffer;
210 event += CollectEvent(event, capacity, device, readBuffer, count);
217 DHLOGI("Removing device %{public}s due to epoll hang-up event.", device->identifier.name.c_str());
221 return event - buffer;
245 void InputHub::MatchAndDealEvent(Device *device, const RawEvent &event)
250 DealNormalKeyEvent(device, event);
253 DealTouchPadEvent(event);
257 void InputHub::DealTouchPadEvent(const RawEvent &event)
259 auto ret = DInputSinkState::GetInstance().GetTouchPadEventFragMgr()->PushEvent(event.descriptor, event);
265 void InputHub::DealNormalKeyEvent(Device *device, const RawEvent &event)
267 if (event.type == EV_KEY && event.value == KEY_DOWN_STATE) {
268 DInputSinkState::GetInstance().AddKeyDownState(event);
269 RecordChangeEventLog(event);
271 if (event.type == EV_KEY && event.value == KEY_UP_STATE) {
273 if (IsCuror(device) && event.code == BTN_MOUSE &&
274 !DInputSinkState::GetInstance().IsDhIdDown(event.descriptor)) {
276 GetAnonyString(event.descriptor).c_str());
277 DInputSinkState::GetInstance().SimulateMouseBtnMouseUpState(event.descriptor, event);
279 DInputSinkState::GetInstance().RemoveKeyDownState(event);
280 RecordChangeEventLog(event);
282 if (event.type == EV_KEY && event.value == KEY_REPEAT) {
283 DInputSinkState::GetInstance().CheckAndSetLongPressedKeyOrder(event);
298 RawEvent event;
299 event.when = ProcessEventTimestamp(iev);
300 event.type = iev.type;
301 event.code = iev.code;
302 event.value = iev.value;
303 event.path = device->path;
304 event.descriptor = isTouchEvent ? touchDescriptor : device->identifier.descriptor;
305 MatchAndDealEvent(device, event);
321 RawEvent* event = buffer;
327 event->when = ProcessEventTimestamp(iev);
328 event->type = iev.type;
329 event->code = iev.code;
330 event->value = iev.value;
331 event->path = device->path;
332 event->descriptor = isTouchEvent ? touchDescriptor : device->identifier.descriptor;
333 RecordEventLog(event);
334 event += 1;
340 return event - buffer;
348 DHLOGE("could not get event, removed? (fd: %{public}d size: %{public}d, errno: %{public}d)\n",
353 DHLOGW("could not get event (errno=%{public}d)", errno);
356 DHLOGW("could not get event (wrong size: %{public}d)", readSize);
366 InputDeviceEvent* event = buffer;
375 event->type = DeviceType::DEVICE_REMOVED;
376 event->deviceInfo = device->identifier;
377 event += 1;
398 event->type = DeviceType::DEVICE_ADDED;
399 event->deviceInfo = device->identifier;
400 event += 1;
413 return event - buffer;
462 DHLOGI("Received unexpected epoll event 0x%08x for INotify.", eventItem.events);
470 DHLOGE("Received unexpected epoll event 0x%{public}08x for unknown fd %{public}d.",
474 DHLOGI("Removing device %{public}s due to epoll hang-up event.", device->identifier.name.c_str());
709 DHLOGI("Get MSC event: %{public}d", msc);
721 DHLOGI("Get LED event: %{public}d", led);
734 DHLOGI("Get Switch event: %{public}d", sw);
747 DHLOGI("Get Repeat event: %{public}d", rep);
1080 struct inotify_event *event;
1084 if (res < sizeof(*event)) {
1088 DHLOGE("could not get event, %{public}s\n", ConvertErrNo().c_str());
1095 while (res >= sizeof(*event) && eventPos < static_cast<size_t>(EVENT_BUFFER_MAX)) {
1096 event = reinterpret_cast<struct inotify_event *>(eventBuf + eventPos);
1097 JudgeDeviceOpenOrClose(*event);
1098 eventSize = sizeof(*event) + event->len;
1106 void InputHub::JudgeDeviceOpenOrClose(const inotify_event &event)
1108 if (event.len) {
1109 if (event.wd == inputWd_) {
1110 std::string filename = std::string(DEVICE_PATH) + "/" + event.name;
1111 if (event.mask & IN_CREATE) {
1114 DHLOGI("Removing device '%{public}s' due to inotify event\n", filename.c_str());
1118 DHLOGI("Unexpected inotify event, wd = %i", event.wd);
1187 int64_t InputHub::ProcessEventTimestamp(const input_event &event)
1189 const int64_t inputEventTime = event.input_event_sec * 1000000000LL + event.input_event_usec * 1000LL;
1381 void InputHub::RecordChangeEventLog(const RawEvent &event)
1384 switch (event.type) {
1398 eventType = "other type " + std::to_string(event.type);
1401 DHLOGI("0.E2E-Test Sink collect change event, EventType: %{public}s, Code: %{public}d, Value: %{public}d, "
1402 "Path: %{public}s, descriptor: %{public}s, When: %{public}" PRId64 "", eventType.c_str(), event.code,
1403 event.value, event.path.c_str(), GetAnonyString(event.descriptor).c_str(), event.when);
1406 void InputHub::RecordEventLog(const RawEvent *event)
1409 switch (event->type) {
1423 eventType = "other type " + std::to_string(event->type);
1426 DHLOGD("1.E2E-Test Sink collect event, EventType: %{public}s, Code: %{public}d, Value: %{public}d, "
1427 "Path: %{public}s, descriptor: %{public}s, When: %{public}" PRId64 "", eventType.c_str(), event->code,
1428 event->value, event->path.c_str(), GetAnonyString(event->descriptor).c_str(), event->when);
1523 struct RawEvent event = {
1530 DInputSinkState::GetInstance().AddKeyDownState(event);
1583 // If device is a touchscreen or touchpad, record the touch event.
1646 DHLOGI("Ctor Device for get event mask, fd: %{public}d, path: %{public}s", fd, path.c_str());