Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2078
Modified Files: Tag: devel_0_39 desire.c Log Message: more renaming
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.158 retrieving revision 1.1.2.159 diff -C2 -d -r1.1.2.158 -r1.1.2.159 *** desire.c 7 Sep 2006 01:17:54 -0000 1.1.2.158 --- desire.c 7 Sep 2006 01:23:12 -0000 1.1.2.159 *************** *** 3053,3057 **** struct _guiconnect { t_object x_obj; ! t_pd *x_who; t_symbol *sym; t_clock *clock; --- 3053,3057 ---- struct _guiconnect { t_object x_obj; ! t_pd *who; t_symbol *sym; t_clock *clock; *************** *** 3062,3066 **** t_guiconnect *guiconnect_new(t_pd *who, t_symbol *sym) { t_guiconnect *x = (t_guiconnect *)pd_new(guiconnect_class); ! x->x_who = who; x->sym = sym; pd_bind((t_pd *)x, sym); --- 3062,3066 ---- t_guiconnect *guiconnect_new(t_pd *who, t_symbol *sym) { t_guiconnect *x = (t_guiconnect *)pd_new(guiconnect_class); ! x->who = who; x->sym = sym; pd_bind((t_pd *)x, sym); *************** *** 3083,3087 **** if (!x->sym) pd_free((t_pd *)x); else { ! x->x_who = 0; if (timedelay > 0) { x->clock = clock_new(x, (t_method)guiconnect_tick); --- 3083,3087 ---- if (!x->sym) pd_free((t_pd *)x); else { ! x->who = 0; if (timedelay > 0) { x->clock = clock_new(x, (t_method)guiconnect_tick); *************** *** 3093,3097 **** /* the GUI calls this to send messages to the target. */ static void guiconnect_anything(t_guiconnect *x, t_symbol *s, int ac, t_atom *av) { ! if (x->x_who) typedmess(x->x_who, s, ac, av); }
--- 3093,3097 ---- /* the GUI calls this to send messages to the target. */ static void guiconnect_anything(t_guiconnect *x, t_symbol *s, int ac, t_atom *av) { ! if (x->who) typedmess(x->who, s, ac, av); }
*************** *** 3100,3104 **** a timeout after which the guiconnect will disappear.) */ static void guiconnect_signoff(t_guiconnect *x) { ! if (!x->x_who) pd_free((t_pd *)x); else { pd_unbind((t_pd *)x, x->sym); --- 3100,3104 ---- a timeout after which the guiconnect will disappear.) */ static void guiconnect_signoff(t_guiconnect *x) { ! if (!x->who) pd_free((t_pd *)x); else { pd_unbind((t_pd *)x, x->sym); *************** *** 7053,7067 **** typedef struct _gatom { t_text a_text; ! t_atom a_atom; /* this holds the value and the type */ ! t_glist *a_glist; /* owning glist */ ! t_float a_toggle; /* value to toggle to */ ! t_float a_draghi; /* high end of drag range */ ! t_float a_draglo; /* low end of drag range */ ! t_symbol *a_label; /* symbol to show as label next to box */ t_symbol *a_symfrom;/* "receive" name -- bind ourselvs to this */ t_symbol *a_symto; /* "send" name -- send to this on output */ ! char a_shift; /* was shift key down when dragging started? */ ! char a_wherelabel; /* 0-3 for left, right, above, below */ ! t_symbol *a_expanded_to; /* a_symto after $0, $1, ... expansion */ } t_gatom;
--- 7053,7065 ---- typedef struct _gatom { t_text a_text; ! t_atom atom; /* this holds the value and the type */ ! t_glist *glist; /* owning glist */ ! t_float toggle; /* value to toggle to */ ! t_float max,min; ! t_symbol *label; /* symbol to show as label next to box */ t_symbol *a_symfrom;/* "receive" name -- bind ourselvs to this */ t_symbol *a_symto; /* "send" name -- send to this on output */ ! char wherelabel; /* 0-3 for left, right, above, below */ ! t_symbol *expanded_to; /* a_symto after $0, $1, ... expansion */ } t_gatom;
*************** *** 7088,7100 ****
static void gatom_set(t_gatom *x, t_symbol *s, int argc, t_atom *argv) { ! t_atom oldatom = x->a_atom; int senditup = 0; if (!argc) return; ! if (x->a_atom.a_type == A_FLOAT) { ! x->a_atom.a_w.w_float = atom_getfloat(argv); ! senditup = x->a_atom.a_w.w_float != oldatom.a_w.w_float; ! } else if (x->a_atom.a_type == A_SYMBOL) { ! x->a_atom.a_w.w_symbol = atom_getsymbol(argv); ! senditup = x->a_atom.a_w.w_symbol != oldatom.a_w.w_symbol; } if (senditup) gobj_changed(x,0); --- 7086,7098 ----
static void gatom_set(t_gatom *x, t_symbol *s, int argc, t_atom *argv) { ! t_atom oldatom = x->atom; int senditup = 0; if (!argc) return; ! if (x->atom.a_type == A_FLOAT) { ! x->atom.a_w.w_float = atom_getfloat(argv); ! senditup = x->atom.a_w.w_float != oldatom.a_w.w_float; ! } else if (x->atom.a_type == A_SYMBOL) { ! x->atom.a_w.w_symbol = atom_getsymbol(argv); ! senditup = x->atom.a_w.w_symbol != oldatom.a_w.w_symbol; } if (senditup) gobj_changed(x,0); *************** *** 7102,7118 ****
static void gatom_bang(t_gatom *x) { ! t_symbol *s = x->a_expanded_to; t_outlet *o = x->a_text.te_outlet; ! if (x->a_atom.a_type == A_FLOAT) { ! if (o) outlet_float(o, x->a_atom.a_w.w_float); if (*s->s_name && s->s_thing) { if (x->a_symto == x->a_symfrom) goto err; ! pd_float(s->s_thing, x->a_atom.a_w.w_float); } ! } else if (x->a_atom.a_type == A_SYMBOL) { ! if (o) outlet_symbol(o, x->a_atom.a_w.w_symbol); if (*x->a_symto->s_name && s->s_thing) { if (x->a_symto == x->a_symfrom) goto err; ! pd_symbol(s->s_thing, x->a_atom.a_w.w_symbol); } } --- 7100,7116 ----
static void gatom_bang(t_gatom *x) { ! t_symbol *s = x->expanded_to; t_outlet *o = x->a_text.te_outlet; ! if (x->atom.a_type == A_FLOAT) { ! if (o) outlet_float(o, x->atom.a_w.w_float); if (*s->s_name && s->s_thing) { if (x->a_symto == x->a_symfrom) goto err; ! pd_float(s->s_thing, x->atom.a_w.w_float); } ! } else if (x->atom.a_type == A_SYMBOL) { ! if (o) outlet_symbol(o, x->atom.a_w.w_symbol); if (*x->a_symto->s_name && s->s_thing) { if (x->a_symto == x->a_symfrom) goto err; ! pd_symbol(s->s_thing, x->atom.a_w.w_symbol); } } *************** *** 7141,7164 **** if (!*symfrom->s_name && *x->a_symfrom->s_name) inlet_new(t, (t_pd *)t, 0, 0); else if (*symfrom->s_name && !*x->a_symfrom->s_name && t->te_inlet) { ! canvas_deletelinesforio(x->a_glist, t, t->te_inlet, 0); inlet_free(t->te_inlet); } if (!*symto->s_name && *x->a_symto->s_name) outlet_new(&x->a_text, 0); else if (*symto->s_name && !*x->a_symto->s_name && t->te_outlet) { ! canvas_deletelinesforio(x->a_glist, t, 0, t->te_outlet); outlet_free(t->te_outlet); } if (draglo >= draghi) draglo = draghi = 0; ! x->a_draglo = draglo; ! x->a_draghi = draghi; if (width < 0) width = 4; else if (width > 80) width = 80; x->a_text.te_width = width; ! x->a_wherelabel = ((int)wherelabel & 3); ! x->a_label = label; ! if (*x->a_symfrom->s_name) pd_unbind((t_pd *)x, canvas_realizedollar(x->a_glist, x->a_symfrom)); x->a_symfrom = symfrom; ! if (*x->a_symfrom->s_name) pd_bind( (t_pd *)x, canvas_realizedollar(x->a_glist, x->a_symfrom)); x->a_symto = symto; ! x->a_expanded_to = canvas_realizedollar(x->a_glist, x->a_symto); gobj_changed(x,0); } --- 7139,7162 ---- if (!*symfrom->s_name && *x->a_symfrom->s_name) inlet_new(t, (t_pd *)t, 0, 0); else if (*symfrom->s_name && !*x->a_symfrom->s_name && t->te_inlet) { ! canvas_deletelinesforio(x->glist, t, t->te_inlet, 0); inlet_free(t->te_inlet); } if (!*symto->s_name && *x->a_symto->s_name) outlet_new(&x->a_text, 0); else if (*symto->s_name && !*x->a_symto->s_name && t->te_outlet) { ! canvas_deletelinesforio(x->glist, t, 0, t->te_outlet); outlet_free(t->te_outlet); } if (draglo >= draghi) draglo = draghi = 0; ! x->min = draglo; ! x->max = draghi; if (width < 0) width = 4; else if (width > 80) width = 80; x->a_text.te_width = width; ! x->wherelabel = ((int)wherelabel & 3); ! x->label = label; ! if (*x->a_symfrom->s_name) pd_unbind((t_pd *)x, canvas_realizedollar(x->glist, x->a_symfrom)); x->a_symfrom = symfrom; ! if (*x->a_symfrom->s_name) pd_bind( (t_pd *)x, canvas_realizedollar(x->glist, x->a_symfrom)); x->a_symto = symto; ! x->expanded_to = canvas_realizedollar(x->glist, x->a_symto); gobj_changed(x,0); } *************** *** 7170,7188 **** x->a_text.te_type = T_ATOM; x->a_text.te_binbuf = binbuf_new(); ! x->a_glist = gl; ! x->a_atom.a_type = type; ! x->a_toggle = 1; ! x->a_draglo = 0; ! x->a_draghi = 0; ! x->a_wherelabel = 0; ! x->a_label = &s_; x->a_symfrom = &s_; ! x->a_symto = x->a_expanded_to = &s_; if (type == A_FLOAT) { ! x->a_atom.a_w.w_float = 0; x->a_text.te_width = 5; SETFLOAT(&at, 0); } else { ! x->a_atom.a_w.w_symbol = &s_symbol; x->a_text.te_width = 10; SETSYMBOL(&at, &s_symbol); --- 7168,7186 ---- x->a_text.te_type = T_ATOM; x->a_text.te_binbuf = binbuf_new(); ! x->glist = gl; ! x->atom.a_type = type; ! x->toggle = 1; ! x->min = 0; ! x->max = 0; ! x->wherelabel = 0; ! x->label = &s_; x->a_symfrom = &s_; ! x->a_symto = x->expanded_to = &s_; if (type == A_FLOAT) { ! x->atom.a_w.w_float = 0; x->a_text.te_width = 5; SETFLOAT(&at, 0); } else { ! x->atom.a_w.w_symbol = &s_symbol; x->a_text.te_width = 10; SETSYMBOL(&at, &s_symbol); *************** *** 7198,7217 **** field... remove this in 2003 or so: */ if (x->a_text.te_width < 0 || x->a_text.te_width > 500) x->a_text.te_width = 4; ! x->a_draglo = atom_getfloatarg(3, argc, argv); ! x->a_draghi = atom_getfloatarg(4, argc, argv); ! x->a_wherelabel = (((int)atom_getfloatarg(5, argc, argv)) & 3); ! x->a_label = gatom_unescapit(atom_getsymbolarg(6, argc, argv)); x->a_symfrom = gatom_unescapit(atom_getsymbolarg(7, argc, argv)); if (*x->a_symfrom->s_name) ! pd_bind(&x->a_text.te_pd, canvas_realizedollar(x->a_glist, x->a_symfrom));
x->a_symto = gatom_unescapit(atom_getsymbolarg(8, argc, argv)); ! x->a_expanded_to = canvas_realizedollar(x->a_glist, x->a_symto); ! if (x->a_symto == &s_) outlet_new(&x->a_text, x->a_atom.a_type == A_FLOAT ? &s_float: &s_symbol); if (x->a_symfrom == &s_) inlet_new(&x->a_text, &x->a_text.te_pd, 0, 0); glist_add(gl, &x->a_text.te_g); } else { int xpix, ypix; ! outlet_new(&x->a_text, x->a_atom.a_type == A_FLOAT ? &s_float: &s_symbol); inlet_new(&x->a_text, &x->a_text.te_pd, 0, 0); glist_getnextxy(gl, &xpix, &ypix); --- 7196,7215 ---- field... remove this in 2003 or so: */ if (x->a_text.te_width < 0 || x->a_text.te_width > 500) x->a_text.te_width = 4; ! x->min = atom_getfloatarg(3, argc, argv); ! x->max = atom_getfloatarg(4, argc, argv); ! x->wherelabel = (((int)atom_getfloatarg(5, argc, argv)) & 3); ! x->label = gatom_unescapit(atom_getsymbolarg(6, argc, argv)); x->a_symfrom = gatom_unescapit(atom_getsymbolarg(7, argc, argv)); if (*x->a_symfrom->s_name) ! pd_bind(&x->a_text.te_pd, canvas_realizedollar(x->glist, x->a_symfrom));
x->a_symto = gatom_unescapit(atom_getsymbolarg(8, argc, argv)); ! x->expanded_to = canvas_realizedollar(x->glist, x->a_symto); ! if (x->a_symto == &s_) outlet_new(&x->a_text, x->atom.a_type == A_FLOAT ? &s_float: &s_symbol); if (x->a_symfrom == &s_) inlet_new(&x->a_text, &x->a_text.te_pd, 0, 0); glist_add(gl, &x->a_text.te_g); } else { int xpix, ypix; ! outlet_new(&x->a_text, x->atom.a_type == A_FLOAT ? &s_float: &s_symbol); inlet_new(&x->a_text, &x->a_text.te_pd, 0, 0); glist_getnextxy(gl, &xpix, &ypix); *************** *** 7228,7232 ****
static void gatom_free(t_gatom *x) { ! if (*x->a_symfrom->s_name) pd_unbind((t_pd *)x, canvas_realizedollar(x->a_glist, x->a_symfrom)); gfxstub_deleteforkey(x); } --- 7226,7230 ----
static void gatom_free(t_gatom *x) { ! if (*x->a_symfrom->s_name) pd_unbind((t_pd *)x, canvas_realizedollar(x->glist, x->a_symfrom)); gfxstub_deleteforkey(x); } *************** *** 7264,7278 **** binbuf_addv(b, ";"); } else if (x->te_type == T_ATOM) { ! t_atomtype t = ((t_gatom *)x)->a_atom.a_type; t_symbol *sel = (t == A_SYMBOL ? gensym("symbolatom") : (t == A_FLOAT ? gensym("floatatom") : gensym("intatom"))); ! t_symbol *label = gatom_escapit(((t_gatom *)x)->a_label); t_symbol *symfrom = gatom_escapit(((t_gatom *)x)->a_symfrom); t_symbol *symto = gatom_escapit(((t_gatom *)x)->a_symto); binbuf_addv(b, "ssiiifffsss", gensym("#X"), sel, (t_int)x->te_xpix, (t_int)x->te_ypix, (t_int)x->te_width, ! (double)((t_gatom *)x)->a_draglo, ! (double)((t_gatom *)x)->a_draghi, ! (double)((t_gatom *)x)->a_wherelabel, label, symfrom, symto); binbuf_addv(b, ";"); --- 7262,7276 ---- binbuf_addv(b, ";"); } else if (x->te_type == T_ATOM) { ! t_atomtype t = ((t_gatom *)x)->atom.a_type; t_symbol *sel = (t == A_SYMBOL ? gensym("symbolatom") : (t == A_FLOAT ? gensym("floatatom") : gensym("intatom"))); ! t_symbol *label = gatom_escapit(((t_gatom *)x)->label); t_symbol *symfrom = gatom_escapit(((t_gatom *)x)->a_symfrom); t_symbol *symto = gatom_escapit(((t_gatom *)x)->a_symto); binbuf_addv(b, "ssiiifffsss", gensym("#X"), sel, (t_int)x->te_xpix, (t_int)x->te_ypix, (t_int)x->te_width, ! (double)((t_gatom *)x)->min, ! (double)((t_gatom *)x)->max, ! (double)((t_gatom *)x)->wherelabel, label, symfrom, symto); binbuf_addv(b, ";");