Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1663/pd/src
Modified Files:
configure.in g_all_guis.c g_all_guis.h g_array.c g_canvas.c
g_canvas.h g_editor.c g_hdial.c g_hslider.c g_numbox.c
g_scalar.c g_template.c g_traversal.c g_vdial.c g_vslider.c
g_vumeter.c makefile makefile.dependencies notes.txt s_main.c
Log Message:
Configure.in was broken. Also, better GUI update queueing for
IEM guis and for 'data' (which should affect arrays.)
Index: g_traversal.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_traversal.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** g_traversal.c 29 Jul 2005 19:01:20 -0000 1.4
--- g_traversal.c 16 Aug 2005 04:06:28 -0000 1.5
***************
*** 274,278 ****
ptrobj_vnext(x, 0);
}
-
static void ptrobj_sendwindow(t_ptrobj *x, t_symbol *s, int argc, t_atom *argv)
{
--- 274,277 ----
***************
*** 335,338 ****
--- 334,363 ----
}
+
+ static void ptrobj_rewind(t_ptrobj *x)
+ {
+ t_scalar *sc;
+ t_symbol *templatesym;
+ int n;
+ t_typedout *to;
+ t_glist *glist;
+ t_pd *canvas;
+ t_gstub *gs;
+ if (!gpointer_check(&x->x_gp, 1))
+ {
+ pd_error(x, "pointer_rewind: empty pointer");
+ return;
+ }
+ gs = x->x_gp.gp_stub;
+ if (gs->gs_which != GP_GLIST)
+ {
+ pd_error(x, "pointer_rewind: sorry, unavailable for arrays");
+ return;
+ }
+ glist = gs->gs_un.gs_glist;
+ gpointer_setglist(&x->x_gp, glist, 0);
+ ptrobj_bang(x);
+ }
+
static void ptrobj_free(t_ptrobj *x)
{
***************
*** 352,355 ****
--- 377,382 ----
class_addmethod(ptrobj_class, (t_method)ptrobj_sendwindow,
gensym("send-window"), A_GIMME, 0);
+ class_addmethod(ptrobj_class, (t_method)ptrobj_rewind,
+ gensym("rewind"), 0);
class_addpointer(ptrobj_class, ptrobj_pointer);
class_addbang(ptrobj_class, ptrobj_bang);
***************
*** 542,546 ****
template_setfloat(template, vp->gv_sym, vec, vp->gv_w.w_float, 1);
if (gs->gs_which == GP_GLIST)
! glist_redrawitem(gs->gs_un.gs_glist, (t_gobj *)(gp->gp_un.gp_scalar));
else
{
--- 569,573 ----
template_setfloat(template, vp->gv_sym, vec, vp->gv_w.w_float, 1);
if (gs->gs_which == GP_GLIST)
! scalar_redraw(gp->gp_un.gp_scalar, gs->gs_un.gs_glist);
else
{
***************
*** 548,553 ****
while (owner_array->a_gp.gp_stub->gs_which == GP_ARRAY)
owner_array = owner_array->a_gp.gp_stub->gs_un.gs_array;
! glist_redrawitem(owner_array->a_gp.gp_stub->gs_un.gs_glist,
! (t_gobj *)(owner_array->a_gp.gp_un.gp_scalar));
}
}
--- 575,580 ----
while (owner_array->a_gp.gp_stub->gs_which == GP_ARRAY)
owner_array = owner_array->a_gp.gp_stub->gs_un.gs_array;
! scalar_redraw(owner_array->a_gp.gp_un.gp_scalar,
! owner_array->a_gp.gp_stub->gs_un.gs_glist);
}
}
***************
*** 1020,1024 ****
}
! glist_redrawitem(glist, (t_gobj *)sc);
outlet_pointer(x->x_obj.ob_outlet, gp);
--- 1047,1051 ----
}
! scalar_redraw(sc, glist);
outlet_pointer(x->x_obj.ob_outlet, gp);
Index: g_scalar.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_scalar.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** g_scalar.c 18 May 2005 04:28:50 -0000 1.6
--- g_scalar.c 16 Aug 2005 04:06:28 -0000 1.7
***************
*** 199,214 ****
{
t_scalar *x = (t_scalar *)z;
! /* post("scalar_select %d", state); */
! /* later */
if (state)
{
int x1, y1, x2, y2;
- t_symbol *templatesym = x->sc_template;
- t_template *tmpl;
- t_atom at;
- t_gpointer gp;
- gpointer_init(&gp);
- gpointer_setglist(&gp, owner, x);
- SETPOINTER(&at, &gp);
if (tmpl = template_findbyname(templatesym))
template_notify(tmpl, gensym("select"), 1, &at);
--- 199,212 ----
{
t_scalar *x = (t_scalar *)z;
! t_symbol *templatesym = x->sc_template;
! t_template *tmpl;
! t_atom at;
! t_gpointer gp;
! gpointer_init(&gp);
! gpointer_setglist(&gp, owner, x);
! SETPOINTER(&at, &gp);
if (state)
{
int x1, y1, x2, y2;
if (tmpl = template_findbyname(templatesym))
template_notify(tmpl, gensym("select"), 1, &at);
***************
*** 222,226 ****
x);
}
! else sys_vgui(".x%lx.c delete select%lx\n", glist_getcanvas(owner), x);
}
--- 220,230 ----
x);
}
! else
! {
! sys_vgui(".x%lx.c delete select%lx\n", glist_getcanvas(owner), x);
! if (tmpl = template_findbyname(templatesym))
! template_notify(tmpl, gensym("deselect"), 1, &at);
!
! }
}
***************
*** 249,253 ****
*(t_float *)(((char *)(x->sc_vec)) + yonset) +=
dy * (glist_pixelstoy(glist, 1) - glist_pixelstoy(glist, 0));
! glist_redrawitem(glist, z);
if (glist_isselected(glist, z))
{
--- 253,257 ----
*(t_float *)(((char *)(x->sc_vec)) + yonset) +=
dy * (glist_pixelstoy(glist, 1) - glist_pixelstoy(glist, 0));
! scalar_redraw(x, glist);
if (glist_isselected(glist, z))
{
***************
*** 296,301 ****
(*wb->w_parentvisfn)(y, owner, x->sc_vec, template, basex, basey, vis);
}
! if (!vis)
! sys_unqueuegui(x);
}
--- 300,315 ----
(*wb->w_parentvisfn)(y, owner, x->sc_vec, template, basex, basey, vis);
}
! sys_unqueuegui(x);
! }
!
! static void scalar_doredraw(t_gobj *client, t_glist *glist)
! {
! scalar_vis(client, glist, 0);
! scalar_vis(client, glist, 1);
! }
!
! void scalar_redraw(t_scalar *x, t_glist *glist)
! {
! sys_queuegui(x, glist, scalar_doredraw);
}
Index: g_all_guis.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** g_all_guis.c 16 Jul 2005 01:43:18 -0000 1.7
--- g_all_guis.c 16 Aug 2005 04:06:28 -0000 1.8
***************
*** 522,526 ****
--- 522,529 ----
(*x->x_gui.x_draw)((void *)z, glist, IEM_GUI_DRAW_MODE_NEW);
else
+ {
(*x->x_gui.x_draw)((void *)z, glist, IEM_GUI_DRAW_MODE_ERASE);
+ sys_unqueuegui(z);
+ }
}
Index: makefile.dependencies
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.dependencies,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** makefile.dependencies 29 Jul 2005 19:01:21 -0000 1.8
--- makefile.dependencies 16 Aug 2005 04:06:28 -0000 1.9
***************
*** 12,17 ****
/usr/include/bits/wchar.h /usr/include/gconv.h \
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
! /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
! m_imp.h s_stuff.h g_canvas.h /usr/include/string.h g_all_guis.h
g_graph.o: g_graph.c /usr/include/stdlib.h /usr/include/features.h \
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
--- 12,19 ----
/usr/include/bits/wchar.h /usr/include/gconv.h \
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
! /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
[...1250 lines suppressed...]
! /usr/include/endian.h /usr/include/bits/endian.h \
/usr/include/sys/select.h /usr/include/bits/select.h \
/usr/include/bits/sigset.h /usr/include/bits/time.h \
--- 1048,1055 ----
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
! /usr/include/bits/stdio.h /usr/include/unistd.h \
! /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
! /usr/include/getopt.h /usr/include/stdlib.h /usr/include/sys/types.h \
! /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
/usr/include/sys/select.h /usr/include/bits/select.h \
/usr/include/bits/sigset.h /usr/include/bits/time.h \
***************
*** 964,967 ****
--- 1060,1064 ----
/usr/include/linux/errno.h /usr/include/asm/errno.h \
/usr/include/alsa/asoundlib.h /usr/include/string.h \
+ /usr/include/bits/string.h /usr/include/bits/string2.h \
/usr/include/assert.h /usr/include/sys/poll.h /usr/include/bits/poll.h \
/usr/include/alsa/asoundef.h /usr/include/alsa/version.h \
Index: g_template.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_template.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** g_template.c 29 Jul 2005 19:01:20 -0000 1.10
--- g_template.c 16 Aug 2005 04:06:28 -0000 1.11
***************
*** 435,439 ****
for (j = 0; j < nfrom; j++)
if (!conformedfrom[j] &&
! dataslot_matches(dataslot, &tfrom->t_vec[j], 1))
{
conformaction[i] = j;
--- 435,439 ----
for (j = 0; j < nfrom; j++)
if (!conformedfrom[j] &&
! dataslot_matches(dataslot, &tfrom->t_vec[j], 0))
{
conformaction[i] = j;
***************
*** 961,966 ****
--- 961,968 ----
t_fielddesc x_outlinecolor;
t_fielddesc x_width;
+ t_fielddesc x_vis;
int x_npoints;
t_fielddesc *x_vec;
+ t_canvas *x_canvas;
} t_curve;
***************
*** 972,985 ****
int nxy, i;
t_fielddesc *fd;
if (classname[0] == 'f')
{
classname += 6;
flags |= CLOSED;
- if (argc) fielddesc_setfloatarg(&x->x_fillcolor, argc--, argv++);
- else fielddesc_setfloat_const(&x->x_outlinecolor, 0);
}
else classname += 4;
if (classname[0] == 'c') flags |= BEZ;
x->x_flags = flags;
if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++);
else fielddesc_setfloat_const(&x->x_outlinecolor, 0);
--- 974,1000 ----
int nxy, i;
t_fielddesc *fd;
+ x->x_canvas = canvas_getcurrent();
if (classname[0] == 'f')
{
classname += 6;
flags |= CLOSED;
}
else classname += 4;
if (classname[0] == 'c') flags |= BEZ;
x->x_flags = flags;
+ fielddesc_setfloat_const(&x->x_vis, 1);
+ while (1)
+ {
+ t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
+ if (!strcmp(firstarg->s_name, "-v") && argc > 1)
+ {
+ fielddesc_setfloatarg(&x->x_vis, 1, argv+1);
+ argc -= 2; argv += 2;
+ }
+ else break;
+ }
+ if ((flags & CLOSED) && argc)
+ fielddesc_setfloatarg(&x->x_fillcolor, argc--, argv++);
+ else fielddesc_setfloat_const(&x->x_fillcolor, 0);
if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++);
else fielddesc_setfloat_const(&x->x_outlinecolor, 0);
***************
*** 997,1000 ****
--- 1012,1032 ----
}
+ void curve_float(t_curve *x, t_floatarg f)
+ {
+ int viswas;
+ if (x->x_vis.fd_type != A_FLOAT || x->x_vis.fd_var)
+ {
+ pd_error(x, "global vis/invis for a template with variable visibility");
+ return;
+ }
+ viswas = (x->x_vis.fd_un.fd_float != 0);
+
+ if ((f != 0 && viswas) || (f == 0 && !viswas))
+ return;
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 2);
+ fielddesc_setfloat_const(&x->x_vis, (f != 0));
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 1);
+ }
+
/* -------------------- widget behavior for curve ------------ */
***************
*** 1007,1010 ****
--- 1039,1048 ----
t_fielddesc *f = x->x_vec;
int x1 = 0x7fffffff, x2 = -0x7fffffff, y1 = 0x7fffffff, y2 = -0x7fffffff;
+ if (!fielddesc_getfloat(&x->x_vis, template, data, 0))
+ {
+ *xp1 = *yp1 = 0x7fffffff;
+ *xp2 = *yp2 = -0x7fffffff;
+ return;
+ }
for (i = 0, f = x->x_vec; i < n; i++, f += 2)
{
***************
*** 1072,1075 ****
--- 1110,1115 ----
t_fielddesc *f = x->x_vec;
+ if (!fielddesc_getfloat(&x->x_vis, template, data, 0))
+ return;
if (vis)
{
***************
*** 1159,1163 ****
}
if (curve_motion_scalar)
! glist_redrawitem(curve_motion_glist, &curve_motion_scalar->sc_gobj);
if (curve_motion_array)
array_redraw(curve_motion_array, curve_motion_glist);
--- 1199,1203 ----
}
if (curve_motion_scalar)
! scalar_redraw(curve_motion_scalar, curve_motion_glist);
if (curve_motion_array)
array_redraw(curve_motion_array, curve_motion_glist);
***************
*** 1174,1177 ****
--- 1214,1219 ----
int besterror = 0x7fffffff;
t_fielddesc *f;
+ if (!fielddesc_getfloat(&x->x_vis, template, data, 0))
+ return (0);
for (i = 0, f = x->x_vec; i < n; i++, f += 2)
{
***************
*** 1236,1240 ****
{
curve_class = class_new(gensym("drawpolygon"), (t_newmethod)curve_new,
! (t_method)curve_free, sizeof(t_curve), CLASS_NOINLET, A_GIMME, 0);
class_setdrawcommand(curve_class);
class_addcreator((t_newmethod)curve_new, gensym("drawcurve"),
--- 1278,1282 ----
{
curve_class = class_new(gensym("drawpolygon"), (t_newmethod)curve_new,
! (t_method)curve_free, sizeof(t_curve), 0, A_GIMME, 0);
class_setdrawcommand(curve_class);
class_addcreator((t_newmethod)curve_new, gensym("drawcurve"),
***************
*** 1245,1248 ****
--- 1287,1291 ----
A_GIMME, 0);
class_setparentwidget(curve_class, &curve_widgetbehavior);
+ class_addfloat(curve_class, curve_float);
}
***************
*** 1272,1276 ****
{
t_plot *x = (t_plot *)pd_new(plot_class);
! int defstyle = PLOTSTYLE_POLY, vis = 1, scalarvis = 1;
x->x_canvas = canvas_getcurrent();
--- 1315,1319 ----
{
t_plot *x = (t_plot *)pd_new(plot_class);
! int defstyle = PLOTSTYLE_POLY;
x->x_canvas = canvas_getcurrent();
***************
*** 1279,1282 ****
--- 1322,1327 ----
fielddesc_setfloat_var(&x->x_wpoints, gensym("w"));
+ fielddesc_setfloat_const(&x->x_vis, 1);
+ fielddesc_setfloat_const(&x->x_scalarvis, 1);
while (1)
{
***************
*** 1288,1300 ****
argc--, argv++;
}
! else if (!strcmp(firstarg->s_name, "-n"))
{
! vis = 0;
! argc--; argv++;
}
! else if (!strcmp(firstarg->s_name, "-noscalar"))
{
! scalarvis = 0;
! argc--; argv++;
}
else if (!strcmp(firstarg->s_name, "-x") && argc > 1)
--- 1333,1345 ----
argc--, argv++;
}
! else if (!strcmp(firstarg->s_name, "-v") && argc > 1)
{
! fielddesc_setfloatarg(&x->x_vis, 1, argv+1);
! argc -= 2; argv += 2;
}
! else if (!strcmp(firstarg->s_name, "-vs") && argc > 1)
{
! fielddesc_setfloatarg(&x->x_scalarvis, 1, argv+1);
! argc -= 2; argv += 2;
}
else if (!strcmp(firstarg->s_name, "-x") && argc > 1)
***************
*** 1329,1336 ****
if (argc) fielddesc_setfloatarg(&x->x_style, argc--, argv++);
else fielddesc_setfloat_const(&x->x_style, defstyle);
- if (argc) fielddesc_setfloatarg(&x->x_vis, argc--, argv++);
- else fielddesc_setfloat_const(&x->x_vis, vis);
- if (argc) fielddesc_setfloatarg(&x->x_scalarvis, argc--, argv++);
- else fielddesc_setfloat_const(&x->x_scalarvis, 1);
return (x);
}
--- 1374,1377 ----
***************
*** 1702,1707 ****
{
sys_vgui("%d %f \\\n", ixpix, glist_ytopixels(glist,
! basey + fielddesc_cvttocoord(yfielddesc,
! yloc + yval) +
fielddesc_cvttocoord(wfielddesc, wval)));
ndrawn++;
--- 1743,1748 ----
{
sys_vgui("%d %f \\\n", ixpix, glist_ytopixels(glist,
! basey + yloc + fielddesc_cvttocoord(yfielddesc,
! yval) +
fielddesc_cvttocoord(wfielddesc, wval)));
ndrawn++;
***************
*** 1715,1724 ****
{
sys_vgui("%d %f \\\n", ixpix + 10, glist_ytopixels(glist,
! basey + fielddesc_cvttocoord(yfielddesc,
! yloc + yval) +
fielddesc_cvttocoord(wfielddesc, wval)));
sys_vgui("%d %f \\\n", ixpix + 10, glist_ytopixels(glist,
! basey + fielddesc_cvttocoord(yfielddesc,
! yloc + yval) -
fielddesc_cvttocoord(wfielddesc, wval)));
}
--- 1756,1765 ----
{
sys_vgui("%d %f \\\n", ixpix + 10, glist_ytopixels(glist,
! basey + yloc + fielddesc_cvttocoord(yfielddesc,
! yval) +
fielddesc_cvttocoord(wfielddesc, wval)));
sys_vgui("%d %f \\\n", ixpix + 10, glist_ytopixels(glist,
! basey + yloc + fielddesc_cvttocoord(yfielddesc,
! yval) -
fielddesc_cvttocoord(wfielddesc, wval)));
}
***************
*** 1754,1759 ****
sys_vgui("%d %f \\\n", ixpix,
glist_ytopixels(glist,
! basey + fielddesc_cvttocoord(yfielddesc,
! yloc + yval)));
ndrawn++;
}
--- 1795,1800 ----
sys_vgui("%d %f \\\n", ixpix,
glist_ytopixels(glist,
! basey + yloc + fielddesc_cvttocoord(yfielddesc,
! yval)));
ndrawn++;
}
***************
*** 1764,1769 ****
if (ndrawn == 0) sys_vgui("0 0 0 0 \\\n");
else if (ndrawn == 1) sys_vgui("%d %f \\\n", ixpix + 10,
! glist_ytopixels(glist, basey +
! fielddesc_cvttocoord(yfielddesc, yloc + yval)));
sys_vgui("-width %f\\\n", linewidth);
--- 1805,1810 ----
if (ndrawn == 0) sys_vgui("0 0 0 0 \\\n");
else if (ndrawn == 1) sys_vgui("%d %f \\\n", ixpix + 10,
! glist_ytopixels(glist, basey + yloc +
! fielddesc_cvttocoord(yfielddesc, yval)));
sys_vgui("-width %f\\\n", linewidth);
***************
*** 1790,1794 ****
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
! useyloc = basey + fielddesc_cvttocoord(yfielddesc, yloc+yval);
for (y = elemtemplatecanvas->gl_list; y; y = y->g_next)
{
--- 1831,1836 ----
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
! useyloc = basey + yloc +
! fielddesc_cvttocoord(yfielddesc, yval);
for (y = elemtemplatecanvas->gl_list; y; y = y->g_next)
{
***************
*** 1871,1880 ****
}
! /* ---------------- drawnumber: draw a number ---------------- */
/*
drawnumbers draw numeric fields at controllable locations, with
! controllable color and label .
! invocation: (drawnumber|drawsymbol) variable x y color label
*/
--- 1913,1922 ----
}
! /* ---------------- drawnumber: draw a number (or symbol) ---------------- */
/*
drawnumbers draw numeric fields at controllable locations, with
! controllable color and label. invocation:
! (drawnumber|drawsymbol) [-v <visible>] variable x y color label
*/
***************
*** 1886,1894 ****
{
t_object x_obj;
- int x_vis; /* LATER incorporate into flags field below? */
t_fielddesc x_value;
t_fielddesc x_xloc;
t_fielddesc x_yloc;
t_fielddesc x_color;
t_symbol *x_label;
int x_flags;
--- 1928,1936 ----
{
t_object x_obj;
t_fielddesc x_value;
t_fielddesc x_xloc;
t_fielddesc x_yloc;
t_fielddesc x_color;
+ t_fielddesc x_vis;
t_symbol *x_label;
int x_flags;
***************
*** 1905,1917 ****
flags |= DRAW_SYMBOL;
x->x_flags = flags;
! x->x_vis = 1;
x->x_canvas = canvas_getcurrent();
while (1)
{
t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
! if (!strcmp(firstarg->s_name, "-n"))
{
! x->x_vis = 0;
! argc--; argv++;
}
else break;
--- 1947,1959 ----
flags |= DRAW_SYMBOL;
x->x_flags = flags;
! fielddesc_setfloat_const(&x->x_vis, 1);
x->x_canvas = canvas_getcurrent();
while (1)
{
t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
! if (!strcmp(firstarg->s_name, "-v") && argc > 1)
{
! fielddesc_setfloatarg(&x->x_vis, 1, argv+1);
! argc -= 2; argv += 2;
}
else break;
***************
*** 1921,1925 ****
if (argc) fielddesc_setsymbolarg(&x->x_value, argc--, argv++);
else fielddesc_setsymbol_const(&x->x_value, &s_);
-
}
else
--- 1963,1966 ----
***************
*** 1943,1950 ****
void drawnumber_float(t_drawnumber *x, t_floatarg f)
{
! if ((f != 0 && x->x_vis) || (f == 0 && !x->x_vis))
return;
canvas_redrawallfortemplatecanvas(x->x_canvas, 2);
! x->x_vis = (f!= 0);
canvas_redrawallfortemplatecanvas(x->x_canvas, 1);
}
--- 1984,1999 ----
void drawnumber_float(t_drawnumber *x, t_floatarg f)
{
! int viswas;
! if (x->x_vis.fd_type != A_FLOAT || x->x_vis.fd_var)
! {
! pd_error(x, "global vis/invis for a template with variable visibility");
! return;
! }
! viswas = (x->x_vis.fd_un.fd_float != 0);
!
! if ((f != 0 && viswas) || (f == 0 && !viswas))
return;
canvas_redrawallfortemplatecanvas(x->x_canvas, 2);
! fielddesc_setfloat_const(&x->x_vis, (f != 0));
canvas_redrawallfortemplatecanvas(x->x_canvas, 1);
}
***************
*** 1971,1975 ****
char buf[DRAWNUMBER_BUFSIZE];
! if (!x->x_vis)
{
*xp1 = *yp1 = 0x7fffffff;
--- 2020,2024 ----
char buf[DRAWNUMBER_BUFSIZE];
! if (!fielddesc_getfloat(&x->x_vis, template, data, 0))
{
*xp1 = *yp1 = 0x7fffffff;
***************
*** 2022,2026 ****
t_drawnumber *x = (t_drawnumber *)z;
! if (!x->x_vis)
return;
if (vis)
--- 2071,2075 ----
t_drawnumber *x = (t_drawnumber *)z;
! if (!fielddesc_getfloat(&x->x_vis, template, data, 0))
return;
if (vis)
***************
*** 2068,2073 ****
1);
if (drawnumber_motion_scalar)
! glist_redrawitem(drawnumber_motion_glist,
! &drawnumber_motion_scalar->sc_gobj);
if (drawnumber_motion_array)
array_redraw(drawnumber_motion_array, drawnumber_motion_glist);
--- 2117,2121 ----
1);
if (drawnumber_motion_scalar)
! scalar_redraw(drawnumber_motion_scalar, drawnumber_motion_glist);
if (drawnumber_motion_array)
array_redraw(drawnumber_motion_array, drawnumber_motion_glist);
***************
*** 2085,2089 ****
&x1, &y1, &x2, &y2);
if (xpix >= x1 && xpix <= x2 && ypix >= y1 && ypix <= y2
! && x->x_value.fd_var && x->x_vis)
{
if (doit)
--- 2133,2138 ----
&x1, &y1, &x2, &y2);
if (xpix >= x1 && xpix <= x2 && ypix >= y1 && ypix <= y2
! && x->x_value.fd_var &&
! fielddesc_getfloat(&x->x_vis, template, data, 0))
{
if (doit)
Index: g_vdial.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_vdial.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** g_vdial.c 6 Sep 2004 20:20:34 -0000 1.4
--- g_vdial.c 16 Aug 2005 04:06:28 -0000 1.5
***************
*** 33,38 ****
/* widget helper functions */
! void vradio_draw_update(t_vradio *x, t_glist *glist)
{
if(glist_isvisible(glist))
{
--- 33,39 ----
/* widget helper functions */
! void vradio_draw_update(t_gobj *client, t_glist *glist)
{
+ t_hradio *x = (t_hradio *)client;
if(glist_isvisible(glist))
{
***************
*** 40,48 ****
sys_vgui(".x%lx.c itemconfigure %lxBUT%d -fill #%6.6x -outline #%6.6x\n",
! canvas, x, x->x_on_old,
x->x_gui.x_bcol, x->x_gui.x_bcol);
sys_vgui(".x%lx.c itemconfigure %lxBUT%d -fill #%6.6x -outline #%6.6x\n",
canvas, x, x->x_on,
x->x_gui.x_fcol, x->x_gui.x_fcol);
}
}
--- 41,50 ----
sys_vgui(".x%lx.c itemconfigure %lxBUT%d -fill #%6.6x -outline #%6.6x\n",
! canvas, x, x->x_drawn,
x->x_gui.x_bcol, x->x_gui.x_bcol);
sys_vgui(".x%lx.c itemconfigure %lxBUT%d -fill #%6.6x -outline #%6.6x\n",
canvas, x, x->x_on,
x->x_gui.x_fcol, x->x_gui.x_fcol);
+ x->x_drawn = x->x_on;
}
}
***************
*** 71,74 ****
--- 73,77 ----
yy21 += dy;
yy22 += dy;
+ x->x_drawn = x->x_on;
}
sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \
***************
*** 205,209 ****
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! vradio_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
vradio_draw_move(x, glist);
--- 208,212 ----
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! sys_queuegui(x, glist, vradio_draw_update);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
vradio_draw_move(x, glist);
Index: g_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_array.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** g_array.c 25 Jun 2005 02:49:15 -0000 1.7
--- g_array.c 16 Aug 2005 04:06:28 -0000 1.8
***************
*** 553,557 ****
while (a->a_gp.gp_stub->gs_which == GP_ARRAY)
a = a->a_gp.gp_stub->gs_un.gs_array;
! gobj_redraw(&a->a_gp.gp_un.gp_scalar->sc_gobj, glist);
}
--- 553,557 ----
while (a->a_gp.gp_stub->gs_which == GP_ARRAY)
a = a->a_gp.gp_stub->gs_un.gs_array;
! scalar_redraw(a->a_gp.gp_un.gp_scalar, glist);
}
***************
*** 616,620 ****
if (array_motion_xfield)
{
! /* it's an x, y plot; can drag many points at once */
int i;
for (i = 0; i < array_motion_npoints; i++)
--- 616,620 ----
if (array_motion_xfield)
{
! /* it's an x, y plot */
int i;
for (i = 0; i < array_motion_npoints; i++)
***************
*** 654,658 ****
{
/* a y-only plot. */
! int thisx = array_motion_initx + array_motion_xcumulative, x2;
int increment, i, nchange;
float newy = array_motion_ycumulative,
--- 654,658 ----
{
/* a y-only plot. */
! int thisx = array_motion_initx + array_motion_xcumulative + 0.5, x2;
int increment, i, nchange;
float newy = array_motion_ycumulative,
***************
*** 681,686 ****
}
if (array_motion_scalar)
! sys_queuegui(&array_motion_scalar->sc_gobj,
! array_motion_glist, gobj_redraw);
if (array_motion_array)
array_redraw(array_motion_array, array_motion_glist);
--- 681,685 ----
}
if (array_motion_scalar)
! scalar_redraw(array_motion_scalar, array_motion_glist);
if (array_motion_array)
array_redraw(array_motion_array, array_motion_glist);
***************
*** 704,707 ****
--- 703,707 ----
t_template *elemtemplate;
int elemsize, yonset, wonset, xonset, i, incr, hit;
+ float xsum;
if (elemtemplatesym == &s_float)
***************
*** 715,724 ****
incr = 1;
else incr = array->a_n / 300;
! for (i = 0; i < array->a_n; i += incr)
{
if (hit = scalar_doclick(
(t_word *)((char *)(array->a_vec) + i * elemsize),
elemtemplate, 0, array,
! glist, xloc, yloc, xpix, ypix, shift, alt, dbl, doit))
return (hit);
}
--- 715,733 ----
incr = 1;
else incr = array->a_n / 300;
! for (i = 0, xsum = 0; i < array->a_n; i += incr)
{
+ float usexloc, useyloc;
+ if (xonset >= 0)
+ usexloc = xloc + fielddesc_cvttocoord(xfield,
+ *(float *)(((char *)(array->a_vec) + elemsize * i) + xonset));
+ else usexloc = xloc + xsum, xsum += xinc;
+ useyloc = yloc + (yonset >= 0 ? fielddesc_cvttocoord(yfield,
+ *(float *)(((char *)(array->a_vec) + elemsize * i) + yonset)) : 0);
+
if (hit = scalar_doclick(
(t_word *)((char *)(array->a_vec) + i * elemsize),
elemtemplate, 0, array,
! glist, usexloc, useyloc,
! xpix, ypix, shift, alt, dbl, doit))
return (hit);
}
***************
*** 851,856 ****
fielddesc_getcoord(xfield, array_motion_template,
(t_word *)(elem + i * elemsize), 1);
! array_motion_wp = (t_word *)(elem + i * elemsize);
! array_motion_npoints = array->a_n - i;
}
else
--- 860,867 ----
fielddesc_getcoord(xfield, array_motion_template,
(t_word *)(elem + i * elemsize), 1);
! array_motion_wp = (t_word *)(elem + i * elemsize);
! if (shift)
! array_motion_npoints = array->a_n - i;
! else array_motion_npoints = 1;
}
else
Index: g_all_guis.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** g_all_guis.h 6 Sep 2004 20:20:33 -0000 1.4
--- g_all_guis.h 16 Aug 2005 04:06:28 -0000 1.5
***************
*** 199,205 ****
t_iemgui x_gui;
int x_on;
! int x_on_old;
int x_change;
int x_number;
t_atom x_at[2];
} t_hdial;
--- 199,206 ----
t_iemgui x_gui;
int x_on;
! int x_on_old; /* LATER delete this; it's used for old version */
int x_change;
int x_number;
+ int x_drawn;
t_atom x_at[2];
} t_hdial;
***************
*** 243,246 ****
--- 244,249 ----
void *x_out_rms;
void *x_out_peak;
+ unsigned int x_updaterms:1;
+ unsigned int x_updatepeak:1;
} t_vu;
***************
*** 267,270 ****
--- 270,274 ----
int x_change;
int x_number;
+ int x_drawn;
t_atom x_at[2];
} t_vdial;
Index: g_hdial.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** g_hdial.c 6 Nov 2004 16:07:33 -0000 1.5
--- g_hdial.c 16 Aug 2005 04:06:28 -0000 1.6
***************
*** 32,37 ****
/* widget helper functions */
! void hradio_draw_update(t_hradio *x, t_glist *glist)
{
if(glist_isvisible(glist))
{
--- 32,38 ----
/* widget helper functions */
! void hradio_draw_update(t_gobj *client, t_glist *glist)
{
+ t_hradio *x = (t_hradio *)client;
if(glist_isvisible(glist))
{
***************
*** 39,47 ****
sys_vgui(".x%lx.c itemconfigure %lxBUT%d -fill #%6.6x -outline #%6.6x\n",
! canvas, x, x->x_on_old,
x->x_gui.x_bcol, x->x_gui.x_bcol);
sys_vgui(".x%lx.c itemconfigure %lxBUT%d -fill #%6.6x -outline #%6.6x\n",
canvas, x, x->x_on,
x->x_gui.x_fcol, x->x_gui.x_fcol);
}
}
--- 40,49 ----
sys_vgui(".x%lx.c itemconfigure %lxBUT%d -fill #%6.6x -outline #%6.6x\n",
! canvas, x, x->x_drawn,
x->x_gui.x_bcol, x->x_gui.x_bcol);
sys_vgui(".x%lx.c itemconfigure %lxBUT%d -fill #%6.6x -outline #%6.6x\n",
canvas, x, x->x_on,
x->x_gui.x_fcol, x->x_gui.x_fcol);
+ x->x_drawn = x->x_on;
}
}
***************
*** 69,72 ****
--- 71,75 ----
xx21 += dx;
xx22 += dx;
+ x->x_drawn = x->x_on;
}
sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \
***************
*** 205,209 ****
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! hradio_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
hradio_draw_move(x, glist);
--- 208,212 ----
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! sys_queuegui(x, glist, hradio_draw_update);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
hradio_draw_move(x, glist);
Index: makefile
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** makefile 29 Jul 2005 19:01:20 -0000 1.16
--- makefile 16 Aug 2005 04:06:28 -0000 1.17
***************
*** 20,24 ****
LIB = -ldl -lpthread -lasound
! OPT_CFLAGS = -g
WARN_CFLAGS = -Wall -W -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
--- 20,24 ----
LIB = -ldl -lpthread -lasound
! OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
WARN_CFLAGS = -Wall -W -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** g_canvas.c 2 Jul 2005 05:03:06 -0000 1.8
--- g_canvas.c 16 Aug 2005 04:06:28 -0000 1.9
***************
*** 404,407 ****
--- 404,419 ----
x->gl_loading = 1;
x->gl_goprect = 0; /* no GOP rectangle unless it's turned on later */
+ /* cancel "vis" flag if we're a subpatch of an
+ abstraction inside another patch. A separate mechanism prevents
+ the toplevel abstraction from showing up. */
+ if (vis && gensym("#X")->s_thing &&
+ ((*gensym("#X")->s_thing) == canvas_class))
+ {
+ t_canvas *zzz = (t_canvas *)(gensym("#X")->s_thing);
+ while (zzz && !zzz->gl_env)
+ zzz = zzz->gl_owner;
+ if (zzz && canvas_isabstraction(zzz) && zzz->gl_owner)
+ vis = 0;
+ }
x->gl_willvis = vis;
x->gl_edit = !strncmp(x->gl_name->s_name, "Untitled", 8);
***************
*** 1345,1357 ****
}
- /* LATER replace this with a queueing scheme */
- void glist_redrawitem(t_glist *owner, t_gobj *gobj)
- {
- if (glist_isvisible(owner))
- {
- gobj_vis(gobj, owner, 0);
- gobj_vis(gobj, owner, 1);
- }
- }
/* redraw all "scalars" (do this if a drawing command is changed.)
--- 1357,1360 ----
***************
*** 1377,1381 ****
gobj_vis(g, gl, 0);
}
! else glist_redrawitem(gl, g);
}
else if (g->g_pd == canvas_class)
--- 1380,1384 ----
gobj_vis(g, gl, 0);
}
! else scalar_redraw((t_scalar *)g, gl);
}
else if (g->g_pd == canvas_class)
Index: notes.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/notes.txt,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** notes.txt 29 Jul 2005 19:01:21 -0000 1.17
--- notes.txt 16 Aug 2005 04:06:28 -0000 1.18
***************
*** 11,14 ****
--- 11,15 ----
plot drawing instructions turn on and off
ranges in drawing instructions
+ select/deselect hook
unify graph properties dialogs
GOP font depends on abstraction, not parent
***************
*** 19,25 ****
--- 20,38 ----
bug fix writing aiff gfiles
bug fix (tcl error messages when starting open dialogs)
+ pointer rewind (also check if send-window documented?)
+
------------ 0.39 ---------
problems:
+ "list" to signal inlet (e.g., "*~") complains
+ "find" doesn't open GOPs correctly
+ save dirty abstractions on close
+ close dirty patches on quit
+ stop vis-ing subpatches of abstractions
+ when retyping abstractions, offer to save dirty one
+ don't filter locked click() through getrect
+ better hit detection (getrect is too greedy; try just sending it through)
+ thread-unsafe callbacks from sys_microsleep()
+
windows:
modal dialogs confuse watchdog
***************
*** 27,30 ****
--- 40,44 ----
mac:
load libraries first before opening patches on drag-and-drop
+ writing 3-byte soundfiles distorts???
check:
***************
*** 32,38 ****
blechman patch for s_inter.c
check what happens when going back and forth between graph-on-parent
-
- garray change:
- make a gobj_redraw that schedules the redraw
array_resize etc., should redraw the array directly? Or should "setsize"
and "garray_resize" do it instead? check it's queued correctly.
--- 46,49 ----
***************
*** 48,56 ****
array name changes don't show up on parent
arrays that don't fit in bounds don't update (same as red rectangle problem?)
! look in d_resample.pd to inderstand inlet~ upsampling...
flag for array to suppress printing name
fix samplerate~ to figure out blocking
patcher inlets don't deal with scalars (zbug.pd)
- need to optimize canvas_motion (get rid of box hit test??)
check if there's a problem loading libs on startup if superuser
tk errors for large tables?
--- 59,66 ----
array name changes don't show up on parent
arrays that don't fit in bounds don't update (same as red rectangle problem?)
! look in d_resample.pd to understand inlet~ upsampling...
flag for array to suppress printing name
fix samplerate~ to figure out blocking
patcher inlets don't deal with scalars (zbug.pd)
check if there's a problem loading libs on startup if superuser
tk errors for large tables?
***************
*** 107,111 ****
vget, vset traversal objects
cursor to show (x, y) location
- better hit detection (getrect is too greedy; try tk's "current" tag for canvas)
typing at drawnumbers
test and debug list elements of templates
--- 117,120 ----
Index: g_vslider.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_vslider.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** g_vslider.c 6 Sep 2004 20:20:34 -0000 1.4
--- g_vslider.c 16 Aug 2005 04:06:28 -0000 1.5
***************
*** 31,36 ****
/* widget helper functions */
! static void vslider_draw_update(t_vslider *x, t_glist *glist)
{
if (glist_isvisible(glist))
{
--- 31,37 ----
/* widget helper functions */
! static void vslider_draw_update(t_gobj *client, t_glist *glist)
{
+ t_vslider *x = (t_vslider *)client;
if (glist_isvisible(glist))
{
***************
*** 175,179 ****
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! vslider_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
vslider_draw_move(x, glist);
--- 176,180 ----
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! sys_queuegui(x, glist, vslider_draw_update);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
vslider_draw_move(x, glist);
Index: g_canvas.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** g_canvas.h 13 Jul 2005 02:28:49 -0000 1.9
--- g_canvas.h 16 Aug 2005 04:06:28 -0000 1.10
***************
*** 353,357 ****
EXTERN void gobj_properties(t_gobj *x, struct _glist *glist);
EXTERN void gobj_save(t_gobj *x, t_binbuf *b);
- EXTERN void gobj_redraw(t_gobj *gobj, t_glist *glist);
/* -------------------- functions on glists --------------------- */
--- 353,356 ----
***************
*** 388,392 ****
EXTERN float glist_dpixtody(t_glist *x, float dypix);
- EXTERN void glist_redrawitem(t_glist *owner, t_gobj *gobj);
EXTERN void glist_getnextxy(t_glist *gl, int *xval, int *yval);
EXTERN void glist_glist(t_glist *g, t_symbol *s, int argc, t_atom *argv);
--- 387,390 ----
***************
*** 523,534 ****
EXTERN void linetraverser_skipobject(t_linetraverser *t);
- /* --------------------- functions on tscalars --------------------- */
-
- EXTERN void tscalar_getrect(t_tscalar *x, t_glist *owner,
- int *xp1, int *yp1, int *xp2, int *yp2);
- EXTERN void tscalar_vis(t_tscalar *x, t_glist *owner, int flag);
- EXTERN int tscalar_click(t_tscalar *x, int xpix, int ypix, int shift,
- int alt, int dbl, int doit);
-
/* --------- functions on garrays (graphical arrays) -------------------- */
--- 521,524 ----
***************
*** 555,558 ****
--- 545,549 ----
EXTERN void word_free(t_word *wp, t_template *tmpl);
EXTERN void scalar_getbasexy(t_scalar *x, float *basex, float *basey);
+ EXTERN void scalar_redraw(t_scalar *x, t_glist *glist);
/* ------helper routines for "garrays" and "plots" -------------- */
Index: configure.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/configure.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** configure.in 29 Jul 2005 19:01:19 -0000 1.14
--- configure.in 16 Aug 2005 04:06:28 -0000 1.15
***************
*** 350,353 ****
fi
! AC_OUTPUT(makefile config.h)
--- 350,353 ----
fi
! AC_OUTPUT(makefile)
Index: g_vumeter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_vumeter.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** g_vumeter.c 6 Sep 2004 20:20:35 -0000 1.4
--- g_vumeter.c 16 Aug 2005 04:06:28 -0000 1.5
***************
*** 77,80 ****
--- 77,95 ----
}
+ static void vu_draw_update(t_gobj *client, t_glist *glist)
+ {
+ t_vu *x = (t_vu *)client;
+ if (x->x_updaterms)
+ {
+ vu_update_rms(x, glist);
+ x->x_updaterms = 0;
+ }
+ if (x->x_updatepeak)
+ {
+ vu_update_peak(x, glist);
+ x->x_updatepeak = 0;
+ }
+ }
+
static void vu_draw_new(t_vu *x, t_glist *glist)
{
***************
*** 152,155 ****
--- 167,172 ----
x, 1);
}
+ x->x_updaterms = x->x_updatepeak = 1;
+ sys_queuegui(x, x->x_gui.x_glist, vu_draw_update);
}
***************
*** 186,191 ****
canvas, x, i, end, yyy+k3);
}
! vu_update_peak(x, glist);
! vu_update_rms(x, glist);
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, xpos+x->x_gui.x_ldx,
--- 203,208 ----
canvas, x, i, end, yyy+k3);
}
! x->x_updaterms = x->x_updatepeak = 1;
! sys_queuegui(x, glist, vu_draw_update);
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, xpos+x->x_gui.x_ldx,
***************
*** 573,577 ****
x->x_fr = rms;
outlet_float(x->x_out_rms, rms);
! vu_update_rms(x, x->x_gui.x_glist);
}
--- 590,595 ----
x->x_fr = rms;
outlet_float(x->x_out_rms, rms);
! x->x_updaterms = 1;
! sys_queuegui(x, x->x_gui.x_glist, vu_draw_update);
}
***************
*** 592,597 ****
peak = 0.01*(float)(i - 10000);
x->x_fp = peak;
outlet_float(x->x_out_peak, peak);
- vu_update_peak(x, x->x_gui.x_glist);
}
--- 610,616 ----
peak = 0.01*(float)(i - 10000);
x->x_fp = peak;
+ x->x_updatepeak = 1;
+ sys_queuegui(x, x->x_gui.x_glist, vu_draw_update);
outlet_float(x->x_out_peak, peak);
}
***************
*** 600,605 ****
outlet_float(x->x_out_peak, x->x_fp);
outlet_float(x->x_out_rms, x->x_fr);
! vu_update_rms(x, x->x_gui.x_glist);
! vu_update_peak(x, x->x_gui.x_glist);
}
--- 619,624 ----
outlet_float(x->x_out_peak, x->x_fp);
outlet_float(x->x_out_rms, x->x_fr);
! x->x_updaterms = x->x_updatepeak = 1;
! sys_queuegui(x, x->x_gui.x_glist, vu_draw_update);
}
Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** s_main.c 29 Jul 2005 19:01:21 -0000 1.15
--- s_main.c 16 Aug 2005 04:06:28 -0000 1.16
***************
*** 3,7 ****
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
! char pd_version[] = "Pd version 0.39 TEST 4b\n";
char pd_compiletime[] = __TIME__;
char pd_compiledate[] = __DATE__;
--- 3,7 ----
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
! char pd_version[] = "Pd version 0.39 TEST 4c\n";
char pd_compiletime[] = __TIME__;
char pd_compiledate[] = __DATE__;
Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** g_editor.c 8 Jul 2005 00:02:44 -0000 1.9
--- g_editor.c 16 Aug 2005 04:06:28 -0000 1.10
***************
*** 95,103 ****
}
- void gobj_redraw(t_gobj *gobj, t_glist *glist)
- {
- glist_redrawitem(glist, gobj);
- }
-
/* ------------------------ managing the selection ----------------- */
--- 95,98 ----
***************
*** 697,704 ****
/* we're going to remake the object, so "g" will go stale.
Get its index here, and afterward restore g. Also, the
! replacement will be at teh end of the list, so we don't
do g = g->g_next in this case. */
int j = glist_getindex(gl, g);
! if (!gl->gl_havewindow)
canvas_vis(glist_getcanvas(gl), 1);
glist_noselect(gl);
--- 692,700 ----
/* we're going to remake the object, so "g" will go stale.
Get its index here, and afterward restore g. Also, the
! replacement will be at the end of the list, so we don't
do g = g->g_next in this case. */
int j = glist_getindex(gl, g);
! int hadwindow = gl->gl_havewindow;
! if (!hadwindow)
canvas_vis(glist_getcanvas(gl), 1);
glist_noselect(gl);
***************
*** 710,713 ****
--- 706,711 ----
glist_noselect(gl);
g = glist_nth(gl, j);
+ if (!hadwindow)
+ canvas_vis(glist_getcanvas(gl), 0);
}
else
***************
*** 956,960 ****
if (x->gl_havewindow)
canvas_redraw(x);
! else gobj_redraw(&x->gl_gobj, x->gl_owner);
}
--- 954,962 ----
if (x->gl_havewindow)
canvas_redraw(x);
! else if (glist_isvisible(x->gl_owner))
! {
! gobj_vis(&x->gl_gobj, x->gl_owner, 0);
! gobj_vis(&x->gl_gobj, x->gl_owner, 1);
! }
}
Index: g_hslider.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hslider.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** g_hslider.c 6 Sep 2004 20:20:33 -0000 1.4
--- g_hslider.c 16 Aug 2005 04:06:28 -0000 1.5
***************
*** 31,36 ****
/* widget helper functions */
! static void hslider_draw_update(t_hslider *x, t_glist *glist)
{
t_canvas *canvas=glist_getcanvas(glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
--- 31,37 ----
/* widget helper functions */
! static void hslider_draw_update(t_gobj *client, t_glist *glist)
{
+ t_hslider *x = (t_hslider *)client;
t_canvas *canvas=glist_getcanvas(glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
***************
*** 183,187 ****
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! hslider_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
hslider_draw_move(x, glist);
--- 184,188 ----
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! sys_queuegui(x, glist, hslider_draw_update);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
hslider_draw_move(x, glist);
Index: g_numbox.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_numbox.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** g_numbox.c 16 Jul 2005 01:43:18 -0000 1.6
--- g_numbox.c 16 Aug 2005 04:06:28 -0000 1.7
***************
*** 27,30 ****
--- 27,31 ----
static void my_numbox_key(void *z, t_floatarg fkey);
+ static void my_numbox_draw_update(t_gobj *client, t_glist *glist);
/* ------------ nmx gui-my number box ----------------------- */
***************
*** 40,44 ****
{
x->x_gui.x_fsf.x_change = 0;
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
}
--- 41,45 ----
{
x->x_gui.x_fsf.x_change = 0;
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
}
***************
*** 46,50 ****
static void my_numbox_tick_wait(t_my_numbox *x)
{
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
--- 47,51 ----
static void my_numbox_tick_wait(t_my_numbox *x)
{
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
***************
*** 128,133 ****
}
! static void my_numbox_draw_update(t_my_numbox *x, t_glist *glist)
{
if (glist_isvisible(glist))
{
--- 129,135 ----
}
! static void my_numbox_draw_update(t_gobj *client, t_glist *glist)
{
+ t_my_numbox *x = (t_my_numbox *)client;
if (glist_isvisible(glist))
{
***************
*** 316,320 ****
clock_unset(x->x_clock_reset);
x->x_buf[0] = 0;
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
sys_vgui(".x%lx.c itemconfigure %lxBASE1 -outline #%6.6x\n",
--- 318,322 ----
clock_unset(x->x_clock_reset);
x->x_buf[0] = 0;
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
sys_vgui(".x%lx.c itemconfigure %lxBASE1 -outline #%6.6x\n",
***************
*** 343,347 ****
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! my_numbox_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
my_numbox_draw_move(x, glist);
--- 345,349 ----
{
if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! sys_queuegui(x, glist, my_numbox_draw_update);
else if(mode == IEM_GUI_DRAW_MODE_MOVE)
my_numbox_draw_move(x, glist);
***************
*** 383,387 ****
x->x_gui.x_fsf.x_change = 0;
clock_unset(x->x_clock_reset);
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
binbuf_addv(b, "ssiisiiffiisssiiiiiiifi", gensym("#X"),gensym("obj"),
--- 385,389 ----
x->x_gui.x_fsf.x_change = 0;
clock_unset(x->x_clock_reset);
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
binbuf_addv(b, "ssiisiiffiisssiiiiiiifi", gensym("#X"),gensym("obj"),
***************
*** 447,451 ****
x->x_gui.x_fsf.x_change = 0;
clock_unset(x->x_clock_reset);
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
--- 449,453 ----
x->x_gui.x_fsf.x_change = 0;
clock_unset(x->x_clock_reset);
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
***************
*** 523,527 ****
x->x_val -= k2*dy;
my_numbox_clip(x);
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
my_numbox_bang(x);
clock_unset(x->x_clock_reset);
--- 525,529 ----
x->x_val -= k2*dy;
my_numbox_clip(x);
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
my_numbox_bang(x);
clock_unset(x->x_clock_reset);
***************
*** 561,565 ****
clock_unset(x->x_clock_reset);
x->x_buf[0] = 0;
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
}
--- 563,567 ----
clock_unset(x->x_clock_reset);
x->x_buf[0] = 0;
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
}
***************
*** 571,575 ****
x->x_val = f;
my_numbox_clip(x);
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
--- 573,577 ----
x->x_val = f;
my_numbox_clip(x);
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
***************
*** 623,627 ****
(double)atom_getfloatarg(1, ac, av)))
{
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
/*my_numbox_bang(x);*/
}
--- 625,629 ----
(double)atom_getfloatarg(1, ac, av)))
{
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
/*my_numbox_bang(x);*/
}
***************
*** 664,668 ****
if(my_numbox_check_minmax(x, x->x_min, x->x_max))
{
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
/*my_numbox_bang(x);*/
}
--- 666,670 ----
if(my_numbox_check_minmax(x, x->x_min, x->x_max))
{
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
/*my_numbox_bang(x);*/
}
***************
*** 683,687 ****
if(!sys_noloadbang && x->x_gui.x_isa.x_loadinit)
{
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
my_numbox_bang(x);
}
--- 685,689 ----
if(!sys_noloadbang && x->x_gui.x_isa.x_loadinit)
{
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
my_numbox_bang(x);
}
***************
*** 699,703 ****
x->x_gui.x_fsf.x_change = 0;
clock_unset(x->x_clock_reset);
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
return;
}
--- 701,705 ----
x->x_gui.x_fsf.x_change = 0;
clock_unset(x->x_clock_reset);
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
return;
}
***************
*** 709,713 ****
buf[0] = c;
strcat(x->x_buf, buf);
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
}
--- 711,715 ----
buf[0] = c;
strcat(x->x_buf, buf);
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
}
***************
*** 719,723 ****
sl = 0;
x->x_buf[sl] = 0;
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
else if((c=='\n')||(c==13))
--- 721,725 ----
sl = 0;
x->x_buf[sl] = 0;
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
else if((c=='\n')||(c==13))
***************
*** 729,733 ****
my_numbox_clip(x);
my_numbox_bang(x);
! (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
}
clock_delay(x->x_clock_reset, 3000);
--- 731,735 ----
my_numbox_clip(x);
my_numbox_bang(x);
! sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update);
}
clock_delay(x->x_clock_reset, 3000);