audiobargraph_v: use NULL
[vlc/gmpfix.git] / include / vlc_text_style.h
blob51677243e472c3e7712f1a0b168a647433f7470b
1 /*****************************************************************************
2 * vlc_text_style.h: text_style_t definition and helpers.
3 *****************************************************************************
4 * Copyright (C) 1999-2010 VLC authors and VideoLAN
5 * $Id$
7 * Authors: Derk-Jan Hartman <hartman _AT_ videolan _DOT_ org>
8 * basOS G <noxelia 4t gmail , com>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef VLC_TEXT_STYLE_H
26 #define VLC_TEXT_STYLE_H 1
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 /**
33 * Text style
35 * A text style is used to specify the formatting of text.
36 * A font renderer can use the supplied information to render the
37 * text specified.
39 typedef struct
41 char * psz_fontname; /**< The name of the font */
42 char * psz_monofontname; /**< The name of the mono font */
43 int i_font_size; /**< The font size in pixels */
44 int i_font_color; /**< The color of the text 0xRRGGBB
45 (native endianness) */
46 unsigned i_font_alpha; /**< The transparency of the text.
47 0x00 is fully opaque,
48 0xFF fully transparent */
49 int i_style_flags; /**< Formatting style flags */
50 int i_outline_color; /**< The color of the outline 0xRRGGBB */
51 int i_outline_alpha; /**< The transparency of the outline.
52 0x00 is fully opaque,
53 0xFF fully transparent */
54 int i_shadow_color; /**< The color of the shadow 0xRRGGBB */
55 int i_shadow_alpha; /**< The transparency of the shadow.
56 0x00 is fully opaque,
57 0xFF fully transparent */
58 int i_background_color;/**< The color of the background 0xRRGGBB */
59 int i_background_alpha;/**< The transparency of the background.
60 0x00 is fully opaque,
61 0xFF fully transparent */
62 int i_karaoke_background_color;/**< Background color for karaoke 0xRRGGBB */
63 int i_karaoke_background_alpha;/**< The transparency of the karaoke bg.
64 0x00 is fully opaque,
65 0xFF fully transparent */
66 int i_outline_width; /**< The width of the outline in pixels */
67 int i_shadow_width; /**< The width of the shadow in pixels */
68 int i_spacing; /**< The spaceing between glyphs in pixels */
69 } text_style_t;
71 /* Style flags for \ref text_style_t */
72 #define STYLE_BOLD 1
73 #define STYLE_ITALIC 2
74 #define STYLE_OUTLINE 4
75 #define STYLE_SHADOW 8
76 #define STYLE_BACKGROUND 16
77 #define STYLE_UNDERLINE 32
78 #define STYLE_STRIKEOUT 64
80 #define STYLE_DEFAULT_FONT_SIZE 22
82 /**
83 * Create a default text style
85 VLC_API text_style_t * text_style_New( void );
87 /**
88 * Copy a text style into another
90 VLC_API text_style_t * text_style_Copy( text_style_t *, const text_style_t * );
92 /**
93 * Duplicate a text style
95 VLC_API text_style_t * text_style_Duplicate( const text_style_t * );
97 /**
98 * Delete a text style created by text_style_New or text_style_Duplicate
100 VLC_API void text_style_Delete( text_style_t * );
102 #ifdef __cplusplus
104 #endif
106 #endif /* VLC_TEXT_STYLE_H */