Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21713
Modified Files: Tag: desiredata desire.c Log Message: switching to class_new2 and class_addcreator2
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.112 retrieving revision 1.1.2.217.2.113 diff -C2 -d -r1.1.2.217.2.112 -r1.1.2.217.2.113 *** desire.c 4 Jan 2007 21:37:05 -0000 1.1.2.217.2.112 --- desire.c 4 Jan 2007 21:55:35 -0000 1.1.2.217.2.113 *************** *** 976,980 ****
/* this routine starts DSP for all root canvases. */ ! static void canvas_start_dsp(void) { if (canvas_dspstate) ugen_stop(); else sys_gui("pdtk_pd_dsp 1\n"); --- 976,980 ----
/* this routine starts DSP for all root canvases. */ ! static void canvas_start_dsp() { if (canvas_dspstate) ugen_stop(); else sys_gui("pdtk_pd_dsp 1\n"); *************** *** 988,992 **** }
! static void canvas_stop_dsp(void) { if (canvas_dspstate) { ugen_stop(); --- 988,992 ---- }
! static void canvas_stop_dsp() { if (canvas_dspstate) { ugen_stop(); *************** *** 2156,2160 **** }
! static void g_array_setup(void) { t_class *c = garray_class = class_new2("array",0,garray_free,sizeof(t_garray),CLASS_GOBJ,""); class_addlist(garray_class, garray_list); --- 2156,2160 ---- }
! static void g_array_setup() { t_class *c = garray_class = class_new2("array",0,garray_free,sizeof(t_garray),CLASS_GOBJ,""); class_addlist(garray_class, garray_list); *************** *** 3303,3307 **** }
! static void vinlet_setup(void) { t_class *c = vinlet_class = class_new2("inlet",vinlet_new,vinlet_free,sizeof(t_vinlet),CLASS_NOINLET,"S"); class_addcreator2("inlet~",vinlet_newsig,"S"); --- 3303,3307 ---- }
! static void vinlet_setup() { t_class *c = vinlet_class = class_new2("inlet",vinlet_new,vinlet_free,sizeof(t_vinlet),CLASS_NOINLET,"S"); class_addcreator2("inlet~",vinlet_newsig,"S"); *************** *** 3544,3548 ****
! static void voutlet_setup(void) { t_class *c = voutlet_class = class_new2("outlet",voutlet_new,voutlet_free,sizeof(t_voutlet),CLASS_NOINLET,"S"); class_addcreator2("outlet~",voutlet_newsig,"S"); --- 3544,3548 ----
! static void voutlet_setup() { t_class *c = voutlet_class = class_new2("outlet",voutlet_new,voutlet_free,sizeof(t_voutlet),CLASS_NOINLET,"S"); class_addcreator2("outlet~",voutlet_newsig,"S"); *************** *** 3779,3783 **** }
! static void g_scalar_setup(void) { scalar_class = class_new2("scalar",0,scalar_free,0,CLASS_GOBJ,""); class_setsavefn(scalar_class, scalar_save); --- 3779,3783 ---- }
! static void g_scalar_setup() { scalar_class = class_new2("scalar",0,scalar_free,0,CLASS_GOBJ,""); class_setsavefn(scalar_class, scalar_save); *************** *** 5042,5046 **** static void drawnumber_free(t_drawnumber *x) {}
! static void g_template_setup(void) { template_class = class_new2("template",0,template_free,sizeof(t_template),CLASS_PD,""); class_addmethod2(pd_canvasmaker._class, template_usetemplate, "struct", "*"); --- 5042,5046 ---- static void drawnumber_free(t_drawnumber *x) {}
! static void g_template_setup() { template_class = class_new2("template",0,template_free,sizeof(t_template),CLASS_PD,""); class_addmethod2(pd_canvasmaker._class, template_usetemplate, "struct", "*"); *************** *** 5628,5632 **** static void sublist_free(t_sublist *x, t_gpointer *gp) {gpointer_unset(&x->gp);}
! static void g_traversal_setup(void) { t_class *c = ptrobj_class = class_new2("pointer",ptrobj_new,ptrobj_free,sizeof(t_ptrobj),0,"*"); class_addmethod2(c, ptrobj_traverse,"traverse", "s"); --- 5628,5632 ---- static void sublist_free(t_sublist *x, t_gpointer *gp) {gpointer_unset(&x->gp);}
! static void g_traversal_setup() { t_class *c = ptrobj_class = class_new2("pointer",ptrobj_new,ptrobj_free,sizeof(t_ptrobj),0,"*"); class_addmethod2(c, ptrobj_traverse,"traverse", "s"); *************** *** 6156,6160 **** }
! static void g_text_setup(void) { t_class *c; text_class = class_new2("text", 0,0,sizeof(t_text),CLASS_NOINLET|CLASS_PATCHABLE,0); --- 6156,6160 ---- }
! static void g_text_setup() { t_class *c; text_class = class_new2("text", 0,0,sizeof(t_text),CLASS_NOINLET|CLASS_PATCHABLE,0); *************** *** 7303,7307 **** }
! static void g_canvas_setup(void) { reply_class = class_new2("reply",0,reply_free,sizeof(t_reply),CLASS_GOBJ,"!"); // class_setsavefn(reply_class, (t_savefn)reply_savefn); --- 7303,7307 ---- }
! static void g_canvas_setup() { reply_class = class_new2("reply",0,reply_free,sizeof(t_reply),CLASS_GOBJ,"!"); // class_setsavefn(reply_class, (t_savefn)reply_savefn); *************** *** 7330,7338 **** class_addmethod2(c,canvas_map,"map","f"); class_addmethod2(c,canvas_clear,"clear",""); ! class_addcreator((t_newmethod)subcanvas_new, gensym("pd"), A_DEFSYMBOL, 0); ! class_addcreator((t_newmethod)subcanvas_new, gensym("page"), A_DEFSYMBOL, 0); class_addmethod2(c,canvas_dsp,"dsp",""); class_addmethod2(c,canvas_rename_method,"rename","*"); ! class_addcreator((t_newmethod)table_new, gensym("table"), A_DEFSYM, A_DEFFLOAT, 0); class_addmethod2(c,canvas_close,"close","F"); class_addmethod2(c,canvas_find, "find","*"); --- 7330,7338 ---- class_addmethod2(c,canvas_map,"map","f"); class_addmethod2(c,canvas_clear,"clear",""); ! class_addcreator2("pd",subcanvas_new,"S"); ! class_addcreator2("page",subcanvas_new,"S"); class_addmethod2(c,canvas_dsp,"dsp",""); class_addmethod2(c,canvas_rename_method,"rename","*"); ! class_addcreator2("table",table_new,"SF"); class_addmethod2(c,canvas_close,"close","F"); class_addmethod2(c,canvas_find, "find","*"); *************** *** 7451,7461 **** }
! void desire_setup(void) { t_class *c; s_empty = gensym("empty"); s_Pd = gensym("Pd"); s_pd = gensym("pd"); ! manager_class = class_new(gensym("__manager"), (t_newmethod)manager_new, ! (t_method)manager_free, sizeof(t_manager), 0, A_GIMME, 0); class_addanything(manager_class,manager_anything); class_setnotice(manager_class,manager_notice); --- 7451,7460 ---- }
! static void desire_setup() { t_class *c; s_empty = gensym("empty"); s_Pd = gensym("Pd"); s_pd = gensym("pd"); ! manager_class = class_new2("__manager",manager_new,manager_free,sizeof(t_manager),0,"*"); class_addanything(manager_class,manager_anything); class_setnotice(manager_class,manager_notice); *************** *** 7465,7470 **** #undef S
! c = bng_class = class_new(gensym("bng"), (t_newmethod)bng_new, ! (t_method)iemgui_free, sizeof(t_bng), 0, A_GIMME, 0); iemgui_subclass(c); class_addbang (c, bng_bang); --- 7464,7468 ---- #undef S
! c = bng_class = class_new2("bng",bng_new,iemgui_free,sizeof(t_bng),0,"*"); iemgui_subclass(c); class_addbang (c, bng_bang); *************** *** 7483,7489 **** class_setfieldnames(c, "foo bar x1 y1 class w hold break isa snd rcv lab ldx ldy fstyle fs bcol fcol lcol");
! c = toggle_class = class_new(gensym("tgl"), (t_newmethod)toggle_new, ! (t_method)iemgui_free, sizeof(t_toggle), 0, A_GIMME, 0); ! class_addcreator((t_newmethod)toggle_new, gensym("toggle"), A_GIMME, 0); iemgui_subclass(c); class_addbang(c, toggle_bang); --- 7481,7486 ---- class_setfieldnames(c, "foo bar x1 y1 class w hold break isa snd rcv lab ldx ldy fstyle fs bcol fcol lcol");
! c = toggle_class = class_new2("tgl",toggle_new,iemgui_free,sizeof(t_toggle),0,"*"); ! class_addcreator2("toggle",toggle_new,"*"); iemgui_subclass(c); class_addbang(c, toggle_bang); *************** *** 7498,7503 **** class_sethelpsymbol(c, gensym("toggle"));
! c = radio_class = class_new(gensym("radio"), (t_newmethod)radio_new, ! (t_method)iemgui_free, sizeof(t_radio), 0, A_GIMME, 0); iemgui_subclass(c); class_addbang(c, radio_bang); --- 7495,7499 ---- class_sethelpsymbol(c, gensym("toggle"));
! c = radio_class = class_new2("radio",radio_new,iemgui_free,sizeof(t_radio),0,"*"); iemgui_subclass(c); class_addbang(c, radio_bang); *************** *** 7517,7534 **** class_setsavefn(c,(t_savefn)radio_savefn); class_sethelpsymbol(c, gensym("hradio")); ! class_addcreator((t_newmethod)radio_new, gensym("hradio"), A_GIMME, 0); ! class_addcreator((t_newmethod)radio_new, gensym("vradio"), A_GIMME, 0); ! class_addcreator((t_newmethod)radio_new, gensym("hdl"), A_GIMME, 0); ! class_addcreator((t_newmethod)radio_new, gensym("vdl"), A_GIMME, 0); ! class_addcreator((t_newmethod)radio_new, gensym("rdb"), A_GIMME, 0); ! class_addcreator((t_newmethod)radio_new, gensym("radiobut"), A_GIMME, 0); ! class_addcreator((t_newmethod)radio_new, gensym("radiobutton"), A_GIMME, 0);
! c = slider_class = class_new(gensym("slider"), (t_newmethod)slider_new, ! (t_method)iemgui_free, sizeof(t_slider), 0, A_GIMME, 0); ! class_addcreator((t_newmethod)slider_new, gensym("hslider"), A_GIMME, 0); ! class_addcreator((t_newmethod)slider_new, gensym("vslider"), A_GIMME, 0); ! class_addcreator((t_newmethod)slider_new, gensym( "hsl"), A_GIMME, 0); ! class_addcreator((t_newmethod)slider_new, gensym( "vsl"), A_GIMME, 0);
iemgui_subclass(c); --- 7513,7529 ---- class_setsavefn(c,(t_savefn)radio_savefn); class_sethelpsymbol(c, gensym("hradio")); ! class_addcreator2("hradio",radio_new,"*"); ! class_addcreator2("vradio",radio_new,"*"); ! class_addcreator2("hdl",radio_new,"*"); ! class_addcreator2("vdl",radio_new,"*"); ! class_addcreator2("rdb",radio_new,"*"); ! class_addcreator2("radiobut",radio_new,"*"); ! class_addcreator2("radiobutton",radio_new,"*");
! c = slider_class = class_new2("slider",slider_new,iemgui_free,sizeof(t_slider),0,"*"); ! class_addcreator2("hslider",slider_new,"*"); ! class_addcreator2("vslider",slider_new,"*"); ! class_addcreator2("hsl" ,slider_new,"*"); ! class_addcreator2("vsl" ,slider_new,"*");
iemgui_subclass(c); *************** *** 7550,7556 **** class_sethelpsymbol(c, gensym("hslider"));
! c = nbx_class = class_new(gensym("nbx"), (t_newmethod)nbx_new, ! (t_method)iemgui_free, sizeof(t_nbx), 0, A_GIMME, 0); ! class_addcreator((t_newmethod)nbx_new, gensym("nbx"), A_GIMME, 0); iemgui_subclass(c); class_addbang(c,nbx_bang); --- 7545,7549 ---- class_sethelpsymbol(c, gensym("hslider"));
! c = nbx_class = class_new2("nbx",nbx_new,iemgui_free,sizeof(t_nbx),0,"*"); iemgui_subclass(c); class_addbang(c,nbx_bang); *************** *** 7569,7575 **** class_sethelpsymbol(c, gensym("numbox2"));
! c = cnv_class = class_new(gensym("cnv"), (t_newmethod)cnv_new, ! (t_method)iemgui_free, sizeof(t_cnv), CLASS_NOINLET, A_GIMME, 0); ! class_addcreator((t_newmethod)cnv_new, gensym("cnv"), A_GIMME, 0); class_addmethod2(c,cnv_reload,"reload","*"); class_addmethod2(c,cnv_size,"size","*"); --- 7562,7566 ---- class_sethelpsymbol(c, gensym("numbox2"));
! c = cnv_class = class_new2("cnv",cnv_new,iemgui_free,sizeof(t_cnv),CLASS_NOINLET,"*"); class_addmethod2(c,cnv_reload,"reload","*"); class_addmethod2(c,cnv_size,"size","*"); *************** *** 7580,7584 **** class_sethelpsymbol(c, gensym("my_canvas"));
! c = vu_class = class_new(gensym("vu"), (t_newmethod)vu_new, (t_method)iemgui_free, sizeof(t_vu), 0, A_GIMME, 0); iemgui_subclass(c); class_addbang(c,vu_bang); --- 7571,7575 ---- class_sethelpsymbol(c, gensym("my_canvas"));
! c = vu_class = class_new2("vu",vu_new,iemgui_free,sizeof(t_vu),0,"*"); iemgui_subclass(c); class_addbang(c,vu_bang); *************** *** 7591,7596 **** class_sethelpsymbol(c, gensym("vu"));
! c = dropper_class = class_new(gensym("dropper"), (t_newmethod)dropper_new, ! (t_method)iemgui_free, sizeof(t_dropper), 0, A_GIMME, 0); iemgui_subclass(c); class_addbang(c, dropper_bang); --- 7582,7586 ---- class_sethelpsymbol(c, gensym("vu"));
! c = dropper_class = class_new2("dropper",dropper_new,iemgui_free,sizeof(t_dropper),0,"*"); iemgui_subclass(c); class_addbang(c, dropper_bang); *************** *** 7600,7605 **** class_sethelpsymbol(c, gensym("dropper"));
! visualloader_class = class_new(gensym("#V"), (t_newmethod)visualloader_new, ! (t_method)visualloader_free, sizeof(t_object), CLASS_GOBJ, A_GIMME, 0); class_addanything(visualloader_class,visualloader_anything); pd_bind(pd_new(visualloader_class),gensym("#V")); --- 7590,7594 ---- class_sethelpsymbol(c, gensym("dropper"));
! visualloader_class = class_new2("#V",visualloader_new,visualloader_free,sizeof(t_object),CLASS_GOBJ,"*"); class_addanything(visualloader_class,visualloader_anything); pd_bind(pd_new(visualloader_class),gensym("#V")); *************** *** 7737,7746 **** extern t_class *glob_pdobject; extern "C" void glob_init(void) { ! maxclass = class_new(gensym("max"), 0, 0, sizeof(t_pd), CLASS_DEFAULT, A_NULL); class_addanything(maxclass, max_default); pd_bind((t_pd *)&maxclass, gensym("max"));
/* this smells bad... a conflict with [pd] subpatches */ ! t_class *c = glob_pdobject = class_new(gensym("pd"), 0, 0, sizeof(t_pd), CLASS_DEFAULT, A_NULL); class_addmethod2(c,glob_initfromgui, "init", "*"); class_addmethod2(c,glob_setfilename, "filename", "ss"); --- 7726,7736 ---- extern t_class *glob_pdobject; extern "C" void glob_init(void) { ! /* can this one really be called "max"? isn't that a name conflict? */ ! maxclass = class_new2("max",0,0,sizeof(t_pd),CLASS_DEFAULT,""); class_addanything(maxclass, max_default); pd_bind((t_pd *)&maxclass, gensym("max"));
/* this smells bad... a conflict with [pd] subpatches */ ! t_class *c = glob_pdobject = class_new2("pd",0,0,sizeof(t_pd),CLASS_DEFAULT,""); class_addmethod2(c,glob_initfromgui, "init", "*"); class_addmethod2(c,glob_setfilename, "filename", "ss");