diff options
Diffstat (limited to 'apps/gui/gwps.h')
-rw-r--r-- | apps/gui/gwps.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index 494d12a084..25cfc08505 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h | |||
@@ -70,7 +70,13 @@ struct gui_img{ | |||
70 | bool always_display; /* not using the preload/display mechanism */ | 70 | bool always_display; /* not using the preload/display mechanism */ |
71 | }; | 71 | }; |
72 | 72 | ||
73 | struct prog_img{ /*progressbar image*/ | 73 | struct progressbar { |
74 | /* regular pb */ | ||
75 | short x; | ||
76 | short y; | ||
77 | short width; | ||
78 | short height; | ||
79 | /*progressbar image*/ | ||
74 | struct bitmap bm; | 80 | struct bitmap bm; |
75 | bool have_bitmap_pb; | 81 | bool have_bitmap_pb; |
76 | }; | 82 | }; |
@@ -85,6 +91,7 @@ struct align_pos { | |||
85 | #ifdef HAVE_LCD_BITMAP | 91 | #ifdef HAVE_LCD_BITMAP |
86 | 92 | ||
87 | #define MAX_IMAGES (26*2) /* a-z and A-Z */ | 93 | #define MAX_IMAGES (26*2) /* a-z and A-Z */ |
94 | #define MAX_PROGRESSBARS 3 | ||
88 | 95 | ||
89 | /* The image buffer is big enough to store one full-screen native bitmap, | 96 | /* The image buffer is big enough to store one full-screen native bitmap, |
90 | plus two full-screen mono bitmaps. */ | 97 | plus two full-screen mono bitmaps. */ |
@@ -92,7 +99,7 @@ struct align_pos { | |||
92 | #define IMG_BUFSIZE ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \ | 99 | #define IMG_BUFSIZE ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \ |
93 | + (2*LCD_HEIGHT*LCD_WIDTH/8)) | 100 | + (2*LCD_HEIGHT*LCD_WIDTH/8)) |
94 | 101 | ||
95 | #define WPS_MAX_VIEWPORTS 16 | 102 | #define WPS_MAX_VIEWPORTS 24 |
96 | #define WPS_MAX_LINES ((LCD_HEIGHT/5+1) * 2) | 103 | #define WPS_MAX_LINES ((LCD_HEIGHT/5+1) * 2) |
97 | #define WPS_MAX_SUBLINES (WPS_MAX_LINES*3) | 104 | #define WPS_MAX_SUBLINES (WPS_MAX_LINES*3) |
98 | #define WPS_MAX_TOKENS 1024 | 105 | #define WPS_MAX_TOKENS 1024 |
@@ -271,8 +278,11 @@ enum wps_token_type { | |||
271 | 278 | ||
272 | #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) | 279 | #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) |
273 | /* Virtual LED */ | 280 | /* Virtual LED */ |
274 | WPS_TOKEN_VLED_HDD | 281 | WPS_TOKEN_VLED_HDD, |
275 | #endif | 282 | #endif |
283 | |||
284 | /* Viewport display */ | ||
285 | WPS_VIEWPORT_ENABLE | ||
276 | }; | 286 | }; |
277 | 287 | ||
278 | struct wps_token { | 288 | struct wps_token { |
@@ -323,12 +333,17 @@ struct wps_line { | |||
323 | long subline_expire_time; | 333 | long subline_expire_time; |
324 | }; | 334 | }; |
325 | 335 | ||
336 | #define VP_DRAW_HIDEABLE 0x1 | ||
337 | #define VP_DRAW_HIDDEN 0x2 | ||
338 | #define VP_DRAW_WASHIDDEN 0x4 | ||
326 | struct wps_viewport { | 339 | struct wps_viewport { |
327 | struct viewport vp; /* The LCD viewport struct */ | 340 | struct viewport vp; /* The LCD viewport struct */ |
328 | 341 | struct progressbar *pb; | |
329 | /* Indexes of the first and last lines belonging to this viewport in the | 342 | /* Indexes of the first and last lines belonging to this viewport in the |
330 | lines[] array */ | 343 | lines[] array */ |
331 | int first_line, last_line; | 344 | int first_line, last_line; |
345 | char hidden_flags; | ||
346 | char label; | ||
332 | }; | 347 | }; |
333 | 348 | ||
334 | /* wps_data | 349 | /* wps_data |
@@ -338,17 +353,15 @@ struct wps_data | |||
338 | { | 353 | { |
339 | #ifdef HAVE_LCD_BITMAP | 354 | #ifdef HAVE_LCD_BITMAP |
340 | struct gui_img img[MAX_IMAGES]; | 355 | struct gui_img img[MAX_IMAGES]; |
341 | struct prog_img progressbar; | ||
342 | unsigned char img_buf[IMG_BUFSIZE]; | 356 | unsigned char img_buf[IMG_BUFSIZE]; |
343 | unsigned char* img_buf_ptr; | 357 | unsigned char* img_buf_ptr; |
344 | int img_buf_free; | 358 | int img_buf_free; |
345 | bool wps_sb_tag; | 359 | bool wps_sb_tag; |
346 | bool show_sb_on_wps; | 360 | bool show_sb_on_wps; |
347 | 361 | ||
348 | short progress_top; | 362 | struct progressbar progressbar[MAX_PROGRESSBARS]; |
349 | short progress_height; | 363 | short progressbar_count; |
350 | short progress_start; | 364 | |
351 | short progress_end; | ||
352 | bool peak_meter_enabled; | 365 | bool peak_meter_enabled; |
353 | 366 | ||
354 | #ifdef HAVE_ALBUMART | 367 | #ifdef HAVE_ALBUMART |