Lines Matching defs:event

46 	and then forwarded to the actual target of the event, a client window
48 You cannot set the target of an event directly - the event filters need
50 The event loop will make sure that every target and interested listener
51 will get the event - it also delivers mouse moved events to the previous
60 view(s). This makes it possible to send every event only once, no
180 // we still need this event
236 BLocker("event dispatcher"),
266 ETRACE(("event dispatcher: stream = %p\n", stream));
313 fThread = spawn_thread(_event_looper, "event loop",
319 ETRACE(("event stream supports cursor thread!\n"));
356 \brief Adds the specified listener or updates its event mask and options
359 It follows the BView semantics in that specifiying an event mask of zero
360 leaves the event mask untouched and just updates the options.
378 // we already have this target, update its event mask
754 BMessage* event;
755 while (fStream->GetNextEvent(&event)) {
765 switch (event->what) {
767 _SendFakeMouseMoved(event);
772 if (event->FindPoint("where", &where) == B_OK)
776 event->AddMessage("be:drag_message", &fDragMessage);
790 // latest mouse moved event in the queue only
793 else if (fNextLatestMouseMoved != event) {
797 if (event->FindInt64("when", &eventTime) == B_OK) {
810 if (event->what != B_MOUSE_MOVED)
811 printf("mouse up/down event, previous target = %p\n", fPreviousMouseTarget);
820 if (fMouseFilter->Filter(event, &mouseTarget, &viewToken,
823 // event is filtered out
824 if (event->what == B_MOUSE_UP
825 && event->FindInt32("buttons") == 0) {
833 if (event->FindInt32("buttons", &buttons) == B_OK)
840 event->RemoveName("where");
841 event->AddPoint("screen_where", fLastCursorPosition);
843 if (event->what == B_MOUSE_MOVED
848 addedTokens = _AddTokens(event, fPreviousMouseTarget,
851 _SetFeedFocus(event);
853 _SendMessage(fPreviousMouseTarget->Messenger(), event,
862 addedTokens |= _AddTokens(event, current, B_POINTER_EVENTS,
868 event->AddInt32("_view_token", viewToken);
871 _SetFeedFocus(event);
878 _SendMessage(current->Messenger(), event,
879 event->what == B_MOUSE_MOVED
891 ETRACE(("key event, focus = %p\n", fFocus));
894 && fKeyboardFilter->Filter(event, &fFocus)
901 if (fFocus != NULL && _AddTokens(event, fFocus,
904 // focus in the event - if not, the event is simply not
909 _SetFeedFocus(event);
916 // focus messages that go through the event dispatcher can
918 if (event->what == B_MOUSE_WHEEL_CHANGED)
924 _SendMessage(current->Messenger(), event,
931 // send the event to the additional listeners
934 _RemoveTokens(event);
935 _UnsetFeedFocus(event);
940 event->RemoveName("_view_token");
946 // We already sent the event to the all focus and last focus
951 // Don't send the message if there are no tokens for this event
952 if (!_AddTokens(event, target,
954 event->what == B_MOUSE_MOVED
958 if (!_SendMessage(target->Messenger(), event,
959 event->what == B_MOUSE_MOVED
966 if (event->what == B_MOUSE_UP && fLastButtons == 0) {
975 if (fNextLatestMouseMoved == event)
977 delete event;
1028 ETRACE(("Start event loop\n"));