LiVES 2.4.6

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pangotext.h
Go to the documentation of this file.
1 // pangotext.h
2 // text handling code
3 // (c) A. Penkov 2010
4 // pieces of code taken and modified from scribbler.c
5 // released under the GNU GPL 3 or later
6 // see file COPYING or www.gnu.org for details
7
8 // (c) G. Finch 2002 - 2015
9
10 #ifndef LIVES_PANGOTEXT_H
11 #define LIVES_PANGOTEXT_H
12
13 typedef enum {
14 SUBTITLE_TYPE_NONE=0,
15 SUBTITLE_TYPE_SRT,
16 SUBTITLE_TYPE_SUB
17 } lives_subtitle_type_t;
18
19
20 // for future use
21 typedef struct {
22 lives_colRGB24_t fg;
23 lives_colRGB24_t bg;
24 } lives_subtitle_style_t;
25
26
27 typedef struct _lives_subtitle_t xlives_subtitle_t;
28
29 typedef struct _lives_subtitle_t {
30 double start_time;
31 double end_time;
32 lives_subtitle_style_t *style;
33 long textpos;
34 xlives_subtitle_t *prev;
35 xlives_subtitle_t *next;
36 } lives_subtitle_t;
37
38
39 typedef struct {
40 lives_subtitle_type_t type;
41 FILE *tfile;
42 char *text;
43 double last_time;
44 lives_subtitle_t *index;
45 lives_subtitle_t *current;
46 int offset;
47 } lives_subtitles_t;
48
49
50 typedef enum {
51 LIVES_TEXT_MODE_FOREGROUND_ONLY,
52 LIVES_TEXT_MODE_FOREGROUND_AND_BACKGROUND,
53 LIVES_TEXT_MODE_BACKGROUND_ONLY
54 } lives_text_mode_t;
55
56
57 char **get_font_list(void);
58
59 weed_plant_t *render_text_to_layer(weed_plant_t *layer, const char *text, const char *fontname,
60 double size, lives_text_mode_t mode, lives_colRGBA32_t *fg_col,
61 lives_colRGBA32_t *bg_col, boolean center, boolean rising, double top);
62
63 LingoLayout *render_text_to_cr(lives_painter_t *, const char *text, const char *fontname,
64 double size, lives_text_mode_t mode, lives_colRGBA32_t *fg_col, lives_colRGBA32_t *bg_col,
65 boolean center, boolean rising, double top, int start, int width, int height);
66
67 #endif
68
lives_text_mode_t
lives_text_mode_t
Definition: pangotext.h:50
xlives_subtitle_t
struct _lives_subtitle_t xlives_subtitle_t
Definition: pangotext.h:27
lives_colRGBA32_t
Definition: main.h:466
lives_subtitle_t::prev
xlives_subtitle_t * prev
for future use
Definition: pangotext.h:34
lives_subtitles_t::text
char * text
Definition: pangotext.h:42
lives_subtitles_t::index
lives_subtitle_t * index
Definition: pangotext.h:44
SUBTITLE_TYPE_NONE
Definition: pangotext.h:14
LIVES_TEXT_MODE_BACKGROUND_ONLY
Definition: pangotext.h:53
lives_subtitle_t::next
xlives_subtitle_t * next
Definition: pangotext.h:35
LIVES_TEXT_MODE_FOREGROUND_AND_BACKGROUND
Definition: pangotext.h:52
lives_subtitle_t::textpos
long textpos
Definition: pangotext.h:33
lives_subtitle_style_t::fg
lives_colRGB24_t fg
Definition: pangotext.h:22
lives_subtitles_t::tfile
FILE * tfile
Definition: pangotext.h:41
lives_subtitle_t::end_time
double end_time
Definition: pangotext.h:31
lives_subtitle_t::start_time
double start_time
Definition: pangotext.h:30
SUBTITLE_TYPE_SRT
Definition: pangotext.h:15
render_text_to_cr
LingoLayout * render_text_to_cr(lives_painter_t *cr, const char *text, const char *fontname, double size, lives_text_mode_t mode, lives_colRGBA32_t *fg, lives_colRGBA32_t *bg, boolean center, boolean rising, double top, int offs_x, int width, int height)
Definition: pangotext.c:138
lives_subtitle_style_t::bg
lives_colRGB24_t bg
Definition: pangotext.h:23
lives_subtitles_t
Definition: pangotext.h:39
lives_subtitle_style_t
Definition: pangotext.h:21
get_font_list
char ** get_font_list(void)
Definition: pangotext.c:82
LIVES_TEXT_MODE_FOREGROUND_ONLY
Definition: pangotext.h:51
render_text_to_layer
weed_plant_t * render_text_to_layer(weed_plant_t *layer, const char *text, const char *fontname, double size, lives_text_mode_t mode, lives_colRGBA32_t *fg_col, lives_colRGBA32_t *bg_col, boolean center, boolean rising, double top)
Definition: pangotext.c:231
lives_subtitles_t::current
lives_subtitle_t * current
pointer to current entry in index
Definition: pangotext.h:45
lives_colRGB24_t
Definition: main.h:460
lives_subtitles_t::offset
int offset
offset in frames (default 0)
Definition: pangotext.h:46
lives_subtitles_t::last_time
double last_time
Definition: pangotext.h:43
lives_subtitle_t
Definition: pangotext.h:29
lives_subtitles_t::type
lives_subtitle_type_t type
Definition: pangotext.h:40
lives_subtitle_t::style
lives_subtitle_style_t * style
for future use
Definition: pangotext.h:32
lives_subtitle_type_t
lives_subtitle_type_t
Definition: pangotext.h:13
SUBTITLE_TYPE_SUB
Definition: pangotext.h:16