From dd51b747c6a4c5175146666192c3cf7347b67c85 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 1 Aug 2011 17:35:10 +0000 Subject: replace .x%x 32-bit only canvas id with .x%lx canvas id which supports 32-bit and 64-bit svn path=/trunk/externals/unauthorized/; revision=15186 --- audience~.c | 80 +++++++++++++++++++++++++------------------------- blinkenlights.c | 28 +++++++++--------- cooled~.c | 68 +++++++++++++++++++++---------------------- exciter.c | 48 +++++++++++++++--------------- filterbank~.c | 22 +++++++------- mp3amp~.c | 12 ++++---- mp3streamin~.c | 14 ++++----- pianoroll.c | 54 +++++++++++++++++----------------- playlist.c | 52 ++++++++++++++++----------------- probalizer.c | 60 +++++++++++++++++++------------------- scratcher~.c | 46 ++++++++++++++--------------- scrolllist.c | 30 +++++++++---------- sonogram~.c | 90 ++++++++++++++++++++++++++++----------------------------- speexin~.c | 16 +++++----- 14 files changed, 310 insertions(+), 310 deletions(-) diff --git a/audience~.c b/audience~.c index 1c32c28..fc5be90 100644 --- a/audience~.c +++ b/audience~.c @@ -112,12 +112,12 @@ static void audience_draw_update(t_audience_tilde *x, t_glist *glist) for ( ei=0; eix_nbinputs; ei++ ) { - SYS_VGUI6(".x%x.c coords %xISPEAKER%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xISPEAKER%d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + x->x_inputs_x[ei], text_ypix(&x->x_obj, glist) + x->x_inputs_y[ei] ); - SYS_VGUI6(".x%x.c coords %xSPEAKERNUM%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xSPEAKERNUM%d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + x->x_inputs_x[ei] - SPEAKER_WIDTH/2, text_ypix(&x->x_obj, glist) + x->x_inputs_y[ei] - SPEAKER_HEIGHT/2 @@ -125,12 +125,12 @@ static void audience_draw_update(t_audience_tilde *x, t_glist *glist) } for ( ei=0; eix_nboutputs; ei++ ) { - SYS_VGUI6(".x%x.c coords %xILISTENER%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xILISTENER%d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + x->x_outputs_x[ei], text_ypix(&x->x_obj, glist) + x->x_outputs_y[ei] ); - SYS_VGUI6(".x%x.c coords %xLISTENERNUM%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xLISTENERNUM%d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + x->x_outputs_x[ei] + LISTENER_WIDTH/2, text_ypix(&x->x_obj, glist) + x->x_outputs_y[ei] + LISTENER_HEIGHT/2 @@ -143,16 +143,16 @@ static void audience_draw_new(t_audience_tilde *x, t_glist *glist) t_canvas *canvas=glist_getcanvas(glist); int ei; - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #EAF1E2 -tags %xAAUDIENCE\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #EAF1E2 -tags %xAAUDIENCE\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); // create captions - SYS_VGUI5(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"0m\" -tags %xBLCAPTION\n", + SYS_VGUI5(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"0m\" -tags %xBLCAPTION\n", canvas, text_xpix(&x->x_obj, glist) - 10 , text_ypix(&x->x_obj, glist) + x->x_height + 10, x ); - SYS_VGUI6(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%dm\" -tags %xBRCAPTION\n", + SYS_VGUI6(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%dm\" -tags %xBRCAPTION\n", canvas, text_xpix(&x->x_obj, glist) + x->x_width + 10 , text_ypix(&x->x_obj, glist) + x->x_height + 10, x->x_width, x ); - SYS_VGUI6(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%dm\" -tags %xULCAPTION\n", + SYS_VGUI6(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%dm\" -tags %xULCAPTION\n", canvas, text_xpix(&x->x_obj, glist) - 10 , text_ypix(&x->x_obj, glist), x->x_height, x ); // draw all outlets @@ -160,7 +160,7 @@ static void audience_draw_new(t_audience_tilde *x, t_glist *glist) { for ( ei=0; eix_nboutputs; ei++ ) { - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT%d\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT%d\n", canvas, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nboutputs-1), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nboutputs-1) + 5, @@ -170,7 +170,7 @@ static void audience_draw_new(t_audience_tilde *x, t_glist *glist) } else { - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT%d\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT%d\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + 5, @@ -180,7 +180,7 @@ static void audience_draw_new(t_audience_tilde *x, t_glist *glist) // draw all inlets for ( ei=0; eix_nbinputs+1; ei++ ) { - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xIN%d\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xIN%d\n", canvas, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nbinputs), text_ypix(&x->x_obj, glist) - 2, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nbinputs) + 5, @@ -192,12 +192,12 @@ static void audience_draw_new(t_audience_tilde *x, t_glist *glist) { SYS_VGUI6("image create photo %xSPEAKER%d -file %s/examples/speaker.gif -format gif -width %d -height %d\n", x, ei, audience_class_tilde->c_externdir->s_name, SPEAKER_WIDTH, SPEAKER_HEIGHT ); - SYS_VGUI8(".x%x.c create image %d %d -image %xSPEAKER%d -tags %xISPEAKER%d\n", + SYS_VGUI8(".x%lx.c create image %d %d -image %xSPEAKER%d -tags %xISPEAKER%d\n", canvas, text_xpix(&x->x_obj, glist) + x->x_inputs_x[ei], text_ypix(&x->x_obj, glist) + x->x_inputs_y[ei], x, ei, x, ei ); - SYS_VGUI7(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"s%d\" -tags %xSPEAKERNUM%d\n", + SYS_VGUI7(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"s%d\" -tags %xSPEAKERNUM%d\n", canvas, text_xpix(&x->x_obj, glist) + x->x_inputs_x[ei] - SPEAKER_WIDTH/2, text_ypix(&x->x_obj, glist) + x->x_inputs_y[ei] - SPEAKER_HEIGHT/2, ei+1, x, ei ); } @@ -206,12 +206,12 @@ static void audience_draw_new(t_audience_tilde *x, t_glist *glist) { SYS_VGUI6("image create photo %xLISTENER%d -file %s/examples/wanderer.gif -format gif -width %d -height %d\n", x, ei, audience_class_tilde->c_externdir->s_name, LISTENER_WIDTH, LISTENER_HEIGHT ); - SYS_VGUI8(".x%x.c create image %d %d -image %xLISTENER%d -tags %xILISTENER%d\n", + SYS_VGUI8(".x%lx.c create image %d %d -image %xLISTENER%d -tags %xILISTENER%d\n", canvas, text_xpix(&x->x_obj, glist) + x->x_outputs_x[ei], text_ypix(&x->x_obj, glist) + x->x_outputs_y[ei], x, ei, x, ei ); - SYS_VGUI7(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"l%d\" -tags %xLISTENERNUM%d\n", + SYS_VGUI7(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"l%d\" -tags %xLISTENERNUM%d\n", canvas, text_xpix(&x->x_obj, glist) + x->x_outputs_x[ei] + LISTENER_WIDTH/2, text_ypix(&x->x_obj, glist) + x->x_outputs_y[ei] + LISTENER_HEIGHT/2, ei+1, x, ei ); } @@ -223,23 +223,23 @@ static void audience_draw_move(t_audience_tilde *x, t_glist *glist) t_canvas *canvas=glist_getcanvas(glist); t_int ei; - SYS_VGUI7(".x%x.c coords %xAAUDIENCE %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xAAUDIENCE %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); - SYS_VGUI5(".x%x.c coords %xBLCAPTION %d %d\n", + SYS_VGUI5(".x%lx.c coords %xBLCAPTION %d %d\n", canvas, x, text_xpix(&x->x_obj, glist) - 10 , text_ypix(&x->x_obj, glist) + x->x_height + 10); - SYS_VGUI5(".x%x.c coords %xBRCAPTION %d %d\n", + SYS_VGUI5(".x%lx.c coords %xBRCAPTION %d %d\n", canvas, x, text_xpix(&x->x_obj, glist) + x->x_width + 10 , text_ypix(&x->x_obj, glist) + x->x_height + 10 ); - SYS_VGUI5(".x%x.c coords %xULCAPTION %d %d\n", + SYS_VGUI5(".x%lx.c coords %xULCAPTION %d %d\n", canvas, x, text_xpix(&x->x_obj, glist) - 10 , text_ypix(&x->x_obj, glist) ); for ( ei=0; eix_nbinputs+1; ei++ ) { - SYS_VGUI8(".x%x.c coords %xIN%d %d %d %d %d\n", + SYS_VGUI8(".x%lx.c coords %xIN%d %d %d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nbinputs), text_ypix(&x->x_obj, glist) - 2, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nbinputs) + 5, @@ -248,12 +248,12 @@ static void audience_draw_move(t_audience_tilde *x, t_glist *glist) } for ( ei=0; eix_nbinputs+1; ei++ ) { - SYS_VGUI6(".x%x.c coords %xISPEAKER%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xISPEAKER%d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + x->x_inputs_x[ei], text_ypix(&x->x_obj, glist) + x->x_inputs_y[ei] ); - SYS_VGUI6(".x%x.c coords %xSPEAKERNUM%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xSPEAKERNUM%d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + x->x_inputs_x[ei] - SPEAKER_WIDTH/2, text_ypix(&x->x_obj, glist) + x->x_inputs_y[ei] - SPEAKER_HEIGHT/2 @@ -263,18 +263,18 @@ static void audience_draw_move(t_audience_tilde *x, t_glist *glist) { for ( ei=0; eix_nboutputs; ei++ ) { - SYS_VGUI8(".x%x.c coords %xOUT%d %d %d %d %d\n", + SYS_VGUI8(".x%lx.c coords %xOUT%d %d %d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nboutputs-1), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nboutputs-1) + 5, text_ypix(&x->x_obj, glist) + x->x_height + 2 ); - SYS_VGUI6(".x%x.c coords %xILISTENER%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xILISTENER%d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + x->x_outputs_x[ei], text_ypix(&x->x_obj, glist) + x->x_outputs_y[ei] ); - SYS_VGUI6(".x%x.c coords %xLISTENERNUM%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xLISTENERNUM%d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + x->x_outputs_x[ei] + LISTENER_WIDTH/2, text_ypix(&x->x_obj, glist) + x->x_outputs_y[ei] + LISTENER_HEIGHT/2 @@ -283,18 +283,18 @@ static void audience_draw_move(t_audience_tilde *x, t_glist *glist) } else { - SYS_VGUI8(".x%x.c coords %xOUT%d %d %d %d %d\n", + SYS_VGUI8(".x%lx.c coords %xOUT%d %d %d %d %d\n", canvas, x, 0, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + 5, text_ypix(&x->x_obj, glist) + x->x_height + 2 ); - SYS_VGUI6(".x%x.c coords %xILISTENER%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xILISTENER%d %d %d\n", canvas, x, 0, text_xpix(&x->x_obj, glist) + x->x_outputs_x[0], text_ypix(&x->x_obj, glist) + x->x_outputs_y[0] ); - SYS_VGUI6(".x%x.c coords %xLISTENERNUM%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xLISTENERNUM%d %d %d\n", canvas, x, 0, text_xpix(&x->x_obj, glist) + x->x_outputs_x[0] + LISTENER_WIDTH/2, text_ypix(&x->x_obj, glist) + x->x_outputs_y[0] + LISTENER_HEIGHT/2 @@ -308,25 +308,25 @@ static void audience_draw_erase(t_audience_tilde* x,t_glist* glist) t_canvas *canvas=glist_getcanvas(glist); int ei; - SYS_VGUI3(".x%x.c delete %xAAUDIENCE\n", canvas, x); - SYS_VGUI3(".x%x.c delete %xBLCAPTION\n", canvas, x); - SYS_VGUI3(".x%x.c delete %xBRCAPTION\n", canvas, x); - SYS_VGUI3(".x%x.c delete %xULCAPTION\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xAAUDIENCE\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xBLCAPTION\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xBRCAPTION\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xULCAPTION\n", canvas, x); for ( ei=0; eix_nbinputs+1; ei++ ) { - SYS_VGUI4(".x%x.c delete %xIN%d\n", canvas, x, ei ); + SYS_VGUI4(".x%lx.c delete %xIN%d\n", canvas, x, ei ); } for ( ei=0; eix_nbinputs; ei++ ) { - SYS_VGUI4(".x%x.c delete %xISPEAKER%d\n", canvas, x, ei ); - SYS_VGUI4(".x%x.c delete %xSPEAKERNUM%d\n", canvas, x, ei ); + SYS_VGUI4(".x%lx.c delete %xISPEAKER%d\n", canvas, x, ei ); + SYS_VGUI4(".x%lx.c delete %xSPEAKERNUM%d\n", canvas, x, ei ); // SYS_VGUI3("image delete %xSPEAKER%d\n", x, ei ); } for ( ei=0; eix_nboutputs; ei++ ) { - SYS_VGUI4(".x%x.c delete %xOUT%d\n", canvas, x, ei ); - SYS_VGUI4(".x%x.c delete %xILISTENER%d\n", canvas, x, ei ); - SYS_VGUI4(".x%x.c delete %xLISTENERNUM%d\n", canvas, x, ei ); + SYS_VGUI4(".x%lx.c delete %xOUT%d\n", canvas, x, ei ); + SYS_VGUI4(".x%lx.c delete %xILISTENER%d\n", canvas, x, ei ); + SYS_VGUI4(".x%lx.c delete %xLISTENERNUM%d\n", canvas, x, ei ); // SYS_VGUI3("image delete %xLISTENER%d\n", x, ei ); } } @@ -338,11 +338,11 @@ static void audience_draw_select(t_audience_tilde* x,t_glist* glist) if(x->x_selected) { /* sets the item in blue */ - SYS_VGUI3(".x%x.c itemconfigure %xAAUDIENCE -outline #0000FF\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xAAUDIENCE -outline #0000FF\n", canvas, x); } else { - SYS_VGUI3(".x%x.c itemconfigure %xAAUDIENCE -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xAAUDIENCE -outline #000000\n", canvas, x); } } diff --git a/blinkenlights.c b/blinkenlights.c index 03abda9..8a34822 100644 --- a/blinkenlights.c +++ b/blinkenlights.c @@ -194,12 +194,12 @@ static void blinkenlights_draw_new(t_blinkenlights* x) t_canvas *canvas=glist_getcanvas(x->x_glist); t_int xi, yi; - SYS_VGUI4("toplevel .x%x -width %d -height %d -borderwidth 0 -background #000000\n", x, + SYS_VGUI4("toplevel .x%lx -width %d -height %d -borderwidth 0 -background #000000\n", x, x->x_width*x->x_xsize, x->x_height*x->x_ysize ); - SYS_VGUI2("frame .x%x.m -relief raised -bd 2\n", x); - SYS_VGUI2("wm title .x%x blinkenlights\n", x); + SYS_VGUI2("frame .x%lx.m -relief raised -bd 2\n", x); + SYS_VGUI2("wm title .x%lx blinkenlights\n", x); - SYS_VGUI4("canvas .x%x.c -width %d -height %d\n", + SYS_VGUI4("canvas .x%lx.c -width %d -height %d\n", x, x->x_width*x->x_xsize, x->x_height*x->x_ysize ); x->x_ecanvas = 1; @@ -208,7 +208,7 @@ static void blinkenlights_draw_new(t_blinkenlights* x) { for ( yi=1; yi<=x->x_height; yi++ ) { - SYS_VGUI10(".x%x.c create rectangle %d %d %d %d -fill %s -outline #555555 -tags %xPIX%.5d%.5d\n", + SYS_VGUI10(".x%lx.c create rectangle %d %d %d %d -fill %s -outline #555555 -tags %xPIX%.5d%.5d\n", x, (xi-1)*x->x_xsize, (yi-1)*x->x_ysize, xi*x->x_xsize, yi*x->x_ysize, @@ -217,10 +217,10 @@ static void blinkenlights_draw_new(t_blinkenlights* x) } } - SYS_VGUI2("pack .x%x.c -side left -expand 1 -fill both\n", x); - SYS_VGUI2("pack .x%x.m -side top -fill x\n", x); - SYS_VGUI2("wm geometry .x%x +0+0\n", x); - SYS_VGUI2("wm geometry .x%x +0+0\n", x); + SYS_VGUI2("pack .x%lx.c -side left -expand 1 -fill both\n", x); + SYS_VGUI2("pack .x%lx.m -side top -fill x\n", x); + SYS_VGUI2("wm geometry .x%lx +0+0\n", x); + SYS_VGUI2("wm geometry .x%lx +0+0\n", x); } @@ -246,10 +246,10 @@ static void blinkenlights_erase(t_blinkenlights* x) { for ( yi=1; yi<=x->x_height; yi++ ) { - SYS_VGUI5(".x%x.c delete %xPIX%.5d%.5d\n", x, x, xi, yi); + SYS_VGUI5(".x%lx.c delete %xPIX%.5d%.5d\n", x, x, xi, yi); } } - SYS_VGUI2("destroy .x%x\n", x); + SYS_VGUI2("destroy .x%lx\n", x); x->x_ecanvas=0; } @@ -375,7 +375,7 @@ static void blinkenlights_pixon(t_blinkenlights* x, t_float fX, t_float fY) post("blinkenlights : pixon : wrong y coordinate : %d : should be in [1,%d]", (int)fY, x->x_height ); return; } - SYS_VGUI6(".x%x.c itemconfigure %xPIX%.5d%.5d -fill %s\n", x, x, (int)fX, (int)fY, x->x_foreground ); + SYS_VGUI6(".x%lx.c itemconfigure %xPIX%.5d%.5d -fill %s\n", x, x, (int)fX, (int)fY, x->x_foreground ); } static void blinkenlights_pixoff(t_blinkenlights* x, t_float fX, t_float fY) @@ -395,7 +395,7 @@ static void blinkenlights_pixoff(t_blinkenlights* x, t_float fX, t_float fY) post("blinkenlights : pixoff : wrong y coordinate : %d : should be in [1,%d]", (int)fY, x->x_height ); return; } - SYS_VGUI6(".x%x.c itemconfigure %xPIX%.5d%.5d -fill %s\n", x, x, (int)fX, (int)fY, x->x_background ); + SYS_VGUI6(".x%lx.c itemconfigure %xPIX%.5d%.5d -fill %s\n", x, x, (int)fX, (int)fY, x->x_background ); } static void blinkenlights_pixel(t_blinkenlights* x, t_float fX, t_float fY, t_float fR, t_float fG, t_float fB) @@ -430,7 +430,7 @@ static void blinkenlights_pixel(t_blinkenlights* x, t_float fX, t_float fY, t_fl post("blinkenlights : pixel : wrong color component : fB : %d", fB); return; } - SYS_VGUI8(".x%x.c itemconfigure %xPIX%.5d%.5d -fill #%.2X%.2X%.2X\n", x, x, (int)fX, (int)fY, (int)fR, (int)fG, (int)fB ); + SYS_VGUI8(".x%lx.c itemconfigure %xPIX%.5d%.5d -fill #%.2X%.2X%.2X\n", x, x, (int)fX, (int)fY, (int)fR, (int)fG, (int)fB ); } static void blinkenlights_clear(t_blinkenlights* x) diff --git a/cooled~.c b/cooled~.c index 7e1886a..9a0e8d1 100644 --- a/cooled~.c +++ b/cooled~.c @@ -319,17 +319,17 @@ static void *cooled_do_update_part(void *tdata) if ( glist_isvisible( x->x_glist ) ) { - SYS_VGUI3( ".x%x.c delete rectangle %xCLIPZONE\n", + SYS_VGUI3( ".x%lx.c delete rectangle %xCLIPZONE\n", canvas, x); if ( ( x->x_readstart != 0 ) || ( x->x_readend != 100 ) ) { - SYS_VGUI7( ".x%x.c create rectangle %d %d %d %d -outline #FF0000 -tags %xCLIPZONE -width 2\n", + SYS_VGUI7( ".x%lx.c create rectangle %d %d %d %d -outline #FF0000 -tags %xCLIPZONE -width 2\n", canvas, x->x_xpos+(int)(x->x_readstart*(x->x_width)/100 ), x->x_ypos, x->x_xpos+(int)(x->x_readend*(x->x_width)/100 ), x->x_ypos+x->x_height*x->x_zoom, x ); } // set borders in black - SYS_VGUI3(".x%x.c itemconfigure %xCOOLED -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xCOOLED -outline #000000\n", canvas, x); } #ifndef _WIN32 @@ -368,32 +368,32 @@ static void cooled_update_part(t_cooled *x, t_glist *glist, int bstart, int bend { if ( ( bstart == 0 ) && ( bend == x->x_width-1 ) && !keepframe ) { - SYS_VGUI3(".x%x.c delete %xCOOLEDL\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xCOOLEDR\n", canvas, x ); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xCOOLEDR\n", + SYS_VGUI3(".x%lx.c delete %xCOOLEDL\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xCOOLEDR\n", canvas, x ); + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xCOOLEDR\n", canvas, x->x_xpos, x->x_ypos, x->x_xpos + x->x_width*x->x_zoom, x->x_ypos + x->x_height/2*x->x_zoom, x); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xCOOLEDL\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xCOOLEDL\n", canvas, x->x_xpos, x->x_ypos + x->x_height/2*x->x_zoom, x->x_xpos + x->x_width*x->x_zoom, x->x_ypos + x->x_height*x->x_zoom, x); SYS_VGUI2("image delete COOLEDIMAGE%x\n", x ); - SYS_VGUI3(".x%x.c delete ICOOLEDIMAGE%x\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete ICOOLEDIMAGE%x\n", canvas, x ); SYS_VGUI4("image create photo COOLEDIMAGE%x -format gif -width %d -height %d\n", x, x->x_width*x->x_zoom, x->x_height*x->x_zoom ); SYS_VGUI2("COOLEDIMAGE%x blank\n", x ); - SYS_VGUI6(".x%x.c create image %d %d -image COOLEDIMAGE%x -tags ICOOLEDIMAGE%x\n", + SYS_VGUI6(".x%lx.c create image %d %d -image COOLEDIMAGE%x -tags ICOOLEDIMAGE%x\n", canvas, x->x_xpos+(x->x_width*x->x_zoom)/2, x->x_ypos+(x->x_height*x->x_zoom)/2, x, x ); canvas_fixlinesfor( canvas, (t_text*)x ); } // set borders in red - SYS_VGUI3(".x%x.c itemconfigure %xCOOLED -outline #FF0000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xCOOLED -outline #FF0000\n", canvas, x); } // launch update thread @@ -425,12 +425,12 @@ static void cooled_draw_new(t_cooled *x, t_glist *glist) x->x_xpos=text_xpix(&x->x_obj, glist); x->x_ypos=text_ypix(&x->x_obj, glist); x->x_xdraw=text_xpix(&x->x_obj, glist); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xCOOLEDR\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xCOOLEDR\n", canvas, x->x_xpos, x->x_ypos, x->x_xpos + x->x_width*x->x_zoom, x->x_ypos + x->x_height/2*x->x_zoom, x); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xCOOLEDL\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xCOOLEDL\n", canvas, x->x_xpos, x->x_ypos + x->x_height/2*x->x_zoom, x->x_xpos + x->x_width*x->x_zoom, @@ -439,7 +439,7 @@ static void cooled_draw_new(t_cooled *x, t_glist *glist) SYS_VGUI4("image create photo COOLEDIMAGE%x -format gif -width %d -height %d\n", x, x->x_width*x->x_zoom, x->x_height*x->x_zoom ); SYS_VGUI2("COOLEDIMAGE%x blank\n", x ); - SYS_VGUI6(".x%x.c create image %d %d -image COOLEDIMAGE%x -tags ICOOLEDIMAGE%x\n", + SYS_VGUI6(".x%lx.c create image %d %d -image COOLEDIMAGE%x -tags ICOOLEDIMAGE%x\n", canvas, x->x_xpos+(x->x_width*x->x_zoom)/2, x->x_ypos+(x->x_height*x->x_zoom)/2, x, x ); @@ -453,15 +453,15 @@ static void cooled_draw_delete(t_cooled *x, t_glist *glist) if ( glist_isvisible( glist ) ) { - SYS_VGUI3( ".x%x.c delete %xCAPTURE\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete %xCAPTURE\n", canvas, x ); if ( ( x->x_readstart != 0 ) || ( x->x_readend != 100 ) ) { - SYS_VGUI3( ".x%x.c delete rectangle %xCLIPZONE\n", canvas, x); + SYS_VGUI3( ".x%lx.c delete rectangle %xCLIPZONE\n", canvas, x); } - SYS_VGUI3( ".x%x.c delete line %xINSERTHERE\n", canvas, x); - SYS_VGUI3(".x%x.c delete %xCOOLEDR\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xCOOLEDL\n", canvas, x ); - SYS_VGUI3(".x%x.c delete ICOOLEDIMAGE%x\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete line %xINSERTHERE\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xCOOLEDR\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xCOOLEDL\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete ICOOLEDIMAGE%x\n", canvas, x ); SYS_VGUI2("image delete COOLEDIMAGE%x\n", x ); } } @@ -472,12 +472,12 @@ static void cooled_draw_move(t_cooled *x, t_glist *glist) if ( glist_isvisible( x->x_glist ) ) { - SYS_VGUI7(".x%x.c coords %xCOOLEDR %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xCOOLEDR %d %d %d %d\n", canvas, x, x->x_xpos, x->x_ypos, x->x_xpos + x->x_width*x->x_zoom, x->x_ypos + x->x_height/2*x->x_zoom); - SYS_VGUI7(".x%x.c coords %xCOOLEDL %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xCOOLEDL %d %d %d %d\n", canvas, x, x->x_xpos, x->x_ypos + x->x_height/2*x->x_zoom, @@ -485,20 +485,20 @@ static void cooled_draw_move(t_cooled *x, t_glist *glist) x->x_ypos + x->x_height*x->x_zoom ); if ( ( x->x_readstart != 0 ) || ( x->x_readend != 100 ) ) { - SYS_VGUI7(".x%x.c coords %xCLIPZONE %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xCLIPZONE %d %d %d %d\n", canvas, x, x->x_xpos+(int)(x->x_readstart*(x->x_width)/100*x->x_zoom ), x->x_ypos, x->x_xpos+(int)(x->x_readend*(x->x_width)/100*x->x_zoom ), x->x_ypos+x->x_height*x->x_zoom ); } - SYS_VGUI7(".x%x.c coords %xINSERTHERE %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xINSERTHERE %d %d %d %d\n", canvas, x, x->x_xdraw, x->x_ypos, x->x_xdraw, x->x_ypos+x->x_height*x->x_zoom ); - SYS_VGUI5(".x%x.c coords ICOOLEDIMAGE%x %d %d\n", + SYS_VGUI5(".x%lx.c coords ICOOLEDIMAGE%x %d %d\n", canvas, x, x->x_xpos+((x->x_width*x->x_zoom)/2), (x->x_ypos+((x->x_height*x->x_zoom)/2)) ); @@ -515,13 +515,13 @@ static void cooled_draw_select(t_cooled* x,t_glist* glist) if(x->x_selected) { /* sets the item in blue */ - SYS_VGUI3(".x%x.c itemconfigure %xCOOLEDR -outline #0000FF\n", canvas, x); - SYS_VGUI3(".x%x.c itemconfigure %xCOOLEDL -outline #0000FF\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xCOOLEDR -outline #0000FF\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xCOOLEDL -outline #0000FF\n", canvas, x); } else { - SYS_VGUI3(".x%x.c itemconfigure %xCOOLEDR -outline #000000\n", canvas, x); - SYS_VGUI3(".x%x.c itemconfigure %xCOOLEDL -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xCOOLEDR -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xCOOLEDL -outline #000000\n", canvas, x); } } } @@ -543,11 +543,11 @@ static void cooled_readstart(t_cooled *x, t_floatarg fstart) if ( ( x->x_readstart < x->x_readend ) && ( x->x_readspeed < 0 ) ) x->x_readspeed = -x->x_readspeed; if ( glist_isvisible( x->x_glist ) ) { - SYS_VGUI3( ".x%x.c delete rectangle %xCLIPZONE\n", + SYS_VGUI3( ".x%lx.c delete rectangle %xCLIPZONE\n", canvas, x); if ( ( x->x_readstart != 0 ) || ( x->x_readend != 100 ) ) { - SYS_VGUI7( ".x%x.c create rectangle %d %d %d %d -outline #FF0000 -tags %xCLIPZONE -width 2\n", + SYS_VGUI7( ".x%lx.c create rectangle %d %d %d %d -outline #FF0000 -tags %xCLIPZONE -width 2\n", canvas, x->x_xpos+(int)(x->x_readstart*x->x_width*x->x_zoom/100 ), x->x_ypos, x->x_xpos+(int)(x->x_readend*x->x_width*x->x_zoom/100 ), x->x_ypos+x->x_height*x->x_zoom, x ); @@ -570,11 +570,11 @@ static void cooled_readend(t_cooled *x, t_floatarg fend) if ( ( x->x_readstart < x->x_readend ) && ( x->x_readspeed < 0 ) ) x->x_readspeed = -x->x_readspeed; if ( glist_isvisible( x->x_glist ) ) { - SYS_VGUI3( ".x%x.c delete rectangle %xCLIPZONE\n", + SYS_VGUI3( ".x%lx.c delete rectangle %xCLIPZONE\n", canvas, x); if ( ( x->x_readstart != 0 ) || ( x->x_readend != 100 ) ) { - SYS_VGUI7( ".x%x.c create rectangle %d %d %d %d -outline #FF0000 -tags %xCLIPZONE -width 2\n", + SYS_VGUI7( ".x%lx.c create rectangle %d %d %d %d -outline #FF0000 -tags %xCLIPZONE -width 2\n", canvas, x->x_xpos+(int)(x->x_readstart*x->x_width*x->x_zoom/100 ), x->x_ypos, x->x_xpos+(int)(x->x_readend*x->x_width*x->x_zoom/100 ), @@ -869,9 +869,9 @@ static int cooled_click(t_gobj *z, struct _glist *glist, // draw insertion line if ( glist_isvisible( x->x_glist ) ) { - SYS_VGUI3( ".x%x.c delete line %xINSERTHERE\n", + SYS_VGUI3( ".x%lx.c delete line %xINSERTHERE\n", canvas, x); - SYS_VGUI7( ".x%x.c create line %d %d %d %d -fill #00FFFF -tags %xINSERTHERE -width 2\n", + SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #00FFFF -tags %xINSERTHERE -width 2\n", canvas, x->x_xdraw, x->x_ypos, x->x_xdraw, x->x_ypos+x->x_height*x->x_zoom, x ); diff --git a/exciter.c b/exciter.c index cfbd365..10ccd1a 100644 --- a/exciter.c +++ b/exciter.c @@ -115,7 +115,7 @@ static void exciter_draw_gem(t_exciter *x, t_glist *glist, t_int ix, t_int iy) t_int polyray = ( x->x_height / x->x_nbevents) / 2; t_canvas *canvas=glist_getcanvas(glist); - SYS_VGUI13(".x%x.c create polygon %d %d %d %d %d %d %d %d -outline #000000 -fill #FFFFFF -tags %xEVENT%.4d%.4d\n", + SYS_VGUI13(".x%lx.c create polygon %d %d %d %d %d %d %d %d -outline #000000 -fill #FFFFFF -tags %xEVENT%.4d%.4d\n", canvas, text_xpix(&x->x_obj, glist) + ix*EXCITER_PIXEL_GRAIN, text_ypix(&x->x_obj, glist) + x->x_height - (iy+1)*x->x_height/x->x_nbevents + 2*polyray, @@ -133,7 +133,7 @@ static void exciter_delete_gem(t_exciter *x, t_glist *glist, t_int ix, t_int iy) { t_canvas *canvas=glist_getcanvas(glist); - SYS_VGUI5(".x%x.c delete %xEVENT%.4d%.4d\n", canvas, x, ix, iy ); + SYS_VGUI5(".x%lx.c delete %xEVENT%.4d%.4d\n", canvas, x, ix, iy ); } static void exciter_draw_update(t_exciter *x, t_glist *glist) @@ -162,16 +162,16 @@ static void exciter_draw_new(t_exciter *x, t_glist *glist) t_canvas *canvas=glist_getcanvas(glist); t_int ei; - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #902181 -tags %xLINE\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #902181 -tags %xLINE\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); - SYS_VGUI5(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"0 s\" -tags %xLOWERCAPTION\n", + SYS_VGUI5(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"0 s\" -tags %xLOWERCAPTION\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height + 10, x ); - SYS_VGUI6(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%.2f s\" -tags %xHIGHERCAPTION\n", + SYS_VGUI6(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%.2f s\" -tags %xHIGHERCAPTION\n", canvas, text_xpix(&x->x_obj, glist) + x->x_width, text_ypix(&x->x_obj, glist) + x->x_height + 10, x->x_width/EXCITER_PIXEL_GRAIN*x->x_timegrain , x); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xIN\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xIN\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) - 2, text_xpix(&x->x_obj, glist) + 5, @@ -181,7 +181,7 @@ static void exciter_draw_new(t_exciter *x, t_glist *glist) { for ( ei=0; eix_nbevents; ei++ ) { - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT%d\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT%d\n", canvas, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nbevents-1), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nbevents-1) + 5, @@ -191,7 +191,7 @@ static void exciter_draw_new(t_exciter *x, t_glist *glist) } else { - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT%d\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT%d\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + 5, @@ -207,15 +207,15 @@ static void exciter_draw_move(t_exciter *x, t_glist *glist) t_int polyray = ( x->x_height / x->x_nbevents) / 2; t_int ei, gi; - SYS_VGUI7(".x%x.c coords %xLINE %d %d %d %d \n", + SYS_VGUI7(".x%lx.c coords %xLINE %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 ); - SYS_VGUI5(".x%x.c coords %xLOWERCAPTION %d %d\n", + SYS_VGUI5(".x%lx.c coords %xLOWERCAPTION %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height + 10 ); - SYS_VGUI5(".x%x.c coords %xHIGHERCAPTION %d %d\n", + SYS_VGUI5(".x%lx.c coords %xHIGHERCAPTION %d %d\n", canvas, x, text_xpix(&x->x_obj, glist) + x->x_width, text_ypix(&x->x_obj, glist) + x->x_height + 10); - SYS_VGUI7(".x%x.c coords %xIN %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xIN %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) - 2, text_xpix(&x->x_obj, glist) + 5, @@ -225,7 +225,7 @@ static void exciter_draw_move(t_exciter *x, t_glist *glist) { for ( ei=0; eix_nbevents; ei++ ) { - SYS_VGUI8(".x%x.c coords %xOUT%d %d %d %d %d\n", + SYS_VGUI8(".x%lx.c coords %xOUT%d %d %d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nbevents-1), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + ( ei * (x->x_width - 5) )/ (x->x_nbevents-1) + 5, @@ -235,7 +235,7 @@ static void exciter_draw_move(t_exciter *x, t_glist *glist) } else { - SYS_VGUI8(".x%x.c coords %xOUT%d %d %d %d %d\n", + SYS_VGUI8(".x%lx.c coords %xOUT%d %d %d %d %d\n", canvas, x, 0, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + 5, @@ -246,7 +246,7 @@ static void exciter_draw_move(t_exciter *x, t_glist *glist) { for ( gi=0; gi<(x->x_width/EXCITER_PIXEL_GRAIN); gi++ ) { - SYS_VGUI13(".x%x.c coords %xEVENT%.4d%.4d %d %d %d %d %d %d %d %d\n", + SYS_VGUI13(".x%lx.c coords %xEVENT%.4d%.4d %d %d %d %d %d %d %d %d\n", canvas, x, gi, ei, text_xpix(&x->x_obj, glist) + gi*EXCITER_PIXEL_GRAIN, text_ypix(&x->x_obj, glist) + x->x_height - (ei+1)*x->x_height/x->x_nbevents + 2*polyray, @@ -267,10 +267,10 @@ static void exciter_draw_erase(t_exciter* x,t_glist* glist) t_canvas *canvas=glist_getcanvas(glist); int i, ei, gi; - SYS_VGUI3(".x%x.c delete %xLINE\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xLOWERCAPTION\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xHIGHERCAPTION\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xIN\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xLINE\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xLOWERCAPTION\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xHIGHERCAPTION\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xIN\n", canvas, x ); for ( ei=0; eix_nbevents; ei++ ) { for ( gi=0; gi<(x->x_width/EXCITER_PIXEL_GRAIN); gi++ ) @@ -280,7 +280,7 @@ static void exciter_draw_erase(t_exciter* x,t_glist* glist) exciter_delete_gem( x, glist, gi, ei ); } } - SYS_VGUI4(".x%x.c delete %xOUT%d\n", canvas, x, ei ); + SYS_VGUI4(".x%lx.c delete %xOUT%d\n", canvas, x, ei ); } } @@ -291,13 +291,13 @@ static void exciter_draw_select(t_exciter* x,t_glist* glist) if(x->x_selected) { /* sets the main item in blue */ - SYS_VGUI3(".x%x.c itemconfigure %xLINE -outline #0000FF\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xLINE -outline #0000FF\n", canvas, x); } else { /* sets the main item in black */ - SYS_VGUI3(".x%x.c itemconfigure %xLINE -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xLINE -outline #000000\n", canvas, x); } } @@ -734,7 +734,7 @@ static t_int *exciter_perform(t_int *w) if ( *(x->x_sbangs+ei*(x->x_width/EXCITER_PIXEL_GRAIN)+gi ) == 1 ) { outlet_bang( x->x_bangs[ ei ] ); - SYS_VGUI5(".x%x.c itemconfigure %xEVENT%.4d%.4d -fill #00FF00\n", + SYS_VGUI5(".x%lx.c itemconfigure %xEVENT%.4d%.4d -fill #00FF00\n", canvas, x, gi, ei); } } @@ -749,7 +749,7 @@ static t_int *exciter_perform(t_int *w) { if ( *(x->x_sbangs+ei*(x->x_width/EXCITER_PIXEL_GRAIN)+gi ) == 1 ) { - SYS_VGUI5(".x%x.c itemconfigure %xEVENT%.4d%.4d -fill #FFFFFF\n", + SYS_VGUI5(".x%lx.c itemconfigure %xEVENT%.4d%.4d -fill #FFFFFF\n", canvas, x, gi, ei); } } diff --git a/filterbank~.c b/filterbank~.c index b27909c..aa7cc43 100644 --- a/filterbank~.c +++ b/filterbank~.c @@ -132,7 +132,7 @@ static void filterbank_draw_new(t_filterbank_tilde *x, t_glist *glist) // draw the square { - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xFILTERBANK\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xFILTERBANK\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), @@ -140,7 +140,7 @@ static void filterbank_draw_new(t_filterbank_tilde *x, t_glist *glist) text_ypix(&x->x_obj, glist) + x->x_height, x); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #000000 -tags %xSIN\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #000000 -tags %xSIN\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, @@ -154,7 +154,7 @@ static void filterbank_draw_new(t_filterbank_tilde *x, t_glist *glist) sprintf( color, "#%.2x%.2x%.2x", (int)random() % 256, (int)random() % 256, (int)random() % 256 ); - SYS_VGUI11(".x%x.c create polygon %d %d %d %d %d %d -outline #000000 -fill %s -tags %xFILTER%d\n", + SYS_VGUI11(".x%lx.c create polygon %d %d %d %d %d %d -outline #000000 -fill %s -tags %xFILTER%d\n", canvas, text_xpix(&x->x_obj, glist) + fi*x->x_width/x->x_nbfilters, text_ypix(&x->x_obj, glist), @@ -174,7 +174,7 @@ static void filterbank_draw_move(t_filterbank_tilde *x, t_glist *glist) t_canvas *canvas=glist_getcanvas(glist); t_int fi; - SYS_VGUI7(".x%x.c coords %xFILTERBANK %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xFILTERBANK %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), @@ -182,7 +182,7 @@ static void filterbank_draw_move(t_filterbank_tilde *x, t_glist *glist) text_ypix(&x->x_obj, glist) + x->x_height ); - SYS_VGUI7(".x%x.c coords %xSIN %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xSIN %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, @@ -192,7 +192,7 @@ static void filterbank_draw_move(t_filterbank_tilde *x, t_glist *glist) for ( fi=0; fix_nbfilters; fi++ ) { - SYS_VGUI10(".x%x.c coords %xFILTER%d %d %d %d %d %d %d\n", + SYS_VGUI10(".x%lx.c coords %xFILTER%d %d %d %d %d %d %d\n", canvas, x, fi, text_xpix(&x->x_obj, glist) + fi*x->x_width/x->x_nbfilters, text_ypix(&x->x_obj, glist), @@ -211,11 +211,11 @@ static void filterbank_draw_erase(t_filterbank_tilde* x,t_glist* glist) t_canvas *canvas=glist_getcanvas(glist); int fi; - SYS_VGUI3(".x%x.c delete %xFILTERBANK\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xSIN\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xFILTERBANK\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xSIN\n", canvas, x ); for ( fi=0; fix_nbfilters; fi++ ) { - SYS_VGUI4(".x%x.c delete %xFILTER%d\n", canvas, x, fi ); + SYS_VGUI4(".x%lx.c delete %xFILTER%d\n", canvas, x, fi ); } } @@ -227,11 +227,11 @@ static void filterbank_draw_select(t_filterbank_tilde* x,t_glist* glist) if(x->x_selected) { /* sets the item in blue */ - SYS_VGUI3(".x%x.c itemconfigure %xFILTERBANK -outline #0000FF\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xFILTERBANK -outline #0000FF\n", canvas, x); } else { - SYS_VGUI3(".x%x.c itemconfigure %xFILTERBANK -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xFILTERBANK -outline #000000\n", canvas, x); } } diff --git a/mp3amp~.c b/mp3amp~.c index 9dfc54e..36b71e9 100644 --- a/mp3amp~.c +++ b/mp3amp~.c @@ -382,7 +382,7 @@ static int mp3amp_decode_input(t_mp3amp *x) t_int width; width = rtext_width( glist_findrtext( (t_glist*)x->x_canvas, (t_text *)x ) ); - SYS_VGUI3(".x%x.c delete rectangle %xSTATUS\n", x->x_canvas, x ); + SYS_VGUI3(".x%lx.c delete rectangle %xSTATUS\n", x->x_canvas, x ); if ( x->x_inframes < (MIN_AUDIO_INPUT/LAME_AUDIO_CHUNK_SIZE) ) { strcpy( color, "red" ); @@ -391,7 +391,7 @@ static int mp3amp_decode_input(t_mp3amp *x) { strcpy( color, "lightgreen" ); } - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -fill %s -tags %xSTATUS\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -fill %s -tags %xSTATUS\n", x->x_canvas, x->x_obj.te_xpix, x->x_obj.te_ypix-BARHEIGHT-1, x->x_obj.te_xpix+(x->x_inwriteposition*width)/INPUT_BUFFER_SIZE, x->x_obj.te_ypix - 1, color, x ); @@ -1039,8 +1039,8 @@ static void *mp3amp_do_connect(void *tdata ) t_int width; width = rtext_width( glist_findrtext( (t_glist*)x->x_canvas, (t_text *)x ) ); - SYS_VGUI3(".x%x.c delete rectangle %xPBAR\n", x->x_canvas, x ); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill lightblue -tags %xPBAR\n", + SYS_VGUI3(".x%lx.c delete rectangle %xPBAR\n", x->x_canvas, x ); + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill lightblue -tags %xPBAR\n", x->x_canvas, x->x_obj.te_xpix, x->x_obj.te_ypix-BARHEIGHT-1, x->x_obj.te_xpix + width, x->x_obj.te_ypix - 1, x ); } @@ -1157,8 +1157,8 @@ static void mp3amp_disconnect(t_mp3amp *x) InitMP3(&mps[x->x_instance]); if ( x->x_graphic ) { - SYS_VGUI3(".x%x.c delete rectangle %xPBAR\n", x->x_canvas, x ); - SYS_VGUI3(".x%x.c delete rectangle %xSTATUS\n", x->x_canvas, x ); + SYS_VGUI3(".x%lx.c delete rectangle %xPBAR\n", x->x_canvas, x ); + SYS_VGUI3(".x%lx.c delete rectangle %xSTATUS\n", x->x_canvas, x ); } post("mp3amp~: connection closed"); outlet_float(x->x_connection, 0); diff --git a/mp3streamin~.c b/mp3streamin~.c index b01a576..c34213f 100644 --- a/mp3streamin~.c +++ b/mp3streamin~.c @@ -312,8 +312,8 @@ static int mp3streamin_decode_input(t_mp3streamin *x) int minpackets = ( MIN_AUDIO_INPUT/LAME_AUDIO_CHUNK_SIZE )-2; // audio loop has eaten some already - sys_vgui(".x%x.c delete rectangle %xSTATUS\n", x->x_canvas, x ); - sys_vgui(".x%x.c delete line %xTHRESHOLD\n", x->x_canvas, x ); + sys_vgui(".x%lx.c delete rectangle %xSTATUS\n", x->x_canvas, x ); + sys_vgui(".x%lx.c delete line %xTHRESHOLD\n", x->x_canvas, x ); if ( x->x_outunread > 0 ) { t_int width; @@ -327,11 +327,11 @@ static int mp3streamin_decode_input(t_mp3streamin *x) strcpy( color, "lightgreen" ); } width = rtext_width( glist_findrtext( (t_glist*)x->x_canvas, (t_text *)x ) ); - sys_vgui(".x%x.c create rectangle %d %d %d %d -fill %s -tags %xSTATUS\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill %s -tags %xSTATUS\n", x->x_canvas, x->x_obj.te_xpix, x->x_obj.te_ypix-BARHEIGHT-1, x->x_obj.te_xpix+(x->x_inpackets*x->x_packetsize*width)/INPUT_BUFFER_SIZE, x->x_obj.te_ypix - 1, color, x ); - sys_vgui(".x%x.c create line %d %d %d %d -fill red -tags %xTHRESHOLD\n", + sys_vgui(".x%lx.c create line %d %d %d %d -fill red -tags %xTHRESHOLD\n", x->x_canvas, x->x_obj.te_xpix+(minpackets*x->x_packetsize*width)/INPUT_BUFFER_SIZE, x->x_obj.te_ypix-BARHEIGHT-1, x->x_obj.te_xpix+(minpackets*x->x_packetsize*width)/INPUT_BUFFER_SIZE, @@ -343,8 +343,8 @@ static int mp3streamin_decode_input(t_mp3streamin *x) if ( x->x_shutdown ) { x->x_shutdown=0; - sys_vgui(".x%x.c delete rectangle %xPBAR\n", x->x_canvas, x ); - sys_vgui(".x%x.c delete line %xTHRESHOLD\n", x->x_canvas, x ); + sys_vgui(".x%lx.c delete rectangle %xPBAR\n", x->x_canvas, x ); + sys_vgui(".x%lx.c delete line %xTHRESHOLD\n", x->x_canvas, x ); } } } @@ -433,7 +433,7 @@ static void mp3streamin_acceptconnection(t_mp3streamin *x) t_int width; width = rtext_width( glist_findrtext( (t_glist*)x->x_canvas, (t_text *)x ) ); - sys_vgui(".x%x.c create rectangle %d %d %d %d -fill lightblue -tags %xPBAR\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill lightblue -tags %xPBAR\n", x->x_canvas, x->x_obj.te_xpix, x->x_obj.te_ypix-BARHEIGHT-1, x->x_obj.te_xpix + width, x->x_obj.te_ypix - 1, x ); } diff --git a/pianoroll.c b/pianoroll.c index c63d7cc..eeda5a5 100644 --- a/pianoroll.c +++ b/pianoroll.c @@ -106,8 +106,8 @@ static void pianoroll_draw_update(t_pianoroll *x, t_glist *glist) x->x_ivolumes[ si ] = vi; x->x_ipeaches[ si ] = pi; - SYS_VGUI5(".x%x.c itemconfigure %xPITCH%.4d%.4d -fill #FFFF00\n", canvas, x, si, pi); - SYS_VGUI5(".x%x.c itemconfigure %xVOLUME%.4d%.4d -fill #FF0000\n", canvas, x, si, vi); + SYS_VGUI5(".x%lx.c itemconfigure %xPITCH%.4d%.4d -fill #FFFF00\n", canvas, x, si, pi); + SYS_VGUI5(".x%lx.c itemconfigure %xVOLUME%.4d%.4d -fill #FF0000\n", canvas, x, si, vi); } } @@ -124,14 +124,14 @@ static void pianoroll_draw_new(t_pianoroll *x, t_glist *glist) { for ( gj=0; gjx_nbgrades; gj++ ) { - SYS_VGUI9(".x%x.c create rectangle %d %d %d %d -fill #771623 -outline #998121 -tags %xPITCH%.4d%.4d\n", + SYS_VGUI9(".x%lx.c create rectangle %d %d %d %d -fill #771623 -outline #998121 -tags %xPITCH%.4d%.4d\n", canvas, text_xpix(&x->x_obj, glist)+(int)(gi*xgstep), text_ypix(&x->x_obj, glist)+(int)(gj*ygstep), text_xpix(&x->x_obj, glist)+(int)(gi*xgstep)+(int)(2*xgstep/3), text_ypix(&x->x_obj, glist)+(int)((gj+1)*ygstep), x, gi, gj ); - SYS_VGUI9(".x%x.c create rectangle %d %d %d %d -fill #562663 -outline #998121 -tags %xVOLUME%.4d%.4d\n", + SYS_VGUI9(".x%lx.c create rectangle %d %d %d %d -fill #562663 -outline #998121 -tags %xVOLUME%.4d%.4d\n", canvas, text_xpix(&x->x_obj, glist)+(int)(gi*xgstep)+(int)(2*xgstep/3), text_ypix(&x->x_obj, glist)+(int)(gj*ygstep), @@ -144,15 +144,15 @@ static void pianoroll_draw_new(t_pianoroll *x, t_glist *glist) x->x_width = (int)((x->x_nbsteps)*xgstep); x->x_height = (int)((x->x_nbgrades)*ygstep); } - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xIN\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -tags %xIN\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) - 1, text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist), x); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xOUTL\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -tags %xOUTL\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, x); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xOUTR\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -tags %xOUTR\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, x); @@ -173,14 +173,14 @@ static void pianoroll_draw_move(t_pianoroll *x, t_glist *glist) { for ( gj=0; gjx_nbgrades; gj++ ) { - SYS_VGUI9(".x%x.c coords %xPITCH%.4d%.4d %d %d %d %d\n", + SYS_VGUI9(".x%lx.c coords %xPITCH%.4d%.4d %d %d %d %d\n", canvas, x, gi, gj, text_xpix(&x->x_obj, glist)+(int)(gi*xgstep), text_ypix(&x->x_obj, glist)+(int)(gj*ygstep), text_xpix(&x->x_obj, glist)+(int)(gi*xgstep)+(int)(2*xgstep/3), text_ypix(&x->x_obj, glist)+(int)((gj+1)*ygstep) ); - SYS_VGUI9(".x%x.c coords %xVOLUME%.4d%.4d %d %d %d %d\n", + SYS_VGUI9(".x%lx.c coords %xVOLUME%.4d%.4d %d %d %d %d\n", canvas, x, gi, gj, text_xpix(&x->x_obj, glist)+(int)(gi*xgstep)+(int)(2*xgstep/3), text_ypix(&x->x_obj, glist)+(int)(gj*ygstep), @@ -190,15 +190,15 @@ static void pianoroll_draw_move(t_pianoroll *x, t_glist *glist) } } } - SYS_VGUI7(".x%x.c coords %xIN %d %d %d %d \n", + SYS_VGUI7(".x%lx.c coords %xIN %d %d %d %d \n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) - 1, text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist) ); - SYS_VGUI7(".x%x.c coords %xOUTL %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xOUTL %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 ); - SYS_VGUI7(".x%x.c coords %xOUTR %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xOUTR %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 ); @@ -210,9 +210,9 @@ static void pianoroll_draw_erase(t_pianoroll* x,t_glist* glist) t_canvas *canvas=glist_getcanvas(glist); t_int i; - SYS_VGUI3(".x%x.c delete %xIN\n", canvas, x); - SYS_VGUI3(".x%x.c delete %xOUTL\n", canvas, x); - SYS_VGUI3(".x%x.c delete %xOUTR\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xIN\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xOUTL\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xOUTR\n", canvas, x); // delete the grid { int gi, gj; @@ -220,8 +220,8 @@ static void pianoroll_draw_erase(t_pianoroll* x,t_glist* glist) { for ( gj=0; gjx_nbgrades; gj++ ) { - SYS_VGUI5(".x%x.c delete %xPITCH%.4d%.4d\n", canvas, x, gi, gj); - SYS_VGUI5(".x%x.c delete %xVOLUME%.4d%.4d\n", canvas, x, gi, gj); + SYS_VGUI5(".x%lx.c delete %xPITCH%.4d%.4d\n", canvas, x, gi, gj); + SYS_VGUI5(".x%lx.c delete %xVOLUME%.4d%.4d\n", canvas, x, gi, gj); } } } @@ -431,21 +431,21 @@ static int pianoroll_click(t_gobj *z, struct _glist *glist, if ( ( xpix - text_xpix(&x->x_obj, glist) ) > ( si*xgstep+2*xgstep/3 ) ) { { - SYS_VGUI5(".x%x.c itemconfigure %xVOLUME%.4d%.4d -fill #562663\n", canvas, x, si, x->x_ivolumes[ si ] ); + SYS_VGUI5(".x%lx.c itemconfigure %xVOLUME%.4d%.4d -fill #562663\n", canvas, x, si, x->x_ivolumes[ si ] ); } x->x_volumes[ si ] = (((float)x->x_nbgrades-1-(float)gi))/(float)(x->x_nbgrades-1); - SYS_VGUI5(".x%x.c itemconfigure %xVOLUME%.4d%.4d -fill #FF0000\n", canvas, x, si, gi); + SYS_VGUI5(".x%lx.c itemconfigure %xVOLUME%.4d%.4d -fill #FF0000\n", canvas, x, si, gi); x->x_ivolumes[ si ] = gi; } else { { - SYS_VGUI5(".x%x.c itemconfigure %xPITCH%.4d%.4d -fill #761623\n", canvas, x, si, x->x_ipeaches[ si ]); + SYS_VGUI5(".x%lx.c itemconfigure %xPITCH%.4d%.4d -fill #761623\n", canvas, x, si, x->x_ipeaches[ si ]); } x->x_peaches[ si ] = x->x_pmin+(float)(x->x_nbgrades-1-gi)/(float)(x->x_nbgrades-1)*(float)(x->x_pmax-x->x_pmin); - SYS_VGUI5(".x%x.c itemconfigure %xPITCH%.4d%.4d -fill #FFFF00\n", canvas, x, si, gi); + SYS_VGUI5(".x%lx.c itemconfigure %xPITCH%.4d%.4d -fill #FFFF00\n", canvas, x, si, gi); x->x_ipeaches[ si ] = gi; } } @@ -567,11 +567,11 @@ static void pianoroll_pitch(t_pianoroll *x, t_floatarg fpos, t_floatarg fpitch) } { - SYS_VGUI5(".x%x.c itemconfigure %xPITCH%.4d%.4d -fill #761623\n", canvas, x, ipos, x->x_ipeaches[ ipos ]); + SYS_VGUI5(".x%lx.c itemconfigure %xPITCH%.4d%.4d -fill #761623\n", canvas, x, ipos, x->x_ipeaches[ ipos ]); x->x_ipeaches[ ipos ] = (t_int) ( ( ( x->x_pmax - fpitch ) / ( x->x_pmax - x->x_pmin ) ) * ( x->x_nbgrades - 1 ) ); x->x_peaches[ ipos ] = x->x_pmin+(float)(x->x_nbgrades-1-x->x_ipeaches[ ipos ])/(float)(x->x_nbgrades-1)*(float)(x->x_pmax-x->x_pmin); - SYS_VGUI5(".x%x.c itemconfigure %xPITCH%.4d%.4d -fill #FFFF00\n", canvas, x, ipos, x->x_ipeaches[ ipos ]); + SYS_VGUI5(".x%lx.c itemconfigure %xPITCH%.4d%.4d -fill #FFFF00\n", canvas, x, ipos, x->x_ipeaches[ ipos ]); } } @@ -593,11 +593,11 @@ static void pianoroll_volume(t_pianoroll *x, t_floatarg fpos, t_floatarg fvol) } { - SYS_VGUI5(".x%x.c itemconfigure %xVOLUME%.4d%.4d -fill #562663\n", canvas, x, ipos, x->x_ivolumes[ ipos ] ); + SYS_VGUI5(".x%lx.c itemconfigure %xVOLUME%.4d%.4d -fill #562663\n", canvas, x, ipos, x->x_ivolumes[ ipos ] ); x->x_ivolumes[ ipos ] = (t_int) ( ( 1 - fvol ) * (x->x_nbgrades-1) ); x->x_volumes[ ipos ] = (((float)x->x_nbgrades-1-(float)x->x_ivolumes[ ipos ]))/(float)(x->x_nbgrades-1); - SYS_VGUI5(".x%x.c itemconfigure %xVOLUME%.4d%.4d -fill #FF0000\n", canvas, x, ipos, x->x_ivolumes[ ipos ] ); + SYS_VGUI5(".x%lx.c itemconfigure %xVOLUME%.4d%.4d -fill #FF0000\n", canvas, x, ipos, x->x_ivolumes[ ipos ] ); } } @@ -630,11 +630,11 @@ static void pianoroll_float(t_pianoroll *x, t_floatarg fposition) { if ( x->x_scurrent != -1 ) { - SYS_VGUI5(".x%x.c itemconfigure %xPITCH%.4d%.4d -fill #FFFF00\n", canvas, x, + SYS_VGUI5(".x%lx.c itemconfigure %xPITCH%.4d%.4d -fill #FFFF00\n", canvas, x, x->x_scurrent, x->x_ipeaches[ x->x_scurrent ]); } x->x_scurrent = rposition; - SYS_VGUI5(".x%x.c itemconfigure %xPITCH%.4d%.4d -fill #00FF00\n", canvas, x, + SYS_VGUI5(".x%lx.c itemconfigure %xPITCH%.4d%.4d -fill #00FF00\n", canvas, x, x->x_scurrent, x->x_ipeaches[ x->x_scurrent ]); } } diff --git a/playlist.c b/playlist.c index 7311eec..0e353dc 100644 --- a/playlist.c +++ b/playlist.c @@ -187,10 +187,10 @@ static void playlist_update_dir(t_playlist *x, t_glist *glist) tv.tv_nsec = 10000000; // set title - SYS_VGUI3(".x%x.c delete %xTITLE\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xTITLE\n", canvas, x); if ( x->x_graphics ) { - SYS_VGUI8(".x%x.c create text %d %d -width %d -text \"%s\" -anchor w -font %s -tags %xTITLE\n", + SYS_VGUI8(".x%lx.c create text %d %d -width %d -text \"%s\" -anchor w -font %s -tags %xTITLE\n", canvas, text_xpix(&x->x_obj, glist)+5, text_ypix(&x->x_obj, glist)-10, @@ -203,7 +203,7 @@ static void playlist_update_dir(t_playlist *x, t_glist *glist) // delete previous entries for ( i=x->x_firstseen; i<=x->x_lastseen; i++ ) { - SYS_VGUI4(".x%x.c delete %xENTRY%d\n", canvas, x, i); + SYS_VGUI4(".x%lx.c delete %xENTRY%d\n", canvas, x, i); } // display the content of current directory @@ -269,7 +269,7 @@ static void playlist_update_dir(t_playlist *x, t_glist *glist) x->x_lastseen = x->x_nentries; strncpy( wrappedname, x->x_dentries[x->x_nentries], MIN(x->x_width/x->x_charwidth, MAX_DIR_LENGTH) ); wrappedname[ x->x_width/x->x_charwidth ] = '\0'; - SYS_VGUI11(".x%x.c create text %d %d -fill %s -activefill %s -width %d -text \"%s\" -anchor w -font %s -tags %xENTRY%d\n", + SYS_VGUI11(".x%lx.c create text %d %d -fill %s -activefill %s -width %d -text \"%s\" -anchor w -font %s -tags %xENTRY%d\n", canvas, text_xpix(&x->x_obj, glist)+5, text_ypix(&x->x_obj, glist)+5+(x->x_nentries-x->x_firstseen)*x->x_charheight, @@ -343,11 +343,11 @@ static void playlist_draw_new(t_playlist *x, t_glist *glist) x->x_glist = glist; if ( x->x_graphics ) { - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -fill %s -tags %xPLAYLIST\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -fill %s -tags %xPLAYLIST\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); - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -fill %s -tags %xSCROLLLIST\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -fill %s -tags %xSCROLLLIST\n", canvas, text_xpix(&x->x_obj, glist)+4*x->x_width/5, 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_sbcolor, x); @@ -367,24 +367,24 @@ static void playlist_draw_move(t_playlist *x, t_glist *glist) if ( x->x_graphics ) { - SYS_VGUI7(".x%x.c coords %xPLAYLIST %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xPLAYLIST %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); - SYS_VGUI7(".x%x.c coords %xSCROLLLIST %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xSCROLLLIST %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist)+4*x->x_width/5, text_ypix(&x->x_obj, glist), text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist)+x->x_height); - SYS_VGUI5(".x%x.c coords %xTITLE %d %d\n", + SYS_VGUI5(".x%lx.c coords %xTITLE %d %d\n", canvas, x, text_xpix(&x->x_obj, glist)+5, text_ypix(&x->x_obj, glist)-10 ); } for ( i=x->x_firstseen; i<=x->x_lastseen; i++ ) { // nanosleep( &tv, NULL ); - SYS_VGUI6(".x%x.c coords %xENTRY%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xENTRY%d %d %d\n", canvas, x, i, text_xpix(&x->x_obj, glist)+5, text_ypix(&x->x_obj, glist)+5+(i-x->x_firstseen)*x->x_charheight); @@ -400,13 +400,13 @@ static void playlist_draw_erase(t_playlist* x, t_glist* glist) if ( x->x_graphics ) { - SYS_VGUI3(".x%x.c delete %xPLAYLIST\n", canvas, x); - SYS_VGUI3(".x%x.c delete %xSCROLLLIST\n", canvas, x); - SYS_VGUI3(".x%x.c delete %xTITLE\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xPLAYLIST\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xSCROLLLIST\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xTITLE\n", canvas, x); } for ( i=x->x_firstseen; i<=x->x_lastseen; i++ ) { - SYS_VGUI4(".x%x.c delete %xENTRY%d\n", canvas, x, i); + SYS_VGUI4(".x%lx.c delete %xENTRY%d\n", canvas, x, i); } } @@ -418,11 +418,11 @@ static void playlist_draw_select(t_playlist* x, t_glist* glist) if(x->x_selected) { /* sets the item in blue */ - if (x->x_graphics) SYS_VGUI3(".x%x.c itemconfigure %xPLAYLIST -outline #0000FF\n", canvas, x); + if (x->x_graphics) SYS_VGUI3(".x%lx.c itemconfigure %xPLAYLIST -outline #0000FF\n", canvas, x); } else { - if (x->x_graphics) SYS_VGUI3(".x%x.c itemconfigure %xPLAYLIST -outline #000000\n", canvas, x); + if (x->x_graphics) SYS_VGUI3(".x%lx.c itemconfigure %xPLAYLIST -outline #000000\n", canvas, x); } } @@ -518,7 +518,7 @@ static void playlist_motion(t_playlist *x, t_floatarg dx, t_floatarg dy) { for ( i=x->x_firstseen; i<=x->x_lastseen; i++ ) { - SYS_VGUI4(".x%x.c delete %xENTRY%d\n", canvas, x, i); + SYS_VGUI4(".x%lx.c delete %xENTRY%d\n", canvas, x, i); } x->x_firstseen++; for ( i=x->x_firstseen; i< x->x_nentries; i++ ) @@ -530,7 +530,7 @@ static void playlist_motion(t_playlist *x, t_floatarg dx, t_floatarg dy) x->x_lastseen = i; strncpy( wrappedname, x->x_dentries[i], x->x_width/x->x_charwidth ); wrappedname[ x->x_width/x->x_charwidth ] = '\0'; - SYS_VGUI11(".x%x.c create text %d %d -fill %s -activefill %s -width %d -text \"%s\" -anchor w -font %s -tags %xENTRY%d\n", + SYS_VGUI11(".x%lx.c create text %d %d -fill %s -activefill %s -width %d -text \"%s\" -anchor w -font %s -tags %xENTRY%d\n", canvas, text_xpix(&x->x_obj, x->x_glist)+5, text_ypix(&x->x_obj, x->x_glist)+5+(i-x->x_firstseen)*x->x_charheight, @@ -543,7 +543,7 @@ static void playlist_motion(t_playlist *x, t_floatarg dx, t_floatarg dy) } else break; } - SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", + SYS_VGUI5(".x%lx.c itemconfigure %xENTRY%d -fill %s\n", canvas, x, x->x_itemselected, x->x_secolor); // post( "playlist : moved down first=%d last=%d", x->x_firstseen, x->x_lastseen ); } @@ -559,7 +559,7 @@ static void playlist_motion(t_playlist *x, t_floatarg dx, t_floatarg dy) { for ( i=x->x_firstseen; i<=x->x_lastseen; i++ ) { - SYS_VGUI4(".x%x.c delete %xENTRY%d\n", canvas, x, i); + SYS_VGUI4(".x%lx.c delete %xENTRY%d\n", canvas, x, i); } x->x_firstseen--; for ( i=x->x_firstseen; i< x->x_nentries; i++ ) @@ -571,7 +571,7 @@ static void playlist_motion(t_playlist *x, t_floatarg dx, t_floatarg dy) x->x_lastseen = i; strncpy( wrappedname, x->x_dentries[i], x->x_width/x->x_charwidth ); wrappedname[ x->x_width/x->x_charwidth ] = '\0'; - SYS_VGUI11(".x%x.c create text %d %d -fill %s -activefill %s -width %d -text \"%s\" \ + SYS_VGUI11(".x%lx.c create text %d %d -fill %s -activefill %s -width %d -text \"%s\" \ -anchor w -font %s -tags %xENTRY%d\n", canvas, text_xpix(&x->x_obj, x->x_glist)+5, @@ -585,7 +585,7 @@ static void playlist_motion(t_playlist *x, t_floatarg dx, t_floatarg dy) } else break; } - SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", + SYS_VGUI5(".x%lx.c itemconfigure %xENTRY%d -fill %s\n", canvas, x, x->x_itemselected, x->x_secolor); // post( "playlist : moved up first=%d last=%d", x->x_firstseen, x->x_lastseen ); } @@ -629,10 +629,10 @@ static int playlist_click(t_gobj *z, struct _glist *glist, if ( (xpix-text_xpix(&x->x_obj, glist)) < 4*x->x_width/5 ) { // deselect previously selected item - SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", + SYS_VGUI5(".x%lx.c itemconfigure %xENTRY%d -fill %s\n", canvas, x, x->x_itemselected, x->x_fgcolor); x->x_itemselected = x->x_firstseen + (ypix-text_ypix(&x->x_obj, glist))/x->x_charheight; - SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", + SYS_VGUI5(".x%lx.c itemconfigure %xENTRY%d -fill %s\n", canvas, x, x->x_itemselected, x->x_secolor); // post( "playlist : selected item : %d", x->x_itemselected ); if ( x->x_dentries && ( x->x_itemselected < x->x_nentries ) ) @@ -971,9 +971,9 @@ static void playlist_seek(t_playlist *x, t_floatarg fseeked) { return; } - SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", canvas, x, x->x_itemselected, x->x_fgcolor); + SYS_VGUI5(".x%lx.c itemconfigure %xENTRY%d -fill %s\n", canvas, x, x->x_itemselected, x->x_fgcolor); x->x_itemselected = iout; - SYS_VGUI5(".x%x.c itemconfigure %xENTRY%d -fill %s\n", canvas, x, x->x_itemselected, x->x_secolor); + SYS_VGUI5(".x%lx.c itemconfigure %xENTRY%d -fill %s\n", canvas, x, x->x_itemselected, x->x_secolor); playlist_output_current(x); } diff --git a/probalizer.c b/probalizer.c index e529d41..b77e5fc 100644 --- a/probalizer.c +++ b/probalizer.c @@ -107,31 +107,31 @@ static void probalizer_draw_new(t_probalizer *x, t_glist *glist) t_canvas *canvas=glist_getcanvas(glist); t_int ei; - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #6790E2 -tags %xPROBALIZER\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #6790E2 -tags %xPROBALIZER\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); - SYS_VGUI5(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"0\" -tags %xLTCAPTION\n", + SYS_VGUI5(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"0\" -tags %xLTCAPTION\n", canvas, text_xpix(&x->x_obj, glist)-15, text_ypix(&x->x_obj, glist) + x->x_height, x ); - SYS_VGUI6(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%d\" -tags %xLBCAPTION\n", + SYS_VGUI6(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%d\" -tags %xLBCAPTION\n", canvas, text_xpix(&x->x_obj, glist)-15, text_ypix(&x->x_obj, glist), x->x_noccurrences, x ); - SYS_VGUI5(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"1\" -tags %xBLCAPTION\n", + SYS_VGUI5(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"1\" -tags %xBLCAPTION\n", canvas, text_xpix(&x->x_obj, glist)+2, text_ypix(&x->x_obj, glist) + x->x_height + 10, x ); - SYS_VGUI6(".x%x.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%d\" -tags %xBRCAPTION\n", + SYS_VGUI6(".x%lx.c create text %d %d -font -*-courier-bold--normal--10-* -text \"%d\" -tags %xBRCAPTION\n", canvas, text_xpix(&x->x_obj, glist) + x->x_width-5, text_ypix(&x->x_obj, glist) + x->x_height + 10, x->x_nvalues, x ); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xIN\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xIN\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) - 2, text_xpix(&x->x_obj, glist) + 5, text_ypix(&x->x_obj, glist) , x); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT\n", canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + 5, text_ypix(&x->x_obj, glist) + x->x_height + 2, x); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT2\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #000000 -tags %xOUT2\n", canvas, text_xpix(&x->x_obj, glist) + x->x_width -5, text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + x->x_width, @@ -139,7 +139,7 @@ static void probalizer_draw_new(t_probalizer *x, t_glist *glist) x); for ( ei=0; eix_nvalues; ei++ ) { - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -outline #000000 -fill #118373 -tags %xPROB%d\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -outline #000000 -fill #118373 -tags %xPROB%d\n", canvas, text_xpix(&x->x_obj, glist) + ei * x->x_width/x->x_nvalues, text_ypix(&x->x_obj, glist) + x->x_height - ( *(x->x_probs+ei) * x->x_height / x->x_noccurrences ), @@ -157,7 +157,7 @@ static void probalizer_draw_update(t_probalizer *x) for ( ei=0; eix_nvalues; ei++ ) { - SYS_VGUI8(".x%x.c coords %xPROB%d %d %d %d %d\n", + SYS_VGUI8(".x%lx.c coords %xPROB%d %d %d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, x->x_glist) + ei * x->x_width / x->x_nvalues, text_ypix(&x->x_obj, x->x_glist) + x->x_height - ( *(x->x_probs+ei) * x->x_height / x->x_noccurrences ), @@ -172,47 +172,47 @@ static void probalizer_draw_move(t_probalizer *x, t_glist *glist) t_canvas *canvas=glist_getcanvas(glist); t_int ei; - SYS_VGUI7(".x%x.c coords %xPROBALIZER %d %d %d %d \n", + SYS_VGUI7(".x%lx.c coords %xPROBALIZER %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 ); - SYS_VGUI7(".x%x.c coords %xIN %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xIN %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) - 2, text_xpix(&x->x_obj, glist) + 5, text_ypix(&x->x_obj, glist) ); - SYS_VGUI7(".x%x.c coords %xOUT %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xOUT %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + 5, text_ypix(&x->x_obj, glist) + x->x_height + 2 ); - SYS_VGUI7(".x%x.c coords %xOUT2 %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xOUT2 %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist) + x->x_width - 5, text_ypix(&x->x_obj, glist) + x->x_height, text_xpix(&x->x_obj, glist) + x->x_width, text_ypix(&x->x_obj, glist) + x->x_height + 2 ); - SYS_VGUI5(".x%x.c coords %xLTCAPTION %d %d\n", + SYS_VGUI5(".x%lx.c coords %xLTCAPTION %d %d\n", canvas, x, text_xpix(&x->x_obj, glist)-15, text_ypix(&x->x_obj, glist) + x->x_height ); - SYS_VGUI5(".x%x.c coords %xLBCAPTION %d %d\n", + SYS_VGUI5(".x%lx.c coords %xLBCAPTION %d %d\n", canvas, x, text_xpix(&x->x_obj, glist)-15, text_ypix(&x->x_obj, glist) ); - SYS_VGUI5(".x%x.c coords %xBLCAPTION %d %d\n", + SYS_VGUI5(".x%lx.c coords %xBLCAPTION %d %d\n", canvas, x, text_xpix(&x->x_obj, glist)+2, text_ypix(&x->x_obj, glist) + x->x_height + 10 ); - SYS_VGUI5(".x%x.c coords %xBRCAPTION %d %d\n", + SYS_VGUI5(".x%lx.c coords %xBRCAPTION %d %d\n", canvas, x, text_xpix(&x->x_obj, glist) + x->x_width - 5, text_ypix(&x->x_obj, glist) + x->x_height + 10 ); for ( ei=0; eix_nvalues; ei++ ) { - SYS_VGUI8(".x%x.c coords %xPROB%d %d %d %d %d\n", + SYS_VGUI8(".x%lx.c coords %xPROB%d %d %d %d %d\n", canvas, x, ei, text_xpix(&x->x_obj, glist) + ei * x->x_width / x->x_nvalues, text_ypix(&x->x_obj, glist) + x->x_height - ( *(x->x_probs+ei) * x->x_height / x->x_noccurrences ), @@ -227,17 +227,17 @@ static void probalizer_draw_erase(t_probalizer* x,t_glist* glist) t_canvas *canvas=glist_getcanvas(glist); int i, ei, gi; - SYS_VGUI3(".x%x.c delete %xPROBALIZER\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xIN\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xOUT\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xOUT2\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xLTCAPTION\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xLBCAPTION\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xBLCAPTION\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xBRCAPTION\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xPROBALIZER\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xIN\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xOUT\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xOUT2\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xLTCAPTION\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xLBCAPTION\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xBLCAPTION\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xBRCAPTION\n", canvas, x ); for ( ei=0; eix_nvalues; ei++ ) { - SYS_VGUI4(".x%x.c delete %xPROB%d\n", canvas, x, ei ); + SYS_VGUI4(".x%lx.c delete %xPROB%d\n", canvas, x, ei ); } } @@ -248,13 +248,13 @@ static void probalizer_draw_select(t_probalizer* x,t_glist* glist) if(x->x_selected) { /* sets the main item in blue */ - SYS_VGUI3(".x%x.c itemconfigure %xPROBALIZER -outline #0000FF\n", glist_getcanvas(glist), x); + SYS_VGUI3(".x%lx.c itemconfigure %xPROBALIZER -outline #0000FF\n", glist_getcanvas(glist), x); } else { /* sets the main item in black */ - SYS_VGUI3(".x%x.c itemconfigure %xPROBALIZER -outline #000000\n", glist_getcanvas(glist), x); + SYS_VGUI3(".x%lx.c itemconfigure %xPROBALIZER -outline #000000\n", glist_getcanvas(glist), x); } } diff --git a/scratcher~.c b/scratcher~.c index 8fec927..d0a8c90 100644 --- a/scratcher~.c +++ b/scratcher~.c @@ -159,14 +159,14 @@ static void scratcher_draw_new(t_scratcher *x, t_glist *glist) t_canvas *canvas=glist_getcanvas(glist); t_int ci; - SYS_VGUI7(".x%x.c create oval %d %d %d %d -fill #000000 -tags %xSCRATCHER\n", + SYS_VGUI7(".x%lx.c create oval %d %d %d %d -fill #000000 -tags %xSCRATCHER\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); for ( ci=0; cix_obj, glist) + ci*x->x_width/(2*SCRATCHER_NB_GROOVES), text_ypix(&x->x_obj, glist) + ci*x->x_height/(2*SCRATCHER_NB_GROOVES), text_xpix(&x->x_obj, glist) + x->x_width - ci*x->x_width/(2*SCRATCHER_NB_GROOVES), @@ -175,14 +175,14 @@ static void scratcher_draw_new(t_scratcher *x, t_glist *glist) } if ( x->x_showspeed ) { - SYS_VGUI7( ".x%x.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n", + SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n", canvas, text_xpix(&x->x_obj, glist)+x->x_width/2, text_ypix(&x->x_obj, glist)+x->x_height/2, text_xpix(&x->x_obj, glist)+x->x_width/2 + (int)(x->x_width/2*cos( x->x_readspeed - 1. )), text_ypix(&x->x_obj, glist)+x->x_height/2 - (int)(x->x_width/2*sin( x->x_readspeed - 1. )), x ); } - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %xFSCRATCHER\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -tags %xFSCRATCHER\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, @@ -197,12 +197,12 @@ static void scratcher_draw_delete(t_scratcher *x, t_glist *glist) if ( glist_isvisible( glist ) ) { - SYS_VGUI3( ".x%x.c delete %xSCRATCHER\n", canvas, x ); - SYS_VGUI3( ".x%x.c delete %xFSCRATCHER\n", canvas, x ); - SYS_VGUI3( ".x%x.c delete %xSPEEDBAR\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete %xSCRATCHER\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete %xFSCRATCHER\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete %xSPEEDBAR\n", canvas, x ); for ( ci=0; cix_glist ) ) { - SYS_VGUI7(".x%x.c coords %xSCRATCHER %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xSCRATCHER %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist)-1, text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist)+x->x_width+1, text_ypix(&x->x_obj, glist)+x->x_height+1); - SYS_VGUI7(".x%x.c coords %xFSCRATCHER %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xFSCRATCHER %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist)-1, text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist)+x->x_width+1, text_ypix(&x->x_obj, glist)+x->x_height+1); if ( x->x_showspeed ) { - SYS_VGUI7( ".x%x.c coords %xSPEEDBAR %d %d %d %d\n", + SYS_VGUI7( ".x%lx.c coords %xSPEEDBAR %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist)+x->x_width/2, text_ypix(&x->x_obj, glist)+x->x_height/2, @@ -236,7 +236,7 @@ static void scratcher_draw_move(t_scratcher *x, t_glist *glist) } for ( ci=0; cix_obj, glist) + ci*x->x_width/(2*SCRATCHER_NB_GROOVES), text_ypix(&x->x_obj, glist) + ci*x->x_height/(2*SCRATCHER_NB_GROOVES), @@ -345,7 +345,7 @@ static void scratcher_motion(t_scratcher *x, t_floatarg dx, t_floatarg dy) if ( x->x_showspeed ) { - SYS_VGUI7( ".x%x.c coords %xSPEEDBAR %d %d %d %d\n", + SYS_VGUI7( ".x%lx.c coords %xSPEEDBAR %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2, text_ypix(&x->x_obj, x->x_glist)+x->x_height/2, @@ -394,7 +394,7 @@ static void scratcher_reset(t_scratcher *x) x->x_readspeed=1.; if ( x->x_showspeed ) { - SYS_VGUI7( ".x%x.c coords %xSPEEDBAR %d %d %d %d\n", + SYS_VGUI7( ".x%lx.c coords %xSPEEDBAR %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2, text_ypix(&x->x_obj, x->x_glist)+x->x_height/2, @@ -420,7 +420,7 @@ static int scratcher_click(t_gobj *z, struct _glist *glist, x->x_motioned = 1; if ( x->x_showspeed ) { - SYS_VGUI7( ".x%x.c coords %xSPEEDBAR %d %d %d %d\n", + SYS_VGUI7( ".x%lx.c coords %xSPEEDBAR %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist)+x->x_width/2, text_ypix(&x->x_obj, glist)+x->x_height/2, @@ -530,7 +530,7 @@ static t_int *scratcher_perform(t_int *w) } if ( x->x_showspeed ) { - SYS_VGUI7( ".x%x.c coords %xSPEEDBAR %d %d %d %d\n", + SYS_VGUI7( ".x%lx.c coords %xSPEEDBAR %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2, text_ypix(&x->x_obj, x->x_glist)+x->x_height/2, @@ -585,8 +585,8 @@ static void scratcher_play(t_scratcher *x) x->x_readspeed=1.; if ( x->x_showspeed ) { - SYS_VGUI3( ".x%x.c delete %xSPEEDBAR\n", canvas, x ); - SYS_VGUI7( ".x%x.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n", + SYS_VGUI3( ".x%lx.c delete %xSPEEDBAR\n", canvas, x ); + SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n", canvas, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2, text_ypix(&x->x_obj, x->x_glist)+x->x_height/2, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2 + (int)(x->x_width/2*cos( x->x_readspeed - 1. )), @@ -606,8 +606,8 @@ static void scratcher_stop(t_scratcher *x) x->x_readspeed=0.; if ( x->x_showspeed ) { - SYS_VGUI3( ".x%x.c delete %xSPEEDBAR\n", canvas, x ); - SYS_VGUI7( ".x%x.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n", + SYS_VGUI3( ".x%lx.c delete %xSPEEDBAR\n", canvas, x ); + SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n", canvas, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2, text_ypix(&x->x_obj, x->x_glist)+x->x_height/2, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2 + (int)(x->x_width/2*cos( x->x_readspeed - 1. )), @@ -679,13 +679,13 @@ static void scratcher_showspeed(t_scratcher *x, t_floatarg fshowspeed ) if (fshowspeed == 0) { x->x_showspeed = 0; - SYS_VGUI3( ".x%x.c delete %xSPEEDBAR\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete %xSPEEDBAR\n", canvas, x ); } else { x->x_showspeed = 1; - SYS_VGUI3( ".x%x.c delete %xSPEEDBAR\n", canvas, x ); - SYS_VGUI7( ".x%x.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n", + SYS_VGUI3( ".x%lx.c delete %xSPEEDBAR\n", canvas, x ); + SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n", canvas, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2, text_ypix(&x->x_obj, x->x_glist)+x->x_height/2, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2 + (int)(x->x_width/2*cos( x->x_readspeed - 1. )), diff --git a/scrolllist.c b/scrolllist.c index b897145..c70bae3 100644 --- a/scrolllist.c +++ b/scrolllist.c @@ -138,7 +138,7 @@ static void scrolllist_erase(t_scrolllist *x, t_glist *glist) // delete previous entries for ( i=x->x_firstseen; i<=x->x_lastseen; i++ ) { - SYS_VGUI4(".x%x.c delete %xITEM%d\n", canvas, x, i); + SYS_VGUI4(".x%lx.c delete %xITEM%d\n", canvas, x, i); } } @@ -157,7 +157,7 @@ static void scrolllist_update(t_scrolllist *x, t_glist *glist) // display the entry if displayable if ( ( (i-x->x_firstseen)*x->x_charheight < x->x_height ) && ( x->x_items[i] != NULL ) ) { - SYS_VGUI11(".x%x.c create text %d %d -fill %s -activefill %s -width %d -text \"%s\" -anchor w -font %s -tags %xITEM%d\n", + SYS_VGUI11(".x%lx.c create text %d %d -fill %s -activefill %s -width %d -text \"%s\" -anchor w -font %s -tags %xITEM%d\n", canvas, text_xpix(&x->x_obj, glist)+5, text_ypix(&x->x_obj, glist)+5+(i-x->x_firstseen)*x->x_charheight, @@ -170,7 +170,7 @@ static void scrolllist_update(t_scrolllist *x, t_glist *glist) } if ( ( x->x_itemselected >= x->x_firstseen ) && ( x->x_itemselected <= x->x_lastseen ) ) { - SYS_VGUI5(".x%x.c itemconfigure %xITEM%d -fill %s\n", + SYS_VGUI5(".x%lx.c itemconfigure %xITEM%d -fill %s\n", canvas, x, x->x_itemselected, x->x_secolor); } } @@ -191,14 +191,14 @@ static void scrolllist_draw_new(t_scrolllist *x, t_glist *glist) x->x_glist = glist; if ( x->x_graphics ) { - SYS_VGUI8(".x%x.c create rectangle %d %d %d %d -fill %s -tags %xTEXTLIST\n", + SYS_VGUI8(".x%lx.c create rectangle %d %d %d %d -fill %s -tags %xTEXTLIST\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); } else { - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -outline white -fill white -tags %xTEXTLIST\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -outline white -fill white -tags %xTEXTLIST\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); } @@ -215,7 +215,7 @@ static void scrolllist_draw_move(t_scrolllist *x, t_glist *glist) tv.tv_sec = 0; tv.tv_nsec = 10000000; - SYS_VGUI7(".x%x.c coords %xTEXTLIST %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xTEXTLIST %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, @@ -223,7 +223,7 @@ static void scrolllist_draw_move(t_scrolllist *x, t_glist *glist) for ( i=x->x_firstseen; i<=x->x_lastseen; i++ ) { // nanosleep( &tv, NULL ); - SYS_VGUI6(".x%x.c coords %xITEM%d %d %d\n", + SYS_VGUI6(".x%lx.c coords %xITEM%d %d %d\n", canvas, x, i, text_xpix(&x->x_obj, glist)+5, text_ypix(&x->x_obj, glist)+5+(i-x->x_firstseen)*x->x_charheight); @@ -237,10 +237,10 @@ static void scrolllist_draw_erase(t_scrolllist* x, t_glist* glist) t_canvas *canvas=glist_getcanvas(glist); t_int i; - SYS_VGUI3(".x%x.c delete %xTEXTLIST\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xTEXTLIST\n", canvas, x); for ( i=x->x_firstseen; i<=x->x_lastseen; i++ ) { - SYS_VGUI4(".x%x.c delete %xITEM%d\n", canvas, x, i); + SYS_VGUI4(".x%lx.c delete %xITEM%d\n", canvas, x, i); } } @@ -252,11 +252,11 @@ static void scrolllist_draw_select(t_scrolllist* x, t_glist* glist) if(x->x_selected) { /* sets the item in blue */ - SYS_VGUI3(".x%x.c itemconfigure %xTEXTLIST -outline #0000FF\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xTEXTLIST -outline #0000FF\n", canvas, x); } else { - SYS_VGUI3(".x%x.c itemconfigure %xTEXTLIST -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xTEXTLIST -outline #000000\n", canvas, x); } } @@ -404,10 +404,10 @@ static int scrolllist_click(t_gobj *z, struct _glist *glist, if (doit) { // deselect previously selected item - SYS_VGUI5(".x%x.c itemconfigure %xITEM%d -fill %s\n", + SYS_VGUI5(".x%lx.c itemconfigure %xITEM%d -fill %s\n", canvas, x, x->x_itemselected, x->x_fgcolor); x->x_itemselected = x->x_firstseen + (ypix-text_ypix(&x->x_obj, glist))/x->x_charheight; - SYS_VGUI5(".x%x.c itemconfigure %xITEM%d -fill %s\n", + SYS_VGUI5(".x%lx.c itemconfigure %xITEM%d -fill %s\n", canvas, x, x->x_itemselected, x->x_secolor); // post( "scrolllist : selected item : %d", x->x_itemselected ); if ( x->x_items && ( x->x_itemselected < x->x_nitems ) ) @@ -811,9 +811,9 @@ static void scrolllist_seek(t_scrolllist *x, t_floatarg fseeked) if ( x->x_nitems == 0 ) return; iout = (t_int)fseeked % (x->x_nitems); - SYS_VGUI5(".x%x.c itemconfigure %xITEM%d -fill %s\n", canvas, x, x->x_itemselected, x->x_fgcolor); + SYS_VGUI5(".x%lx.c itemconfigure %xITEM%d -fill %s\n", canvas, x, x->x_itemselected, x->x_fgcolor); x->x_itemselected = iout; - SYS_VGUI5(".x%x.c itemconfigure %xITEM%d -fill %s\n", canvas, x, x->x_itemselected, x->x_secolor); + SYS_VGUI5(".x%lx.c itemconfigure %xITEM%d -fill %s\n", canvas, x, x->x_itemselected, x->x_secolor); scrolllist_output_current(x); } diff --git a/sonogram~.c b/sonogram~.c index 18bf3c6..5454fff 100644 --- a/sonogram~.c +++ b/sonogram~.c @@ -431,10 +431,10 @@ static void *sonogram_do_update_part(void *tdata) } // set borders in black - SYS_VGUI3(".x%x.c itemconfigure %xSONOGRAM -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xSONOGRAM -outline #000000\n", canvas, x); if ( x->x_phaso ) { - SYS_VGUI3(".x%x.c itemconfigure %xPHASOGRAM -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xPHASOGRAM -outline #000000\n", canvas, x); } // post("sonogram~ : child thread %d ended (nb_updated=%d)", (int)x->x_updatechild, x->x_nbupdated ); @@ -471,44 +471,44 @@ static void sonogram_update_part(t_sonogram *x, t_glist *glist, t_int bstart, t_ // recreate the square if needed if ( ( bstart == 0 ) && ( bend == x->x_size-1 ) && !keepframe ) { - SYS_VGUI3(".x%x.c delete %xSONOGRAM\n", canvas, x ); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xSONOGRAM\n", + SYS_VGUI3(".x%lx.c delete %xSONOGRAM\n", canvas, x ); + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xSONOGRAM\n", glist_getcanvas(glist), x->x_xpos-1, x->x_ypos-1, x->x_xpos + x->x_size*x->x_zoom+1, x->x_ypos + x->x_blocksize/2*x->x_zoom+1, x); SYS_VGUI2("image delete SONIMAGE%x\n", x ); - SYS_VGUI3(".x%x.c delete ISONIMAGE%x\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete ISONIMAGE%x\n", canvas, x ); SYS_VGUI4("image create photo SONIMAGE%x -format gif -width %d -height %d\n", x, x->x_size*x->x_zoom, x->x_blocksize/2*x->x_zoom ); SYS_VGUI2("SONIMAGE%x blank\n", x); - SYS_VGUI6(".x%x.c create image %d %d -image SONIMAGE%x -tags ISONIMAGE%x\n", + SYS_VGUI6(".x%lx.c create image %d %d -image SONIMAGE%x -tags ISONIMAGE%x\n", canvas, x->x_xpos+((x->x_size*x->x_zoom)/2), (x->x_ypos+((x->x_blocksize/2*x->x_zoom)/2)), x, x ); if ( x->x_phaso ) { - SYS_VGUI3(".x%x.c delete %xPHASOGRAM\n", canvas, x ); - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xPHASOGRAM\n", + SYS_VGUI3(".x%lx.c delete %xPHASOGRAM\n", canvas, x ); + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xPHASOGRAM\n", canvas, x->x_xpos-1, x->x_ypos+x->x_blocksize/2*x->x_zoom+2, x->x_xpos + x->x_size*x->x_zoom +1, x->x_ypos + x->x_blocksize*x->x_zoom + 3, x); SYS_VGUI2("image delete FAZIMAGE%x\n", x ); - SYS_VGUI3(".x%x.c delete IFAZIMAGE%x\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete IFAZIMAGE%x\n", canvas, x ); SYS_VGUI4("image create photo FAZIMAGE%x -format gif -width %d -height %d\n", x, x->x_size*x->x_zoom, x->x_blocksize/2*x->x_zoom ); SYS_VGUI2("FAZIMAGE%x blank\n", x); - SYS_VGUI6(".x%x.c create image %d %d -image FAZIMAGE%x -tags IFAZIMAGE%x\n", + SYS_VGUI6(".x%lx.c create image %d %d -image FAZIMAGE%x -tags IFAZIMAGE%x\n", canvas, 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( canvas, (t_text*)x ); } // set borders in red - SYS_VGUI3(".x%x.c itemconfigure %xSONOGRAM -outline #FF0000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xSONOGRAM -outline #FF0000\n", canvas, x); if ( x->x_phaso ) { - SYS_VGUI3(".x%x.c itemconfigure %xPHASOGRAM -outline #FF0000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xPHASOGRAM -outline #FF0000\n", canvas, x); } // launch update thread @@ -706,7 +706,7 @@ static void sonogram_paste_phase( t_sonogram* x) sonogram_update_part(x, x->x_glist, pxstart, pxstart+(si-1)-cxs, 0, 1, 1); // start a new capture - SYS_VGUI3( ".x%x.c delete %xCAPTURE\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete %xCAPTURE\n", canvas, x ); x->x_xstartcapture = x->x_xdraw; x->x_ystartcapture = x->x_ydraw; x->x_xendcapture = x->x_xdraw; @@ -722,7 +722,7 @@ static void sonogram_draw_new(t_sonogram *x, t_glist *glist) x->x_ypos=text_ypix(&x->x_obj, glist); if ( x->x_graphic ) { - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xSONOGRAM\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xSONOGRAM\n", canvas, x->x_xpos-1, x->x_ypos-1, x->x_xpos + x->x_size*x->x_zoom+1, x->x_ypos + x->x_blocksize/2*x->x_zoom+1, @@ -730,12 +730,12 @@ static void sonogram_draw_new(t_sonogram *x, t_glist *glist) SYS_VGUI4("image create photo SONIMAGE%x -format gif -width %d -height %d\n", x, x->x_size*x->x_zoom, x->x_blocksize/2*x->x_zoom ); SYS_VGUI2("SONIMAGE%x blank\n", x); - SYS_VGUI6(".x%x.c create image %d %d -image SONIMAGE%x -tags ISONIMAGE%x\n", + SYS_VGUI6(".x%lx.c create image %d %d -image SONIMAGE%x -tags ISONIMAGE%x\n", canvas, x->x_xpos+((x->x_size*x->x_zoom)/2), (x->x_ypos+((x->x_blocksize/2*x->x_zoom)/2)), x, x ); if ( x->x_phaso ) { - SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xPHASOGRAM\n", + SYS_VGUI7(".x%lx.c create rectangle %d %d %d %d -fill #FFFFFF -tags %xPHASOGRAM\n", canvas, x->x_xpos-1, x->x_ypos+x->x_blocksize/2*x->x_zoom+2, x->x_xpos + x->x_size*x->x_zoom +1, x->x_ypos + x->x_blocksize*x->x_zoom + 3, @@ -743,7 +743,7 @@ static void sonogram_draw_new(t_sonogram *x, t_glist *glist) SYS_VGUI4("image create photo FAZIMAGE%x -format gif -width %d -height %d\n", x, x->x_size*x->x_zoom, x->x_blocksize/2*x->x_zoom ); SYS_VGUI2("FAZIMAGE%x blank\n", x); - SYS_VGUI6(".x%x.c create image %d %d -image FAZIMAGE%x -tags IFAZIMAGE%x\n", + SYS_VGUI6(".x%lx.c create image %d %d -image FAZIMAGE%x -tags IFAZIMAGE%x\n", canvas, 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 ); } @@ -757,18 +757,18 @@ static void sonogram_draw_delete(t_sonogram *x, t_glist *glist) if ( x->x_graphic && glist_isvisible( glist ) ) { - SYS_VGUI3( ".x%x.c delete %xCAPTURE\n", canvas, x ); - SYS_VGUI3( ".x%x.c delete line %xREADSTART\n", canvas, x); - SYS_VGUI3( ".x%x.c delete line %xREADEND\n", canvas, x); - SYS_VGUI3( ".x%x.c delete line %xMODSTART\n", canvas, x); - SYS_VGUI3( ".x%x.c delete line %xMODEND\n", canvas, x); - SYS_VGUI3(".x%x.c delete %xSONOGRAM\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xPHASOGRAM\n", canvas, x ); - SYS_VGUI3(".x%x.c delete %xISONIMAGE\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete %xCAPTURE\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete line %xREADSTART\n", canvas, x); + SYS_VGUI3( ".x%lx.c delete line %xREADEND\n", canvas, x); + SYS_VGUI3( ".x%lx.c delete line %xMODSTART\n", canvas, x); + SYS_VGUI3( ".x%lx.c delete line %xMODEND\n", canvas, x); + SYS_VGUI3(".x%lx.c delete %xSONOGRAM\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xPHASOGRAM\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xISONIMAGE\n", canvas, x ); SYS_VGUI2("image delete SONIMAGE%x\n", x ); if ( x->x_phaso ) { - SYS_VGUI3(".x%x.c delete %xIFAZIMAGE\n", canvas, x ); + SYS_VGUI3(".x%lx.c delete %xIFAZIMAGE\n", canvas, x ); SYS_VGUI2("image delete FAZIMAGE%x\n", x ); } } @@ -780,23 +780,23 @@ static void sonogram_draw_move(t_sonogram *x, t_glist *glist) if ( x->x_graphic && glist_isvisible( x->x_glist ) ) { - SYS_VGUI7(".x%x.c coords %xSONOGRAM %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xSONOGRAM %d %d %d %d\n", canvas, x, x->x_xpos-1, x->x_ypos-1, x->x_xpos+x->x_size*x->x_zoom+1, x->x_ypos+x->x_blocksize/2*x->x_zoom+1); - SYS_VGUI5(".x%x.c coords ISONIMAGE%x %d %d\n", + SYS_VGUI5(".x%lx.c coords ISONIMAGE%x %d %d\n", canvas, x, x->x_xpos+((x->x_size*x->x_zoom)/2), (x->x_ypos+((x->x_blocksize/2*x->x_zoom)/2)) ); if ( x->x_phaso ) { - SYS_VGUI7(".x%x.c coords %xPHASOGRAM %d %d %d %d\n", + SYS_VGUI7(".x%lx.c coords %xPHASOGRAM %d %d %d %d\n", canvas, x, x->x_xpos-1, x->x_ypos+(x->x_blocksize/2*x->x_zoom)+1, x->x_xpos+x->x_size*x->x_zoom+1, x->x_ypos+x->x_blocksize*x->x_zoom+3); - SYS_VGUI5(".x%x.c coords IFAZIMAGE%x %d %d\n", + SYS_VGUI5(".x%lx.c coords IFAZIMAGE%x %d %d\n", canvas, x, x->x_xpos+((x->x_size*x->x_zoom)/2), x->x_ypos+3*((x->x_blocksize/2*x->x_zoom)/2)+2 ); @@ -814,18 +814,18 @@ static void sonogram_draw_select(t_sonogram* x,t_glist* glist) if(x->x_selected) { /* sets the item in blue */ - SYS_VGUI3(".x%x.c itemconfigure %xSONOGRAM -outline #0000FF\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xSONOGRAM -outline #0000FF\n", canvas, x); if ( x->x_phaso ) { - SYS_VGUI3(".x%x.c itemconfigure %xPHASOGRAM -outline #0000FF\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xPHASOGRAM -outline #0000FF\n", canvas, x); } } else { - SYS_VGUI3(".x%x.c itemconfigure %xSONOGRAM -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xSONOGRAM -outline #000000\n", canvas, x); if ( x->x_phaso ) { - SYS_VGUI3(".x%x.c itemconfigure %xPHASOGRAM -outline #000000\n", canvas, x); + SYS_VGUI3(".x%lx.c itemconfigure %xPHASOGRAM -outline #000000\n", canvas, x); } } } @@ -1003,8 +1003,8 @@ static void sonogram_motion(t_sonogram *x, t_floatarg dx, t_floatarg dy) (x->x_yendcapture+dy) <= x->x_ypos+x->x_blocksize*x->x_zoom ) { x->x_yendcapture += dy; } - SYS_VGUI3( ".x%x.c delete %xCAPTURE\n", canvas, x ); - SYS_VGUI7( ".x%x.c create rectangle %d %d %d %d -outline #0000FF -tags %xCAPTURE\n", + SYS_VGUI3( ".x%lx.c delete %xCAPTURE\n", canvas, x ); + SYS_VGUI7( ".x%lx.c create rectangle %d %d %d %d -outline #0000FF -tags %xCAPTURE\n", canvas, x->x_xstartcapture, x->x_ystartcapture, x->x_xendcapture, x->x_yendcapture, x ); } } @@ -1098,7 +1098,7 @@ static int sonogram_click(t_gobj *z, struct _glist *glist, (x->x_xendcapture-x->x_xpos)/x->x_zoom, 0, 1, 1); } // start a new capture - SYS_VGUI3( ".x%x.c delete %xCAPTURE\n", canvas, x ); + SYS_VGUI3( ".x%lx.c delete %xCAPTURE\n", canvas, x ); x->x_xstartcapture = xpix; x->x_ystartcapture = ypix; x->x_xendcapture = xpix; @@ -1388,9 +1388,9 @@ static void sonogram_readstart(t_sonogram *x, t_floatarg fstart) if ( ( x->x_readstart < x->x_readend ) && ( x->x_readspeed < 0 ) ) x->x_readspeed = -x->x_readspeed; if ( x->x_graphic && glist_isvisible( x->x_glist ) ) { - SYS_VGUI3( ".x%x.c delete line %xREADSTART\n", + SYS_VGUI3( ".x%lx.c delete line %xREADSTART\n", canvas, x); - SYS_VGUI7( ".x%x.c create line %d %d %d %d -fill #FF0000 -tags %xREADSTART -width 3\n", + SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #FF0000 -tags %xREADSTART -width 3\n", canvas, x->x_xpos+(x->x_readstart*(x->x_size)/100 ), x->x_ypos, x->x_xpos+(x->x_readstart*(x->x_size)/100 ), x->x_ypos+x->x_blocksize*x->x_zoom, x ); @@ -1413,9 +1413,9 @@ static void sonogram_modstart(t_sonogram *x, t_floatarg fstart) } if ( x->x_graphic && glist_isvisible( x->x_glist ) ) { - SYS_VGUI3( ".x%x.c delete line %xMODSTART\n", + SYS_VGUI3( ".x%lx.c delete line %xMODSTART\n", canvas, x); - SYS_VGUI7( ".x%x.c create line %d %d %d %d -fill #11E834 -tags %xMODSTART -width 3\n", + SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #11E834 -tags %xMODSTART -width 3\n", canvas, x->x_xpos+(x->x_modstart*(x->x_size)/100 ), x->x_ypos, x->x_xpos+(x->x_modstart*(x->x_size)/100 ), x->x_ypos+x->x_blocksize*x->x_zoom, x ); @@ -1454,9 +1454,9 @@ static void sonogram_readend(t_sonogram *x, t_floatarg fend) if ( ( x->x_readstart < x->x_readend ) && ( x->x_readspeed < 0 ) ) x->x_readspeed = -x->x_readspeed; if ( x->x_graphic && glist_isvisible( x->x_glist ) ) { - SYS_VGUI3( ".x%x.c delete line %xREADEND\n", + SYS_VGUI3( ".x%lx.c delete line %xREADEND\n", canvas, x); - SYS_VGUI7( ".x%x.c create line %d %d %d %d -fill #FF0000 -tags %xREADEND -width 3\n", + SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #FF0000 -tags %xREADEND -width 3\n", canvas, x->x_xpos+(x->x_readend*(x->x_size)/100 ), x->x_ypos, x->x_xpos+(x->x_readend*(x->x_size)/100 ), x->x_ypos+x->x_blocksize*x->x_zoom, x ); @@ -1479,9 +1479,9 @@ static void sonogram_modend(t_sonogram *x, t_floatarg fend) } if ( x->x_graphic && glist_isvisible( x->x_glist ) ) { - SYS_VGUI3( ".x%x.c delete line %xMODEND\n", + SYS_VGUI3( ".x%lx.c delete line %xMODEND\n", canvas, x); - SYS_VGUI7( ".x%x.c create line %d %d %d %d -fill #11E834 -tags %xMODEND -width 3\n", + SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #11E834 -tags %xMODEND -width 3\n", canvas, x->x_xpos+(x->x_modend*(x->x_size)/100 ), x->x_ypos, x->x_xpos+(x->x_modend*(x->x_size)/100 ), x->x_ypos+x->x_blocksize*x->x_zoom, x ); diff --git a/speexin~.c b/speexin~.c index eff2601..a2d9e82 100644 --- a/speexin~.c +++ b/speexin~.c @@ -273,8 +273,8 @@ static void speexin_decode_input(t_speexin *x) int minpackets = ( MIN_AUDIO_INPUT/x->x_framesize)-2; // audio loop has eaten some already - sys_vgui(".x%x.c delete rectangle %xSTATUS\n", x->x_canvas, x ); - sys_vgui(".x%x.c delete line %xTHRESHOLD\n", x->x_canvas, x ); + sys_vgui(".x%lx.c delete rectangle %xSTATUS\n", x->x_canvas, x ); + sys_vgui(".x%lx.c delete line %xTHRESHOLD\n", x->x_canvas, x ); if ( x->x_outunread > 0 ) { t_int width; @@ -288,11 +288,11 @@ static void speexin_decode_input(t_speexin *x) strcpy( color, "lightgreen" ); } width = rtext_width( glist_findrtext( (t_glist*)x->x_canvas, (t_text *)x ) ); - sys_vgui(".x%x.c create rectangle %d %d %d %d -fill %s -tags %xSTATUS\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill %s -tags %xSTATUS\n", x->x_canvas, x->x_obj.te_xpix, x->x_obj.te_ypix-BARHEIGHT-1, x->x_obj.te_xpix+(x->x_inpackets*x->x_packetsize*width)/INPUT_BUFFER_SIZE, x->x_obj.te_ypix - 1, color, x ); - sys_vgui(".x%x.c create line %d %d %d %d -fill red -tags %xTHRESHOLD\n", + sys_vgui(".x%lx.c create line %d %d %d %d -fill red -tags %xTHRESHOLD\n", x->x_canvas, x->x_obj.te_xpix+(minpackets*x->x_packetsize*width)/INPUT_BUFFER_SIZE, x->x_obj.te_ypix-BARHEIGHT-1, x->x_obj.te_xpix+(minpackets*x->x_packetsize*width)/INPUT_BUFFER_SIZE, @@ -333,9 +333,9 @@ static void speexin_recv(t_speexin *x) post( "speexin~ : closing connection ( s=%d )", x->x_socket ); speexin_closesocket(x->x_socket); x->x_socket = -1; - sys_vgui(".x%x.c delete rectangle %xPBAR\n", x->x_canvas, x ); - sys_vgui(".x%x.c delete line %xTHRESHOLD\n", x->x_canvas, x ); - sys_vgui(".x%x.c delete rectangle %xSTATUS\n", x->x_canvas, x ); + sys_vgui(".x%lx.c delete rectangle %xPBAR\n", x->x_canvas, x ); + sys_vgui(".x%lx.c delete line %xTHRESHOLD\n", x->x_canvas, x ); + sys_vgui(".x%lx.c delete rectangle %xSTATUS\n", x->x_canvas, x ); outlet_symbol( x->x_connectionip, gensym("") ); } else @@ -378,7 +378,7 @@ static void speexin_acceptconnection(t_speexin *x) t_int width; width = rtext_width( glist_findrtext( (t_glist*)x->x_canvas, (t_text *)x ) ); - sys_vgui(".x%x.c create rectangle %d %d %d %d -fill lightblue -tags %xPBAR\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill lightblue -tags %xPBAR\n", x->x_canvas, x->x_obj.te_xpix, x->x_obj.te_ypix-BARHEIGHT-1, x->x_obj.te_xpix + width, x->x_obj.te_ypix - 1, x ); } -- cgit v1.2.1