ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.xs
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.73 by root, Wed Jan 18 09:40:53 2006 UTC vs.
Revision 1.74 by root, Wed Jan 18 10:31:37 2006 UTC

535 XEvent *xe = va_arg (ap, XEvent *); 535 XEvent *xe = va_arg (ap, XEvent *);
536 HV *hv = newHV (); 536 HV *hv = newHV ();
537 537
538# define set(name, sv) hv_store (hv, # name, sizeof (# name) - 1, sv, 0) 538# define set(name, sv) hv_store (hv, # name, sizeof (# name) - 1, sv, 0)
539# define setiv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSViv (val), 0) 539# define setiv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSViv (val), 0)
540# define setuv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSVuv (val), 0)
540# undef set 541# undef set
541 542
542 setiv (type, xe->type); 543 setiv (type, xe->type);
543 setiv (send_event, xe->xany.send_event); 544 setiv (send_event, xe->xany.send_event);
544 setiv (serial, xe->xany.serial); 545 setiv (serial, xe->xany.serial);
548 case KeyPress: 549 case KeyPress:
549 case KeyRelease: 550 case KeyRelease:
550 case ButtonPress: 551 case ButtonPress:
551 case ButtonRelease: 552 case ButtonRelease:
552 case MotionNotify: 553 case MotionNotify:
554 setuv (window, xe->xmotion.window);
555 setuv (root, xe->xmotion.root);
556 setuv (subwindow, xe->xmotion.subwindow);
553 setiv (time, xe->xmotion.time); 557 setuv (time, xe->xmotion.time);
554 setiv (x, xe->xmotion.x); 558 setiv (x, xe->xmotion.x);
555 setiv (y, xe->xmotion.y); 559 setiv (y, xe->xmotion.y);
556 setiv (row, xe->xmotion.y / term->fheight); 560 setiv (row, xe->xmotion.y / term->fheight);
557 setiv (col, xe->xmotion.x / term->fwidth); 561 setiv (col, xe->xmotion.x / term->fwidth);
558 setiv (x_root, xe->xmotion.x_root); 562 setiv (x_root, xe->xmotion.x_root);
559 setiv (y_root, xe->xmotion.y_root); 563 setiv (y_root, xe->xmotion.y_root);
560 setiv (state, xe->xmotion.state); 564 setuv (state, xe->xmotion.state);
565
566 switch (xe->type)
567 {
568 case KeyPress:
569 case KeyRelease:
570 setuv (keycode, xe->xkey.keycode);
571 break;
572
573 case ButtonPress:
574 case ButtonRelease:
575 setuv (button, xe->xbutton.button);
576 break;
577
578 case MotionNotify:
579 setiv (is_hint, xe->xmotion.is_hint);
580 break;
581 }
582
561 break; 583 break;
562 }
563 584
585 case MapNotify:
586 case UnmapNotify:
587 case ConfigureNotify:
588 setuv (event, xe->xconfigure.event);
589 setuv (window, xe->xconfigure.window);
590
564 switch (xe->type) 591 switch (xe->type)
565 { 592 {
566 case KeyPress: 593 case ConfigureNotify:
567 case KeyRelease: 594 setiv (x, xe->xconfigure.x);
568 setiv (keycode, xe->xkey.keycode); 595 setiv (y, xe->xconfigure.y);
596 setiv (width, xe->xconfigure.width);
597 setiv (height, xe->xconfigure.height);
598 setuv (above, xe->xconfigure.above);
569 break; 599 break;
570
571 case ButtonPress:
572 case ButtonRelease:
573 setiv (button, xe->xbutton.button);
574 break; 600 }
575 601
576 case MotionNotify:
577 setiv (is_hint, xe->xmotion.is_hint);
578 break; 602 break;
579 } 603 }
580 604
581 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv))); 605 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv)));
582 } 606 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines