Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10657
Modified Files: Tag: desiredata desire.c Log Message: added "bounds" method to canvas class
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.199 retrieving revision 1.1.2.217.2.200 diff -C2 -d -r1.1.2.217.2.199 -r1.1.2.217.2.200 *** desire.c 11 Aug 2007 21:13:39 -0000 1.1.2.217.2.199 --- desire.c 11 Aug 2007 21:16:45 -0000 1.1.2.217.2.200 *************** *** 350,357 **** extern t_pd *newest; t_class *canvas_class; ! int canvas_dspstate; /* whether DSP is on or off */ ! t_canvas *canvas_whichfind; /* last canvas we did a find in */ t_canvas *canvas_list; /* list of all root canvases */ ! static void canvas_setbounds(t_canvas *x, int x1, int y1, int x2, int y2); static t_symbol *canvas_newfilename = &s_; static t_symbol *canvas_newdirectory = &s_; --- 350,357 ---- extern t_pd *newest; t_class *canvas_class; ! int canvas_dspstate; /* whether DSP is on or off */ ! t_canvas *canvas_whichfind; /* last canvas we did a find in */ t_canvas *canvas_list; /* list of all root canvases */ ! static void canvas_setbounds(t_canvas *x, t_floatarg x1, t_floatarg y1, t_floatarg x2, t_floatarg y2); static t_symbol *canvas_newfilename = &s_; static t_symbol *canvas_newdirectory = &s_; *************** *** 633,642 ****
/* This is sent from the GUI to inform a toplevel that its window has been moved or resized. */ ! static void canvas_setbounds(t_canvas *x, int x1, int y1, int x2, int y2) { ! int heightwas = y2 - y1; if (x->screenx1 == x1 && x->screeny1 == y1 && x->screenx2 == x2 && x->screeny2 == y2) return; ! x->screenx1 = x1; x->screeny1 = y1; ! x->screenx2 = x2; x->screeny2 = y2; if (!x->isgraph && x->y2 < x->y1) { /* if it's flipped so that y grows upward, fix so that zero is bottom edge and redraw. --- 633,642 ----
/* This is sent from the GUI to inform a toplevel that its window has been moved or resized. */ ! static void canvas_setbounds(t_canvas *x, t_floatarg x1, t_floatarg y1, t_floatarg x2, t_floatarg y2) { ! int heightwas = int(y2-y1); if (x->screenx1 == x1 && x->screeny1 == y1 && x->screenx2 == x2 && x->screeny2 == y2) return; ! x->screenx1 = int(x1); x->screeny1 = int(y1); ! x->screenx2 = int(x2); x->screeny2 = int(y2); if (!x->isgraph && x->y2 < x->y1) { /* if it's flipped so that y grows upward, fix so that zero is bottom edge and redraw. *************** *** 6849,6852 **** --- 6849,6853 ---- class_addmethod2(c,canvas_restore,"restore","*"); class_addmethod2(c,canvas_coords,"coords","*"); + class_addmethod2(c,canvas_setbounds,"bounds","ffff"); class_addmethod2(c,canvas_obj,"obj","*"); class_addmethod2(c,canvas_msg,"msg","*");