mirror of
https://github.com/0intro/wmii
synced 2024-12-26 05:16:59 +03:00
removed add/rm_widget, should be done in the specific widget
This commit is contained in:
parent
07494795c6
commit
f774e68470
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user