diff options
-rw-r--r-- | audience~/audience~.c | 4 | ||||
-rw-r--r-- | cooled~/cooled~.c | 6 | ||||
-rw-r--r-- | exciter/exciter.c | 4 | ||||
-rw-r--r-- | filterbank~/filterbank~.c | 4 | ||||
-rw-r--r-- | grid/grid.c | 66 | ||||
-rw-r--r-- | pianoroll/pianoroll.c | 4 | ||||
-rw-r--r-- | playlist/playlist.c | 9 | ||||
-rw-r--r-- | probalizer/probalizer.c | 4 | ||||
-rw-r--r-- | scratcher~/scratcher~.c | 4 | ||||
-rw-r--r-- | scrolllist/scrolllist.c | 4 | ||||
-rw-r--r-- | sonogram~/sonogram~-joge.c | 10 | ||||
-rw-r--r-- | sonogram~/sonogram~-yves.c | 10 | ||||
-rw-r--r-- | sonogram~/sonogram~.c | 8 |
13 files changed, 62 insertions, 75 deletions
diff --git a/audience~/audience~.c b/audience~/audience~.c index 8350c37..b14b139 100644 --- a/audience~/audience~.c +++ b/audience~/audience~.c @@ -582,7 +582,7 @@ static void audience_delete(t_gobj *z, t_glist *glist) // post( "audience~ : delete" ); audience_draw_erase( x, glist ); - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void audience_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -1059,5 +1059,5 @@ void audience_tilde_setup(void) #endif class_setwidget(audience_class_tilde, &audience_widgetbehavior); - class_sethelpsymbol(audience_class_tilde, gensym("audience~.pd")); + } diff --git a/cooled~/cooled~.c b/cooled~/cooled~.c index 9ec95b1..87cec0e 100644 --- a/cooled~/cooled~.c +++ b/cooled~/cooled~.c @@ -623,7 +623,7 @@ static void cooled_vis(t_gobj *z, t_glist *glist, int vis) static void cooled_delete(t_gobj *z, t_glist *glist) { - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void cooled_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -1210,7 +1210,7 @@ static void cooled_zoom(t_cooled *x, t_floatarg fzoom ) post( "cooled~ : allocated %d bytes", 128+x->x_height*x->x_zoom*sizeof("#FFFFFF ") ); } if ( x->x_draw) cooled_update_part(x, x->x_glist, 0, x->x_width-1, !x->x_empty, !x->x_empty, 0); - canvas_fixlinesfor( glist_getcanvas( x->x_glist ), (t_text*)x ); + canvas_fixlinesfor(x->x_glist, (t_text*)x ); } /* modify the loop positions */ @@ -1357,7 +1357,7 @@ void cooled_tilde_setup(void) post(cooled_version); cooled_class = class_new(gensym("cooled~"), (t_newmethod)cooled_new, (t_method)cooled_free, sizeof(t_cooled), 0, A_GIMME, 0); - class_sethelpsymbol( cooled_class, gensym("cooled~.pd") ); + // set callbacks cooled_widgetbehavior.w_getrectfn = cooled_getrect; diff --git a/exciter/exciter.c b/exciter/exciter.c index 37bb9e2..009776f 100644 --- a/exciter/exciter.c +++ b/exciter/exciter.c @@ -488,7 +488,7 @@ static void exciter_dialog(t_exciter *x, t_symbol *s, int argc, t_atom *argv) static void exciter_delete(t_gobj *z, t_glist *glist) { - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void exciter_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -818,5 +818,5 @@ void exciter_setup(void) #endif class_setwidget(exciter_class, &exciter_widgetbehavior); - class_sethelpsymbol(exciter_class, gensym("exciter.pd")); + } diff --git a/filterbank~/filterbank~.c b/filterbank~/filterbank~.c index 20e4624..4e44c2a 100644 --- a/filterbank~/filterbank~.c +++ b/filterbank~/filterbank~.c @@ -374,7 +374,7 @@ static void filterbank_delete(t_gobj *z, t_glist *glist) // post( "filterbank~ : delete" ); filterbank_draw_erase( x, glist ); - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void filterbank_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -664,5 +664,5 @@ void filterbank_tilde_setup(void) filterbank_widgetbehavior.w_savefn = filterbank_save; #endif class_setwidget(filterbank_class_tilde, &filterbank_widgetbehavior); - class_sethelpsymbol(filterbank_class_tilde, gensym("filterbank~.pd")); + } diff --git a/grid/grid.c b/grid/grid.c index 98e7df0..d32fcf7 100644 --- a/grid/grid.c +++ b/grid/grid.c @@ -13,12 +13,11 @@ #include <math.h> #include <ctype.h> #include "m_pd.h" -#include "m_imp.h" #include "g_canvas.h" #include "g_grid.h" -#ifdef NT +#ifdef _WIN32 #include <io.h> #else #include <unistd.h> @@ -73,7 +72,7 @@ static void grid_draw_update(t_grid *x, t_glist *glist) // delete previous point if existing if (x->x_point) { - GRID_SYS_VGUI3(".x%x.c delete %xPOINT\n", canvas, x); + GRID_SYS_VGUI3(".x%lx.c delete %lxPOINT\n", canvas, x); } if ( x->x_current < text_xpix(&x->x_obj, glist) ) xpoint = text_xpix(&x->x_obj, glist); @@ -83,7 +82,7 @@ static void grid_draw_update(t_grid *x, t_glist *glist) if ( x->y_current > text_ypix(&x->x_obj, glist) + x->x_height - pointsize ) ypoint = text_ypix(&x->x_obj, glist) + x->x_height - pointsize; // draw the selected point - GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FF0000 -tags %xPOINT\n", + GRID_SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FF0000 -tags %lxPOINT\n", canvas, xpoint, ypoint, xpoint+pointsize, ypoint+pointsize, x); x->x_point = 1; // } @@ -96,22 +95,19 @@ static void grid_draw_update(t_grid *x, t_glist *glist) static void grid_draw_new(t_grid *x, t_glist *glist) { t_canvas *canvas=glist_getcanvas(glist); - char *tagRoot; - rtext_new(glist, (t_text *)x ); - tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); - GRID_SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -fill %s -tags %xGRID\n", + GRID_SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -fill %s -tags %lxGRID\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), text_xpix(&x->x_obj, glist) + x->x_width, text_ypix(&x->x_obj, glist) + x->x_height, x->x_bgcolor, x); - GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so0\n", + GRID_SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -tags %lxo0\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height+1, text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist) + x->x_height+2, - tagRoot); - GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so1\n", + x); + GRID_SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -tags %lxo1\n", canvas, text_xpix(&x->x_obj, glist)+x->x_width-7, text_ypix(&x->x_obj, glist) + x->x_height+1, text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist) + x->x_height+2, - tagRoot); + x); if ( x->x_grid ) { @@ -121,7 +117,7 @@ static void grid_draw_new(t_grid *x, t_glist *glist) int ycount = 1; while ( xlpos < text_xpix(&x->x_obj, glist)+x->x_width ) { - GRID_SYS_VGUI9(".x%x.c create line %d %d %d %d -fill #FFFFFF -tags %xLINE%d%d\n", + GRID_SYS_VGUI9(".x%lx.c create line %d %d %d %d -fill #FFFFFF -tags %lxLINE%d%d\n", canvas, xlpos, text_ypix(&x->x_obj, glist), xlpos, text_ypix(&x->x_obj, glist)+x->x_height, x, xcount, 0 ); @@ -130,7 +126,7 @@ static void grid_draw_new(t_grid *x, t_glist *glist) } while ( ylpos < text_ypix(&x->x_obj, glist)+x->x_height ) { - GRID_SYS_VGUI9(".x%x.c create line %d %d %d %d -fill #FFFFFF -tags %xLINE%d%d\n", + GRID_SYS_VGUI9(".x%lx.c create line %d %d %d %d -fill #FFFFFF -tags %lxLINE%d%d\n", canvas, text_xpix(&x->x_obj, glist), ylpos, text_xpix(&x->x_obj, glist)+x->x_width, ylpos, x, 0, ycount); @@ -144,19 +140,17 @@ static void grid_draw_new(t_grid *x, t_glist *glist) static void grid_draw_move(t_grid *x, t_glist *glist) { t_canvas *canvas=glist_getcanvas(glist); - char *tagRoot; - tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); - GRID_SYS_VGUI7(".x%x.c coords %xGRID %d %d %d %d\n", + GRID_SYS_VGUI7(".x%lx.c coords %lxGRID %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist)+x->x_height); - GRID_SYS_VGUI7(".x%x.c coords %so0 %d %d %d %d\n", - canvas, tagRoot, + GRID_SYS_VGUI7(".x%lx.c coords %lxo0 %d %d %d %d\n", + canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height+1, text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist) + x->x_height+2 ); - GRID_SYS_VGUI7(".x%x.c coords %so1 %d %d %d %d\n", - canvas, tagRoot, + GRID_SYS_VGUI7(".x%lx.c coords %lxo1 %d %d %d %d\n", + canvas, x, text_xpix(&x->x_obj, glist)+x->x_width-7, text_ypix(&x->x_obj, glist) + x->x_height+1, text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist) + x->x_height+2 ); if ( x->x_point ) @@ -171,7 +165,7 @@ static void grid_draw_move(t_grid *x, t_glist *glist) int ycount = 1; while ( xlpos < text_xpix(&x->x_obj, glist)+x->x_width ) { - GRID_SYS_VGUI9(".x%x.c coords %xLINE%d%d %d %d %d %d\n", + GRID_SYS_VGUI9(".x%lx.c coords %lxLINE%d%d %d %d %d %d\n", canvas, x, xcount, 0, xlpos, text_ypix(&x->x_obj, glist), xlpos, text_ypix(&x->x_obj, glist) + x->x_height); xlpos+=x->x_width/x->x_xlines; @@ -179,7 +173,7 @@ static void grid_draw_move(t_grid *x, t_glist *glist) } while ( ylpos < text_ypix(&x->x_obj, glist)+x->x_height ) { - GRID_SYS_VGUI9(".x%x.c coords %xLINE%d%d %d %d %d %d\n", + GRID_SYS_VGUI9(".x%lx.c coords %lxLINE%d%d %d %d %d %d\n", canvas, x, 0, ycount, text_xpix(&x->x_obj, glist), ylpos, text_xpix(&x->x_obj, glist) + x->x_width, ylpos); ylpos+=x->x_height/x->x_ylines; @@ -193,29 +187,26 @@ static void grid_draw_erase(t_grid* x,t_glist* glist) { t_canvas *canvas=glist_getcanvas(glist); int i; - char *tagRoot; - tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); - GRID_SYS_VGUI3(".x%x.c delete %xGRID\n", canvas, x); - GRID_SYS_VGUI3(".x%x.c delete %so0\n", canvas, tagRoot); - GRID_SYS_VGUI3(".x%x.c delete %so1\n", canvas, tagRoot); + GRID_SYS_VGUI3(".x%lx.c delete %lxGRID\n", canvas, x); + GRID_SYS_VGUI3(".x%lx.c delete %lxo0\n", canvas, x); + GRID_SYS_VGUI3(".x%lx.c delete %lxo1\n", canvas, x); if (x->x_grid) { for (i=1; i<x->x_xlines; i++ ) { - GRID_SYS_VGUI4(".x%x.c delete %xLINE%d0\n", canvas, x, i); + GRID_SYS_VGUI4(".x%lx.c delete %lxLINE%d0\n", canvas, x, i); } for (i=1; i<x->x_ylines; i++ ) { - GRID_SYS_VGUI4(".x%x.c delete %xLINE0%d\n", canvas, x, i); + GRID_SYS_VGUI4(".x%lx.c delete %lxLINE0%d\n", canvas, x, i); } } if (x->x_point) { - GRID_SYS_VGUI3(".x%x.c delete %xPOINT\n", canvas, x); + GRID_SYS_VGUI3(".x%lx.c delete %lxPOINT\n", canvas, x); x->x_point = 0; } - rtext_free(glist_findrtext(glist, (t_text *)x)); } static void grid_draw_select(t_grid* x,t_glist* glist) @@ -226,12 +217,12 @@ static void grid_draw_select(t_grid* x,t_glist* glist) { pd_bind(&x->x_obj.ob_pd, x->x_name); /* sets the item in blue */ - GRID_SYS_VGUI3(".x%x.c itemconfigure %xGRID -outline #0000FF\n", canvas, x); + GRID_SYS_VGUI3(".x%lx.c itemconfigure %lxGRID -outline #0000FF\n", canvas, x); } else { pd_unbind(&x->x_obj.ob_pd, x->x_name); - GRID_SYS_VGUI3(".x%x.c itemconfigure %xGRID -outline #000000\n", canvas, x); + GRID_SYS_VGUI3(".x%lx.c itemconfigure %lxGRID -outline #000000\n", canvas, x); } } @@ -360,7 +351,7 @@ static void grid_dialog(t_grid *x, t_symbol *s, int argc, t_atom *argv) static void grid_delete(t_gobj *z, t_glist *glist) { - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void grid_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -586,9 +577,8 @@ static void grid_bang(t_grid *x) { static t_grid *grid_new(t_symbol *s, int argc, t_atom *argv) { - int i, zz; + int zz; t_grid *x; - t_pd *x2; char *str; // post( "grid_new : create : %s argc =%d", s->s_name, argc ); @@ -721,5 +711,5 @@ void grid_setup(void) #endif class_setwidget(grid_class, &grid_widgetbehavior); - class_sethelpsymbol(grid_class, gensym("grid.pd")); + } diff --git a/pianoroll/pianoroll.c b/pianoroll/pianoroll.c index 92cf860..c71735c 100644 --- a/pianoroll/pianoroll.c +++ b/pianoroll/pianoroll.c @@ -390,7 +390,7 @@ static void pianoroll_dialog(t_pianoroll *x, t_symbol *s, int argc, t_atom *argv static void pianoroll_delete(t_gobj *z, t_glist *glist) { - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void pianoroll_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -811,5 +811,5 @@ void pianoroll_setup(void) #endif class_setwidget(pianoroll_class, &pianoroll_widgetbehavior); - class_sethelpsymbol(pianoroll_class, gensym("pianoroll.pd")); + } diff --git a/playlist/playlist.c b/playlist/playlist.c index 12a5744..fce68a8 100644 --- a/playlist/playlist.c +++ b/playlist/playlist.c @@ -42,7 +42,7 @@ #include "g_canvas.h" -#ifdef NT +#ifdef _WIN32 #include <io.h> #else #include <unistd.h> @@ -422,7 +422,6 @@ static void playlist_select(t_gobj *z, t_glist *glist, int selected) static void playlist_vis(t_gobj *z, t_glist *glist, int vis) { t_playlist *x = (t_playlist *)z; - t_rtext *y; x->x_glist = glist; if (vis) @@ -437,9 +436,7 @@ static void playlist_vis(t_gobj *z, t_glist *glist, int vis) static void playlist_delete(t_gobj *z, t_glist *glist) { - t_playlist *x = (t_playlist *)z; - - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void playlist_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -1016,5 +1013,5 @@ void playlist_setup(void) #endif class_setwidget(playlist_class, &playlist_widgetbehavior); - class_sethelpsymbol(playlist_class, gensym("playlist.pd")); + } diff --git a/probalizer/probalizer.c b/probalizer/probalizer.c index 0930df8..c6fe338 100644 --- a/probalizer/probalizer.c +++ b/probalizer/probalizer.c @@ -392,7 +392,7 @@ static void probalizer_dialog(t_probalizer *x, t_symbol *s, int argc, t_atom *ar static void probalizer_delete(t_gobj *z, t_glist *glist) { - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void probalizer_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -699,5 +699,5 @@ void probalizer_setup(void) #endif class_setwidget(probalizer_class, &probalizer_widgetbehavior); - class_sethelpsymbol(probalizer_class, gensym("probalizer.pd")); + } diff --git a/scratcher~/scratcher~.c b/scratcher~/scratcher~.c index b988206..6adba91 100644 --- a/scratcher~/scratcher~.c +++ b/scratcher~/scratcher~.c @@ -314,7 +314,7 @@ static void scratcher_vis(t_gobj *z, t_glist *glist, int vis) static void scratcher_delete(t_gobj *z, t_glist *glist) { - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void scratcher_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -783,7 +783,7 @@ void scratcher_tilde_setup(void) #include "scratcher~.tk2c" scratcher_class = class_new(gensym("scratcher~"), (t_newmethod)scratcher_new, (t_method)scratcher_free, sizeof(t_scratcher), 0, A_GIMME, 0); - class_sethelpsymbol( scratcher_class, gensym("scratcher~.pd") ); + // set callbacks scratcher_widgetbehavior.w_getrectfn = scratcher_getrect; diff --git a/scrolllist/scrolllist.c b/scrolllist/scrolllist.c index 6266e1c..8e44ba7 100644 --- a/scrolllist/scrolllist.c +++ b/scrolllist/scrolllist.c @@ -318,7 +318,7 @@ static void scrolllist_deleteobj(t_gobj *z, t_glist *glist) { t_scrolllist *x = (t_scrolllist *)z; - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void scrolllist_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -1034,5 +1034,5 @@ void scrolllist_setup(void) #endif class_setwidget(scrolllist_class, &scrolllist_widgetbehavior); - class_sethelpsymbol(scrolllist_class, gensym("help-scrolllist.pd")); + } diff --git a/sonogram~/sonogram~-joge.c b/sonogram~/sonogram~-joge.c index 19f87eb..8d148fa 100644 --- a/sonogram~/sonogram~-joge.c +++ b/sonogram~/sonogram~-joge.c @@ -512,7 +512,7 @@ static void sonogram_update_part(t_sonogram *x, t_glist *glist, t_int bstart, t_ glist_getcanvas( x->x_glist ), x->x_xpos+((x->x_size*x->x_zoom)/2), x->x_ypos+3*((x->x_blocksize/2*x->x_zoom)/2)+2, x, x ); } - canvas_fixlinesfor( glist_getcanvas(x->x_glist), (t_text*)x ); + canvas_fixlinesfor(x->x_glist, (t_text*)x ); } // set borders in red SYS_VGUI3(".x%x.c itemconfigure %xSONOGRAM -outline #FF0000\n", glist_getcanvas(glist), x); @@ -899,7 +899,7 @@ static void sonogram_vis(t_gobj *z, t_glist *glist, int vis) static void sonogram_delete(t_gobj *z, t_glist *glist) { - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void sonogram_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -1233,7 +1233,7 @@ static t_int *sonogram_perform(t_int *w) x->x_blocksize = n; sonogram_allocate(x); sonogram_update_part(x, x->x_glist, 0, x->x_size-1, !x->x_empty, 0, 0); - canvas_fixlinesfor( glist_getcanvas(x->x_glist), (t_text*)x ); + canvas_fixlinesfor(x->x_glist, (t_text*)x ); } bi = 0; @@ -1550,7 +1550,7 @@ static void sonogram_zoom(t_sonogram *x, t_floatarg fzoom ) post( "sonogram~ : allocated %d bytes", 128+(x->x_blocksize/2)*x->x_zoom*sizeof("#FFFFFF ") ); } sonogram_update_part(x, x->x_glist, 0, x->x_size-1, !x->x_empty, !x->x_empty, 0); - canvas_fixlinesfor( glist_getcanvas( x->x_glist ), (t_text*)x ); + canvas_fixlinesfor(x->x_glist, (t_text*)x ); } /* refresh data */ @@ -2003,7 +2003,7 @@ void sonogram_tilde_setup(void) sonogram_widgetbehavior.w_propertiesfn = NULL; sonogram_widgetbehavior.w_savefn = sonogram_save; /* this is needed to make the help patch work on < 0.37 */ - class_sethelpsymbol( sonogram_class, gensym("sonogram~-help.pd") ); + #else class_setpropertiesfn(sonogram_class, NULL); class_setsavefn(sonogram_class, &sonogram_save); diff --git a/sonogram~/sonogram~-yves.c b/sonogram~/sonogram~-yves.c index e15d366..6ff83d8 100644 --- a/sonogram~/sonogram~-yves.c +++ b/sonogram~/sonogram~-yves.c @@ -493,7 +493,7 @@ static void sonogram_update_part(t_sonogram *x, t_glist *glist, t_int bstart, t_ glist_getcanvas( x->x_glist ), x->x_xpos+((x->x_size*x->x_zoom)/2), x->x_ypos+3*((x->x_blocksize/2*x->x_zoom)/2)+2, x, x ); } - canvas_fixlinesfor( glist_getcanvas(x->x_glist), (t_text*)x ); + canvas_fixlinesfor(x->x_glist, (t_text*)x ); } // set borders in red SYS_VGUI3(".x%x.c itemconfigure %xSONOGRAM -outline #FF0000\n", glist_getcanvas(glist), x); @@ -880,7 +880,7 @@ static void sonogram_vis(t_gobj *z, t_glist *glist, int vis) static void sonogram_delete(t_gobj *z, t_glist *glist) { - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void sonogram_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -1214,7 +1214,7 @@ static t_int *sonogram_perform(t_int *w) x->x_blocksize = n; sonogram_allocate(x); sonogram_update_part(x, x->x_glist, 0, x->x_size-1, !x->x_empty, 0, 0); - canvas_fixlinesfor( glist_getcanvas(x->x_glist), (t_text*)x ); + canvas_fixlinesfor(x->x_glist, (t_text*)x ); } bi = 0; @@ -1531,7 +1531,7 @@ static void sonogram_zoom(t_sonogram *x, t_floatarg fzoom ) post( "sonogram~ : allocated %d bytes", 128+(x->x_blocksize/2)*x->x_zoom*sizeof("#FFFFFF ") ); } sonogram_update_part(x, x->x_glist, 0, x->x_size-1, !x->x_empty, !x->x_empty, 0); - canvas_fixlinesfor( glist_getcanvas( x->x_glist ), (t_text*)x ); + canvas_fixlinesfor(x->x_glist, (t_text*)x ); } /* refresh data */ @@ -1977,7 +1977,7 @@ void sonogram_tilde_setup(void) sonogram_widgetbehavior.w_propertiesfn = NULL; sonogram_widgetbehavior.w_savefn = sonogram_save; /* this is needed to make the help patch work on < 0.37 */ - class_sethelpsymbol( sonogram_class, gensym("sonogram~-help.pd") ); + #else class_setpropertiesfn(sonogram_class, NULL); class_setsavefn(sonogram_class, &sonogram_save); diff --git a/sonogram~/sonogram~.c b/sonogram~/sonogram~.c index c034d90..c9be8d4 100644 --- a/sonogram~/sonogram~.c +++ b/sonogram~/sonogram~.c @@ -882,7 +882,7 @@ static void sonogram_vis(t_gobj *z, t_glist *glist, int vis) static void sonogram_delete(t_gobj *z, t_glist *glist) { - canvas_deletelinesfor( glist_getcanvas(glist), (t_text *)z); + canvas_deletelinesfor(glist, (t_text *)z); } static void sonogram_displace(t_gobj *z, t_glist *glist, int dx, int dy) @@ -1282,7 +1282,7 @@ static t_int *sonogram_perform(t_int *w) x->x_blocksize = n; sonogram_allocate(x); sonogram_update_part(x, x->x_glist, 0, x->x_size-1, !x->x_empty, 0, 0); - canvas_fixlinesfor( glist_getcanvas(x->x_glist), (t_text*)x ); + canvas_fixlinesfor(x->x_glist, (t_text*)x ); } bi = 0; @@ -1604,7 +1604,7 @@ static void sonogram_zoom(t_sonogram *x, t_floatarg fzoom ) post( "sonogram~ : allocated %d bytes", 128+(x->x_blocksize/2)*x->x_zoom*sizeof("#FFFFFF ") ); } sonogram_update_part(x, x->x_glist, 0, x->x_size-1, !x->x_empty, !x->x_empty, 0); - canvas_fixlinesfor( glist_getcanvas( x->x_glist ), (t_text*)x ); + canvas_fixlinesfor(x->x_glist, (t_text*)x ); } /* refresh data */ @@ -2031,7 +2031,7 @@ void sonogram_tilde_setup(void) post(sonogram_version); sonogram_class = class_new(gensym("sonogram~"), (t_newmethod)sonogram_new, (t_method)sonogram_free, sizeof(t_sonogram), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0); - class_sethelpsymbol( sonogram_class, gensym("sonogram~.pd") ); + // set callbacks sonogram_widgetbehavior.w_getrectfn = sonogram_getrect; |