VLC
3.0.21
|
Macros | |
#define | MERGE(var, fflag) |
#define | MERGE_SIZE(var) |
Functions | |
text_style_t * | text_style_New (void) |
Create a default text style. More... | |
text_style_t * | text_style_Create (int i_defaults) |
Create a text style. More... | |
text_style_t * | text_style_Copy (text_style_t *p_dst, const text_style_t *p_src) |
Copy a text style into another. More... | |
void | text_style_Merge (text_style_t *p_dst, const text_style_t *p_src, bool b_override) |
Merge two styles using non default values. More... | |
text_style_t * | text_style_Duplicate (const text_style_t *p_src) |
Duplicate a text style. More... | |
void | text_style_Delete (text_style_t *p_style) |
Delete a text style created by text_style_New or text_style_Duplicate. More... | |
text_segment_t * | text_segment_New (const char *psz_text) |
This function will create a new text segment. More... | |
text_segment_t * | text_segment_NewInheritStyle (const text_style_t *p_style) |
This function will create a new text segment and duplicates the style passed as argument. More... | |
void | text_segment_Delete (text_segment_t *segment) |
Delete a text segment and its content. More... | |
void | text_segment_ChainDelete (text_segment_t *segment) |
This function will destroy a list of text segments allocated by text_segment_New. More... | |
text_segment_t * | text_segment_Copy (text_segment_t *p_src) |
This function will copy a text_segment and its chain into a new one. More... | |
unsigned int | vlc_html_color (const char *psz_value, bool *ok) |
Returns an integer representation of an HTML color. More... | |
#define MERGE | ( | var, | |
fflag | |||
) |
#define MERGE_SIZE | ( | var | ) |
void text_segment_ChainDelete | ( | text_segment_t * | ) |
This function will destroy a list of text segments allocated by text_segment_New.
You may pass it NULL.
References text_segment_t::p_next, and text_segment_Delete().
Referenced by subpicture_region_Delete().
text_segment_t* text_segment_Copy | ( | text_segment_t * | ) |
This function will copy a text_segment and its chain into a new one.
You may give it NULL, but it will return NULL.
References text_segment_t::p_next, text_segment_t::psz_text, text_segment_t::style, text_segment_New(), text_style_Duplicate(), and unlikely.
Referenced by subpicture_region_Copy().
void text_segment_Delete | ( | text_segment_t * | ) |
Delete a text segment and its content.
This assumes the segment is not part of a chain
References text_segment_t::psz_text, text_segment_t::style, and text_style_Delete().
Referenced by text_segment_ChainDelete(), text_segment_NewInheritStyle(), and vout_OSDSegment().
text_segment_t* text_segment_New | ( | const char * | ) |
This function will create a new text segment.
You should use text_segment_ChainDelete to destroy it, to clean all the linked segments, or text_segment_Delete to free a specic one
This duplicates the string passed as argument
References text_segment_t::psz_text, and strdup().
Referenced by text_segment_Copy(), text_segment_NewInheritStyle(), and vout_OSDSegment().
text_segment_t* text_segment_NewInheritStyle | ( | const text_style_t * | p_style | ) |
This function will create a new text segment and duplicates the style passed as argument.
You should use text_segment_ChainDelete to destroy it, to clean all the linked segments, or text_segment_Delete to free a specic one
This doesn't initialize the text.
References text_segment_t::style, text_segment_Delete(), text_segment_New(), text_style_Duplicate(), and unlikely.
text_style_t* text_style_Copy | ( | text_style_t * | p_dst, |
const text_style_t * | p_src | ||
) |
Copy a text style into another.
References text_style_t::psz_fontname, text_style_t::psz_monofontname, and strdup().
Referenced by text_style_Duplicate().
text_style_t* text_style_Create | ( | int | ) |
Create a text style.
Set feature flags as argument if you want to set style defaults
References text_style_t::e_wrapinfo, text_style_t::f_font_relsize, text_style_t::i_background_alpha, text_style_t::i_background_color, text_style_t::i_features, text_style_t::i_font_alpha, text_style_t::i_font_color, text_style_t::i_font_size, text_style_t::i_karaoke_background_alpha, text_style_t::i_karaoke_background_color, text_style_t::i_outline_alpha, text_style_t::i_outline_color, text_style_t::i_outline_width, text_style_t::i_shadow_alpha, text_style_t::i_shadow_color, text_style_t::i_shadow_width, text_style_t::i_spacing, text_style_t::i_style_flags, text_style_t::psz_fontname, text_style_t::psz_monofontname, STYLE_ALPHA_OPAQUE, STYLE_DEFAULT_FONT_SIZE, STYLE_DEFAULT_REL_FONT_SIZE, STYLE_FULLY_SET, STYLE_NO_DEFAULTS, and STYLE_OUTLINE.
Referenced by text_style_New(), and vout_OSDSegment().
void text_style_Delete | ( | text_style_t * | p_style | ) |
Delete a text style created by text_style_New or text_style_Duplicate.
References text_style_t::psz_fontname, and text_style_t::psz_monofontname.
Referenced by text_segment_Delete().
text_style_t* text_style_Duplicate | ( | const text_style_t * | p_src | ) |
Duplicate a text style.
References text_style_Copy().
Referenced by text_segment_Copy(), and text_segment_NewInheritStyle().
void text_style_Merge | ( | text_style_t * | , |
const text_style_t * | , | ||
bool | b_override | ||
) |
Merge two styles using non default values.
Set b_override to true if you also want to overwrite non-defaults
References text_style_t::i_features, text_style_t::i_style_flags, MERGE, MERGE_SIZE, text_style_t::psz_fontname, text_style_t::psz_monofontname, strdup(), STYLE_HAS_BACKGROUND_ALPHA, STYLE_HAS_BACKGROUND_COLOR, STYLE_HAS_FONT_ALPHA, STYLE_HAS_FONT_COLOR, STYLE_HAS_K_BACKGROUND_ALPHA, STYLE_HAS_K_BACKGROUND_COLOR, STYLE_HAS_OUTLINE_ALPHA, STYLE_HAS_OUTLINE_COLOR, STYLE_HAS_SHADOW_ALPHA, STYLE_HAS_SHADOW_COLOR, STYLE_HAS_WRAP_INFO, and STYLE_NO_DEFAULTS.
text_style_t* text_style_New | ( | void | ) |
Create a default text style.
References STYLE_FULLY_SET, and text_style_Create().
unsigned int vlc_html_color | ( | const char * | psz_value, |
bool * | ok | ||
) |
Returns an integer representation of an HTML color.
psz_value | An HTML color, which can be either:
|
ok | If non-null, true will be stored in this pointer to signal a successful conversion |
References i_value, p_html_colors, psz_name, psz_value, and strcasecmp().