diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-09-17 17:11:34 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-09-17 17:11:34 +0000 |
commit | 77ba1c5c22800eddd11166109147f8f4e873dae2 (patch) | |
tree | cddc3315f4931aa967647865339fe2113fd78ad4 /gui | |
parent | e0e4ed2888ebfbb0d32d2106d78ef61b006f4004 (diff) |
merged relevant changes from Pd-extended 0.42
svn path=/trunk/externals/ggee/; revision=14153
Diffstat (limited to 'gui')
-rw-r--r-- | gui/button.c | 17 | ||||
-rw-r--r-- | gui/fatom.h | 18 | ||||
-rw-r--r-- | gui/gcanvas.c | 10 | ||||
-rw-r--r-- | gui/image.c | 10 | ||||
-rw-r--r-- | gui/toddle.c | 10 | ||||
-rw-r--r-- | gui/w_envgen.h | 4 |
6 files changed, 25 insertions, 44 deletions
diff --git a/gui/button.c b/gui/button.c index 4b29dd7..2e051b0 100644 --- a/gui/button.c +++ b/gui/button.c @@ -10,10 +10,6 @@ #pragma warning( disable : 4305 ) #endif -#if PD_MINOR_VERSION < 37 -#define t_rtext t_text -#endif - #ifndef IOWIDTH #define IOWIDTH 4 #endif @@ -197,7 +193,7 @@ static void button_displace(t_gobj *z, t_glist *glist, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2); button_drawme(x, glist, 0); - canvas_fixlinesfor(glist_getcanvas(glist),(t_text*) x); + canvas_fixlinesfor(glist,(t_text*) x); } DEBUG(post("displace end");) } @@ -233,27 +229,20 @@ static void button_activate(t_gobj *z, t_glist *glist, int state) static void button_delete(t_gobj *z, t_glist *glist) { t_text *x = (t_text *)z; - canvas_deletelinesfor(glist_getcanvas(glist), x); + canvas_deletelinesfor(glist, x); } static void button_vis(t_gobj *z, t_glist *glist, int vis) { t_button* s = (t_button*)z; - t_rtext *y; DEBUG(post("vis: %d",vis);) if (vis) { -#ifdef PD_MINOR_VERSION - y = (t_rtext *) rtext_new(glist, (t_text *)z); -#else - y = (t_rtext *) rtext_new(glist, (t_text *)z,0,0); -#endif button_drawme(s, glist, 1); } else { - y = glist_findrtext(glist, (t_text *)z); button_erase(s,glist); - rtext_free(y); + sys_unqueuegui(z); } } diff --git a/gui/fatom.h b/gui/fatom.h index 61d86dd..9f2dbac 100644 --- a/gui/fatom.h +++ b/gui/fatom.h @@ -272,7 +272,7 @@ static void fatom_displace(t_gobj *z, t_glist *glist, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height); fatom_drawme(x, glist, 0); - canvas_fixlinesfor(glist_getcanvas(glist),(t_text*) x); + canvas_fixlinesfor(glist,(t_text*) x); } DEBUG(post("displace end");) } @@ -308,27 +308,19 @@ static void fatom_activate(t_gobj *z, t_glist *glist, int state) static void fatom_delete(t_gobj *z, t_glist *glist) { t_text *x = (t_text *)z; - canvas_deletelinesfor(glist_getcanvas(glist), x); + canvas_deletelinesfor(glist, x); } static void fatom_vis(t_gobj *z, t_glist *glist, int vis) { - t_fatom* s = (t_fatom*)z; - t_rtext *y; + t_fatom* x = (t_fatom*)z; DEBUG(post("vis: %d",vis);) if (vis) { -#ifdef PD_MINOR_VERSION - y = (t_rtext *) rtext_new(glist, (t_text *)z); -#else - y = (t_rtext *) rtext_new(glist, (t_text *)z,0,0); -#endif - fatom_drawme(s, glist, 1); + fatom_drawme(x, glist, 1); } else { - y = glist_findrtext(glist, (t_text *)z); - fatom_erase(s,glist); - rtext_free(y); + fatom_erase(x,glist); } } diff --git a/gui/gcanvas.c b/gui/gcanvas.c index 498d04a..f5661d1 100644 --- a/gui/gcanvas.c +++ b/gui/gcanvas.c @@ -220,7 +220,7 @@ static void gcanvas_displace(t_gobj *z, t_glist *glist, x->x_obj.te_xpix += dx;
x->x_obj.te_ypix += dy;
gcanvas_drawme(x, glist, 0);
- canvas_fixlinesfor(glist_getcanvas(glist),(t_text*) x);
+ canvas_fixlinesfor(glist,(t_text*) x);
}
static void gcanvas_select(t_gobj *z, t_glist *glist, int state)
@@ -240,17 +240,17 @@ static void gcanvas_activate(t_gobj *z, t_glist *glist, int state) static void gcanvas_delete(t_gobj *z, t_glist *glist)
{
t_text *x = (t_text *)z;
- canvas_deletelinesfor(glist_getcanvas(glist), x);
+ canvas_deletelinesfor(glist, x);
}
static void gcanvas_vis(t_gobj *z, t_glist *glist, int vis)
{
- t_gcanvas* s = (t_gcanvas*)z;
+ t_gcanvas* x = (t_gcanvas*)z;
if (vis)
- gcanvas_drawme(s, glist, 1);
+ gcanvas_drawme(x, glist, 1);
else
- gcanvas_erase(s,glist);
+ gcanvas_erase(x,glist);
}
/* can we use the normal text save function ?? */
diff --git a/gui/image.c b/gui/image.c index 4c02a09..471867b 100644 --- a/gui/image.c +++ b/gui/image.c @@ -105,7 +105,7 @@ static void image_displace(t_gobj *z, t_glist *glist, text_xpix(&x->x_obj, glist) + x->x_width, text_ypix(&x->x_obj, glist) + x->x_height); image_drawme(x, glist, 0); - canvas_fixlinesfor(glist_getcanvas(glist),(t_text*) x); + canvas_fixlinesfor(glist,(t_text*) x); } static void image_select(t_gobj *z, t_glist *glist, int state) @@ -139,17 +139,17 @@ static void image_activate(t_gobj *z, t_glist *glist, int state) static void image_delete(t_gobj *z, t_glist *glist) { t_text *x = (t_text *)z; - canvas_deletelinesfor(glist_getcanvas(glist), x); + canvas_deletelinesfor(glist, x); } static void image_vis(t_gobj *z, t_glist *glist, int vis) { - t_image* s = (t_image*)z; + t_image* x = (t_image*)z; if (vis) - image_drawme(s, glist, 1); + image_drawme(x, glist, 1); else - image_erase(s,glist); + image_erase(x,glist); } /* can we use the normal text save function ?? */ diff --git a/gui/toddle.c b/gui/toddle.c index 9abf281..d7b9f31 100644 --- a/gui/toddle.c +++ b/gui/toddle.c @@ -198,7 +198,7 @@ static void toddle_displace(t_gobj *z, t_glist *glist, x->x_obj.te_xpos += dx;
x->x_obj.te_ypos += dy;
toddle_drawme(x, glist, 0);
- canvas_fixlinesfor(glist_getcanvas(glist),(t_text*) x);
+ canvas_fixlinesfor(glist,(t_text*) x);
}
static void toddle_select(t_gobj *z, t_glist *glist, int state)
@@ -219,17 +219,17 @@ static void toddle_activate(t_gobj *z, t_glist *glist, int state) static void toddle_delete(t_gobj *z, t_glist *glist)
{
t_text *x = (t_text *)z;
- canvas_deletelinesfor(glist_getcanvas(glist), x);
+ canvas_deletelinesfor(glist, x);
}
static void toddle_vis(t_gobj *z, t_glist *glist, int vis)
{
- t_toddle* s = (t_toddle*)z;
+ t_toddle* x = (t_toddle*)z;
if (vis)
- toddle_drawme(s, glist, 1);
+ toddle_drawme(x, glist, 1);
else
- toddle_erase(s,glist);
+ toddle_erase(x,glist);
}
/* can we use the normal text save function ?? */
diff --git a/gui/w_envgen.h b/gui/w_envgen.h index 9cd24f7..f664d66 100644 --- a/gui/w_envgen.h +++ b/gui/w_envgen.h @@ -324,7 +324,7 @@ static void envgen_displace(t_gobj *z, t_glist *glist, x->x_obj.te_ypix += dy; envgen_drawme(x, glist, 0); - canvas_fixlinesfor(glist_getcanvas(glist),(t_text*) x); + canvas_fixlinesfor(glist,(t_text*) x); } static void envgen_select(t_gobj *z, t_glist *glist, int state) @@ -345,7 +345,7 @@ static void envgen_activate(t_gobj *z, t_glist *glist, int state) static void envgen_delete(t_gobj *z, t_glist *glist) { t_text *x = (t_text *)z; - canvas_deletelinesfor(glist_getcanvas(glist), x); + canvas_deletelinesfor(glist, x); } |