Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22094
Modified Files: Tag: desiredata desire.tk desire.c Log Message: map macro events to key, click and unclick
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.330 retrieving revision 1.1.2.600.2.331 diff -C2 -d -r1.1.2.600.2.330 -r1.1.2.600.2.331 *** desire.tk 9 Aug 2007 05:32:11 -0000 1.1.2.600.2.330 --- desire.tk 9 Aug 2007 07:00:50 -0000 1.1.2.600.2.331 *************** *** 2416,2422 **** set t ${mess}$comma switch $event { ! KeyPress {clipboard append $t} ! ButtonPress {clipboard append $t} ! ButtonRelease {clipboard append $t} } incr i --- 2416,2422 ---- set t ${mess}$comma switch $event { ! KeyPress {clipboard append [lreplace $t 0 0 "key"]} ! ButtonPress {clipboard append [lreplace $t 0 0 "click"]} ! ButtonRelease {clipboard append [lreplace $t 0 0 "unclick"]} } incr i *************** *** 5029,5039 **** set w [focus] set m [lindex $@macro_q 0] ! set fudge_motion 0 mset {event x y mode k} $m switch $event { ! KeyPress {set name [modekey $k $mode]; set fudge_motion 1} ! ButtonPress {set name $event-$k; set fudge_motion 1} ! ButtonRelease {set name $event-$k; set fudge_motion 1} ! Motion {set name $event} bang { after $delay [list $self macro_schedule $@macro_delay] $obj --- 5029,5038 ---- set w [focus] set m [lindex $@macro_q 0] ! set fudge 0 mset {event x y mode k} $m switch $event { ! key {set name [modekey $k $mode]; set fudge 1} ! click {set name ButtonPress-$k; set fudge 1} ! unclick {set name ButtonRelease-$k; set fudge 1} bang { after $delay [list $self macro_schedule $@macro_delay] $obj *************** *** 5044,5048 **** default {puts "Error: this event should not have been here.."} } ! if {$fudge_motion} {event generate $w <Motion> -x $x -y $y} event generate $w <$name> -x $x -y $y if {$event=="KeyPress"} {event generate $w <KeyRelease-$k> -x $x -y $y} --- 5043,5047 ---- default {puts "Error: this event should not have been here.."} } ! if {$fudge} {event generate $w <Motion> -x $x -y $y} event generate $w <$name> -x $x -y $y if {$event=="KeyPress"} {event generate $w <KeyRelease-$k> -x $x -y $y}
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.196 retrieving revision 1.1.2.217.2.197 diff -C2 -d -r1.1.2.217.2.196 -r1.1.2.217.2.197 *** desire.c 8 Aug 2007 23:23:49 -0000 1.1.2.217.2.196 --- desire.c 9 Aug 2007 07:00:53 -0000 1.1.2.217.2.197 *************** *** 6034,6038 **** case 'f': case 'd': i+=snprintf(buf+i,n-i," %f",va_arg(val,double)); break; case 'i': i+=snprintf(buf+i,n-i," %d",va_arg(val,int)); break; ! case 'p': i+=snprintf(buf+i,n-i," %lx",(long)va_arg(val,void*)); break; /* case 's': i+=snprintf(buf+i,n-i," "%s"",va_arg(val,t_symbol *)->name); break; --- 6034,6038 ---- case 'f': case 'd': i+=snprintf(buf+i,n-i," %f",va_arg(val,double)); break; case 'i': i+=snprintf(buf+i,n-i," %d",va_arg(val,int)); break; ! case 'p': i+=snprintf(buf+i,n-i," x%lx",(long)va_arg(val,void*)); break; /* case 's': i+=snprintf(buf+i,n-i," "%s"",va_arg(val,t_symbol *)->name); break;