diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/button.c | 10 | ||||
-rw-r--r-- | gui/image.c | 2 | ||||
-rwxr-xr-x | gui/w_envgen.h | 5 |
3 files changed, 11 insertions, 6 deletions
diff --git a/gui/button.c b/gui/button.c index 362312d..3360464 100644 --- a/gui/button.c +++ b/gui/button.c @@ -1,7 +1,11 @@ #include <m_pd.h> -#include "g_canvas.h" +#include <g_canvas.h> +#include <stdio.h> +#include <string.h> +t_rtext *rtext_new_without_senditup(t_glist *glist, t_text *who, t_rtext *next); + #ifdef NT #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) @@ -320,7 +324,7 @@ static void *button_new(t_symbol* text) /* TODO .. ask the button for its width */ x->x_width += strlen(x->x_text->s_name)*5.7; - sprintf(buf,"button%x",x); + sprintf(buf,"button%p",x); x->x_sym = gensym(buf); pd_bind(&x->x_obj.ob_pd, x->x_sym); @@ -334,7 +338,7 @@ static void *button_new(t_symbol* text) return (x); } -void button_setup() { +void button_setup(void) { post("button setup"); button_class = class_new(gensym("button"), (t_newmethod)button_new, 0, sizeof(t_button),0,A_DEFSYM,0); diff --git a/gui/image.c b/gui/image.c index ad4635e..7d57744 100644 --- a/gui/image.c +++ b/gui/image.c @@ -159,7 +159,7 @@ void image_color(t_image* x,t_symbol* col) */ } -static void image_setwidget() +static void image_setwidget(void) { image_widgetbehavior.w_getrectfn = image_getrect; image_widgetbehavior.w_displacefn = image_displace; diff --git a/gui/w_envgen.h b/gui/w_envgen.h index 88c0c6b..7b89939 100755 --- a/gui/w_envgen.h +++ b/gui/w_envgen.h @@ -212,7 +212,7 @@ int i; xscale = x->w.width/x->duration[x->last_state];
yscale = x->w.height;
- sprintf(buf,".x%x.c coords %xP",(unsigned int)glist_getcanvas(glist),x);
+ sprintf(buf,".x%x.c coords %pP",(unsigned int)glist_getcanvas(glist),x);
xpos = x->x_obj.te_xpix;
ypos = (int) (x->x_obj.te_ypix + x->w.height);
for (i=0;i<=x->last_state;i++) {
@@ -403,7 +403,8 @@ void envgen_click(t_envgen *x, x->w.grabbed = envgen_next_doodle(x,xpos,ypos);
#if (PD_VERSION_MINOR > 31)
- glist_grab(x->w.glist, &x->x_obj.te_g, envgen_motion, envgen_key, xpos, ypos);
+ glist_grab(x->w.glist, &x->x_obj.te_g, (t_glistmotionfn) envgen_motion,
+ (t_glistkeyfn) envgen_key, xpos, ypos);
#else
glist_grab(x->w.glist, &x->x_obj.te_g, xpos, ypos);
#endif
|