![]() |
DVBCore
22.3.0
Open Source DVB Engine
|
Header file - Function prototypes for OSD control. More...
Go to the source code of this file.
Functions | |
void | STB_OSDInitialise (U8BIT num_max_regions) |
Initialised the OSD hardware layer functions. More... | |
BOOLEAN | STB_OSDEnable (BOOLEAN enable) |
Enable/Disable the OSD. More... | |
BOOLEAN | STB_OSDDisableUIRegion (void) |
Disables (makes invisible) the OSD. This function needs to be implemented on platforms that cannot display the UI at the same time as subtitles or teletext. More... | |
BOOLEAN | STB_OSDEnableUIRegion (void) |
Disables (makes invisible) the OSD. This function needs to be implemented on platforms that cannot display the UI at the same time as subtitles or teletext. More... | |
void | STB_OSDSetTransparency (U8BIT trans) |
Sets the UI transparency level (0-100%) More... | |
U8BIT | STB_OSDGetTransparency (void) |
Returns the current UI transparency level. More... | |
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 depth only. More... | |
U32BIT * | STB_OSDGetCurrentPalette (void) |
Returns a pointer to the current TRGB palette (clut). This function is used for 8 bit colour depth only. More... | |
void | STB_OSDDrawBitmap (U16BIT x, U16BIT y, U16BIT width, U16BIT height, U8BIT bits, U8BIT *data) |
Draw a bitmap into the UI composition (invisible) buffer. More... | |
void | STB_OSDReadBitmap (U16BIT x, U16BIT y, U16BIT width, U16BIT height, U8BIT bits, U8BIT *data) |
Read a bitmap from the UI composition (invisible) buffer. More... | |
void | STB_OSDDrawPixel (U16BIT x, U16BIT y, U32BIT colour) |
Draw a single pixel in the UI composition buffer. More... | |
void | STB_OSDReadPixel (U16BIT x, U16BIT y, U32BIT *colour) |
Read a single pixel from the UI composition buffer. More... | |
void | STB_OSDDrawHLine (U16BIT x, U16BIT y, U16BIT width, U32BIT colour) |
Draw a horizontal line in the UI composition buffer. More... | |
void | STB_OSDDrawVLine (U16BIT x, U16BIT y, U16BIT height, U32BIT colour) |
Draw a vertical line in the UI composition buffer. More... | |
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. More... | |
void | STB_OSDClear (U32BIT colour) |
Clear the entire UI composition buffer to a single colour. More... | |
void | STB_OSDFill (U32BIT colour, E_BLIT_OP bflg) |
Clear the user interface layer to the given colour using the given blit op. More... | |
void | STB_OSDGetSize (U16BIT *width, U16BIT *height) |
Returns the current width and height of the OSD. More... | |
void | STB_OSDUpdate (void) |
Commit invisible UI buffer to visible surface and copy back. | |
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 UI needs to be redrawn. More... | |
void | STB_OSDRegisterInUseCallback (U8BIT(*func)(void)) |
App registered callback to indicate if OSD is in use. More... | |
void | STB_OSDRefreshDisplayCallback (void) |
Can be called by anyone to force redraw of the OSD by the UI. This function will cause the platform code OSD module to call the registered refresh handler (see STB_OSDRegisterRefreshHandler). | |
void | STB_OSDResize (BOOLEAN scaling, U16BIT width, U16BIT height, U16BIT x_offset, U16BIT y_offset) |
Reconifugres the OSD for a new screen size. More... | |
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 HD display, or vice versa. More... | |
void * | STB_OSDCreateRegion (U16BIT width, U16BIT height, U8BIT depth) |
Creates a new OSD region (for subtitling) More... | |
void | STB_OSDDestroyRegion (void *handle) |
Destroys (free the resources used by) a region. More... | |
void | STB_OSDSetYCrCbPalette (void *region_handle, U32BIT *tycrcb) |
Sets a regions entire palette to a T,Y,CR,CB clut. More... | |
void | STB_OSDMoveRegion (void *handle, U16BIT x, U16BIT y) |
Move a region to new coordinates. More... | |
void | STB_OSDHideRegion (void *handle) |
Makes a region invisible. More... | |
void | STB_OSDShowRegion (void *handle) |
Makes a region visible. More... | |
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. More... | |
void | STB_OSDRegionToRegionCopy (void *handle_new, void *handle_orig) |
Copy a region to another region, including palette. More... | |
void | STB_OSDFillRegion (void *handle, U8BIT colour) |
Fill a region with a colour. More... | |
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. More... | |
void | STB_OSDUpdateRegions (void) |
Updates the display of all subtitle regions. | |
void | STB_OSDSetRGBPalette (void *handle, U32BIT *trgb) |
Sets the RGB palette for the given region. This function is used for Teletext. More... | |
Header file - Function prototypes for OSD control.
void STB_OSDClear | ( | U32BIT | colour | ) |
Clear the entire UI composition buffer to a single colour.
colour | colour to clear to |
void* STB_OSDCreateRegion | ( | U16BIT | width, |
U16BIT | height, | ||
U8BIT | depth | ||
) |
Creates a new OSD region (for subtitling)
width | width of new region |
height | height of new region |
depth | bits per pixel of new region |
void STB_OSDDestroyRegion | ( | void * | handle | ) |
Destroys (free the resources used by) a region.
handle | handle of (pointer to) the region |
BOOLEAN STB_OSDDisableUIRegion | ( | void | ) |
Disables (makes invisible) the OSD. This function needs to be implemented on platforms that cannot display the UI at the same time as subtitles or teletext.
void STB_OSDDrawBitmap | ( | U16BIT | x, |
U16BIT | y, | ||
U16BIT | width, | ||
U16BIT | height, | ||
U8BIT | bits, | ||
U8BIT * | data | ||
) |
Draw a bitmap into the UI composition (invisible) buffer.
x | the x coordinate where to draw |
y | the x coordinate where to draw |
width | width of bitmap in pixels |
height | height of bitmap in pixels |
bits | bits per pixel of source bitmap |
data | the bitmap data |
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.
handle | handle of (pointer to) the region |
x | x coordinate to draw bitmap |
y | y coordinate to draw bitmap |
w | width of bitmap |
h | height of bitmap |
bitmap | the bitmap data |
non_modifying_colour | not used |
void STB_OSDDrawHLine | ( | U16BIT | x, |
U16BIT | y, | ||
U16BIT | width, | ||
U32BIT | colour | ||
) |
Draw a horizontal line in the UI composition buffer.
x | x coordinate of line |
y | y coordinate of line |
width | width of line in pixels |
colour | colour of line |
void STB_OSDDrawPixel | ( | U16BIT | x, |
U16BIT | y, | ||
U32BIT | colour | ||
) |
Draw a single pixel in the UI composition buffer.
x | x coordinate of pixel |
y | y coordinate of pixel |
colour | colour of pixel |
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.
x | x coordinate of rectangle |
y | x coordinate of rectangle |
width | width of rectangle |
height | height of rectangle |
colour | colour of rectangle |
thick | thickness of outline for hollow rectangles |
fill | TRUE for solid (filled) rectangle |
void STB_OSDDrawVLine | ( | U16BIT | x, |
U16BIT | y, | ||
U16BIT | height, | ||
U32BIT | colour | ||
) |
Draw a vertical line in the UI composition buffer.
x | x coordinate of line |
y | y coordinate of line |
height | height of line in pixels |
colour | colour of line |
BOOLEAN STB_OSDEnable | ( | BOOLEAN | enable | ) |
Enable/Disable the OSD.
enable | TRUE to enable |
BOOLEAN STB_OSDEnableUIRegion | ( | void | ) |
Disables (makes invisible) the OSD. This function needs to be implemented on platforms that cannot display the UI at the same time as subtitles or teletext.
void STB_OSDFill | ( | U32BIT | colour, |
E_BLIT_OP | bflg | ||
) |
Clear the user interface layer to the given colour using the given blit op.
colour | colour to clear to |
bflg | blit operation |
void STB_OSDFillRegion | ( | void * | handle, |
U8BIT | colour | ||
) |
Fill a region with a colour.
handle | handle of (pointer to) the region |
colour | the colour index to fill with |
U32BIT* STB_OSDGetCurrentPalette | ( | void | ) |
Returns a pointer to the current TRGB palette (clut). This function is used for 8 bit colour depth only.
void STB_OSDGetSize | ( | U16BIT * | width, |
U16BIT * | height | ||
) |
Returns the current width and height of the OSD.
width | width of OSD in pixels |
height | height of OSD in pixels |
U8BIT STB_OSDGetTransparency | ( | void | ) |
Returns the current UI transparency level.
void STB_OSDHideRegion | ( | void * | handle | ) |
Makes a region invisible.
handle | handle of (pointer to) the region |
void STB_OSDInitialise | ( | U8BIT | num_max_regions | ) |
Initialised the OSD hardware layer functions.
num_max_regions | number of regions required (not used here) |
void STB_OSDMoveRegion | ( | void * | handle, |
U16BIT | x, | ||
U16BIT | y | ||
) |
Move a region to new coordinates.
handle | handle of (pointer to) the region |
x | new x coordinate of region |
y | new y coordinate of 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.
x | the x coordinate where to read |
y | the x coordinate where to read |
width | width of bitmap in pixels |
height | height of bitmap in pixels |
bits | bits per pixel of destination bitmap |
data | the resultant bitmap data |
void STB_OSDReadPixel | ( | U16BIT | x, |
U16BIT | y, | ||
U32BIT * | colour | ||
) |
Read a single pixel from the UI composition buffer.
x | x coordinate of pixel |
y | y coordinate of pixel |
colour | colour of pixel |
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.
handle | - region handle |
left | - x position of rectangle within the region |
top | - y position of rectangle within the region |
width | - rectangle width |
height | rectangle height |
colour | - fill colour |
void STB_OSDRegionToRegionCopy | ( | void * | handle_new, |
void * | handle_orig | ||
) |
Copy a region to another region, including palette.
handle_new | handle of (pointer to) new (destination) region |
handle_old | handle of (pointer to) old (source) region |
void STB_OSDRegisterInUseCallback | ( | U8BIT(*)(void) | func | ) |
App registered callback to indicate if OSD is in use.
func | the callback function |
void STB_OSDRegisterRefreshHandler | ( | void(*)(void) | func | ) |
Register app fn that can be used by the platform code OSD module to notify the application when the UI needs to be redrawn.
func | the callback function |
void STB_OSDResize | ( | BOOLEAN | scaling, |
U16BIT | width, | ||
U16BIT | height, | ||
U16BIT | x_offset, | ||
U16BIT | y_offset | ||
) |
Reconifugres the OSD for a new screen size.
scaling | TRUE if osd scaling is required due to MHEG scene aspect ratio, FALSE otherwise |
width | width of OSD in pixels |
height | height of OSD in pixels |
x_offset | offset of OSD from left of screen, in pixels |
y_offset | offset of OSD from top of screen, in pixels |
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 depth only.
index | starting number of palette entry to be set |
num | number of consecutive palette entries to set |
trgb | the colour value array |
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 HD display, or vice versa.
width | - display width defined by the subtitle DDS |
height | - display height defined by the subtitle DDS |
void STB_OSDSetRGBPalette | ( | void * | handle, |
U32BIT * | trgb | ||
) |
Sets the RGB palette for the given region. This function is used for Teletext.
handle | region handle as returned by STB_OSDCreateRegion. |
trgb | pointer to the palette array |
void STB_OSDSetTransparency | ( | U8BIT | trans | ) |
Sets the UI transparency level (0-100%)
trans | transparency in percent |
void STB_OSDSetYCrCbPalette | ( | void * | region_handle, |
U32BIT * | tycrcb | ||
) |
Sets a regions entire palette to a T,Y,CR,CB clut.
handle | handle (pointer to) the region to configure |
tycrcb | pointer to the CLUT entries |
void STB_OSDShowRegion | ( | void * | handle | ) |
Makes a region visible.
handle | handle of (pointer to) the region |