summaryrefslogtreecommitdiff
path: root/apps/gui/wps_debug.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-03-21 19:38:00 +0000
committerDave Chapman <dave@dchapman.com>2008-03-21 19:38:00 +0000
commitd02c79c03fed154e8cdf4cbef8670221dfe922aa (patch)
treeae519730d242d0b9daadcf9daa10154beab682d5 /apps/gui/wps_debug.c
parent1544b36966c692e20d711b920eade06487996eb6 (diff)
downloadrockbox-d02c79c03fed154e8cdf4cbef8670221dfe922aa.tar.gz
rockbox-d02c79c03fed154e8cdf4cbef8670221dfe922aa.zip
Commit viewports-in-WPS patch (FS#8385). This adds the %V tag - see the CustomWPS page for details (shortly...). There is still some work to do - decide how to handle font references, decide how to handle conditionals. Plus checkwps is broken - I'll fix that in a separate commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16733 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/wps_debug.c')
-rw-r--r--apps/gui/wps_debug.c55
1 files changed, 33 insertions, 22 deletions
diff --git a/apps/gui/wps_debug.c b/apps/gui/wps_debug.c
index 0f69c76938..0c13fd2c22 100644
--- a/apps/gui/wps_debug.c
+++ b/apps/gui/wps_debug.c
@@ -493,40 +493,51 @@ static void dump_wps_tokens(struct wps_data *data)
493 493
494static void print_line_info(struct wps_data *data) 494static void print_line_info(struct wps_data *data)
495{ 495{
496 int i, j; 496 int i, j, v;
497 struct wps_line *line; 497 struct wps_line *line;
498 struct wps_subline *subline; 498 struct wps_subline *subline;
499 499
500 if (wps_verbose_level > 0) 500 if (wps_verbose_level > 0)
501 { 501 {
502 DEBUGF("Number of lines : %d\n", data->num_lines); 502 DEBUGF("Number of viewports : %d\n", data->num_viewports);
503 DEBUGF("Number of sublines: %d\n", data->num_sublines); 503 for (v = 0; v < data->num_viewports; v++)
504 DEBUGF("Number of tokens : %d\n", data->num_tokens); 504 {
505 DEBUGF("vp %d: Number of lines: %d\n", v, data->viewports[v].num_lines);
506 }
507 DEBUGF("Number of sublines : %d\n", data->num_sublines);
508 DEBUGF("Number of tokens : %d\n", data->num_tokens);
505 DEBUGF("\n"); 509 DEBUGF("\n");
506 } 510 }
507 511
508 if (wps_verbose_level > 1) 512 if (wps_verbose_level > 1)
509 { 513 {
510 for (i = 0, line = data->lines; i < data->num_lines; i++,line++) 514 for (v = 0; v < data->num_viewports; v++)
511 { 515 {
512 DEBUGF("Line %2d (num_sublines=%d, first_subline=%d)\n", 516 DEBUGF("Viewport %d - +%d+%d (%dx%d)\n",v,data->viewports[v].vp.x,
513 i, line->num_sublines, line->first_subline_idx); 517 data->viewports[v].vp.y,
514 518 data->viewports[v].vp.width,
515 for (j = 0, subline = data->sublines + line->first_subline_idx; 519 data->viewports[v].vp.height);
516 j < line->num_sublines; j++, subline++) 520 for (i = 0, line = data->viewports[v].lines; i < data->viewports[v].num_lines; i++,line++)
517 { 521 {
518 DEBUGF(" Subline %d: first_token=%3d, last_token=%3d", 522 DEBUGF("Line %2d (num_sublines=%d, first_subline=%d)\n",
519 j, subline->first_token_idx, 523 i, line->num_sublines, line->first_subline_idx);
520 wps_last_token_index(data, i, j)); 524
521 525 for (j = 0, subline = data->sublines + line->first_subline_idx;
522 if (subline->line_type & WPS_REFRESH_SCROLL) 526 j < line->num_sublines; j++, subline++)
523 DEBUGF(", scrolled"); 527 {
524 else if (subline->line_type & WPS_REFRESH_PLAYER_PROGRESS) 528 DEBUGF(" Subline %d: first_token=%3d, last_token=%3d",
525 DEBUGF(", progressbar"); 529 j, subline->first_token_idx,
526 else if (subline->line_type & WPS_REFRESH_PEAK_METER) 530 wps_last_token_index(data, v, i, j));
527 DEBUGF(", peakmeter"); 531
528 532 if (subline->line_type & WPS_REFRESH_SCROLL)
529 DEBUGF("\n"); 533 DEBUGF(", scrolled");
534 else if (subline->line_type & WPS_REFRESH_PLAYER_PROGRESS)
535 DEBUGF(", progressbar");
536 else if (subline->line_type & WPS_REFRESH_PEAK_METER)
537 DEBUGF(", peakmeter");
538
539 DEBUGF("\n");
540 }
530 } 541 }
531 } 542 }
532 543