cosmetic and don't cast for nothing

This commit is contained in:
Julien Danjou 2007-12-15 16:25:54 +01:00
parent 79749fcc7f
commit 3b013f90b1
3 changed files with 15 additions and 20 deletions

View File

@ -38,7 +38,7 @@ focustitle_new(Statusbar *statusbar)
{
Widget *w;
w = p_new(Widget, 1);
w->draw = (void*) focustitle_draw;
w->draw = focustitle_draw;
w->statusbar = statusbar;
w->name = name;
w->alignment = AlignFlex;

View File

@ -22,15 +22,14 @@ isoccupied(TagClientLink *tc, int screen, Client *head, Tag *t)
return False;
}
static int
taglist_draw(DrawCtx *ctx,
awesome_config *awesomeconf,
VirtScreen vscreen,
int screen,
int offset,
int used __attribute__ ((unused)),
int align __attribute__ ((unused)))
awesome_config *awesomeconf,
VirtScreen vscreen,
int screen,
int offset,
int used __attribute__ ((unused)),
int align __attribute__ ((unused)))
{
Tag *tag;
Client *sel = awesomeconf->focus->client;
@ -65,17 +64,15 @@ taglist_draw(DrawCtx *ctx,
return width;
}
Widget *
taglist_new(Statusbar *statusbar)
{
Widget *w;
w = p_new(Widget, 1);
w->draw = (void*) taglist_draw;
w->draw = taglist_draw;
w->statusbar = statusbar;
w->name = name;
return w;
}
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99

View File

@ -1,17 +1,16 @@
#include "util.h"
#include "widget.h"
static char name[] = "textbox";
static int
textbox_draw(DrawCtx *ctx,
awesome_config *awesomeconf __attribute__ ((unused)),
VirtScreen vscreen,
int screen __attribute__ ((unused)),
int offset,
int used __attribute__ ((unused)),
int align)
awesome_config *awesomeconf __attribute__ ((unused)),
VirtScreen vscreen,
int screen __attribute__ ((unused)),
int offset,
int used __attribute__ ((unused)),
int align)
{
int width = textwidth(ctx, vscreen.font, vscreen.statustext);
int location = calculate_offset(vscreen.statusbar.width, width, offset, align);
@ -20,13 +19,12 @@ textbox_draw(DrawCtx *ctx,
return width;
}
Widget *
textbox_new(Statusbar *statusbar)
{
Widget *w;
w = p_new(Widget, 1);
w->draw = (void*) textbox_draw;
w->draw = textbox_draw;
w->statusbar = statusbar;
w->name = name;
return w;