comparison src/events/SDL_mouse.c @ 1731:875c3cf1a12c SDL-1.3

SDL_PushEvent() calls the event filter code, and has a return value to tell whether or not the event was actually pushed. SDL_GetEventFilter() now returns an SDL_bool instead of the filter function.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 08 Jul 2006 20:07:08 +0000
parents 6c63fc2bd986
children fd65f12b6de6
comparison
equal deleted inserted replaced
1730:e70477157db9 1731:875c3cf1a12c
369 event.motion.x = mouse->x; 369 event.motion.x = mouse->x;
370 event.motion.y = mouse->y; 370 event.motion.y = mouse->y;
371 event.motion.xrel = xrel; 371 event.motion.xrel = xrel;
372 event.motion.yrel = yrel; 372 event.motion.yrel = yrel;
373 event.motion.windowID = mouse->focus; 373 event.motion.windowID = mouse->focus;
374 if ((SDL_EventOK == NULL) 374 posted = (SDL_PushEvent(&event) > 0);
375 || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
376 posted = 1;
377 SDL_PushEvent(&event);
378 }
379 } 375 }
380 return posted; 376 return posted;
381 } 377 }
382 378
383 int 379 int
423 event.button.state = state; 419 event.button.state = state;
424 event.button.button = button; 420 event.button.button = button;
425 event.button.x = mouse->x; 421 event.button.x = mouse->x;
426 event.button.y = mouse->y; 422 event.button.y = mouse->y;
427 event.button.windowID = mouse->focus; 423 event.button.windowID = mouse->focus;
428 if ((SDL_EventOK == NULL) 424 posted = (SDL_PushEvent(&event) > 0);
429 || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
430 posted = 1;
431 SDL_PushEvent(&event);
432 }
433 } 425 }
434 return posted; 426 return posted;
435 } 427 }
436 428
437 int 429 int
450 SDL_Event event; 442 SDL_Event event;
451 event.type = SDL_MOUSEWHEEL; 443 event.type = SDL_MOUSEWHEEL;
452 event.wheel.which = (Uint8) index; 444 event.wheel.which = (Uint8) index;
453 event.wheel.motion = motion; 445 event.wheel.motion = motion;
454 event.wheel.windowID = mouse->focus; 446 event.wheel.windowID = mouse->focus;
455 if ((SDL_EventOK == NULL) 447 posted = (SDL_PushEvent(&event) > 0);
456 || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
457 posted = 1;
458 SDL_PushEvent(&event);
459 }
460 } 448 }
461 return posted; 449 return posted;
462 } 450 }
463 451
464 void 452 void