DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
Functions
stbhwosd.h File Reference

Header file - Function prototypes for OSD control. More...

#include "techtype.h"
#include "osdtype.h"

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...
 

Detailed Description

Header file - Function prototypes for OSD control.

Date
06/02/2001

Function Documentation

void STB_OSDClear ( U32BIT  colour)

Clear the entire UI composition buffer to a single colour.

Parameters
colourcolour to clear to
void* STB_OSDCreateRegion ( U16BIT  width,
U16BIT  height,
U8BIT  depth 
)

Creates a new OSD region (for subtitling)

Parameters
widthwidth of new region
heightheight of new region
depthbits per pixel of new region
Returns
handle (pointer to) new region
void STB_OSDDestroyRegion ( void *  handle)

Destroys (free the resources used by) a region.

Parameters
handlehandle 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.

Returns
TRUE if succesful, FALSE otherwise
void STB_OSDDrawBitmap ( U16BIT  x,
U16BIT  y,
U16BIT  width,
U16BIT  height,
U8BIT  bits,
U8BIT *  data 
)

Draw a bitmap into the UI composition (invisible) buffer.

Parameters
xthe x coordinate where to draw
ythe x coordinate where to draw
widthwidth of bitmap in pixels
heightheight of bitmap in pixels
bitsbits per pixel of source bitmap
datathe 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.

Parameters
handlehandle of (pointer to) the region
xx coordinate to draw bitmap
yy coordinate to draw bitmap
wwidth of bitmap
hheight of bitmap
bitmapthe bitmap data
non_modifying_colournot used
void STB_OSDDrawHLine ( U16BIT  x,
U16BIT  y,
U16BIT  width,
U32BIT  colour 
)

Draw a horizontal line in the UI composition buffer.

Parameters
xx coordinate of line
yy coordinate of line
widthwidth of line in pixels
colourcolour of line
void STB_OSDDrawPixel ( U16BIT  x,
U16BIT  y,
U32BIT  colour 
)

Draw a single pixel in the UI composition buffer.

Parameters
xx coordinate of pixel
yy coordinate of pixel
colourcolour 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.

Parameters
xx coordinate of rectangle
yx coordinate of rectangle
widthwidth of rectangle
heightheight of rectangle
colourcolour of rectangle
thickthickness of outline for hollow rectangles
fillTRUE for solid (filled) rectangle
void STB_OSDDrawVLine ( U16BIT  x,
U16BIT  y,
U16BIT  height,
U32BIT  colour 
)

Draw a vertical line in the UI composition buffer.

Parameters
xx coordinate of line
yy coordinate of line
heightheight of line in pixels
colourcolour of line
BOOLEAN STB_OSDEnable ( BOOLEAN  enable)

Enable/Disable the OSD.

Parameters
enableTRUE to enable
Returns
The new state ( i.e. will = param if successful )
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.

Returns
TRUE if succesful, FALSE otherwise
void STB_OSDFill ( U32BIT  colour,
E_BLIT_OP  bflg 
)

Clear the user interface layer to the given colour using the given blit op.

Parameters
colourcolour to clear to
bflgblit operation
void STB_OSDFillRegion ( void *  handle,
U8BIT  colour 
)

Fill a region with a colour.

Parameters
handlehandle of (pointer to) the region
colourthe 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.

Returns
Pointer to an array of 32bit trans,red,green,blue values
void STB_OSDGetSize ( U16BIT *  width,
U16BIT *  height 
)

Returns the current width and height of the OSD.

Parameters
widthwidth of OSD in pixels
heightheight of OSD in pixels
U8BIT STB_OSDGetTransparency ( void  )

Returns the current UI transparency level.

Returns
The current transparency in percent
void STB_OSDHideRegion ( void *  handle)

Makes a region invisible.

Parameters
handlehandle of (pointer to) the region
void STB_OSDInitialise ( U8BIT  num_max_regions)

Initialised the OSD hardware layer functions.

Parameters
num_max_regionsnumber of regions required (not used here)
void STB_OSDMoveRegion ( void *  handle,
U16BIT  x,
U16BIT  y 
)

Move a region to new coordinates.

Parameters
handlehandle of (pointer to) the region
xnew x coordinate of region
ynew 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.

Parameters
xthe x coordinate where to read
ythe x coordinate where to read
widthwidth of bitmap in pixels
heightheight of bitmap in pixels
bitsbits per pixel of destination bitmap
datathe resultant bitmap data
void STB_OSDReadPixel ( U16BIT  x,
U16BIT  y,
U32BIT *  colour 
)

Read a single pixel from the UI composition buffer.

Parameters
xx coordinate of pixel
yy coordinate of pixel
colourcolour 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.

Parameters
handle- region handle
left- x position of rectangle within the region
top- y position of rectangle within the region
width- rectangle width
heightrectangle height
colour- fill colour
void STB_OSDRegionToRegionCopy ( void *  handle_new,
void *  handle_orig 
)

Copy a region to another region, including palette.

Parameters
handle_newhandle of (pointer to) new (destination) region
handle_oldhandle of (pointer to) old (source) region
void STB_OSDRegisterInUseCallback ( U8BIT(*)(void)  func)

App registered callback to indicate if OSD is in use.

Parameters
functhe 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.

Parameters
functhe 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.

Parameters
scalingTRUE if osd scaling is required due to MHEG scene aspect ratio, FALSE otherwise
widthwidth of OSD in pixels
heightheight of OSD in pixels
x_offsetoffset of OSD from left of screen, in pixels
y_offsetoffset 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.

Parameters
indexstarting number of palette entry to be set
numnumber of consecutive palette entries to set
trgbthe 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.

Parameters
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.

Parameters
handleregion handle as returned by STB_OSDCreateRegion.
trgbpointer to the palette array
void STB_OSDSetTransparency ( U8BIT  trans)

Sets the UI transparency level (0-100%)

Parameters
transtransparency in percent
void STB_OSDSetYCrCbPalette ( void *  region_handle,
U32BIT *  tycrcb 
)

Sets a regions entire palette to a T,Y,CR,CB clut.

Parameters
handlehandle (pointer to) the region to configure
tycrcbpointer to the CLUT entries
void STB_OSDShowRegion ( void *  handle)

Makes a region visible.

Parameters
handlehandle of (pointer to) the region