summaryrefslogtreecommitdiff
path: root/src/widget/widget_label.c
diff options
context:
space:
mode:
authorDusan Durech <dusan@debian.debian>2009-04-12 14:29:51 +0200
committerDusan Durech <dusan@debian.debian>2009-04-12 14:29:51 +0200
commit876fc624df9728ee0feee26e1b31b53ed9ef3326 (patch)
treee20814ab6d07fb892284dcee11bc492532bdabaa /src/widget/widget_label.c
parentdff1cbc31ca8d585c01f5bebd08e50cf07fd2b0c (diff)
convert all name function from oldName to new_name
Diffstat (limited to 'src/widget/widget_label.c')
-rw-r--r--src/widget/widget_label.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/widget/widget_label.c b/src/widget/widget_label.c
index e3c907c..8ef7fad 100644
--- a/src/widget/widget_label.c
+++ b/src/widget/widget_label.c
@@ -8,19 +8,19 @@
#include "widget_label.h"
#include "widget.h"
-widget_t *newWidgetLabel(char *text, int x, int y, int bind)
+widget_t *label_new(char *text, int x, int y, int bind)
{
widget_label_t *new;
new = malloc(sizeof(widget_label_t));
new->text = strdup(text);
new->bind = bind;
- getTextSize(text, &(new->w), &(new->h));
+ font_text_size(text, &(new->w), &(new->h));
- return newWidget(WIDGET_TYPE_LABEL, x, y, new->w, new->h, new);
+ return widget_new(WIDGET_TYPE_LABEL, x, y, new->w, new->h, new);
}
-void drawWidgetLabel(widget_t * widget)
+void label_draw(widget_t * widget)
{
widget_label_t *p;
@@ -31,24 +31,24 @@ void drawWidgetLabel(widget_t * widget)
switch (p->bind) {
case WIDGET_LABEL_RIGHT:
- drawFont(p->text, widget->x + p->w, widget->y + p->h / 2, COLOR_WHITE);
+ font_draw(p->text, widget->x + p->w, widget->y + p->h / 2, COLOR_WHITE);
break;
case WIDGET_LABEL_LEFT:
- drawFont(p->text, widget->x, widget->y + widget->h / 2, COLOR_WHITE);
+ font_draw(p->text, widget->x, widget->y + widget->h / 2, COLOR_WHITE);
break;
case WIDGET_LABEL_CENTER:
- drawFont(p->text, widget->x - p->w / 2, widget->y + p->h / 2, COLOR_WHITE);
+ font_draw(p->text, widget->x - p->w / 2, widget->y + p->h / 2, COLOR_WHITE);
break;
}
}
-void eventWidgetLabel(widget_t * widget)
+void label_event(widget_t * widget)
{
assert(widget != NULL);
assert(widget->type == WIDGET_TYPE_LABEL);
}
-void destroyWidgetLabel(widget_t * widget)
+void label_destroy(widget_t * widget)
{
widget_label_t *p;
@@ -60,5 +60,5 @@ void destroyWidgetLabel(widget_t * widget)
free(p->text);
free(p);
- destroyWidget(widget);
+ widget_destroy(widget);
}