Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17779
Modified Files:
Tag: devel_0_39
desire.c desire.tk
Log Message:
.
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.186
retrieving revision 1.1.2.187
diff -C2 -d -r1.1.2.186 -r1.1.2.187
*** desire.tk 23 Apr 2006 02:13:29 -0000 1.1.2.186
--- desire.tk 23 Apr 2006 05:48:04 -0000 1.1.2.187
***************
*** 530,534 ****
# a menuable must be a View
class_new Menuable {}
! def* Menuable init {args} {
eval [concat [list super] $args]
set @accel {}
--- 530,534 ----
# a menuable must be a View
class_new Menuable {}
! def Menuable init {args} {
eval [concat [list super] $args]
set @accel {}
***************
*** 882,886 ****
def* Canvas eval% {code} {
! mset x y $@curpos
regsub -all %X $code $x code
regsub -all %Y $code $y code
--- 882,886 ----
def* Canvas eval% {code} {
! mset {x y} $@curpos
regsub -all %X $code $x code
regsub -all %Y $code $y code
***************
*** 1294,1298 ****
class_new TextBox {Box}
! def* TextBox draw {} {
# TEXT = the text label
# text = the input text field
--- 1294,1298 ----
class_new TextBox {Box}
! def TextBox draw {} {
# TEXT = the text label
# text = the input text field
***************
*** 1302,1306 ****
mset {x1 y1} [$self xy]
puts "x1=$x1 y1=$y1"
! puts "!!!!edit = $@edit!!!!"
if {$@edit} {
set t .$(a)canvas.c.${self}text
--- 1302,1306 ----
mset {x1 y1} [$self xy]
puts "x1=$x1 y1=$y1"
! # puts "!!!!edit = $@edit!!!!"
if {$@edit} {
set t .$(a)canvas.c.${self}text
***************
*** 1359,1363 ****
}
! def* TextBox update_size {} {
global font look
set @textwidth [expr $font(padx)+$font(width)*([string length $@text]+$@edit)]
--- 1359,1363 ----
}
! def TextBox update_size {} {
global font look
set @textwidth [expr $font(padx)+$font(width)*([string length $@text]+$@edit)]
***************
*** 1390,1394 ****
}
! def* ObjectBox draw {} {
$self update_size
set xs $@xs
--- 1390,1394 ----
}
! def ObjectBox draw {} {
$self update_size
set xs $@xs
***************
*** 2383,2387 ****
def* MessageBox init {args} {
! puts "!!!!!! args:$args"
super
set @w 15
--- 2383,2387 ----
def* MessageBox init {args} {
! # puts "!!!!!! args:$args"
super
set @w 15
***************
*** 2765,2769 ****
class_new Bang {BlueBox}
def Bang init {args} {
- puts "!!!!!! args:$args"
super
set @w 15
--- 2765,2768 ----
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.71
retrieving revision 1.1.2.72
diff -C2 -d -r1.1.2.71 -r1.1.2.72
*** desire.c 22 Apr 2006 03:41:13 -0000 1.1.2.71
--- desire.c 23 Apr 2006 05:48:03 -0000 1.1.2.72
***************
*** 26,39 ****
#ifdef _MSC_VER
/*
! #define L fprintf(stderr,"%s:%d\n",__FILE__,__LINE__);
! #define LS fprintf(stderr,"%s:%d (self=%lx\n",__FILE__,__LINE__,(long)self);\
! fprintf(stderr,"class=%s)\n",((t_gobj *)self)->g_pd->c_name->s_name);
*/
/* no sys_vgui logging for MSVC... we have no vararg macros */
#else
! #define L fprintf(stderr,"%s:%d in %s\n",__FILE__,__LINE__,__PRETTY_FUNCTION__);
! #define LS fprintf(stderr,"%s:%d in %s (self=%lx\n",__FILE__,__LINE__,__PRETTY_FUNCTION__,(long)self);\
! fprintf(stderr,"class=%s)\n",((t_gobj *)self)->g_pd->c_name->s_name);
/*
--- 26,39 ----
#ifdef _MSC_VER
/*
! #define L printf("%s:%d\n",__FILE__,__LINE__);
! #define LS printf("%s:%d (self=%lx\n",__FILE__,__LINE__,(long)self);\
! printf("class=%s)\n",((t_gobj *)self)->g_pd->c_name->s_name);
*/
/* no sys_vgui logging for MSVC... we have no vararg macros */
#else
! #define L printf("%s:%d in %s\n",__FILE__,__LINE__,__PRETTY_FUNCTION__);
! #define LS printf("%s:%d in %s (self=%lx\n",__FILE__,__LINE__,__PRETTY_FUNCTION__,(long)self);\
! printf("class=%s)\n",((t_gobj *)self)->g_pd->c_name->s_name);
/*
***************
*** 109,113 ****
t_gobj *obs = d->obs[i];
t_notice ice = obs->g_pd->c_notice;
! //fprintf(stderr,"obs=%lx\n",(long)obs);
if (ice) ice(obs,origin,argc,argv);
else post("null func ptr for class %s",self->g_pd->c_name->s_name);
--- 109,113 ----
t_gobj *obs = d->obs[i];
t_notice ice = obs->g_pd->c_notice;
! //printf("obs=%lx\n",(long)obs);
if (ice) ice(obs,origin,argc,argv);
else post("null func ptr for class %s",self->g_pd->c_name->s_name);
***************
*** 132,135 ****
--- 132,139 ----
void queue_put (t_queue *self, void *stuff) {
+ char *buf; int bufn;
+ t_binbuf *b = ((t_text *)stuff)->te_binbuf;
+ if (b) {char *buf; int bufn; binbuf_gettext(b,&buf,&bufn); printf("queue_put [%.*s]\n",bufn,buf);}
+ else {printf("queue_put (%s)\n",(*(t_pd*)stuff)->c_name->s_name);}
if (self->len==QUEUE_SIZE) {bug("queue full"); return;}
self->o[(self->start+self->len)%QUEUE_SIZE] = stuff;
***************
*** 139,147 ****
void *queue_get (t_queue *self) {
! void *r = self->o[self->start];
self->start = (self->start+1)%QUEUE_SIZE;
self->len--;
//post("queue_get: items in queue: %d",self->len);
! return r;
}
--- 143,155 ----
void *queue_get (t_queue *self) {
! void *stuff = self->o[self->start];
! t_binbuf *b;
self->start = (self->start+1)%QUEUE_SIZE;
self->len--;
//post("queue_get: items in queue: %d",self->len);
! b = ((t_text *)stuff)->te_binbuf;
! if (b) {char *buf; int bufn; binbuf_gettext(b,&buf,&bufn); printf("queue_get [%.*s]\n",bufn,buf);}
! else {printf("queue_get (%s)\n",(*(t_pd*)stuff)->c_name->s_name);}
! return stuff;
}
***************
*** 293,297 ****
post("subscribe %lx",(long)x);
gobj_subscribe((t_gobj *)x,(t_gobj *)manager);
! gobj_changed(x,"");
}
}
--- 301,305 ----
post("subscribe %lx",(long)x);
gobj_subscribe((t_gobj *)x,(t_gobj *)manager);
! gobj_changed(x,0);
}
}
***************
*** 479,483 ****
((t_gobj *)x)->g_adix = appendix_new((t_gobj *)x);
/* the following is a hack */
! if (hack) gobj_subscribe((t_gobj *)x,(t_gobj *)manager);
}
--- 487,494 ----
((t_gobj *)x)->g_adix = appendix_new((t_gobj *)x);
/* the following is a hack */
! if (hack) {
! gobj_subscribe((t_gobj *)x,(t_gobj *)manager);
! gobj_changed((t_gobj *)x,0);
! }
}
***************
*** 849,853 ****
post("******subscribe %lx",(long)x);
gobj_subscribe((t_gobj *)x,(t_gobj *)manager);
! gobj_changed(x,"");
}
} else { /* make invisible */
--- 860,864 ----
post("******subscribe %lx",(long)x);
gobj_subscribe((t_gobj *)x,(t_gobj *)manager);
! gobj_changed(x,0);
}
} else { /* make invisible */
***************
*** 3585,3590 ****
post ("%d %d %d %d", whoout2, outno, whoin2, inno);
post("canvas_connect: objsrc=%d outno=%d objsink=%d inno=%d",objsrc,outno,objsink,inno);
! sys_mgui((t_canvas *)x,"wires_new","iiii", whoout2, outno, whoin2, inno);
! gobj_changed(x,"");
if (!(oc = obj_connect(objsrc, outno, objsink, inno))) goto bad;
if (glist_isvisible(x))
--- 3596,3602 ----
post ("%d %d %d %d", whoout2, outno, whoin2, inno);
post("canvas_connect: objsrc=%d outno=%d objsink=%d inno=%d",objsrc,outno,objsink,inno);
! // shouldn't use sys_mgui because it interferes with the queue
! // sys_mgui((t_canvas *)x,"wires_new","iiii", whoout2, outno, whoin2, inno);
! gobj_changed(x,0);
if (!(oc = obj_connect(objsrc, outno, objsink, inno))) goto bad;
if (glist_isvisible(x))
***************
*** 5261,5269 ****
char *buf; int bufn;
binbuf_gettext(((t_text *)y)->te_binbuf,&buf,&bufn);
! fprintf(stderr,"glist_add %p %p [%.*s]\n",x,y,bufn,buf);
free(buf);
if (!y->g_adix) y->g_adix = appendix_new(y); /* mb: i found no better place for initing this */
gobj_subscribe(y,(t_gobj *)x);
! gobj_changed(y,"");
y->g_next = 0;
if (!x->gl_list) x->gl_list = y;
--- 5273,5281 ----
char *buf; int bufn;
binbuf_gettext(((t_text *)y)->te_binbuf,&buf,&bufn);
! printf("glist_add %p %p [%.*s]\n",x,y,bufn,buf);
free(buf);
if (!y->g_adix) y->g_adix = appendix_new(y); /* mb: i found no better place for initing this */
gobj_subscribe(y,(t_gobj *)x);
! gobj_changed(y,0);
y->g_next = 0;
if (!x->gl_list) x->gl_list = y;
***************
*** 5274,5278 ****
y2->g_next = y;
}
! gobj_changed(x,"");
/* voodoo */
/* if (x->gl_editor && (ob = pd_checkobject(&y->g_pd))) rtext_new(x, ob); */
--- 5286,5290 ----
y2->g_next = y;
}
! gobj_changed(x,0);
/* voodoo */
/* if (x->gl_editor && (ob = pd_checkobject(&y->g_pd))) rtext_new(x, ob); */
***************
*** 11003,11006 ****
--- 11015,11019 ----
}
if (!x) x = (t_text *)pd_new(text_class);
+ sys_vgui("global _; set _(%x:canvas) %lx\n",(long)x,(long)gl);
x->te_binbuf = b;
x->te_xpix = xpix;
***************
*** 11675,11679 ****
}
! #define NEXT p=va_arg(val,void*); /*fprintf(stderr,"p=%p\n",p);*/
int pd_vscanargs(int argc, t_atom *argv, char *fmt, va_list val) {
int i=0;
--- 11688,11692 ----
}
! #define NEXT p=va_arg(val,void*); /*printf("p=%p\n",p);*/
int pd_vscanargs(int argc, t_atom *argv, char *fmt, va_list val) {
int i=0;
***************
*** 11805,11808 ****
--- 11818,11822 ----
}
binbuf_gettext(buf,&s,&n);
+ if (s[n-1]=='\n') n--;
sys_vgui("update_object x%lx {%.*s}\n", (long)self,n,s);
sys_mgui(self,"ninlets=" ,"i", obj_ninlets((t_text *)self));