VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vlc_text_style.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vlc_text_style.h: text_style_t definition and helpers.
3  *****************************************************************************
4  * Copyright (C) 1999-2010 VLC authors and VideoLAN
5  * $Id: 531411ae607308ad632cd90c63bd70756ebb51df $
6  *
7  * Authors: Derk-Jan Hartman <hartman _AT_ videolan _DOT_ org>
8  * basOS G <noxelia 4t gmail , com>
9  *
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.
14  *
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.
19  *
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  *****************************************************************************/
24 
25 #ifndef VLC_TEXT_STYLE_H
26 #define VLC_TEXT_STYLE_H 1
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 /**
33  * Text style
34  *
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.
38  */
39 typedef struct
40 {
41  char * psz_fontname; /**< The name of the font */
42  int i_font_size; /**< The font size in pixels */
43  int i_font_color; /**< The color of the text 0xRRGGBB
44  (native endianness) */
45  int i_font_alpha; /**< The transparency of the text.
46  0x00 is fully opaque,
47  0xFF fully transparent */
48  int i_style_flags; /**< Formatting style flags */
49  int i_outline_color; /**< The color of the outline 0xRRGGBB */
50  int i_outline_alpha; /**< The transparency of the outline.
51  0x00 is fully opaque,
52  0xFF fully transparent */
53  int i_shadow_color; /**< The color of the shadow 0xRRGGBB */
54  int i_shadow_alpha; /**< The transparency of the shadow.
55  0x00 is fully opaque,
56  0xFF fully transparent */
57  int i_background_color;/**< The color of the background 0xRRGGBB */
58  int i_background_alpha;/**< The transparency of the background.
59  0x00 is fully opaque,
60  0xFF fully transparent */
61  int i_karaoke_background_color;/**< Background color for karaoke 0xRRGGBB */
62  int i_karaoke_background_alpha;/**< The transparency of the karaoke bg.
63  0x00 is fully opaque,
64  0xFF fully transparent */
65  int i_outline_width; /**< The width of the outline in pixels */
66  int i_shadow_width; /**< The width of the shadow in pixels */
67  int i_spacing; /**< The spaceing between glyphs in pixels */
69 
70 /* Style flags for \ref text_style_t */
71 #define STYLE_BOLD 1
72 #define STYLE_ITALIC 2
73 #define STYLE_OUTLINE 4
74 #define STYLE_SHADOW 8
75 #define STYLE_BACKGROUND 16
76 #define STYLE_UNDERLINE 32
77 #define STYLE_STRIKEOUT 64
78 
79 /**
80  * Create a default text style
81  */
83 
84 /**
85  * Copy a text style into another
86  */
88 
89 /**
90  * Duplicate a text style
91  */
93 
94 /**
95  * Delete a text style created by text_style_New or text_style_Duplicate
96  */
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif /* VLC_TEXT_STYLE_H */
104