DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
stbhwosd.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  *******************************************************************************/
24 // pre-processor mechanism so multiple inclusions don't cause compilation error
25 
26 #ifndef _STBHWOSD_H
27 #define _STBHWOSD_H
28 
29 #include "techtype.h"
30 #include "osdtype.h"
31 
32 //---Constant and macro definitions for public use-----------------------------
33 
34 //---Enumerations for public use-----------------------------------------------
35 
36 //---Global type defs for public use-------------------------------------------
37 
38 //---Global Function prototypes for public use---------------------------------
39 
44 void STB_OSDInitialise(U8BIT num_max_regions);
45 
51 BOOLEAN STB_OSDEnable(BOOLEAN enable);
52 
58 BOOLEAN STB_OSDDisableUIRegion(void);
59 
65 BOOLEAN STB_OSDEnableUIRegion(void);
66 
71 void STB_OSDSetTransparency(U8BIT trans);
72 
77 U8BIT STB_OSDGetTransparency(void);
78 
86 void STB_OSDSetPalette(U16BIT index, U16BIT num, U32BIT *trgb);
87 
93 U32BIT* STB_OSDGetCurrentPalette(void);
94 
104 void STB_OSDDrawBitmap(U16BIT x, U16BIT y, U16BIT width, U16BIT height, U8BIT bits, U8BIT *data);
105 
115 void STB_OSDReadBitmap(U16BIT x, U16BIT y, U16BIT width, U16BIT height, U8BIT bits, U8BIT *data);
116 
123 void STB_OSDDrawPixel(U16BIT x, U16BIT y, U32BIT colour);
124 
131 void STB_OSDReadPixel(U16BIT x, U16BIT y, U32BIT *colour);
132 
140 void STB_OSDDrawHLine(U16BIT x, U16BIT y, U16BIT width, U32BIT colour);
141 
149 void STB_OSDDrawVLine(U16BIT x, U16BIT y, U16BIT height, U32BIT colour);
150 
161 void STB_OSDDrawRectangle(U16BIT x, U16BIT y, U16BIT width, U16BIT height, U32BIT colour,
162  U8BIT thick, BOOLEAN fill);
163 
168 void STB_OSDClear(U32BIT colour);
169 
175 void STB_OSDFill(U32BIT colour, E_BLIT_OP bflg);
176 
182 void STB_OSDGetSize(U16BIT *width, U16BIT *height);
183 
187 void STB_OSDUpdate(void);
188 
194 void STB_OSDRegisterRefreshHandler(void (*func)(void));
195 
200 void STB_OSDRegisterInUseCallback(U8BIT (*func)(void));
201 
208 
218 void STB_OSDResize(BOOLEAN scaling, U16BIT width, U16BIT height, U16BIT x_offset, U16BIT y_offset);
219 
220 
221 /* Subtitles and teletext OSD functions*/
222 
229 void STB_OSDSetRegionDisplaySize(U16BIT width, U16BIT height);
230 
238 void* STB_OSDCreateRegion(U16BIT width, U16BIT height, U8BIT depth);
239 
244 void STB_OSDDestroyRegion(void *handle);
245 
251 void STB_OSDSetYCrCbPalette(void *region_handle, U32BIT *tycrcb);
252 
259 void STB_OSDMoveRegion(void *handle, U16BIT x, U16BIT y);
260 
265 void STB_OSDHideRegion(void *handle);
266 
271 void STB_OSDShowRegion(void *handle);
272 
283 void STB_OSDDrawBitmapInRegion(void *handle, U16BIT x, U16BIT y, U16BIT w, U16BIT h, U8BIT *bitmap, BOOLEAN non_modifying_colour);
284 
290 void STB_OSDRegionToRegionCopy(void *handle_new, void *handle_orig);
291 
297 void STB_OSDFillRegion(void *handle, U8BIT colour);
298 
308 void STB_OSDRegionFillRect(void *handle, U16BIT left, U16BIT top, U16BIT width, U16BIT height, U8BIT colour);
309 
313 void STB_OSDUpdateRegions(void);
314 
320 void STB_OSDSetRGBPalette(void *handle, U32BIT *trgb);
321 
322 #endif // _STBHWOSD_H
323 
324 //*****************************************************************************
325 // End of file
326 //*****************************************************************************
327 
Header file - Function prototypes for A/V control.
void STB_OSDDrawVLine(U16BIT x, U16BIT y, U16BIT height, U32BIT colour)
Draw a vertical line in the UI composition buffer.
void STB_OSDInitialise(U8BIT num_max_regions)
Initialised the OSD hardware layer functions.
void STB_OSDUpdateRegions(void)
Updates the display of all subtitle regions.
void STB_OSDFillRegion(void *handle, U8BIT colour)
Fill a region with a colour.
void STB_OSDFill(U32BIT colour, E_BLIT_OP bflg)
Clear the user interface layer to the given colour using the given blit op.
void STB_OSDSetRGBPalette(void *handle, U32BIT *trgb)
Sets the RGB palette for the given region. This function is used for Teletext.
BOOLEAN STB_OSDDisableUIRegion(void)
Disables (makes invisible) the OSD. This function needs to be implemented on platforms that cannot di...
void STB_OSDRefreshDisplayCallback(void)
Can be called by anyone to force redraw of the OSD by the UI. This function will cause the platform c...
void STB_OSDDrawRectangle(U16BIT x, U16BIT y, U16BIT width, U16BIT height, U32BIT colour, U8BIT thick, BOOLEAN fill)
Draw a rectangle in the UI composition buffer.
void STB_OSDShowRegion(void *handle)
Makes a region visible.
void STB_OSDUpdate(void)
Commit invisible UI buffer to visible surface and copy back.
U32BIT * STB_OSDGetCurrentPalette(void)
Returns a pointer to the current TRGB palette (clut). This function is used for 8 bit colour depth on...
void STB_OSDSetYCrCbPalette(void *region_handle, U32BIT *tycrcb)
Sets a regions entire palette to a T,Y,CR,CB clut.
void STB_OSDDrawBitmapInRegion(void *handle, U16BIT x, U16BIT y, U16BIT w, U16BIT h, U8BIT *bitmap, BOOLEAN non_modifying_colour)
Draw a bitmap in a specified region.
void STB_OSDReadPixel(U16BIT x, U16BIT y, U32BIT *colour)
Read a single pixel from the UI composition buffer.
void STB_OSDSetTransparency(U8BIT trans)
Sets the UI transparency level (0-100%)
void STB_OSDGetSize(U16BIT *width, U16BIT *height)
Returns the current width and height of the OSD.
BOOLEAN STB_OSDEnable(BOOLEAN enable)
Enable/Disable the OSD.
void STB_OSDDrawBitmap(U16BIT x, U16BIT y, U16BIT width, U16BIT height, U8BIT bits, U8BIT *data)
Draw a bitmap into the UI composition (invisible) buffer.
void STB_OSDSetPalette(U16BIT index, U16BIT num, U32BIT *trgb)
Sets a range of palette entries to Trans/Red/Grn/Blue levels. This function is used for 8 bit colour ...
void STB_OSDMoveRegion(void *handle, U16BIT x, U16BIT y)
Move a region to new coordinates.
void STB_OSDResize(BOOLEAN scaling, U16BIT width, U16BIT height, U16BIT x_offset, U16BIT y_offset)
Reconifugres the OSD for a new screen size.
System Wide Global Technical Data Type Definitions.
U8BIT STB_OSDGetTransparency(void)
Returns the current UI transparency level.
void STB_OSDDrawHLine(U16BIT x, U16BIT y, U16BIT width, U32BIT colour)
Draw a horizontal line in the UI composition buffer.
void * STB_OSDCreateRegion(U16BIT width, U16BIT height, U8BIT depth)
Creates a new OSD region (for subtitling)
void STB_OSDRegisterRefreshHandler(void(*func)(void))
Register app fn that can be used by the platform code OSD module to notify the application when the U...
void STB_OSDDrawPixel(U16BIT x, U16BIT y, U32BIT colour)
Draw a single pixel in the UI composition buffer.
void STB_OSDSetRegionDisplaySize(U16BIT width, U16BIT height)
Should be called to set the size of the display so that SD subtitles can be scaled correctly for an H...
void STB_OSDRegisterInUseCallback(U8BIT(*func)(void))
App registered callback to indicate if OSD is in use.
void STB_OSDHideRegion(void *handle)
Makes a region invisible.
void STB_OSDRegionFillRect(void *handle, U16BIT left, U16BIT top, U16BIT width, U16BIT height, U8BIT colour)
Fill the rectangle within the given region with the given colour.
void STB_OSDClear(U32BIT colour)
Clear the entire UI composition buffer to a single colour.
void STB_OSDDestroyRegion(void *handle)
Destroys (free the resources used by) a region.
void STB_OSDReadBitmap(U16BIT x, U16BIT y, U16BIT width, U16BIT height, U8BIT bits, U8BIT *data)
Read a bitmap from the UI composition (invisible) buffer.
BOOLEAN STB_OSDEnableUIRegion(void)
Disables (makes invisible) the OSD. This function needs to be implemented on platforms that cannot di...
void STB_OSDRegionToRegionCopy(void *handle_new, void *handle_orig)
Copy a region to another region, including palette.