source: svn/trunk/newcon3bcm2_21bu/nexus/app/nanotv/bscreen.h @ 2

Last change on this file since 2 was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 46.8 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2006, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile:  $
11 * $brcm_Revision:  $
12 * $brcm_Date: $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log:  $
19 *
20 ***************************************************************************/
21#ifndef BSCREEN_H__
22#define BSCREEN_H__
23
24#include "bsettop.h"
25#include "str_table.h"
26#include "bir_codes.h"
27
28#ifdef CUSTOMER_THOMSON
29#define NUMBER_BUTTONS
30#endif
31
32/* Screen defines */
33#define APP_DEFAULT_YIELD                        (50)                 /* Milliseconds */
34#define SCREEN_DEFAULT_TIMEOUT                   (10 * 60 * 1000)     /* Milliseconds */
35//#define SCREEN_DEFAULT_TIMEOUT                   (2 * 60 * 1000)     /* Milliseconds */
36#define HIDE_BANNER_TIMEOUT                      (10 * 1000)              /* Milliseconds */
37#define BANNER_SMALL_TIMEOUT                     (5000)               /* Milliseconds */
38#define BANNER_BIG_TIMEOUT                       (10 * 1000)          /* Milliseconds */
39#define BANNER_10_KEY_TIMEOUT                    (2 * 1000)           /* Milliseconds */
40#define BANNER_VOLUME_TIMEOUT                    (1 * 1000)           /* Milliseconds */
41#define BANNER_SAP_TIMEOUT                       (2 * 1000)           /* Milliseconds */
42
43#define BANNER_CC_TIMEOUT                        (2 * 1000)           /* Milliseconds */
44
45#define SCREENSAVER_IMAGE_TIMEOUT                (3 * 1000)           /* Milliseconds */
46#define VOLUME_INCREMENT                         (5)
47#define AUTO_POWER_OFF_TIMEOUT                   (4 * 60 * 60 * 1000) /* Milliseconds */
48//#define AUTO_POWER_OFF_TIMEOUT                   (SCREEN_DEFAULT_TIMEOUT + 120000) /* Milliseconds */
49
50#define AUTO_POWER_OFF_RESTART_TIMEOUT           (1000 * 10) /* Milliseconds */
51
52/* Default to one repeat event every 3/4 second then accelerate */
53#define DEFAULT_REPEAT_TIMEOUT          ((3 * g_ticks_per_second) / 4)
54#define MAX_REPEAT_ACCEL                8
55#define REPEAT_INC                      4
56#define KEY_UP                          0x40000000
57
58/* Color enums */
59typedef enum bcolor_idx_t
60{
61    eCOLOR_CLEAR,
62    eCOLOR_BLACK,
63    eCOLOR_BLACK_65,
64    eCOLOR_WHITE,
65    eCOLOR_LT_BLUE,
66    eCOLOR_MED_BLUE,
67    eCOLOR_DRK_BLUE,
68    eCOLOR_BRT_YELLOW,
69    eCOLOR_LT_YELLOW,
70    eCOLOR_MED_YELLOW,
71    eCOLOR_DK_YELLOW,
72    eCOLOR_PALE_YELLOW,
73    eCOLOR_NEON_GREEN
74}bcolor_idx_t;
75
76
77/* Layout enums */
78typedef enum bscreen_layout_t
79{
80#if (DISPLAY_NTSC || DISPLAY_PAL_M)
81        eHEIGHT                                                            = 480,
82#elif (DISPLAY_PAL || DISPLAY_PAL_NC)
83        eHEIGHT                                                            = 576,
84#else
85#error display format (NTSC, PAL, PAL-M or PAL-NC) must be defined
86#endif
87
88    eWIDTH                                 = 720,
89    eSCREEN_ACTION_SAFE_PERCENT            = 10,
90    eSCREEN_ACTION_SAFE_X                  = (eWIDTH * eSCREEN_ACTION_SAFE_PERCENT / 100),
91    eSCREEN_ACTION_SAFE_Y                  = (eHEIGHT * eSCREEN_ACTION_SAFE_PERCENT / 100),
92    eSCREEN_ACTION_SAFE_WIDTH              = (eWIDTH - (2 * eSCREEN_ACTION_SAFE_X)),
93    eSCREEN_ACTION_SAFE_HEIGHT             = (eHEIGHT - (2 * eSCREEN_ACTION_SAFE_Y)),
94
95    eINFO_AREA_HEIGHT                      = 30,
96    eINFO_AREA_Y                           = (eHEIGHT - eSCREEN_ACTION_SAFE_Y - eINFO_AREA_HEIGHT),
97
98    eMENU_TITLE_AREA_HEIGHT_0_LINE         = 60,
99    eMENU_TITLE_AREA_HEIGHT_1_LINE         = 80,
100    eMENU_TITLE_AREA_HEIGHT_2_LINE         = 100,
101    eMENU_TITLE_AREA_HEIGHT_3_LINE         = 120,
102    eMENU_TITLE_AREA_HEIGHT_4_LINE         = 140,
103
104    eMENU_TITLE_TEXT_X                     = (20 + eSCREEN_ACTION_SAFE_X),
105    eMENU_TITLE_TEXT_Y                     = (14 + eSCREEN_ACTION_SAFE_Y),
106    eMENU_TITLE_TEXT_WIDTH                 = (eSCREEN_ACTION_SAFE_WIDTH - 2 * (eMENU_TITLE_TEXT_X - eSCREEN_ACTION_SAFE_X)),
107    eMENU_TITLE_TEXT_HEIGHT                = 40,
108
109    eMENU_TITLE_DESC_TEXT_X                = (20 + eMENU_TITLE_TEXT_X),
110    eMENU_TITLE_DESC_TEXT_Y                = (40 + eMENU_TITLE_TEXT_Y),
111    eMENU_TITLE_DESC_TEXT_WIDTH            = (eWIDTH - eMENU_TITLE_DESC_TEXT_X - eMENU_TITLE_TEXT_X),
112    eMENU_TITLE_DESC_TEXT_HEIGHT           = 85,
113    eMENU_TITLE_DESC_TEXT_SPACING          = 4,
114
115    eMENU_PICTURES_FIRST_BUTTON_X          = (eSCREEN_ACTION_SAFE_X + 20),
116    eMENU_PICTURES_FIRST_BUTTON_Y          = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 10),
117    eMENU_PICTURES_BUTTON_WIDTH            = 190,
118    eMENU_PICTURES_BUTTON_DESC_WIDTH       = (eWIDTH - eMENU_PICTURES_FIRST_BUTTON_X - eMENU_PICTURES_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
119    eMENU_PICTURES_BUTTON_DESC_HEIGHT      = 95,
120    eMENU_PICTURES_BUTTON_INC_Y            = 75,
121
122    eMENU_SOUND_FIRST_BUTTON_X             = (eSCREEN_ACTION_SAFE_X + 40),
123    eMENU_SOUND_FIRST_BUTTON_Y             = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 10),
124    eMENU_SOUND_BUTTON_WIDTH               = 186,
125    eMENU_SOUND_BUTTON_DESC_WIDTH          = (eWIDTH - eMENU_SOUND_FIRST_BUTTON_X - eMENU_SOUND_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
126    eMENU_SOUND_BUTTON_DESC_HEIGHT         = 75,
127    eMENU_SOUND_BUTTON_INC_Y               = 60,
128
129    eMENU_AV_FIRST_BUTTON_X                = (eSCREEN_ACTION_SAFE_X + 70),
130    eMENU_AV_FIRST_BUTTON_Y                = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 10),
131    eMENU_AV_BUTTON_WIDTH                  = 200,
132    eMENU_AV_BUTTON_DESC_WIDTH             = (eWIDTH - eMENU_AV_FIRST_BUTTON_X - eMENU_AV_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
133    eMENU_AV_BUTTON_DESC_HEIGHT            = 75,
134    eMENU_AV_BUTTON_INC_Y                  = 60,
135
136    eMENU_LANGUAGE_FIRST_BUTTON_X          = (eSCREEN_ACTION_SAFE_X + 20),
137    eMENU_LANGUAGE_FIRST_BUTTON_Y          = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 15),
138    eMENU_LANGUAGE_BUTTON_WIDTH            = 150,
139    eMENU_LANGUAGE_BUTTON_DESC_WIDTH       = (eWIDTH - eMENU_LANGUAGE_FIRST_BUTTON_X - eMENU_LANGUAGE_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
140    eMENU_LANGUAGE_BUTTON_DESC_HEIGHT      = 75,
141    eMENU_LANGUAGE_BUTTON_INC_Y            = 60,
142
143    eMENU_CAPTIONS_FIRST_BUTTON_X          = (eSCREEN_ACTION_SAFE_X + 20),
144    eMENU_CAPTIONS_FIRST_BUTTON_Y          = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 5),
145    eMENU_CAPTIONS_BUTTON_HEIGHT           = 30,
146    eMENU_CAPTIONS_BUTTON_WIDTH            = 150,
147    eMENU_CAPTIONS_BUTTON_DESC_WIDTH       = (eWIDTH - eMENU_CAPTIONS_FIRST_BUTTON_X - eMENU_CAPTIONS_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
148    eMENU_CAPTIONS_BUTTON_DESC_HEIGHT      = 75,
149    eMENU_CAPTIONS_BUTTON_INC_Y            = 60,
150    eMENU_CAPTIONS_ON_OFF_BUTTON_WIDTH     = 130,
151        eMENU_CAPTIONS_ON_OFF_FIRST_BUTTON_Y   = eMENU_CAPTIONS_FIRST_BUTTON_Y + 20,
152    eMENU_CAPTIONS_BASIC_BUTTON_WIDTH      = 130,
153        eMENU_CAPTIONS_BASIC_FIRST_BUTTON_Y    = eMENU_CAPTIONS_FIRST_BUTTON_Y - 40,
154    eMENU_CAPTIONS_BASIC_BUTTON_INC_Y      = 40,
155    eMENU_CAPTIONS_ADVANCED_BUTTON_WIDTH   = 180,
156        eMENU_CAPTIONS_ADVANCED_FIRST_BUTTON_Y = eMENU_CAPTIONS_FIRST_BUTTON_Y - 40,
157    eMENU_CAPTIONS_ADVANCED_BUTTON_INC_Y   = 33,
158    eMENU_CAPTIONS_ADVANCED_BUTTON_HEIGHT  = 30,
159    eMENU_CAPTIONS_FONT_OPTIONS_BUTTON_WIDTH   = 170,
160        eMENU_CAPTIONS_FONT_OPTIONS_FIRST_BUTTON_Y = eMENU_CAPTIONS_FIRST_BUTTON_Y - 40,
161    eMENU_CAPTIONS_FONT_OPTIONS_BUTTON_INC_Y   = 50,
162    eMENU_CAPTIONS_FONT_OPTIONS_BUTTON_HEIGHT  = 40,
163    eMENU_CAPTIONS_BACK_OPTIONS_BUTTON_WIDTH   = 170,
164        eMENU_CAPTIONS_BACK_OPTIONS_FIRST_BUTTON_Y = eMENU_CAPTIONS_FIRST_BUTTON_Y - 30,
165    eMENU_CAPTIONS_BACK_OPTIONS_BUTTON_HEIGHT  = 40,
166    eMENU_CAPTIONS_FONT_BUTTON_WIDTH       = 190,
167        eMENU_CAPTIONS_FONT_FIRST_BUTTON_Y     = eMENU_CAPTIONS_FIRST_BUTTON_Y - 46,
168    eMENU_CAPTIONS_FONT_BUTTON_INC_Y       = 33,
169    eMENU_CAPTIONS_FONT_COLOR_BUTTON_INC_Y = 29,
170    eMENU_CAPTIONS_FONT_BUTTON_HEIGHT      = 30,
171    eMENU_CAPTIONS_FONT_COLOR_BUTTON_HEIGHT = 25,
172        eMENU_CAPTIONS_FONT_FIRST_STYLE_BUTTON_Y = eMENU_CAPTIONS_FIRST_BUTTON_Y - 30,
173        eMENU_CAPTIONS_FONT_FIRST_SIZE_BUTTON_Y  = eMENU_CAPTIONS_FIRST_BUTTON_Y - 30,
174        eMENU_CAPTIONS_FONT_STYLE_BUTTON_WIDTH = 170,
175        eMENU_CAPTIONS_OPACITY_FIRST_BUTTON_Y  = eMENU_CAPTIONS_FIRST_BUTTON_Y - 40,
176        eMENU_CAPTIONS_FONT_OPACITY_BUTTON_WIDTH = 200,
177        eMENU_CAPTIONS_OPACITY_BUTTON_INC_Y    = 50,
178        eMENU_CAPTIONS_RESET_FIRST_BUTTON_Y    = eMENU_CAPTIONS_FIRST_BUTTON_Y + 15,
179        eMENU_CAPTIONS_EDGE_TYPE_FIRST_BUTTON_Y= eMENU_CAPTIONS_FIRST_BUTTON_Y - 40,
180        eMENU_CAPTIONS_EDGE_TYPE_BUTTON_WIDTH  = 216,
181        eMENU_CAPTIONS_EDGE_TYPE_BUTTON_INC_Y  = 40,
182
183    eMENU_SETUP_FIRST_BUTTON_X             = (eSCREEN_ACTION_SAFE_X + 20),
184#ifdef CONFIG_EIA_708
185    eMENU_SETUP_FIRST_BUTTON_Y             = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 42),
186#else
187    eMENU_SETUP_FIRST_BUTTON_Y             = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 38),
188#endif
189    eMENU_SETUP_BUTTON_INC_Y               = 42,
190    eMENU_SETUP_BUTTON_WIDTH               = 200,
191    eMENU_SETUP_BUTTON_DESC_WIDTH          = (eWIDTH - eMENU_SETUP_FIRST_BUTTON_X - eMENU_SETUP_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X + 20),
192    eMENU_SETUP_BUTTON_DESC_HEIGHT         = 75,
193
194    eMENU_CH_SCAN_FIRST_BUTTON_X           = (eSCREEN_ACTION_SAFE_X + 20),
195    eMENU_CH_SCAN_FIRST_BUTTON_Y           = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 25),
196    eMENU_CH_SCAN_BUTTON_WIDTH             = 160,
197    eMENU_CH_SCAN_BUTTON_DESC_WIDTH        = (eWIDTH - eMENU_CH_SCAN_FIRST_BUTTON_X - eMENU_CH_SCAN_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
198    eMENU_CH_SCAN_BUTTON_DESC_HEIGHT       = 75,
199    eMENU_CH_SCAN_BUTTON_INC_Y             = 75,
200
201    eMENU_SMART_CH_SCAN_FIRST_BUTTON_X     = (eSCREEN_ACTION_SAFE_X + 20),
202    eMENU_SMART_CH_SCAN_FIRST_BUTTON_Y     = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 15),
203    eMENU_SMART_CH_SCAN_BUTTON_WIDTH       = 160,
204    eMENU_SMART_CH_SCAN_BUTTON_DESC_WIDTH  = (eWIDTH - eMENU_CH_SCAN_FIRST_BUTTON_X - eMENU_CH_SCAN_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
205    eMENU_SMART_CH_SCAN_BUTTON_DESC_HEIGHT = 75,
206    eMENU_SMART_CH_SCAN_BUTTON_INC_Y       = 70,
207
208    eMENU_RESET_FIRST_BUTTON_X             = (eSCREEN_ACTION_SAFE_X + 20),
209    eMENU_RESET_FIRST_BUTTON_Y             = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 25),
210    eMENU_RESET_BUTTON_WIDTH               = 168,
211    eMENU_RESET_BUTTON_DESC_WIDTH          = (eWIDTH - eMENU_RESET_FIRST_BUTTON_X - eMENU_RESET_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
212    eMENU_RESET_BUTTON_DESC_HEIGHT         = 75,
213    eMENU_RESET_BUTTON_INC_Y               = 75,
214
215    eMENU_WIZ_WELCOME_FIRST_BUTTON_X       = (eSCREEN_ACTION_SAFE_X + 20),
216    eMENU_WIZ_WELCOME_FIRST_BUTTON_Y       = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 65),
217    eMENU_WIZ_WELCOME_BUTTON_WIDTH         = 150,
218    eMENU_WIZ_WELCOME_BUTTON_DESC_WIDTH    = (eWIDTH - eMENU_WIZ_WELCOME_FIRST_BUTTON_X - eMENU_WIZ_WELCOME_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
219    eMENU_WIZ_WELCOME_BUTTON_DESC_HEIGHT   = 75,
220    eMENU_WIZ_WELCOME_BUTTON_INC_Y         = 75,
221
222    eMENU_WIZ_ANTENNA_FIRST_BUTTON_X       = (eSCREEN_ACTION_SAFE_X + 20),
223    eMENU_WIZ_ANTENNA_FIRST_BUTTON_Y       = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 45),
224    eMENU_WIZ_ANTENNA_BUTTON_WIDTH         = 150,
225    eMENU_WIZ_ANTENNA_BUTTON_DESC_WIDTH    = (eWIDTH - eMENU_WIZ_ANTENNA_FIRST_BUTTON_X - eMENU_WIZ_ANTENNA_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
226    eMENU_WIZ_ANTENNA_BUTTON_DESC_HEIGHT   = 75,
227    eMENU_WIZ_ANTENNA_BUTTON_INC_Y         = 60,
228
229    eMENU_WIZ_CH_SCAN_FIRST_BUTTON_X       = (eSCREEN_ACTION_SAFE_X + 20),
230    eMENU_WIZ_CH_SCAN_FIRST_BUTTON_Y       = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 25),
231    eMENU_WIZ_CH_SCAN_BUTTON_WIDTH         = 150,
232    eMENU_WIZ_CH_SCAN_BUTTON_DESC_WIDTH    = (eWIDTH - eMENU_WIZ_CH_SCAN_FIRST_BUTTON_X - eMENU_WIZ_CH_SCAN_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
233    eMENU_WIZ_CH_SCAN_BUTTON_DESC_HEIGHT   = 75,
234    eMENU_WIZ_CH_SCAN_BUTTON_INC_Y         = 60,
235
236    eMENU_WIZ_SMART_CH_SCAN_FIRST_BUTTON_X       = (eSCREEN_ACTION_SAFE_X + 20),
237    eMENU_WIZ_SMART_CH_SCAN_FIRST_BUTTON_Y       = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT),
238    eMENU_WIZ_SMART_CH_SCAN_BUTTON_WIDTH         = 160,
239    eMENU_WIZ_SMART_CH_SCAN_BUTTON_DESC_WIDTH    = (eWIDTH - eMENU_WIZ_CH_SCAN_FIRST_BUTTON_X - eMENU_WIZ_CH_SCAN_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
240    eMENU_WIZ_SMART_CH_SCAN_BUTTON_DESC_HEIGHT   = 75,
241    eMENU_WIZ_SMART_CH_SCAN_BUTTON_INC_Y         = 65,
242
243    eMENU_WIZ_DONE_FIRST_BUTTON_X          = (eSCREEN_ACTION_SAFE_X + 20),
244    eMENU_WIZ_DONE_FIRST_BUTTON_Y          = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 65),
245    eMENU_WIZ_DONE_BUTTON_WIDTH            = 150,
246    eMENU_WIZ_DONE_BUTTON_DESC_WIDTH       = (eWIDTH - eMENU_WIZ_DONE_FIRST_BUTTON_X - eMENU_WIZ_DONE_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
247    eMENU_WIZ_DONE_BUTTON_DESC_HEIGHT      = 75,
248    eMENU_WIZ_DONE_BUTTON_INC_Y            = 75,
249
250    eMENU_AUTO_POWER_FIRST_BUTTON_X        = (eSCREEN_ACTION_SAFE_X + 20),
251    eMENU_AUTO_POWER_FIRST_BUTTON_Y        = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT-40),
252    eMENU_AUTO_POWER_BUTTON_WIDTH          = 180,
253    eMENU_AUTO_POWER_BUTTON_DESC_WIDTH     = (eWIDTH - eMENU_AUTO_POWER_FIRST_BUTTON_X - eMENU_AUTO_POWER_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
254    eMENU_AUTO_POWER_BUTTON_DESC_HEIGHT    = 75,
255    eMENU_AUTO_POWER_BUTTON_INC_Y          = 65,
256
257    eMENU_TIMEZONE_FIRST_BUTTON_X          = (eSCREEN_ACTION_SAFE_X + 20),
258    eMENU_TIMEZONE_FIRST_BUTTON_Y          = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT-56),
259    eMENU_TIMEZONE_BUTTON_WIDTH            = 200,
260    eMENU_TIMEZONE_BUTTON_DESC_WIDTH       = (eWIDTH - eMENU_TIMEZONE_FIRST_BUTTON_X - eMENU_TIMEZONE_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
261    eMENU_TIMEZONE_BUTTON_DESC_HEIGHT      = 75,
262    eMENU_TIMEZONE_BUTTON_INC_Y            = 45,
263
264    eMENU_RATINGS_FIRST_BUTTON_X           = (eSCREEN_ACTION_SAFE_X + 20),
265    eMENU_RATINGS_FIRST_BUTTON_Y           = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 5),
266    eMENU_RATINGS_BUTTON_WIDTH             = 196,
267
268    eMENU_RATINGS_BUTTON_DESC_WIDTH        = (eWIDTH - eMENU_RATINGS_FIRST_BUTTON_X - eMENU_RATINGS_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
269    eMENU_RATINGS_BUTTON_DESC_HEIGHT       = 75,
270    eMENU_RATINGS_BUTTON_INC_Y             = 60,
271
272    eMENU_RATINGS_LOCK_FIRST_BUTTON_X      = (eSCREEN_ACTION_SAFE_X + 20),
273    eMENU_RATINGS_LOCK_FIRST_BUTTON_Y      = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 35),
274    eMENU_RATINGS_LOCK_BUTTON_WIDTH        = 200,
275    eMENU_RATINGS_LOCK_BUTTON_DESC_WIDTH   = (eWIDTH - eMENU_RATINGS_LOCK_FIRST_BUTTON_X - eMENU_RATINGS_LOCK_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
276    eMENU_RATINGS_LOCK_BUTTON_DESC_HEIGHT  = 75,
277    eMENU_RATINGS_LOCK_BUTTON_INC_Y        = 75,
278
279    eMENU_RATINGS_LIMITS_FIRST_BUTTON_X    = (eSCREEN_ACTION_SAFE_X + 20),
280    eMENU_RATINGS_LIMITS_FIRST_BUTTON_Y    = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 5),
281    eMENU_RATINGS_LIMITS_BUTTON_WIDTH      = 156,
282    eMENU_RATINGS_LIMITS_BUTTON_DESC_WIDTH = (eWIDTH - eMENU_RATINGS_LIMITS_FIRST_BUTTON_X - eMENU_RATINGS_LIMITS_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
283    eMENU_RATINGS_LIMITS_BUTTON_DESC_HEIGHT= 75,
284
285
286    eMENU_RATINGS_LIMITS_BUTTON_INC_Y      = 55,
287    eMENU_RATINGS_TV_FIRST_BUTTON_X        = (eSCREEN_ACTION_SAFE_X + 50),
288
289        eMENU_RATINGS_RRT_DIM_FIRST_BUTTON_X   = (eSCREEN_ACTION_SAFE_X + 110),
290        eMENU_RATINGS_RRT_DIM_FIRST_BUTTON_Y   = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 48),
291    eMENU_RATINGS_RRT_DIM_BUTTON_INC_Y     = 28,
292    eMENU_RATINGS_RRT_DIM_BUTTON_WIDTH     = 350,
293    eMENU_RATINGS_RRT_DIM_BUTTON_HEIGHT    = 25,
294
295        eMENU_RATINGS_RRT_VAL_FIRST_BUTTON_X   = (eSCREEN_ACTION_SAFE_X + 110),
296        eMENU_RATINGS_RRT_VAL_FIRST_BUTTON_Y   = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 48),
297    eMENU_RATINGS_RRT_VAL_BUTTON_INC_Y     = 28,
298    eMENU_RATINGS_RRT_VAL_BUTTON_WIDTH     = 350,
299    eMENU_RATINGS_RRT_VAL_BUTTON_HEIGHT    = 25,
300       
301        eMENU_RATINGS_RRT_UPDATE_FIRST_BUTTON_X = (eSCREEN_ACTION_SAFE_X + 20),
302        eMENU_RATINGS_RRT_UPDATE_FIRST_BUTTON_Y = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 15),
303    eMENU_RATINGS_RRT_UPDATE_BUTTON_INC_Y   = 75,
304    eMENU_RATINGS_RRT_UPDATE_BUTTON_WIDTH   = 200,
305    eMENU_RATINGS_TV_FIRST_BUTTON_Y        = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 35),
306
307        eMENU_RATINGS_TV_DLSV_FIRST_BUTTON_X   = eMENU_RATINGS_TV_FIRST_BUTTON_X + 80,
308    eMENU_RATINGS_TV_GRID_BUTTON_WIDTH     = 120,
309    eMENU_RATINGS_TV_DLSV_GRID_BUTTON_WIDTH= 70,
310    eMENU_RATINGS_TV_BUTTON_WIDTH          = 150,
311    eMENU_RATINGS_TV_BUTTON_DESC_WIDTH     = (eWIDTH - eMENU_RATINGS_TV_FIRST_BUTTON_X - eMENU_RATINGS_TV_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
312    eMENU_RATINGS_TV_BUTTON_DESC_HEIGHT    = 75,
313    eMENU_RATINGS_TV_BUTTON_INC_Y          = 40,
314
315    eMENU_RATINGS_MOVIES_FIRST_BUTTON_X    = (eSCREEN_ACTION_SAFE_X + 15),
316    eMENU_RATINGS_MOVIES_FIRST_BUTTON_Y    = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 35),
317    eMENU_RATINGS_MOVIES_BUTTON_WIDTH      = 126,
318    eMENU_RATINGS_MOVIES_BUTTON_DESC_WIDTH = (eWIDTH - eMENU_RATINGS_MOVIES_FIRST_BUTTON_X - eMENU_RATINGS_MOVIES_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
319    eMENU_RATINGS_MOVIES_BUTTON_DESC_HEIGHT= 75,
320    eMENU_RATINGS_MOVIES_BUTTON_INC_Y      = 33,
321
322    eMENU_CONTENT_MA_FIRST_BUTTON_X        = (eSCREEN_ACTION_SAFE_X + 30),
323    eMENU_CONTENT_MA_FIRST_BUTTON_Y        = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 20),
324    eMENU_CONTENT_MA_BUTTON_WIDTH          = 140,
325    eMENU_CONTENT_MA_BUTTON_DESC_WIDTH     = (eWIDTH - eMENU_CONTENT_MA_FIRST_BUTTON_X - eMENU_CONTENT_MA_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
326    eMENU_CONTENT_MA_BUTTON_DESC_HEIGHT    = 75,
327    eMENU_CONTENT_MA_BUTTON_INC_Y          = 50,
328
329    eMENU_CONTENT_14_FIRST_BUTTON_X        = (eSCREEN_ACTION_SAFE_X + 60),
330    eMENU_CONTENT_14_FIRST_BUTTON_Y        = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 40),
331    eMENU_CONTENT_14_BUTTON_WIDTH          = 140,
332    eMENU_CONTENT_14_BUTTON_DESC_WIDTH     = (eWIDTH - eMENU_CONTENT_14_FIRST_BUTTON_X - eMENU_CONTENT_14_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
333    eMENU_CONTENT_14_BUTTON_DESC_HEIGHT    = 75,
334    eMENU_CONTENT_14_BUTTON_INC_Y          = 50,
335
336    eMENU_CONTENT_PG_FIRST_BUTTON_X        = (eSCREEN_ACTION_SAFE_X + 50),
337    eMENU_CONTENT_PG_FIRST_BUTTON_Y        = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 40),
338    eMENU_CONTENT_PG_BUTTON_WIDTH          = 140,
339    eMENU_CONTENT_PG_BUTTON_DESC_WIDTH     = (eWIDTH - eMENU_CONTENT_PG_FIRST_BUTTON_X - eMENU_CONTENT_PG_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
340    eMENU_CONTENT_PG_BUTTON_DESC_HEIGHT    = 75,
341    eMENU_CONTENT_PG_BUTTON_INC_Y          = 50,
342
343    eMENU_CONTENT_Y7_FIRST_BUTTON_X        = (eSCREEN_ACTION_SAFE_X + 70),
344    eMENU_CONTENT_Y7_FIRST_BUTTON_Y        = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT - 10),
345    eMENU_CONTENT_Y7_BUTTON_WIDTH          = 140,
346    eMENU_CONTENT_Y7_BUTTON_DESC_WIDTH     = (eWIDTH - eMENU_CONTENT_Y7_FIRST_BUTTON_X - eMENU_CONTENT_Y7_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
347    eMENU_CONTENT_Y7_BUTTON_DESC_HEIGHT    = 75,
348    eMENU_CONTENT_Y7_BUTTON_INC_Y          = 50,
349
350    ePIN_INC_X                             = 10,
351    ePIN_WIDTH                             = 76,
352    ePIN_HEIGHT                            = 76,
353    ePIN_X                                 = eSCREEN_ACTION_SAFE_X + (eSCREEN_ACTION_SAFE_WIDTH / 2) - (((ePIN_WIDTH * 4) + (ePIN_INC_X * 3)) / 2) + 1,
354    ePIN_Y                                 = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 40),
355
356    eMENU_WRONG_PIN_FIRST_BUTTON_X         = (eSCREEN_ACTION_SAFE_X + 20),
357    eMENU_WRONG_PIN_FIRST_BUTTON_Y         = (eMENU_TITLE_DESC_TEXT_Y + eMENU_TITLE_DESC_TEXT_HEIGHT + 30),
358    eMENU_WRONG_PIN_BUTTON_WIDTH           = 140,
359    eMENU_WRONG_PIN_BUTTON_DESC_WIDTH      = (eWIDTH - eMENU_WRONG_PIN_FIRST_BUTTON_X - eMENU_WRONG_PIN_BUTTON_WIDTH - eSCREEN_ACTION_SAFE_X),
360    eMENU_WRONG_PIN_BUTTON_DESC_HEIGHT     = 75,
361    eMENU_WRONG_PIN_BUTTON_INC_Y           = 75,
362   
363    eMENU_RETRY_BUTTON_WIDTH               = 140,
364
365    eBANNER_WIDTH_OFFSET                   = 30,
366    eBANNER_X                              = eSCREEN_ACTION_SAFE_X + eBANNER_WIDTH_OFFSET,
367    eBANNER_Y                              = eSCREEN_ACTION_SAFE_Y + 20,
368    eBANNER_WIDTH                          = eSCREEN_ACTION_SAFE_WIDTH - (2 * eBANNER_WIDTH_OFFSET),
369    eBANNER_SMALL_HEIGHT                   = 110,
370    eBANNER_LARGE_HEIGHT                   = 130,
371    eBANNER_TITLE_X                        = eBANNER_X + 10,
372    eBANNER_TITLE_Y                        = eBANNER_Y + 10,
373    eBANNER_TITLE_WIDTH                    = eBANNER_WIDTH - 125,
374    eBANNER_TITLE_HEIGHT                   = 20,
375    eBANNER_CH_NUM_WIDTH                   = 100,
376    eBANNER_CH_NUM_HEIGHT                  = eBANNER_TITLE_HEIGHT,
377    eBANNER_CH_NUM_X                       = eBANNER_X + eBANNER_WIDTH - eBANNER_CH_NUM_WIDTH,
378    eBANNER_CH_NUM_Y                       = eBANNER_TITLE_Y,
379    eBANNER_CALLSIGN_WIDTH                 = 100,
380    eBANNER_CALLSIGN_HEIGHT                = eBANNER_TITLE_HEIGHT,
381    eBANNER_CALLSIGN_X                     = eBANNER_X + eBANNER_WIDTH - eBANNER_CALLSIGN_WIDTH,
382    eBANNER_CALLSIGN_Y                     = eBANNER_TITLE_Y + eBANNER_CH_NUM_HEIGHT + 5,
383    eBANNER_NEXT_TITLE_X                   = eBANNER_X + 100,
384    eBANNER_NEXT_TITLE_Y                   = eBANNER_CALLSIGN_Y,
385    eBANNER_EPISODE_WIDTH                  = 380,
386    eBANNER_EPISODE_HEIGHT                 = eBANNER_TITLE_HEIGHT,
387    eBANNER_EPISODE_X                      = eBANNER_TITLE_X,
388    eBANNER_EPISODE_Y                      = eBANNER_CALLSIGN_Y,
389    eBANNER_TIME_WIDTH                     = 100,
390    eBANNER_TIME_HEIGHT                    = eBANNER_TITLE_HEIGHT,
391    eBANNER_TIME_X                         = eBANNER_X + eBANNER_WIDTH - eBANNER_TIME_WIDTH,
392    eBANNER_TIME_Y                         = eBANNER_CALLSIGN_Y + eBANNER_CALLSIGN_HEIGHT + 5,
393    eBANNER_RATINGS_WIDTH                  = eBANNER_WIDTH,
394    eBANNER_RATINGS_HEIGHT                 = eBANNER_TITLE_HEIGHT,
395    eBANNER_RATINGS_X                      = eBANNER_TITLE_X,
396    eBANNER_RATINGS_Y                      = eBANNER_TIME_Y + eBANNER_TIME_HEIGHT + 5,
397    eBANNER_SAP_WIDTH                      = 40,
398    eBANNER_SAP_HEIGHT                     = eBANNER_TITLE_HEIGHT,
399    eBANNER_SAP_X                          = eBANNER_TIME_X - eBANNER_SAP_WIDTH - 5,
400    eBANNER_SAP_Y                          = eBANNER_TIME_Y,
401    eBANNER_DESC_WIDTH                     = eBANNER_WIDTH - 20,
402    eBANNER_DESC_HEIGHT                    = eBANNER_LARGE_HEIGHT - 30,
403    eBANNER_DESC_X                         = eBANNER_X + 10,
404    eBANNER_DESC_Y                         = eBANNER_Y + eBANNER_SMALL_HEIGHT + 10,
405    eBANNER_DESC_LINE_SPACING              = 6,
406    eBANNER_STATUS_HEIGHT                  = 105,
407    eBANNER_STATUS_TITLE_ONLY_HEIGHT       = 40,
408    eBANNER_STATUS_WIDTH                   = eBANNER_WIDTH,
409    eBANNER_STATUS_X                       = eBANNER_X,
410    eBANNER_STATUS_Y                       = eSCREEN_ACTION_SAFE_Y + eSCREEN_ACTION_SAFE_HEIGHT - eBANNER_STATUS_HEIGHT - 20,
411    eBANNER_STATUS_TITLE_ONLY_Y_OFFSET     = 65,
412    eBANNER_POPUP_TITLE_X                  = eBANNER_STATUS_X + 10,
413    eBANNER_POPUP_TITLE_Y                  = eBANNER_STATUS_Y + 10,
414    eBANNER_POPUP_TITLE_WIDTH              = eBANNER_STATUS_WIDTH - 125,
415        eBANNER_POPUP_VOL_TITLE_WIDTH          = 40,
416    eBANNER_POPUP_TITLE_HEIGHT             = 22,
417    eBANNER_POPUP_DESC_X                   = eBANNER_STATUS_X + 10,
418    eBANNER_POPUP_DESC_Y                   = eBANNER_POPUP_TITLE_Y + eBANNER_POPUP_TITLE_HEIGHT + 5,
419    eBANNER_POPUP_DESC_WIDTH               = eBANNER_STATUS_WIDTH - 20,
420    eBANNER_POPUP_DESC_HEIGHT              = eBANNER_STATUS_Y + eBANNER_STATUS_HEIGHT - 10 - eBANNER_POPUP_DESC_Y,
421    eBANNER_SIGNAL_X                       = eBANNER_X + 10,
422    eBANNER_SIGNAL_Y                       = eBANNER_TIME_Y + 5,
423    eBANNER_SIGNAL_WIDTH                   = 55,
424    eBANNER_SIGNAL_HEIGHT                  = 10,
425    eBANNER_START_END_TIME_X               = eBANNER_SIGNAL_X + eBANNER_SIGNAL_WIDTH + 35,
426    eBANNER_START_END_TIME_Y               = eBANNER_TIME_Y,
427    eBANNER_START_END_TIME_WIDTH           = 180,
428    eBANNER_START_END_TIME_HEIGHT          = eBANNER_TIME_HEIGHT,
429
430    eMENU_FIRST_BUTTON_X                   = (eSCREEN_ACTION_SAFE_X + 30),
431    eMENU_BUTTON_WIDTH                     = 186,
432    eMENU_BUTTON_INC_Y                     = 50,
433    eMENU_FIRST_BUTTON_Y                   = (eSCREEN_ACTION_SAFE_Y + 85),
434    eMENU_ITEM_DESC_X                      = (180 + 60 + 4 + eSCREEN_ACTION_SAFE_X),
435    eMENU_ITEM_DESC_Y                      = (90 + 2 + eSCREEN_ACTION_SAFE_Y),
436    eMENU_INFO_X                           = (10 + eSCREEN_ACTION_SAFE_X),
437    eMENU_INFO_Y                           = (eINFO_AREA_Y + 5),
438    eMENU_INFO_LINE_SPACING                = 4,
439    ePROGRESS_X                            = 130,
440    ePROGRESS_Y                            = 220,
441    ePROGRESS_WIDTH                        = 400,
442    ePROGRESS_HEIGHT                       = 50,
443    ePROGRESS_LABEL_SPACING                = 6,
444    ePROGRESS_VOLUME_X                     = eBANNER_POPUP_TITLE_X + 175,
445    ePROGRESS_VOLUME_WIDTH                 = 260,
446    ePROGRESS_VOLUME_HEIGHT                = 25,
447    ePROGRESS_GUIDE_X                      = eBANNER_TITLE_X + 430,
448    ePROGRESS_GUIDE_Y                      = eBANNER_TITLE_Y - 10,
449    ePROGRESS_GUIDE_WIDTH                  = 80,
450    ePROGRESS_GUIDE_HEIGHT                 = 25,
451    ePROGRESS_GUIDE_TEXT_X                 = ePROGRESS_GUIDE_X - 110,
452    ePROGRESS_GUIDE_TEXT_Y                 = ePROGRESS_GUIDE_Y + 5,
453    ePROGRESS_GUIDE_TEXT_WIDTH             = 100,
454    ePROGRESS_GUIDE_TEXT_HEIGHT            = 50,
455    eBUTTON_HEIGHT                         = 40,
456    eBUTTON_HEIGHT_RATINGS                 = 30,
457    eBUTTON_BEVEL_GRADIENT_STEP            = 2,
458    eBUTTON_MARGIN_X                       = 4,
459    eBUTTON_MARGIN_RIGHT                   = 70,
460    eBUTTON_RADIO_BOX_WIDTH                = 20,
461    eBUTTON_RADIO_BOX_DOT_WIDTH            = 4,
462    eBUTTON_RADIO_BOX_BORDER               = 4,
463    eBUTTON_RADIO_BOX_MARGIN_X             = 10,
464    eBUTTON_PROGRESS_BORDER                = 4,
465    eBUTTON_VOL_PROGRESS_BORDER            = 2,
466    eMENU_TEXT_DROPSHADOW                  = 2,
467}bscreen_layout_t;
468
469/* Font Size Enum */
470typedef enum bapp_font_size_t
471{
472    eFONT_SIZE_SMALL,
473    eFONT_SIZE_MED,
474    eFONT_SIZE_LARGE,
475    eFONT_SIZE_MAX
476}bapp_font_size_t;
477
478/* Screen ID Enum */
479typedef enum bapp_screen_id_t
480{
481    eSCREEN_NULL,
482    eSCREEN_MAIN,
483    eSCREEN_PICTURE,
484    eSCREEN_SOUND,
485        eSCREEN_AV,
486    eSCREEN_ANTENNA,
487#if 0
488        eSCREEN_CAPTIONS,
489        eSCREEN_CAPTIONS_ON_OFF,
490        eSCREEN_CAPTIONS_BASIC,
491#endif
492        eSCREEN_CAPTIONS_ADVANCED,
493        eSCREEN_CAPTIONS_FONT_OPTIONS,
494        eSCREEN_CAPTIONS_BACK_OPTIONS,
495        eSCREEN_CAPTIONS_FONT,
496        eSCREEN_CAPTIONS_FONT_SIZE,
497        eSCREEN_CAPTIONS_FONT_STYLE,
498        eSCREEN_CAPTIONS_FONT_COLOR,
499        eSCREEN_CAPTIONS_FONT_OPACITY,
500        eSCREEN_CAPTIONS_BACK_COLOR,
501        eSCREEN_CAPTIONS_BACK_OPACITY,
502        eSCREEN_CAPTIONS_EDGE_COLOR,
503        eSCREEN_CAPTIONS_EDGE_TYPE,
504        eSCREEN_CAPTIONS_RESET,
505    eSCREEN_LANGUAGE,
506    eSCREEN_SETUP,
507    eSCREEN_CH_SCAN,
508    eSCREEN_SMART_CH_SCAN,
509    eSCREEN_CH_SCAN_PROGRESS,
510    eSCREEN_RESET,
511    eSCREEN_WIZ_WELCOME,
512    eSCREEN_WIZ_LANGUAGE,
513    eSCREEN_WIZ_CH_SCAN,
514    eSCREEN_WIZ_SMART_CH_SCAN,
515    eSCREEN_WIZ_PIN_NEW,
516    eSCREEN_WIZ_PIN_CONFIRM,
517    eSCREEN_WIZ_MISMATCHED_PINS,
518    eSCREEN_WIZ_DONE,
519    eSCREEN_AUTO_POWER,
520    eSCREEN_RATINGS,
521    eSCREEN_RATINGS_LOCK,
522    eSCREEN_RATINGS_LIMITS,
523    eSCREEN_RATINGS_TV,
524    eSCREEN_RATINGS_MOVIES,
525        eSCREEN_RATINGS_RRT_DIM,
526        eSCREEN_RATINGS_RRT_VAL,
527        eSCREEN_RATINGS_RRT_UPDATE,
528    eSCREEN_PIN_VERIFY_LIVE,
529    eSCREEN_PIN_VERIFY_RATINGS,
530    eSCREEN_PIN_VERIFY_RESET,
531    eSCREEN_PIN_NEW,
532    eSCREEN_PIN_CONFIRM,
533    eSCREEN_WRONG_PIN_LIVE,
534    eSCREEN_WRONG_PIN_RATINGS,
535    eSCREEN_WRONG_PIN_RESET,
536    eSCREEN_MISMATCHED_PINS,
537    eSCREEN_BANNER_SMALL,
538    eSCREEN_GUIDE,
539    eSCREEN_SCREENSAVER,
540    eSCREEN_POWER_OFF,
541    eSCREEN_TIMEZONE,
542    eSCREEN_STATUS,
543    eSCREEN_DEBUG,
544    eSCREEN_MAX
545}bapp_screen_id_t;
546
547/* Types of buttons and attibutes*/
548typedef enum bbutton_type_t
549{
550    eBUTTON_MENU            = 0x1,
551    eBUTTON_RADIO           = 0x2,
552    eBUTTON_CHECK           = 0x4,
553        eBUTTON_CHECK_LOCK      = 0x8,
554    eBUTTON_DESC_BOX        = 0x10,
555    eBUTTON_MAX
556}bbutton_type_t;
557
558/* Button states */
559typedef enum bbutton_state_t
560{
561    eBUTTON_STATE_OFF       = 0x0,
562    eBUTTON_STATE_ON        = 0x1,
563    eBUTTON_STATE_SELECTED  = 0x2,
564    eBUTTON_STATE_MAX
565}bbutton_state_t;
566
567typedef enum tv_ratings_position_t
568{
569        ePOS_TV_Y,
570        ePOS_TV_Y7,
571        ePOS_TV_Y7_FV,
572        ePOS_TV_G,
573        ePOS_TV_PG,
574        ePOS_TV_PG_D,
575        ePOS_TV_PG_L,
576        ePOS_TV_PG_S,
577        ePOS_TV_PG_V,
578        ePOS_TV_14,
579        ePOS_TV_14_D,
580        ePOS_TV_14_L,
581        ePOS_TV_14_S,
582        ePOS_TV_14_V,
583        ePOS_TV_MA,
584        ePOS_TV_MA_L,
585        ePOS_TV_MA_S,
586        ePOS_TV_MA_V,
587        ePOS_TV_LAST
588}tv_ratings_position_t;
589
590/* Button info structure */
591typedef struct bbutton_t
592{
593    bbutton_type_t      type;
594    unsigned short      x;
595    unsigned short      y;
596    unsigned short      width;
597    unsigned short      height;
598    btext_id_t          text_id;
599    btext_id_t          desc_text_id;
600    bapp_screen_id_t    next_screen_id;
601    bapp_screen_id_t    next_screen_back_id;
602        unsigned short      right_justify_text;
603        unsigned int            background_color;
604}bbutton_t;
605
606/* Types of events */
607typedef enum bevent_type_t
608{
609    eS_EVENT_IR,
610    eS_EVENT_IDLE,
611    eS_EVENT_SETUP,
612    eS_EVENT_SETUP_DONE,
613    eS_EVENT_SELECTED,
614    eS_EVENT_CHECKED,
615    eS_EVENT_PROGRESS,
616    eS_EVENT_DONE,
617    eS_EVENT_REDRAW,
618    eS_EVENT_CANCEL,
619    eS_EVENT_MAX
620}bevent_type_t;
621
622/* Screen event structure */
623typedef struct bscreen_event_t
624{
625    bevent_type_t   type;
626    unsigned int    id;
627    void *data;
628}bscreen_event_t;
629
630/* Screen data structure */
631typedef struct bscreen_t
632{
633    btext_id_t          title_text_id;
634    btext_id_t          desc_text_id;
635    btext_id_t          help_text_id;
636    uint16_t            top_banner_height;
637    unsigned char       button_selection;
638    unsigned char       button_checked;
639    unsigned char       num_buttons;
640    unsigned int        idle_timeout;
641    bapp_screen_id_t    last_screen_id;
642    bbutton_t         * p_button_array;
643    void (*draw)(void *p_app, void *p_screen);
644    int (*handle_event)(void *p_app, void *p_screen, bscreen_event_t *p_event);
645    unsigned int        local_state;
646}bscreen_t;
647
648
649/*
650Summary:
651    screen draw callback functions.
652*/
653void screen_null_draw(void *v_app, void *v_screen);
654
655/*
656Summary:
657    screen event handler callback functions.
658*/
659int screen_picture_event(void *v_app, void *v_screen, 
660                               bscreen_event_t *p_event);
661int screen_sound_event(void *v_app, void *v_screen,
662                               bscreen_event_t *p_event);
663int screen_antenna_event(void *v_app, void *v_screen,
664                               bscreen_event_t *p_event);
665#if 0
666int screen_captions_event(void *v_app, void *v_screen,
667                               bscreen_event_t *p_event);
668int screen_captions_on_off_event(void *v_app, void *v_screen,
669                               bscreen_event_t *p_event);
670int screen_captions_basic_event(void *v_app, void *v_screen,
671                               bscreen_event_t *p_event);
672#endif
673int screen_captions_advanced_event(void *v_app, void *v_screen, 
674                               bscreen_event_t *p_event);
675int screen_captions_font_options_event(void *v_app, void *v_screen, 
676                               bscreen_event_t *p_event);
677int screen_captions_back_options_event(void *v_app, void *v_screen, 
678                               bscreen_event_t *p_event);
679int screen_captions_font_event(void *v_app, void *v_screen, 
680                               bscreen_event_t *p_event);
681int screen_captions_font_size_event(void *v_app, void *v_screen, 
682                               bscreen_event_t *p_event);
683int screen_captions_font_style_event(void *v_app, void *v_screen, 
684                               bscreen_event_t *p_event);
685int screen_captions_font_color_event(void *v_app, void *v_screen, 
686                               bscreen_event_t *p_event);
687int screen_captions_font_opacity_event(void *v_app, void *v_screen, 
688                               bscreen_event_t *p_event);
689int screen_captions_back_color_event(void *v_app, void *v_screen, 
690                               bscreen_event_t *p_event);
691int screen_captions_back_opacity_event(void *v_app, void *v_screen, 
692                               bscreen_event_t *p_event);
693int screen_captions_edge_color_event(void *v_app, void *v_screen, 
694                               bscreen_event_t *p_event);
695int screen_captions_edge_type_event(void *v_app, void *v_screen, 
696                               bscreen_event_t *p_event);
697int screen_captions_reset_event(void *v_app, void *v_screen, 
698                               bscreen_event_t *p_event);
699int screen_language_event(void *v_app, void *v_screen,
700                               bscreen_event_t *p_event);
701int screen_setup_event(void *v_app, void *v_screen,
702                               bscreen_event_t *p_event);
703int screen_ch_scan_event(void *v_app, void *v_screen,
704                               bscreen_event_t *p_event);
705int screen_ch_scan_progress_event(void *v_app, void *v_screen,
706                               bscreen_event_t *p_event);
707int screen_reset_event(void *v_app, void *v_screen, 
708                               bscreen_event_t *p_event);
709int screen_wiz_welcome_event(void *v_app, void *v_screen, 
710                               bscreen_event_t *p_event);
711int screen_wiz_language_event(void *v_app, void *v_screen,
712                               bscreen_event_t *p_event);
713int screen_wiz_ch_scan_event(void *v_app, void *v_screen,
714                               bscreen_event_t *p_event);
715int screen_wiz_done_event(void *v_app, void *v_screen, 
716                               bscreen_event_t *p_event);
717int screen_auto_power_event(void *v_app, void *v_screen,
718                               bscreen_event_t *p_event);
719int screen_ratings_event(void *v_app, void *v_screen,
720                               bscreen_event_t *p_event);
721int screen_ratings_lock_event(void *v_app, void *v_screen, 
722                               bscreen_event_t *p_event);
723int screen_ratings_limits_event(void *v_app, void *v_screen, 
724                               bscreen_event_t *p_event);
725int screen_ratings_tv_event(void *v_app, void *v_screen, 
726                               bscreen_event_t *p_event);
727const int screen_ratings_tv_pos2dim(int button_position);
728const int screen_ratings_tv_pos2value(int button_position);
729const int screen_ratings_tv_xds2pos(int xds_tv_rating);
730const int screen_ratings_movie_xds2pos(int xds_movie_rating);
731
732int screen_ratings_movies_event(void *v_app, void *v_screen, 
733                               bscreen_event_t *p_event);
734int screen_ratings_rrt_dim_event(void *v_app, void *v_screen, 
735                                 bscreen_event_t *p_event);
736int screen_ratings_rrt_val_event(void *v_app, void *v_screen, 
737                                 bscreen_event_t *p_event);
738int screen_ratings_rrt_update_event(void *v_app, void *v_screen, 
739                                    bscreen_event_t *p_event);
740
741int screen_pin_event(void *v_app, void *v_screen,
742                               bscreen_event_t *p_event);
743int screen_wrong_pin_event(void *v_app, void *v_screen, 
744                               bscreen_event_t *p_event);
745int screen_banner_event(void *v_app, void *v_screen,
746                               bscreen_event_t *p_event);
747int screen_guide_event(void *v_app, void *v_screen,
748                               bscreen_event_t *p_event);
749int screen_screensaver_event(void *v_app, void *v_screen,
750                             bscreen_event_t *p_event);
751int screen_power_off_event(void *v_app, void *v_screen,
752                           bscreen_event_t *p_event);
753
754/*
755Summary:
756    default screen callback functions.
757*/
758void bscreen_default_setup(void *v_app, void *v_screen);
759int bscreen_default_idle(void *v_app, void *v_screen);
760int bscreen_default_event(void *v_app, void *v_screen, 
761                               bscreen_event_t *p_event);
762int bscreen_tv_event(void *v_app, void *v_screen, 
763                               bscreen_event_t *p_event);
764void bscreen_default_draw(void *v_app, void *v_screen);
765void bscreen_antenna_draw(void *v_app, void *v_screen);
766void bscreen_ch_scan_progress_draw(void *v_app, void *v_screen);
767void bscreen_wiz_welcome_draw(void *v_app, void *v_screen);
768void bscreen_wiz_ch_scan_draw(void *v_app, void *v_screen);
769void bscreen_wiz_done_draw(void *v_app, void *v_screen);
770void bscreen_ratings_tv_draw(void *v_app, void *v_screen);
771void bscreen_pin_draw(void *v_app, void *v_screen);
772void bscreen_auto_power_draw(void *v_app, void *v_screen);
773void bscreen_popup(void *v_app, void *v_screen);
774void bscreen_popup_draw(void *v_app, void *v_screen, btext_id_t title, btext_id_t desc);
775void bscreen_banner_draw(void *v_app, void *v_screen);
776void bscreen_guide_draw(void *v_app, void *v_screen);
777void bscreen_screensaver_draw(void *v_app, void *v_screen);
778void bscreen_power_off_draw(void *v_app, void *v_screen);
779void bscreen_rrt_dim_draw(void *v_app, void *v_screen);
780void bscreen_rrt_val_draw(void *v_app, void *v_screen);
781
782void bscreen_debug_draw(void *v_app, void *v_screen);
783int bscreen_debug_event(void *v_app, void *v_screen, 
784                               bscreen_event_t *p_event);
785void bscreen_status_draw(void *v_app, void *v_screen);
786int bscreen_status_event(void *v_app, void *v_screen, 
787                               bscreen_event_t *p_event);
788void bscreen_timezone_draw(void *v_app, void *v_screen);
789int bscreen_timezone_event(void *v_app, void *v_screen, 
790                               bscreen_event_t *p_event);
791/*
792Summary:
793    screen button arrays.
794*/
795extern bbutton_t g_buttons_main[];
796#define g_buttons_main_num      5
797
798extern bbutton_t g_buttons_picture[];
799#define g_buttons_picture_num   2
800extern bbutton_t g_buttons_sound[];
801#define g_buttons_sound_num     2
802
803extern bbutton_t g_buttons_av[];
804#define g_buttons_av_num     2
805
806extern bbutton_t g_buttons_language[];
807#define g_buttons_language_num  3
808extern bbutton_t g_buttons_setup[];
809
810#ifdef CONFIG_EIA_708
811#define g_buttons_setup_num     6
812#else
813#define g_buttons_setup_num     5
814#endif
815
816extern bbutton_t g_buttons_ch_scan[];
817#define g_buttons_ch_scan_num   2
818extern bbutton_t g_buttons_smart_ch_scan[];
819#define g_buttons_smart_ch_scan_num   3
820extern bbutton_t g_buttons_reset[];
821#define g_buttons_reset_num   2
822extern bbutton_t g_buttons_wiz_welcome[];
823#define g_buttons_wiz_welcome_num   1
824extern bbutton_t g_buttons_wiz_language[];
825#define g_buttons_wiz_language_num  3
826extern bbutton_t g_buttons_wiz_ch_scan[];
827#define g_buttons_wiz_ch_scan_num  2
828extern bbutton_t g_buttons_wiz_smart_ch_scan[];
829#define g_buttons_wiz_smart_ch_scan_num  3
830extern bbutton_t g_buttons_wiz_mismatched_pins[];
831#define g_buttons_wiz_mismatched_pins_num   1
832extern bbutton_t g_buttons_wiz_done[];
833#define g_buttons_wiz_done_num   1
834extern bbutton_t g_buttons_auto_power[];
835#define g_buttons_auto_power_num  4
836extern bbutton_t g_buttons_ratings[];
837#define g_buttons_ratings_num  3
838extern bbutton_t g_buttons_ratings_lock[];
839#define g_buttons_ratings_lock_num   3
840extern bbutton_t g_buttons_ratings_limits[];
841#define g_buttons_ratings_limits_num   3
842extern bbutton_t g_buttons_ratings_tv[];
843#define g_buttons_ratings_tv_num  ePOS_TV_LAST
844#if 0
845extern bbutton_t g_buttons_captions[];
846#define g_buttons_captions_num   3
847extern bbutton_t g_buttons_captions_on_off[];
848#define g_buttons_captions_on_off_num   2
849extern bbutton_t g_buttons_captions_basic[];
850#define g_buttons_captions_basic_num   6
851#endif
852extern bbutton_t g_buttons_captions_advanced[];
853#define g_buttons_captions_advanced_num   3
854extern bbutton_t g_buttons_captions_font_options[];
855#define g_buttons_captions_font_options_num   5
856extern bbutton_t g_buttons_captions_back_options[];
857#define g_buttons_captions_back_options_num   4
858extern bbutton_t g_buttons_captions_font[];
859#define g_buttons_captions_font_num   8
860extern bbutton_t g_buttons_captions_font_size[];
861#define g_buttons_captions_font_size_num   4
862extern bbutton_t g_buttons_captions_font_style[];
863#define g_buttons_captions_font_style_num   3
864extern bbutton_t g_buttons_captions_color[];
865#define g_buttons_captions_color_num   9
866extern bbutton_t g_buttons_captions_font_opacity[];
867extern bbutton_t g_buttons_captions_back_opacity[];
868#define g_buttons_captions_opacity_num   5
869extern bbutton_t g_buttons_captions_reset[];
870#define g_buttons_captions_reset_num   2
871extern bbutton_t g_buttons_captions_edge_type[];
872#define g_buttons_captions_edge_type_num   6
873extern bbutton_t g_buttons_captions_font_color[];
874#define g_buttons_captions_font_color_num   9
875extern bbutton_t g_buttons_captions_edge_color[];
876#define g_buttons_captions_edge_color_num   9
877extern bbutton_t g_buttons_timezone[];
878#define g_buttons_timezone_num   6
879
880
881extern bbutton_t g_buttons_ratings_movies[];
882#define g_buttons_ratings_movies_num  7
883
884#define MAX_RRT_DIM_BUTTONS 9
885#define MAX_RRT_VAL_BUTTONS 9
886extern bbutton_t g_buttons_ratings_rrt_dim[];
887#define g_buttons_ratings_rrt_dim_num MAX_RRT_DIM_BUTTONS;
888extern bbutton_t g_buttons_ratings_rrt_val[];
889#define g_buttons_ratings_rrt_val_num MAX_RRT_VAL_BUTTONS;
890
891extern bbutton_t g_buttons_ratings_rrt_update[];
892#define g_buttons_ratings_rrt_update_num 2
893
894extern bbutton_t g_buttons_wrong_pin_live[];
895#define g_buttons_wrong_pin_live_num   1
896extern bbutton_t g_buttons_wrong_pin_ratings[];
897#define g_buttons_wrong_pin_ratings_num   2
898extern bbutton_t g_buttons_wrong_pin_reset[];
899#define g_buttons_wrong_pin_reset_num   2
900extern bbutton_t g_buttons_mismatched_pins[];
901#define g_buttons_mismatched_pins_num   2
902
903
904/* Banner state types */
905
906typedef enum banner_mode_t
907{
908    eLS_BANNER_OFF,
909    eLS_BANNER_SMALL,
910    eLS_BANNER_BIG,
911    eLS_BANNER_MAX
912}banner_mode_t;
913
914typedef struct banner_state_t
915{
916    char            majorCh[3];
917    char            minorCh[3];
918    unsigned char   majorChIndex;
919    unsigned char   minorChIndex;
920    unsigned char   dot;
921    unsigned char   enter;
922    banner_mode_t   mode;
923    bscreen_event_t event;
924    unsigned int    repeat_timeout;
925    unsigned int    repeat_rate;
926    unsigned int    timeout;
927    unsigned int    ten_key_timeout;
928    unsigned int    volume_timeout;
929    char            volume_dirty;
930    unsigned int    SAP_timeout;
931        char            SAP_dirty;
932    unsigned int    CC_timeout;
933        char            CC_dirty;
934        unsigned int    auto_power_restart_timeout;
935        char            auto_power_one_min_warning;
936}banner_state_t;
937
938extern banner_state_t g_banner_state;
939
940
941/* Screensaver State */
942typedef struct screensaver_state_t
943{
944    unsigned int image_swap_timeout;
945}screensaver_state_t;
946
947extern screensaver_state_t g_screensaver_state;
948
949/* Guide State */
950
951typedef struct guide_state_t
952{
953    unsigned int    selection;
954        int                     column;
955    unsigned int    offset;
956    char            ch_num_str[32];
957    bscreen_event_t event;
958    unsigned int    repeat_timeout;
959    unsigned int    repeat_rate;
960    unsigned char   update_progress;
961}guide_state_t;
962
963extern guide_state_t g_guide_state;
964
965/*
966Summary:
967    Use the this function to get a UNI string.
968*/
969
970void bscreen_get_string(
971                    bapp_lang_t e_lang,         /* Language enum */
972                    btext_id_t e_text_id,       /* Text enum */
973                    unsigned int *p_uni_str,    /* Buffer to put UNI string into */
974                    unsigned int *str_len       /* The string length. */
975                    );
976/*
977Summary:
978    Draw the buttons for the screen.
979Description:
980    Draw the buttons for the screen.
981*/
982void bscreen_draw_buttons(
983                        void *v_app,            /* Opaque app reference */
984                        void *v_screen          /* Opaque screen reference */
985                        );
986
987/*
988Summary:
989    Draw a button for the screen.
990Description:
991    Draw a button for the screen.
992*/
993void bscreen_draw_button(void *v_app,                   /* application structure */
994                    const bbutton_t *p_button,              /* button info structure */
995                    int selected,                       /* Button selected when non-zero */
996                    int checked,                         /* Button checked when non-zero */
997                                        int idx                                         /* button index or -1 for non index button */
998                    );
999
1000/*
1001Summary:
1002    Draw a button but override the p_button->text_id text with str_text.
1003Description:
1004    Draw a button but override the p_button->text_id text with str_text.
1005*/
1006void bscreen_draw_button_custom_text(void *v_app,                   /* application structure */
1007                                     const bbutton_t *p_button,     /* button info structure */
1008                                                             char *str_text,                /* button text to use (overrides p_button->text_id) */
1009                                                                         char *str_desc_text,           /* description text to use (overrides p_button->desc_text_id) */
1010                                     int selected,                  /* Button selected when non-zero */
1011                                     int checked,                   /* Button checked when non-zero */
1012                                                             int idx                                            /* button index or -1 for non index button */
1013                                    );
1014/*
1015Summary:
1016    Draw a progress meter for the screen.
1017Description:
1018    Draw a progress meter for the screen.
1019*/
1020void bscreen_draw_progress(void * v_app,       /* Opague app reference */ 
1021                unsigned int x,                /* x coord for progress meter */
1022                unsigned int y,                /* y coord for progress meter */
1023                unsigned int width,            /* width of progress meter */
1024                unsigned int height,           /* height of progress meter */
1025                unsigned int border_width,     /* width of meter border */
1026                unsigned int border_color,     /* color of meter border */
1027                unsigned int background_color, /* background color behind thumb */
1028                unsigned int percent);         /* percentage thumb size (0-100) */
1029
1030/*
1031Summary:
1032    Draw a pin entry field for the screen.
1033Description:
1034    Draw a pin entry field for the screen.
1035*/
1036void bscreen_draw_pin(void * v_app,            /* Opague app reference */ 
1037                unsigned int x,                /* x coord for pin field */
1038                unsigned int y,                /* y coord for pin field */
1039                unsigned int width,            /* width of pin field */
1040                unsigned int height,           /* height of pin field*/
1041                unsigned int inc_x,            /* x increment between digits */
1042                unsigned int selection,        /* selected digit */
1043                unsigned int field);           /* pin field to draw */
1044
1045/*
1046Summary:
1047    Draw signal level meter in banner
1048Description:
1049    Draw signal level meter in banner
1050*/
1051void bscreen_draw_banner_signal_level(void * v_app,                   /* Opaque app reference */
1052                                      unsigned int signal);           /* signal level         */
1053
1054
1055#endif /* BSCREEN_H__ */
Note: See TracBrowser for help on using the repository browser.