Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22014
Modified Files: Tag: desiredata desire.c Log Message: introducing gobj_setcanvas
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.55 retrieving revision 1.1.2.217.2.56 diff -C2 -d -r1.1.2.217.2.55 -r1.1.2.217.2.56 *** desire.c 13 Dec 2006 00:10:01 -0000 1.1.2.217.2.55 --- desire.c 13 Dec 2006 01:08:09 -0000 1.1.2.217.2.56 *************** *** 105,108 **** --- 105,109 ---- self->master = master; self->next = 0; + self->canvas = 0; self->nobs = 0; self->obs = 0; *************** *** 160,163 **** --- 161,170 ---- }
+ void gobj_setcanvas (t_gobj *self, t_canvas *c) { + if (self->dix->canvas) gobj_unsubscribe(self,self->dix->canvas); + self->dix->canvas = c; + if (self->dix->canvas) { gobj_subscribe(self,self->dix->canvas); gobj_changed(self,0); } + } + // if !k then suppose all of the object might have changed. void gobj_changed (t_gobj *self, const char *k) { *************** *** 1375,1378 **** --- 1382,1386 ---- if (!(oc = obj_connect(from,outlet,to,inlet))) goto bad; pd_set_newest(oc); + gobj_setcanvas(oc,x); return; bad: *************** *** 2243,2247 **** #endif
! gobj_subscribe(y,x);
/* delay first uploading of object (DesireData <= 2006.08.19) */ --- 2251,2255 ---- #endif
! gobj_setcanvas(y,x);
/* delay first uploading of object (DesireData <= 2006.08.19) */