Home | History | Annotate | Download | only in x11

Lines Matching refs:xevent

302 static int X11_KeyRepeat(Display *display, XEvent *event)
304 XEvent peekevent;
327 static __inline__ int X11_WarpedMotion(_THIS, XEvent *xevent)
335 deltax = xevent->xmotion.x - mouse_last.x;
336 deltay = xevent->xmotion.y - mouse_last.y;
340 mouse_last.x = xevent->xmotion.x;
341 mouse_last.y = xevent->xmotion.y;
344 if ( (xevent->xmotion.x < MOUSE_FUDGE_FACTOR) ||
345 (xevent->xmotion.x > (w-MOUSE_FUDGE_FACTOR)) ||
346 (xevent->xmotion.y < MOUSE_FUDGE_FACTOR) ||
347 (xevent->xmotion.y > (h-MOUSE_FUDGE_FACTOR)) ) {
349 while ( XCheckTypedEvent(SDL_Display, MotionNotify, xevent) ) {
350 deltax = xevent->xmotion.x - mouse_last.x;
351 deltay = xevent->xmotion.y - mouse_last.y;
355 mouse_last.x = xevent->xmotion.x;
356 mouse_last.y = xevent->xmotion.y;
364 XMaskEvent(SDL_Display, PointerMotionMask, xevent);
365 if ( (xevent->xmotion.x >
367 (xevent->xmotion.x <
369 (xevent->xmotion.y >
371 (xevent->xmotion.y <
376 printf("Lost mouse motion: %d,%d\n", xevent->xmotion.x, xevent->xmotion.y);
391 XEvent xevent;
393 SDL_memset(&xevent, '\0', sizeof (XEvent)); /* valgrind fix. --ryan. */
394 XNextEvent(SDL_Display, &xevent);
399 if ( xevent.type == KeyRelease
400 && X11_KeyRepeat(SDL_Display, &xevent) ) {
409 && XFilterEvent(&xevent, None) ) {
415 switch (xevent.type) {
420 printf("EnterNotify! (%d,%d)\n", xevent.xcrossing.x, xevent.xcrossing.y);
421 if ( xevent.xcrossing.mode == NotifyGrab )
423 if ( xevent.xcrossing.mode == NotifyUngrab )
426 if ( (xevent.xcrossing.mode != NotifyGrab) &&
427 (xevent.xcrossing.mode != NotifyUngrab) ) {
432 xevent.xcrossing.x,
433 xevent.xcrossing.y);
441 printf("LeaveNotify! (%d,%d)\n", xevent.xcrossing.x, xevent.xcrossing.y);
442 if ( xevent.xcrossing.mode == NotifyGrab )
444 if ( xevent.xcrossing.mode == NotifyUngrab )
447 if ( (xevent.xcrossing.mode != NotifyGrab) &&
448 (xevent.xcrossing.mode != NotifyUngrab) &&
449 (xevent.xcrossing.detail != NotifyInferior) ) {
454 xevent.xcrossing.x,
455 xevent.xcrossing.y);
500 XRefreshKeyboardMapping(&xevent.xmapping);
509 X11_SetKeyboardState(SDL_Display, xevent.xkeymap.key_vector);
519 printf("DGA motion: %d,%d\n", xevent.xmotion.x_root, xevent.xmotion.y_root);
522 xevent.xmotion.x_root,
523 xevent.xmotion.y_root);
525 posted = X11_WarpedMotion(this,&xevent);
529 printf("X11 motion: %d,%d\n", xevent.xmotion.x, xevent.xmotion.y);
532 xevent.xmotion.x,
533 xevent.xmotion.y);
542 xevent.xbutton.button, 0, 0);
549 xevent.xbutton.button, 0, 0);
556 KeyCode keycode = xevent.xkey.keycode;
559 printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
591 count = Xutf8LookupString(SDL_IC, &xevent.xkey, keydata, sizeof(keybuf), &xkeysym, &status);
601 count = Xutf8LookupString(SDL_IC, &xevent.xkey, keydata, count, &xkeysym, &status);
729 if ( XLookupString(&xevent.xkey,
749 KeyCode keycode = xevent.xkey.keycode;
760 printf("KeyRelease (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
821 printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height);
824 if ((xevent.xconfigure.width != SDL_VideoSurface->w) ||
825 (xevent.xconfigure.height != SDL_VideoSurface->h)) {
827 if ( ! ((xevent.xconfigure.width == 32) &&
828 (xevent.xconfigure.height == 32)) ) {
829 SDL_PrivateResize(xevent.xconfigure.width,
830 xevent.xconfigure.height);
844 if ( (xevent.xclient.format == 32) &&
845 (xevent.xclient.data.l[0] == WM_DELETE_WINDOW) )
854 wmmsg.event.xevent = xevent;
863 printf("Expose (count = %d)\n", xevent.xexpose.count);
865 if ( SDL_VideoSurface && (xevent.xexpose.count == 0) ) {
873 printf("Unhandled event %d\n", xevent.type);
881 wmmsg.event.xevent = xevent;