diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2003-09-02 05:19:17 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2003-09-02 05:19:17 +0000 |
commit | a2b76c71f48393a78f43606f2bbc34727901f2dd (patch) | |
tree | 5eb3e2a78f1d72256a77b3fa2d4324feb1b33787 /grid | |
parent | b06d166030d3b24c432bcc0c1f4357dfc98db4e2 (diff) |
added #if's and minor tweaks to make things compile with pd 0.37
svn path=/trunk/externals/unauthorized/; revision=929
Diffstat (limited to 'grid')
-rw-r--r-- | grid/grid.c | 13 | ||||
-rw-r--r-- | grid/grid2.c | 6 |
2 files changed, 18 insertions, 1 deletions
diff --git a/grid/grid.c b/grid/grid.c index 3e040e8..5042f4e 100644 --- a/grid/grid.c +++ b/grid/grid.c @@ -94,7 +94,12 @@ static void grid_draw_new(t_grid *x, t_glist *glist) t_canvas *canvas=glist_getcanvas(glist); char *tagRoot; - rtext_new(glist, (t_text *)x, glist->gl_editor->e_rtext, 0); +/* rtext_new(); in g_canvas.h changed in 0.37 */ +#if PD_MINOR_VERSION >= 37 + rtext_new(glist, (t_text *)x); +#else + rtext_new(glist, (t_text *)x, glist->gl_editor->e_rtext, 0); +#endif tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x)); GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -fill #124392 -tags %xGRID\n", canvas, x->x_obj.te_xpix, x->x_obj.te_ypix, @@ -664,8 +669,14 @@ void grid_setup(void) grid_widgetbehavior.w_deletefn = grid_delete; grid_widgetbehavior.w_visfn = grid_vis; grid_widgetbehavior.w_clickfn = grid_click; + /* As of 0.37, the last two elements of t_widgetbehavoir */ + /* have been removed. <hans@eds.org> */ +#if PD_MAJOR_VERSION == 0 +#if PD_MINOR_VERSION < 37 || !defined(PD_MINOR_VERSION) grid_widgetbehavior.w_propertiesfn = grid_properties; grid_widgetbehavior.w_savefn = grid_save; +#endif +#endif class_setwidget(grid_class, &grid_widgetbehavior); class_sethelpsymbol(grid_class, gensym("help-grid.pd")); } diff --git a/grid/grid2.c b/grid/grid2.c index df53c5b..426e2d2 100644 --- a/grid/grid2.c +++ b/grid/grid2.c @@ -535,8 +535,14 @@ void grid_setup(void) grid_widgetbehavior.w_deletefn = grid_delete; grid_widgetbehavior.w_visfn = grid_vis; grid_widgetbehavior.w_clickfn = grid_click; + /* As of 0.37, the last two elements of t_widgetbehavoir */ + /* have been removed. <hans@eds.org> */ +#if PD_MAJOR_VERSION == 0 +#if PD_MINOR_VERSION < 37 || !defined(PD_MINOR_VERSION) grid_widgetbehavior.w_propertiesfn = grid_properties; grid_widgetbehavior.w_savefn = grid_save; +#endif +#endif class_setwidget(grid_class, &grid_widgetbehavior); class_sethelpsymbol(grid_class, gensym("help-grid.pd")); } |