removed add/rm_widget, should be done in the specific widget

This commit is contained in:
Anselm R. Garbe 2006-06-13 18:05:15 +02:00
parent 07494795c6
commit f774e68470
2 changed files with 0 additions and 30 deletions

View File

@ -115,9 +115,6 @@ void blitz_drawborder(BlitzDraw *d);
/* layout.c */
BlitzLayout *blitz_create_layout(BlitzWin *win);
void blitz_add_widget(BlitzWidget **l, BlitzWidget *w);
void blitz_rm_widget(BlitzWidget **l, BlitzWidget *w);
int blitz_destroy_layout(BlitzLayout *l);
/* font.c */
unsigned int blitz_textwidth(BlitzFont *font, char *text);

View File

@ -45,30 +45,3 @@ blitz_create_layout(BlitzWin *win)
l->draw = xdraw;
return l;
}
void
blitz_add_widget(BlitzWidget **l, BlitzWidget *w)
{
BlitzWidget **wt;
for(wt = l; *wt; wt = &(*wt)->next);
w->next = nil;
*wt = w;
}
void
blitz_rm_widget(BlitzWidget **l, BlitzWidget *w)
{
BlitzWidget **wt;
for(wt = l; *wt && *wt != w; wt = &(*wt)->next);
cext_assert(*wt == w);
*wt = w->next;
}
int
blitz_destroy_layout(BlitzLayout *l)
{
if(l->cols || l->rows)
return -1;
free(l);
return 0;
}