DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
stbebutt.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
26 // pre-processor mechanism so multiple inclusions don't cause compilation error
27 
28 #ifndef _STBEBUTT_H
29 #define _STBEBUTT_H
30 
31 #include "techtype.h"
32 
33 //---Constant and macro definitions for public use-----------------------------
34 
35 //---Enumerations for public use-----------------------------------------------
36 
37 typedef enum e_ebutt_event
38 {
39  // These are the four FastText shortcuts, usually represented by red, green,
40  // yellow and blue keys on the handset.
41  EBUTT_EVENT_QUICK_NAVIGATE_1,
42  EBUTT_EVENT_QUICK_NAVIGATE_2,
43  EBUTT_EVENT_QUICK_NAVIGATE_3,
44  EBUTT_EVENT_QUICK_NAVIGATE_4,
45  // The ten numeric keys used to input page indexes.
46  EBUTT_EVENT_0,
47  EBUTT_EVENT_1,
48  EBUTT_EVENT_2,
49  EBUTT_EVENT_3,
50  EBUTT_EVENT_4,
51  EBUTT_EVENT_5,
52  EBUTT_EVENT_6,
53  EBUTT_EVENT_7,
54  EBUTT_EVENT_8,
55  EBUTT_EVENT_9,
56  // This is the home key, which returns to the nominated index page for this
57  // service.
58  EBUTT_EVENT_INDEXPAGE,
59  // These are used to quickly increment/decrement the page index.
60  EBUTT_EVENT_NEXTPAGE,
61  EBUTT_EVENT_PREVIOUSPAGE,
62  // These are used to navigate the sub-pages when in 'hold' mode.
63  EBUTT_EVENT_NEXTSUBPAGE,
64  EBUTT_EVENT_PREVIOUSSUBPAGE,
65  // These are used to traverse the page history (if caching requested).
66  EBUTT_EVENT_BACKPAGE,
67  EBUTT_EVENT_FORWARDPAGE,
68  // This is used to toggle hold on the current page.
69  EBUTT_EVENT_HOLD,
70  // Reveal hidden page content (as defined in EBU specification)
71  EBUTT_EVENT_REVEAL,
72  // This key toggles 'clear' mode (page hidden until updated)
73  EBUTT_EVENT_CLEAR,
74  // Used to toggle transparent background ('video mix' mode)
75  EBUTT_EVENT_MIX_VIDEO,
76  // Used to toggle double height top / double-height bottom / normal height display.
77  EBUTT_EVENT_DOUBLE_HEIGHT,
78  // Functional enhancement may offer finer scrolling of double-height display.
79  EBUTT_EVENT_DOUBLE_SCROLL_UP,
80  EBUTT_EVENT_DOUBLE_SCROLL_DOWN,
81  // Used to initiate/cancel 'timer' mode (clear and re-display page at set time)
82  EBUTT_EVENT_TIMER
83 }
84 E_EBUTT_EVENT;
85 
86 
87 typedef enum e_ebutt_caching_method
88 {
89  // No caching is performed - only presently displayed page and optionally next requested
90  // page information is held in the system.
91  EBUTT_CACHING_METHOD_NONE = 0,
92 
93  // An nominal number of pages in the carousel numbering sequence that are close to the currently
94  // displayed page are cached.
95  // The minimal amount of memory allocation is required for this simple caching.
96  EBUTT_CACHING_METHOD_PREVIOUS_NEXT,
97 
98  // As for EBUTT_CACHING_METHOD_PREVIOUS_NEXT, but also...
99  // Previously visited pages are cached, up to a nominal limit.
100  // The allows for easy travelral of a chain of recently visited pages.
101  // Some memory allocation is required for this caching.
102  EBUTT_CACHING_METHOD_HISTORY,
103 
104  // As for EBUTT_CACHING_METHOD_HISTORY, but also...
105  // The FLOF (or FastText) page navigation links are cached for the
106  // currently displayed page.
107  // More complex memory allocation is required for this caching.
108  EBUTT_CACHING_METHOD_NAVIGATION,
109 
110  // As for EBUTT_CACHING_METHOD_NAVIGATION, but also...
111  // The pages defined in a tree of navigation links to the currently
112  // displayed page are cached.
113  // Complex memory allocation is required for this caching.
114  EBUTT_CACHING_METHOD_NAVIGATION_TREE,
115 
116  // All TeleText carousel content is cached - offers optimal performance.
117  // Significant amounts of memory allocation are required for this caching.
118  EBUTT_CACHING_METHOD_ALL
119 }
120 E_EBUTT_CACHING_METHOD;
121 
122 typedef enum e_ebutt_character_set_designation
123 {
124  EBUTT_CHARACTER_SET_DESIGNATION_LATIN_DEFAULT = 0,
125  EBUTT_CHARACTER_SET_DESIGNATION_LATIN_POLISH = 1,
126  EBUTT_CHARACTER_SET_DESIGNATION_LATIN_TURKISH = 2,
127  EBUTT_CHARACTER_SET_DESIGNATION_LATIN_SERBIAN_RUMANIAN = 3,
128  EBUTT_CHARACTER_SET_DESIGNATION_CYRILLIC = 4,
129  EBUTT_CHARACTER_SET_DESIGNATION_GREEK_TURKISH = 6,
130  EBUTT_CHARACTER_SET_DESIGNATION_LATIN_ARABIC = 8,
131  EBUTT_CHARACTER_SET_DESIGNATION_HEBREW_ARABIC = 10
132 }
133 E_EBUTT_CHARACTER_SET_DESIGNATION;
134 
135 //---Global type defs for public use-------------------------------------------
136 
137 typedef struct s_ebutt_font
138 {
139  U8BIT character_width;
140  U8BIT character_height;
141 
142  U32BIT seperator_row_mask;
143  U32BIT seperator_column_mask;
144 
145  U8BIT *font_table_set_ptr[13]; // each points to 96 * character_width * character_height values
146  // whereby each value is a pixel representation.
147 
148  U8BIT *font_table_option_subset_ptr; // each points to 169 * character_width * character_height values
149  // whereby each value is a pixel representation.
150 }
152 
153 /* Pointer to "midware held" ebutt font data */
154 extern const S_EBUTT_FONT *const ebutt_font_ptr;
155 
156 //---Global Function prototypes for public use---------------------------------
157 
175 BOOLEAN STB_EBUTT_Initialise(void);
176 
191 void STB_EBUTT_Kill(U8BIT path);
192 
213 void STB_EBUTT_Start(U8BIT path, U16BIT text_pid, U8BIT magazine, U8BIT page);
214 
215 void STB_EBUTT_Stop(U8BIT path, BOOLEAN reset_cache);
216 
217 /*!**************************************************************************
218  * @brief Allows teletext PES data packets to be injected by an external module,
219  * which will be decoded and displayed.
220  * @param data_ptr - pointer to first whole PES packet data
221  * @param data_length - number of bytes of data provided
222  * @return TRUE if the data is valid EBU teletext PES data, FALSE otherwise
223  ****************************************************************************/
224 BOOLEAN STB_EBUTT_InjectData(U8BIT *data_ptr, U32BIT data_length);
225 
251 BOOLEAN STB_EBUTT_Show(E_EBUTT_CHARACTER_SET_DESIGNATION character_set_designation,
252  BOOLEAN navigate_to_index_page, BOOLEAN show_header);
253 
266 void STB_EBUTT_Hide(void);
267 
280 void STB_EBUTT_SetCacheMethod(E_EBUTT_CACHING_METHOD ebutt_caching_method);
281 
295 void STB_EBUTT_NotifyEvent(E_EBUTT_EVENT event_type);
296 
311 
324 void STB_EBUTT_SetDisplayBrightness(U8BIT gun_intensity);
325 
338 
339 void STB_EBUTT_DecreaseDisplayBrightness(void);
340 
354 void STB_EBUTT_SetDisplayAntiAliasing(U8BIT antialias_level);
355 
368 void STB_EBUTT_DecreaseDisplayAntiAliasing(void);
369 
382 void STB_EBUTT_SetDisplayMixTransparency(U8BIT transparency_level);
383 
396 void STB_EBUTT_DecreaseDisplayMixTransparency(void);
397 
411 BOOLEAN STB_EBUTT_IsDisplayHeld(void);
412 
426 BOOLEAN STB_EBUTT_IsDisplayDoubleHeight(void);
427 
428 #endif // _STBEBUTT_H
429 
430 //*****************************************************************************
431 // End of file
432 //*****************************************************************************
void STB_EBUTT_NotifyServiceChange(void)
Called whenever the application permits a TV/Radio service change during a TeleText display session...
Definition: stbebutt.c:11962
BOOLEAN STB_EBUTT_Show(E_EBUTT_CHARACTER_SET_DESIGNATION character_set_designation, BOOLEAN navigate_to_index_page, BOOLEAN show_header)
Called to initiate continuous display of TeleText page content. This will result in either the index ...
Definition: stbebutt.c:11347
void STB_EBUTT_IncreaseDisplayMixTransparency(void)
Called to adjust the display video-mix transparency level of the Teletext pages.
Definition: stbebutt.c:12137
BOOLEAN STB_EBUTT_IsDisplayDoubleHeight(void)
Called to ascertain whether the present page is in 'double height' mode or not. Thus function is usef...
Definition: stbebutt.c:12215
void STB_EBUTT_SetDisplayAntiAliasing(U8BIT antialias_level)
Called to adjust the display anti-aliasing level of the Teletext pages. This is used to control 'flic...
Definition: stbebutt.c:12047
Definition: stbebutt.h:137
void STB_EBUTT_IncreaseDisplayAntiAliasing(void)
Called to adjust the display anti-aliasing level of the Teletext pages.
Definition: stbebutt.c:12074
void STB_EBUTT_IncreaseDisplayBrightness(void)
Called to adjust the display brightness (colour intensity) of the Teletext pages. ...
Definition: stbebutt.c:12010
void STB_EBUTT_SetDisplayMixTransparency(U8BIT transparency_level)
Called to adjust the display video-mix transparency level of the Teletext pages.
Definition: stbebutt.c:12110
BOOLEAN STB_EBUTT_InjectData(U8BIT *data_ptr, U32BIT data_length)
Allows teletext PES data packets to be injected by an external module, which will be decoded and disp...
Definition: stbebutt.c:11160
void STB_EBUTT_Kill(U8BIT path)
This is the accompanying function to STB_EBUTT_Initialise( ), and is called to shut-down the EBU Tele...
Definition: stbebutt.c:11129
void STB_EBUTT_SetCacheMethod(E_EBUTT_CACHING_METHOD ebutt_caching_method)
Called to define the strategy used to determine what page content is to be displayed form the TeleTex...
Definition: stbebutt.c:11434
System Wide Global Technical Data Type Definitions.
void STB_EBUTT_Start(U8BIT path, U16BIT text_pid, U8BIT magazine, U8BIT page)
These functions are called to control whether received TeleText data is processed. Using this functionality ensures that the process of collating page information can be halted when processing resources are a consideration. It is envisaged that some implementations may wish only to collate TeleText content only when the display is being shown, whilst other designs may which to cache significant page content as a background process. Abstracting this functionality from the initialisation routines gives the option to support both solution types.
Definition: stbebutt.c:11219
BOOLEAN STB_EBUTT_Initialise(void)
This must be called to invoke the EBU TeleText driver module before all other functionality can be ac...
Definition: stbebutt.c:11058
BOOLEAN STB_EBUTT_IsDisplayHeld(void)
Called to ascertain whether the present page is in 'hold' mode or not. Thus function is useful when a...
Definition: stbebutt.c:12182
void STB_EBUTT_Hide(void)
Called to halt the continuous display of TeleText page content, and to clear the relevant area of the...
Definition: stbebutt.c:11394
void STB_EBUTT_SetDisplayBrightness(U8BIT gun_intensity)
Called to adjust the display brightness (colour intensity) of the Teletext pages. ...
Definition: stbebutt.c:11983
void STB_EBUTT_NotifyEvent(E_EBUTT_EVENT event_type)
Called whenever a TeleText-specific event being invoked. This is used to pass relevant user input to ...
Definition: stbebutt.c:11522