From 1f1ffba837fa69e3623007db8044c8a0f73faece Mon Sep 17 00:00:00 2001 From: xHire Date: Fri, 22 May 2009 19:02:10 +0200 Subject: Rewritten messages/comments in code of widget Rectified the coding style in code of widget --- src/widget/widget.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/widget/widget.c') 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 #include @@ -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); } -- cgit v1.2.3