MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mg_api.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2012 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  *******************************************************************************/
25 #ifndef _MG_API_H
26 #define _MG_API_H
27 
28 #include "mh5visible.h"
29 
30 #ifdef OSD_8_BIT
31 extern void MG_OSDUpdate( void );
32 #else /* OSD_8_BIT */
33  #include "stb_osd.h"
34  #define MG_OSDUpdate STB_OSDMhegUpdate
35 #endif /* OSD_8_BIT */
36 
37 void MG_DrawPng( void *data, int len, MHEG5Visible *visible );
38 void MG_DrawJpg( void *data, int len, MHEG5Visible *visible );
39 void MG_FreeData( void *data );
40 
41 void MG_OSDdisplayBitmap( MHEG5Visible *visible, S_REGION *overlap );
42 void MG_OSDdisplayImage( void *data, S_REGION *overlap, int x, int y );
43 void MG_OSDdisplayDynamicLineart( void *data, S_REGION *overlap, int x, int y );
44 
45 void MG_OSDdisplayRectangle( S_REGION *overlap, int x, int y, int width, int height,
46  int lineWidth, /*int lineStyle,*/
47  OSDColor lineColour, OSDColor fillColour );
48 
49 void MG_OSDdisplayVideo( S_REGION rgn );
50 
51 #ifdef SURFACE_THRESHOLD
52 
59 void MG_ApplySurfaceThreshold(void **data, S32BIT threshold);
60 #endif
61 
68 void MG_OSDerase( S_REGION rgn, OSDColor colour );
69 
74 void MG_OSDclear(void);
75 
86 void MG_OSDstartTextOutput( S_REGION *overlap, int boxX1, int boxY1, int boxWidth, int boxHeight,
87  OSDColor backColour, int psize);
88 
94 void OSDsetTextColour(OSDColor foreColour);
95 
103 void OSDdisplayChar(unsigned short c,
104  int x,
105  int y);
106 
112 void OSDendTextOutput(void);
113 
120 int OSDgetCharWidth(unsigned short c);
121 
122 
123 #endif /*_MG_API_H*/
int OSDgetCharWidth(unsigned short c)
Return the width of a character in font metrics units See UK MHEG5 profile 1.05 Section 5...
void OSDsetTextColour(OSDColor foreColour)
Set the foreground colour of text.
void MG_OSDdisplayDynamicLineart(void *data, S_REGION *overlap, int x, int y)
Display dynamic lineart.
Definition: mg_dla.c:1050
void MG_FreeData(void *data)
free surface buffer
Definition: mg_osd.c:1536
Definition: mh5visible.h:46
Definition: osdtypes.h:43
void MG_OSDclear(void)
Clear the screen, making it the specified colour.
Definition: mg_osd.c:888
void MG_OSDstartTextOutput(S_REGION *overlap, int boxX1, int boxY1, int boxWidth, int boxHeight, OSDColor backColour, int psize)
Start text output.
void OSDdisplayChar(unsigned short c, int x, int y)
Display the character.
Implement the MHEG5 Visible Class Defines the behaviour of Presentables that have a visual representa...
void MG_OSDdisplayVideo(S_REGION rgn)
Display video window.
Definition: mg_osd.c:729
void MG_OSDdisplayRectangle(S_REGION *overlap, int x, int y, int width, int height, int lineWidth, OSDColor lineColour, OSDColor fillColour)
Draw rectangle.
Definition: mg_osd.c:566
void MG_OSDerase(S_REGION rgn, OSDColor colour)
Erase an area of the OSD to the desktop colour.
Definition: mg_osd.c:808
void OSDendTextOutput(void)
End text output externals platform dependent.
Graphics functions required by the HD MHEG5 engine. All references to colour used in these functions ...