summaryrefslogtreecommitdiff
path: root/src/widget
diff options
context:
space:
mode:
authorMichal Zima <xhire@tuxportal.cz>2009-07-16 13:07:51 +0200
committerMichal Zima <xhire@tuxportal.cz>2009-07-16 13:07:51 +0200
commit37880070ae525a0b5b23c711bf3f612ea15cd537 (patch)
tree576866c973a96219526336176844207724cec677 /src/widget
parentd0c088655af27e2e66b164c061e48a5f5bd28f05 (diff)
Fixed code style
Diffstat (limited to 'src/widget')
-rw-r--r--src/widget/widget_button.c12
-rw-r--r--src/widget/widget_catchkey.c8
-rw-r--r--src/widget/widget_check.c3
-rw-r--r--src/widget/widget_choicegroup.c8
-rw-r--r--src/widget/widget_select.c3
-rw-r--r--src/widget/widget_statusbar.c4
-rw-r--r--src/widget/widget_textfield.c5
7 files changed, 31 insertions, 12 deletions
diff --git a/src/widget/widget_button.c b/src/widget/widget_button.c
index 7e2d091..f30b03d 100644
--- a/src/widget/widget_button.c
+++ b/src/widget/widget_button.c
@@ -45,10 +45,13 @@ void button_draw(widget_t *widget)
g_button1 = image_add("button1.png", IMAGE_ALPHA, "button1", IMAGE_GROUP_BASE);
}
- if (mouse_buffer_is_on_area(widget->x, widget->y, WIDGET_BUTTON_WIDTH, WIDGET_BUTTON_HEIGHT, MOUSE_BUF_MOTION)) {
- image_draw(g_button1, widget->x, widget->y, 0, 0, g_button0->w, g_button0->h);
+ if (mouse_buffer_is_on_area(widget->x, widget->y, WIDGET_BUTTON_WIDTH,
+ WIDGET_BUTTON_HEIGHT, MOUSE_BUF_MOTION)) {
+ image_draw(g_button1, widget->x, widget->y, 0, 0,
+ g_button0->w, g_button0->h);
} else {
- image_draw(g_button0, widget->x, widget->y, 0, 0, g_button0->w, g_button0->h);
+ image_draw(g_button0, widget->x, widget->y, 0, 0,
+ g_button0->w, g_button0->h);
}
/*font_draw(p->text, p->x+WIDGET_BUTTON_WIDTH/2-p->w/2, p->y+p->h/2, COLOR_WHITE);*/
@@ -72,7 +75,8 @@ void button_event(widget_t *widget)
return;
}
- if (mouse_buffer_is_on_area(widget->x, widget->y, WIDGET_BUTTON_WIDTH, WIDGET_BUTTON_HEIGHT, MOUSE_BUF_CLICK)) {
+ if (mouse_buffer_is_on_area(widget->x, widget->y, WIDGET_BUTTON_WIDTH,
+ WIDGET_BUTTON_HEIGHT, MOUSE_BUF_CLICK)) {
my_time = WIDGET_BUTTON_TIME;
DEBUG_MSG(_("[Debug] Caught some button event\n"));
diff --git a/src/widget/widget_catchkey.c b/src/widget/widget_catchkey.c
index b6290a6..b785c92 100644
--- a/src/widget/widget_catchkey.c
+++ b/src/widget/widget_catchkey.c
@@ -18,7 +18,8 @@ widget_t *catch_key_new(int key, int x, int y, void *event)
new->fce_event = event;
new->active = FALSE;
- return widget_new(WIDGET_TYPE_CATCHKEY, x, y, WIDGET_CATCHKEY_WIDTH, WIDGET_CATCHKEY_HEIGHT, new);
+ return widget_new(WIDGET_TYPE_CATCHKEY, x, y, WIDGET_CATCHKEY_WIDTH,
+ WIDGET_CATCHKEY_HEIGHT, new);
}
int catch_key_get(widget_t *widget)
@@ -103,7 +104,10 @@ void catch_key_event(widget_t *widget)
p = (widget_catchkey_t *) widget->private_data;
if (mouse_buffer_is_on_area(0, 0, 0, 0, MOUSE_BUF_AREA_NONE|MOUSE_BUF_CLICK)) {
- if (mouse_buffer_is_on_area(widget->x, widget->y, WIDGET_CATCHKEY_WIDTH, WIDGET_CATCHKEY_HEIGHT, MOUSE_BUF_CLICK)) {
+ if (mouse_buffer_is_on_area(widget->x, widget->y,
+ WIDGET_CATCHKEY_WIDTH,
+ WIDGET_CATCHKEY_HEIGHT,
+ MOUSE_BUF_CLICK)) {
p->active = TRUE;
} else {
p->active = FALSE;
diff --git a/src/widget/widget_check.c b/src/widget/widget_check.c
index 4aa6a29..f39c6ad 100644
--- a/src/widget/widget_check.c
+++ b/src/widget/widget_check.c
@@ -62,7 +62,8 @@ void check_event(widget_t *widget)
return;
}
- if (mouse_buffer_is_on_area(widget->x, widget->y, WIDGET_CHECK_WIDTH, WIDGET_CHECK_HEIGHT, MOUSE_BUF_CLICK)) {
+ if (mouse_buffer_is_on_area(widget->x, widget->y, WIDGET_CHECK_WIDTH,
+ WIDGET_CHECK_HEIGHT, MOUSE_BUF_CLICK)) {
if (p->status == TRUE) {
p->status = FALSE;
p->time = WIDGET_CHECK_TIME_SWITCH_STATUS;
diff --git a/src/widget/widget_choicegroup.c b/src/widget/widget_choicegroup.c
index d325d1b..2c3338f 100644
--- a/src/widget/widget_choicegroup.c
+++ b/src/widget/widget_choicegroup.c
@@ -20,7 +20,8 @@ widget_t *choice_group_new(int x, int y, bool_t status, list_t *list, void (*fce
new->fce_event = fce_event;
new->list = list;
- widget = widget_new(WIDGET_TYPE_CHOICE, x, y, WIDGET_CHOICEGROUP_WIDTH, WIDGET_CHOICEGROUP_HEIGHT, new);
+ widget = widget_new(WIDGET_TYPE_CHOICE, x, y, WIDGET_CHOICEGROUP_WIDTH,
+ WIDGET_CHOICEGROUP_HEIGHT, new);
list_add(new->list, widget);
@@ -116,7 +117,10 @@ void choice_group_event(widget_t *widget)
return;
}
- if (mouse_buffer_is_on_area(widget->x, widget->y, WIDGET_CHOICEGROUP_WIDTH, WIDGET_CHOICEGROUP_HEIGHT, MOUSE_BUF_CLICK)) {
+ if (mouse_buffer_is_on_area(widget->x, widget->y,
+ WIDGET_CHOICEGROUP_WIDTH,
+ WIDGET_CHOICEGROUP_HEIGHT,
+ MOUSE_BUF_CLICK)) {
choice_group_set_active(widget);
}
}
diff --git a/src/widget/widget_select.c b/src/widget/widget_select.c
index a453ec4..13ce483 100644
--- a/src/widget/widget_select.c
+++ b/src/widget/widget_select.c
@@ -105,7 +105,8 @@ void select_draw(widget_t *widget)
}
}
*/
- if (mouse_buffer_is_on_area(widget->x, widget->y+i * 20, w, h, MOUSE_BUF_MOTION)) {
+ if (mouse_buffer_is_on_area(widget->x, widget->y + i * 20,
+ w, h, MOUSE_BUF_MOTION)) {
font_draw(line, widget->x, widget->y + i * 20, COLOR_YELLOW);
} else {
if (p->select == i) {
diff --git a/src/widget/widget_statusbar.c b/src/widget/widget_statusbar.c
index 0a9c9b3..c2b48a4 100644
--- a/src/widget/widget_statusbar.c
+++ b/src/widget/widget_statusbar.c
@@ -122,7 +122,9 @@ void statusbar_event(widget_t *widget)
item = (item_t *) p->listElement->list[i];
- if (mouse_buffer_is_on_area(item->widget->x, item->widget->y, item->widget->w, item->widget->h, MOUSE_BUF_MOTION)) {
+ if (mouse_buffer_is_on_area(item->widget->x, item->widget->y,
+ item->widget->w, item->widget->h,
+ MOUSE_BUF_MOTION)) {
p->selectElement = i;
}
}
diff --git a/src/widget/widget_textfield.c b/src/widget/widget_textfield.c
index 1711ad9..fdf4e1d 100644
--- a/src/widget/widget_textfield.c
+++ b/src/widget/widget_textfield.c
@@ -308,7 +308,10 @@ void text_field_event(widget_t *widget)
p = (widget_textfield_t *) widget->private_data;
if (mouse_buffer_is_on_area(0, 0, 0, 0, MOUSE_BUF_AREA_NONE|MOUSE_BUF_CLICK)) {
- if (mouse_buffer_is_on_area(widget->x, widget->y, WIDGET_TEXTFIELD_WIDTH, WIDGET_TEXTFIELD_HEIGHT, MOUSE_BUF_MOTION)) {
+ if (mouse_buffer_is_on_area(widget->x, widget->y,
+ WIDGET_TEXTFIELD_WIDTH,
+ WIDGET_TEXTFIELD_HEIGHT,
+ MOUSE_BUF_MOTION)) {
p->active = TRUE;
interface_enable_keyboard_buffer();
keyboard_buffer_clear();