summaryrefslogtreecommitdiff
path: root/src/widget/widget.c
diff options
context:
space:
mode:
authorxHire <xhire@tuxportal.cz>2009-05-22 19:02:10 +0200
committerxHire <xhire@tuxportal.cz>2009-05-26 01:11:13 +0200
commit1f1ffba837fa69e3623007db8044c8a0f73faece (patch)
treef5574bc8f6880aafe88487a1f9b43a018efcc7e1 /src/widget/widget.c
parent78aa43a47bdcb3d88d267d8b65377b12d75a017b (diff)
Rewritten messages/comments in code of widget
Rectified the coding style in code of widget
Diffstat (limited to 'src/widget/widget.c')
-rw-r--r--src/widget/widget.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/widget/widget.c b/src/widget/widget.c
index 9cf2e7e..4e4143e 100644
--- a/src/widget/widget.c
+++ b/src/widget/widget.c
@@ -1,4 +1,3 @@
-
#include <stdlib.h>
#include <assert.h>
@@ -22,37 +21,41 @@ widget_t *widget_new(int type, int x, int y, int w, int h, void *private_data)
return new;
}
-void widget_set_location(widget_t * p, int x, int y)
+void widget_set_location(widget_t *p, int x, int y)
{
p->x = x;
p->y = y;
}
-void widget_get_location(widget_t * p, int *x, int *y)
+void widget_get_location(widget_t *p, int *x, int *y)
{
- if (x != NULL)
+ if (x != NULL) {
*x = p->x;
+ }
- if (y != NULL)
+ if (y != NULL) {
*y = p->y;
+ }
}
-void widget_get_size(widget_t * p, int w, int h)
+void widget_get_size(widget_t *p, int w, int h)
{
p->w = w;
p->h = h;
}
-void widget_set_size(widget_t * p, int *w, int *h)
+void widget_set_size(widget_t *p, int *w, int *h)
{
- if (w != NULL)
+ if (w != NULL) {
*w = p->w;
+ }
- if (h != NULL)
+ if (h != NULL) {
*h = p->h;
+ }
}
-void widget_destroy(widget_t * p)
+void widget_destroy(widget_t *p)
{
free(p);
}