summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_display.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-09-13 12:24:14 +0000
committerThomas Martitz <kugel@rockbox.org>2009-09-13 12:24:14 +0000
commit541dd6fda5ae93073a0b9c499f62af2cf46f3529 (patch)
tree2c14fe844b52f7a5c20f4fe1cb28ca8dd72cb6f4 /apps/gui/skin_engine/skin_display.c
parent894c8091088f7554bc89bf0e1dca38acbdfde4d5 (diff)
downloadrockbox-541dd6fda5ae93073a0b9c499f62af2cf46f3529.tar.gz
rockbox-541dd6fda5ae93073a0b9c499f62af2cf46f3529.zip
Remove some trailing whitespaces in in the skin engine files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22694 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r--apps/gui/skin_engine/skin_display.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 14e0bce0a9..e24ab66393 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -120,14 +120,14 @@ bool gui_wps_display(struct gui_wps *gwps)
120bool skin_update(struct gui_wps *gwps, unsigned int update_type) 120bool skin_update(struct gui_wps *gwps, unsigned int update_type)
121{ 121{
122 bool retval; 122 bool retval;
123 /* This maybe shouldnt be here, but while the skin is only used to 123 /* This maybe shouldnt be here, but while the skin is only used to
124 * display the music screen this is better than whereever we are being 124 * display the music screen this is better than whereever we are being
125 * called from. This is also safe for skined screen which dont use the id3 */ 125 * called from. This is also safe for skined screen which dont use the id3 */
126 struct mp3entry *id3 = gwps->state->id3; 126 struct mp3entry *id3 = gwps->state->id3;
127 bool cuesheet_update = (id3 != NULL ? cuesheet_subtrack_changed(id3) : false); 127 bool cuesheet_update = (id3 != NULL ? cuesheet_subtrack_changed(id3) : false);
128 gwps->state->do_full_update = cuesheet_update || gwps->state->do_full_update; 128 gwps->state->do_full_update = cuesheet_update || gwps->state->do_full_update;
129 129
130 retval = skin_redraw(gwps, gwps->state->do_full_update ? 130 retval = skin_redraw(gwps, gwps->state->do_full_update ?
131 WPS_REFRESH_ALL : update_type); 131 WPS_REFRESH_ALL : update_type);
132 return retval; 132 return retval;
133} 133}
@@ -161,7 +161,7 @@ void skin_statusbar_changed(struct gui_wps *skin)
161 } 161 }
162 } 162 }
163 163
164 164
165} 165}
166 166
167static void draw_progressbar(struct gui_wps *gwps, 167static void draw_progressbar(struct gui_wps *gwps,
@@ -226,7 +226,7 @@ static void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subima
226#if LCD_DEPTH > 1 226#if LCD_DEPTH > 1
227 if(img->bm.format == FORMAT_MONO) { 227 if(img->bm.format == FORMAT_MONO) {
228#endif 228#endif
229 display->mono_bitmap_part(img->bm.data, 229 display->mono_bitmap_part(img->bm.data,
230 0, img->subimage_height * subimage, 230 0, img->subimage_height * subimage,
231 img->bm.width, img->x, 231 img->bm.width, img->x,
232 img->y, img->bm.width, 232 img->y, img->bm.width,
@@ -235,8 +235,8 @@ static void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subima
235 } else { 235 } else {
236 display->transparent_bitmap_part((fb_data *)img->bm.data, 236 display->transparent_bitmap_part((fb_data *)img->bm.data,
237 0, img->subimage_height * subimage, 237 0, img->subimage_height * subimage,
238 STRIDE(display->screen_type, 238 STRIDE(display->screen_type,
239 img->bm.width, img->bm.height), 239 img->bm.width, img->bm.height),
240 img->x, img->y, img->bm.width, 240 img->x, img->y, img->bm.width,
241 img->subimage_height); 241 img->subimage_height);
242 } 242 }
@@ -268,14 +268,14 @@ static void wps_display_images(struct gui_wps *gwps, struct viewport* vp)
268 } 268 }
269 list = list->next; 269 list = list->next;
270 } 270 }
271#ifdef HAVE_ALBUMART 271#ifdef HAVE_ALBUMART
272 /* now draw the AA */ 272 /* now draw the AA */
273 if (data->albumart && data->albumart->vp == vp && data->albumart->draw) 273 if (data->albumart && data->albumart->vp == vp && data->albumart->draw)
274 { 274 {
275 draw_album_art(gwps, audio_current_aa_hid(), false); 275 draw_album_art(gwps, audio_current_aa_hid(), false);
276 } 276 }
277#endif 277#endif
278 278
279 display->set_drawmode(DRMODE_SOLID); 279 display->set_drawmode(DRMODE_SOLID);
280} 280}
281 281
@@ -352,14 +352,14 @@ static void draw_player_fullbar(struct gui_wps *gwps, char* buf, int buf_size)
352 { 352 {
353 softchar = false; 353 softchar = false;
354 memset(progress_pattern, 0, sizeof(progress_pattern)); 354 memset(progress_pattern, 0, sizeof(progress_pattern));
355 355
356 if ((digit = timestr[time_idx])) 356 if ((digit = timestr[time_idx]))
357 { 357 {
358 softchar = true; 358 softchar = true;
359 digit -= '0'; 359 digit -= '0';
360 360
361 if (timestr[time_idx + 1] == ':') /* ones, left aligned */ 361 if (timestr[time_idx + 1] == ':') /* ones, left aligned */
362 { 362 {
363 memcpy(progress_pattern, numbers[digit], 4); 363 memcpy(progress_pattern, numbers[digit], 4);
364 time_idx += 2; 364 time_idx += 2;
365 } 365 }
@@ -498,8 +498,8 @@ struct gui_img* find_image(char label, struct wps_data *data)
498 list = list->next; 498 list = list->next;
499 } 499 }
500 return NULL; 500 return NULL;
501} 501}
502#endif 502#endif
503 503
504struct skin_viewport* find_viewport(char label, struct wps_data *data) 504struct skin_viewport* find_viewport(char label, struct wps_data *data)
505{ 505{
@@ -512,9 +512,9 @@ struct skin_viewport* find_viewport(char label, struct wps_data *data)
512 list = list->next; 512 list = list->next;
513 } 513 }
514 return NULL; 514 return NULL;
515} 515}
516 516
517 517
518/* Read a (sub)line to the given alignment format buffer. 518/* Read a (sub)line to the given alignment format buffer.
519 linebuf is the buffer where the data is actually stored. 519 linebuf is the buffer where the data is actually stored.
520 align is the alignment format that'll be used to display the text. 520 align is the alignment format that'll be used to display the text.
@@ -617,7 +617,7 @@ static bool get_line(struct gui_wps *gwps,
617 struct skin_token_list *list = data->viewports; 617 struct skin_token_list *list = data->viewports;
618 while (list) 618 while (list)
619 { 619 {
620 struct skin_viewport *vp = 620 struct skin_viewport *vp =
621 (struct skin_viewport *)list->token->value.data; 621 (struct skin_viewport *)list->token->value.data;
622 if (vp->label == label) 622 if (vp->label == label)
623 { 623 {
@@ -859,7 +859,7 @@ static void write_line(struct screen *display,
859 ypos = (line * string_height); 859 ypos = (line * string_height);
860 860
861 861
862 if (scroll && ((left_width > scroll_width) || 862 if (scroll && ((left_width > scroll_width) ||
863 (center_width > scroll_width) || 863 (center_width > scroll_width) ||
864 (right_width > scroll_width))) 864 (right_width > scroll_width)))
865 { 865 {
@@ -911,7 +911,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
911 911
912 if (!id3) 912 if (!id3)
913 return false; 913 return false;
914 914
915 unsigned flags; 915 unsigned flags;
916 char linebuf[MAX_PATH]; 916 char linebuf[MAX_PATH];
917 917
@@ -919,8 +919,8 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
919 align.left = NULL; 919 align.left = NULL;
920 align.center = NULL; 920 align.center = NULL;
921 align.right = NULL; 921 align.right = NULL;
922 922
923 923
924 struct skin_token_list *viewport_list; 924 struct skin_token_list *viewport_list;
925 925
926 bool update_line, new_subline_refresh; 926 bool update_line, new_subline_refresh;
@@ -942,14 +942,14 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
942 if (refresh_mode == WPS_REFRESH_ALL) 942 if (refresh_mode == WPS_REFRESH_ALL)
943 { 943 {
944 struct skin_line *line; 944 struct skin_line *line;
945 945
946 display->set_viewport(&find_viewport(VP_DEFAULT_LABEL, data)->vp); 946 display->set_viewport(&find_viewport(VP_DEFAULT_LABEL, data)->vp);
947 display->clear_viewport(); 947 display->clear_viewport();
948 948
949 for (viewport_list = data->viewports; 949 for (viewport_list = data->viewports;
950 viewport_list; viewport_list = viewport_list->next) 950 viewport_list; viewport_list = viewport_list->next)
951 { 951 {
952 struct skin_viewport *skin_viewport = 952 struct skin_viewport *skin_viewport =
953 (struct skin_viewport *)viewport_list->token->value.data; 953 (struct skin_viewport *)viewport_list->token->value.data;
954 for(line = skin_viewport->lines; line; line = line->next) 954 for(line = skin_viewport->lines; line; line = line->next)
955 { 955 {
@@ -968,10 +968,10 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
968#endif 968#endif
969 969
970 /* disable any viewports which are conditionally displayed */ 970 /* disable any viewports which are conditionally displayed */
971 for (viewport_list = data->viewports; 971 for (viewport_list = data->viewports;
972 viewport_list; viewport_list = viewport_list->next) 972 viewport_list; viewport_list = viewport_list->next)
973 { 973 {
974 struct skin_viewport *skin_viewport = 974 struct skin_viewport *skin_viewport =
975 (struct skin_viewport *)viewport_list->token->value.data; 975 (struct skin_viewport *)viewport_list->token->value.data;
976 if (skin_viewport->hidden_flags&VP_DRAW_HIDEABLE) 976 if (skin_viewport->hidden_flags&VP_DRAW_HIDEABLE)
977 { 977 {
@@ -982,10 +982,10 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
982 } 982 }
983 } 983 }
984 int viewport_count = 0; 984 int viewport_count = 0;
985 for (viewport_list = data->viewports; 985 for (viewport_list = data->viewports;
986 viewport_list; viewport_list = viewport_list->next, viewport_count++) 986 viewport_list; viewport_list = viewport_list->next, viewport_count++)
987 { 987 {
988 struct skin_viewport *skin_viewport = 988 struct skin_viewport *skin_viewport =
989 (struct skin_viewport *)viewport_list->token->value.data; 989 (struct skin_viewport *)viewport_list->token->value.data;
990 unsigned vp_refresh_mode = refresh_mode; 990 unsigned vp_refresh_mode = refresh_mode;
991 display->set_viewport(&skin_viewport->vp); 991 display->set_viewport(&skin_viewport->vp);
@@ -995,7 +995,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
995 struct skin_token_list *imglist = data->images; 995 struct skin_token_list *imglist = data->images;
996 while (imglist) 996 while (imglist)
997 { 997 {
998 struct gui_img *img = (struct gui_img *)imglist->token->value.data; 998 struct gui_img *img = (struct gui_img *)imglist->token->value.data;
999 img->display = -1; 999 img->display = -1;
1000 imglist = imglist->next; 1000 imglist = imglist->next;
1001 } 1001 }
@@ -1019,11 +1019,11 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
1019 { 1019 {
1020 display->clear_viewport(); 1020 display->clear_viewport();
1021 } 1021 }
1022 1022
1023 /* loop over the lines for this viewport */ 1023 /* loop over the lines for this viewport */
1024 struct skin_line *line; 1024 struct skin_line *line;
1025 int line_count = 0; 1025 int line_count = 0;
1026 1026
1027 for (line = skin_viewport->lines; line; line = line->next, line_count++) 1027 for (line = skin_viewport->lines; line; line = line->next, line_count++)
1028 { 1028 {
1029 struct skin_subline *subline; 1029 struct skin_subline *subline;
@@ -1082,7 +1082,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
1082 } 1082 }
1083#endif 1083#endif
1084 1084
1085 if (update_line && 1085 if (update_line &&
1086 /* conditionals clear the line which means if the %Vd is put into the default 1086 /* conditionals clear the line which means if the %Vd is put into the default
1087 viewport there will be a blank line. 1087 viewport there will be a blank line.
1088 To get around this we dont allow any actual drawing to happen in the 1088 To get around this we dont allow any actual drawing to happen in the