42 #define FONT_ATTRIBUTES_DEFAULT_SIZE (24) 43 #define FONT_ATTRIBUTES_DEFAULT_LINESPACE (28) 44 #define FONT_ATTRIBUTES_DEFAULT_LETTERSPACE (0) 47 #define MINIMUM_BOX_DIMENSION 8 50 #define DEFAULT_LINK_COLOUR (RGBT(0x00, 0x00, 0xff, 0x00)) 51 #define DEFAULT_ACTIVE_LINK_COLOUR (RGBT(0xff, 0x00, 0x00, 0x00)) 52 #define DEFAULT_VISITED_LINK_COLOUR (RGBT(0x3f, 0x1f, 0x7f, 0x00)) 55 #define OBSCURED_INPUT_CHAR ('*') 72 static int parseInt(
MHEG5String *
string,
int *offset)
79 localOffset = *offset;
85 if (string->
data[localOffset] ==
'-')
93 else if (string->
data[localOffset] ==
'+')
101 while ((localOffset < string->
len) && (string->
data[localOffset] <=
'9') &&
102 (string->
data[localOffset] >=
'0'))
105 value = value * 10 + (int) (string->
data[localOffset]) - (int)
'0';
112 *offset = localOffset;
164 U8BIT font_size, font_style;
193 if (pBox->
width > 720)
252 font_index = ((
MHEG5Font *)f_obj)->mg_fnt_index;
270 font_index = ((
MHEG5Font *)f_obj)->mg_fnt_index;
311 TRACE(TTEXT, (
"Short FA=(0x%x,0x%x,0x%x,0x%x,0x%x)",
314 if (fa.
data[0] & 0x10)
327 retSize = fa.
data[1];
328 retLinespace = fa.
data[2];
329 retLetterspace = fa.
data[3] * 256 + fa.
data[4];
330 if (retLetterspace > 0x7FFF)
333 retLetterspace -= 0x10000;
349 while ((i < fa.
len) && (fa.
data[i] !=
'.'))
355 TRACE(TERROR, (
"Unexpected end of font attributes %.*s", (
int)fa.
len, fa.
data))
362 retSize = parseInt(&fa, &i);
363 if ((i >= fa.
len) || (fa.
data[i] !=
'.'))
365 TRACE(TERROR, (
"Unexpected end of font attributes or missing dot %.*s", (
int)fa.
len, fa.
data))
373 retLinespace = parseInt(&fa, &i);
374 if ((i >= fa.
len) || (fa.
data[i] !=
'.'))
376 TRACE(TERROR, (
"Unexpected end of font attributes or missing dot %.*s", (
int)fa.
len, fa.
data))
385 retLetterspace = parseInt(&fa, &i);
388 TRACE(TERROR, (
"Expected end of font attributes %.*s", (
int)fa.
len, fa.
data))
429 else if (retSize < 31)
433 else if (retSize < 36)
456 if (retLetterspace >= 32767)
460 else if (retLetterspace <= -32767)
470 if (retLinespace >= 255)
474 else if (retLinespace <= 0)
491 if (getBoxAndAttribs( txt, &box, &attrib, &str ))
493 if ((str.
len > 0) && (str.
data))
508 if (getBoxAndAttribs((
MHEG5Text *)entry, &box, &attrib, &str ))
553 assert( str.
len <= 255 );
556 for (i = 0; i != str.
len; i++)
564 o_str[i] = str.
data[i];
585 if (getBoxAndAttribs((
MHEG5Text *)hypertxt, &box, &attrib, &str ))
587 if ((str.
len > 0) && (str.
data))
590 attrib.
p_ha = &hyp_atb;
MHEG5Interactible interactible
MHEG5String fontAttributes
void MG_OSDdisplayImage(void *data, S_REGION *overlap, int x, int y)
void MHEG5drawEntry(MHEG5Entryfield *entry, entryfieldCursor_t cursor)
#define FONT_ATTRIBUTES_DEFAULT_LINESPACE
#define DEFAULT_VISITED_LINK_COLOUR
MHEG5Bool MHEG5stringEqual(MHEG5String *s1, MHEG5String *s2)
Compare two Strings (case sensitive!)
MHEG5Int verticalJustification
MHEG5Bool MH5_SupportHDGraphics(void)
Returns whether supporting HD Graphics extension.
MHEG5Int horizontalJustification
#define JUSTIFY_H_JUSTIFIED
MHEG5Root * MHEG5findObject(MH5GroupRef gid, MHEG5Int id)
H_FontSize MG_AllocateFont(S16BIT fnt_index, U8BIT fnt_size, U8BIT fnt_style)
Allocate font of particular size from font file.
MHEG5Bool characterSetEncoded
MHEG5Bool highlightStatus
void MG_FreeData(void *data)
free surface buffer
#define DEFAULT_LINK_COLOUR
OSDColor MHEG5displayColour(MHEG5Colour *colour)
Convert Generic Colour value to OSD specific value. If the generic colour is encoded as a string it i...
#define ENTRY_INSERT_CHAR
MHEG5String fontAttributes
MHEG5Colour backgroundColour
MHEG5Colour backgroundColour
void MHEG5drawText(MHEG5Text *txt)
Implement the MHEG5 Font Class Font Class Defines a class to represent a character font used for rend...
void MHEG5drawHypertext(MHEG5Hypertext *hypertxt)
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
#define FONT_STYLE_SQUARE
union sMHEG5FontBody::@7 ref
#define FONT_ATTRIBUTES_DEFAULT_LETTERSPACE
#define FONT_ATTRIBUTES_DEFAULT_SIZE
void MH5_DisplayText(MHEG5Text *txt, S_REGION *overlap)
#define OBSCURED_INPUT_CHAR
MHEG5Bool interactionStatus
MHEG5Bool anchorWrappingFlag
#define MHEG5strncmp(a, b, n)
Implement functions to retrieve MHEG5objects by GroupID and ID.
Implementation of the MHEG5 Application Class Defines a set of Ingredient objects, which are shared within an application scope. Base class: Group Subclasses: None Status: Concrete class.
Mheg5 logging and debug printing.
void MG_OSDdisplayRectangle(S_REGION *overlap, int x, int y, int width, int height, int lineWidth, OSDColor lineColour, OSDColor fillColour)
Draw rectangle.
MHEG class interface to graphics text render.
void MH5_DisplayEntry(MHEG5Entryfield *entry, S_REGION *overlap)
#define ENTRY_OVERWRITE_CHAR
MHEG5Ingredient ingredient
MHEG5Int lastFocusPosition
void * MG_DrawText(const TextString unistr, pDrawTextAttrib attrib, const VRect txt_box)
Create Surface and draw text string on it and terminate freetype library.
#define MINIMUM_BOX_DIMENSION
void MHEG5sendEvent(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the asynchronous event queue.
MHEG5Bool MH5_SupportInteractionChannel(void)
Return whether Interaction channel is supported by current profile.
Definition of colour type for MHEG5 - settings and conversions.
#define INVALID_MG_FNT_INDEX
Implement generic MHEG5-display functions - independent from the OSD These are generic functions used...
MHEG5Interactible interactible
Interface to the MHEG text render that uses Freetype font library.
MHEG5Colour highlightRefColour
Engine support utility functions for MHEG5.
#define DEFAULT_ACTIVE_LINK_COLOUR
MHEG5Application * MHEG5getCurrentApplication(void)
<Function description>="">
union _DrawTextAttrib::@14 font