summaryrefslogtreecommitdiff
path: root/src/widget/widget.c
diff options
context:
space:
mode:
authorxHire <xhire@tuxportal.cz>2008-10-25 14:11:06 +0200
committerxHire <xhire@tuxportal.cz>2008-10-25 14:11:06 +0200
commitc8a9209d77a896bf49227e5aeccd54e91ccf29cc (patch)
tree6b7367406ebbc6ce3ea5e0c8668c75f6fb3f6ae9 /src/widget/widget.c
parentcb9deba915dd7b114eeb76601eb1c8b07c1ba90f (diff)
Changed style of the code to the K&R standard
Diffstat (limited to 'src/widget/widget.c')
-rw-r--r--src/widget/widget.c62
1 files changed, 28 insertions, 34 deletions
diff --git a/src/widget/widget.c b/src/widget/widget.c
index 4eaca17..0dcfb41 100644
--- a/src/widget/widget.c
+++ b/src/widget/widget.c
@@ -7,56 +7,50 @@
#include "widget.h"
#include "widget_label.h"
-widget_t *
-newWidget(int type, int x, int y, int w, int h, void *private_data)
+widget_t *newWidget(int type, int x, int y, int w, int h, void *private_data)
{
- widget_t *new;
+ widget_t *new;
- new = malloc(sizeof(widget_t));
- new->type = type;
- new->x = x;
- new->y = y;
- new->w = w;
- new->h = h;
- new->private_data = private_data;
+ new = malloc(sizeof(widget_t));
+ new->type = type;
+ new->x = x;
+ new->y = y;
+ new->w = w;
+ new->h = h;
+ new->private_data = private_data;
- return new;
+ return new;
}
-void
-widgetSetLocation(widget_t * p, int x, int y)
+void widgetSetLocation(widget_t * p, int x, int y)
{
- p->x = x;
- p->y = y;
+ p->x = x;
+ p->y = y;
}
-void
-widgetGetLocation(widget_t * p, int *x, int *y)
+void widgetGetLocation(widget_t * p, int *x, int *y)
{
- if (x != NULL)
- *x = p->x;
- if (y != NULL)
- *y = p->y;
+ if (x != NULL)
+ *x = p->x;
+ if (y != NULL)
+ *y = p->y;
}
-void
-widgetSetSize(widget_t * p, int w, int h)
+void widgetSetSize(widget_t * p, int w, int h)
{
- p->w = w;
- p->h = h;
+ p->w = w;
+ p->h = h;
}
-void
-widgetGetSize(widget_t * p, int *w, int *h)
+void widgetGetSize(widget_t * p, int *w, int *h)
{
- if (w != NULL)
- *w = p->w;
- if (h != NULL)
- *h = p->h;
+ if (w != NULL)
+ *w = p->w;
+ if (h != NULL)
+ *h = p->h;
}
-void
-destroyWidget(widget_t * p)
+void destroyWidget(widget_t * p)
{
- free(p);
+ free(p);
}