00001
00002
00003
00004
00005
00006
00007
00008 #ifndef LIVES_PANGOTEXT_H
00009 #define LIVES_PANGOTEXT_H
00010
00011 typedef enum {
00012 SUBTITLE_TYPE_NONE=0,
00013 SUBTITLE_TYPE_SRT,
00014 SUBTITLE_TYPE_SUB
00015 } lives_subtitle_type_t;
00016
00017
00018
00019 typedef struct {
00020 lives_colRGB24_t fg;
00021 lives_colRGB24_t bg;
00022 } lives_subtitle_style_t;
00023
00024
00025 typedef struct lives_subtitle_t _lives_subtitle_t;
00026
00027 typedef struct {
00028 double start_time;
00029 double end_time;
00030 lives_subtitle_style_t *style;
00031 long textpos;
00032 _lives_subtitle_t *prev;
00033 _lives_subtitle_t *next;
00034 } lives_subtitle_t;
00035
00036
00037 typedef struct {
00038 lives_subtitle_type_t type;
00039 FILE *tfile;
00040 char *text;
00041 double last_time;
00042 lives_subtitle_t *index;
00043 lives_subtitle_t *current;
00044 int offset;
00045 } lives_subtitles_t;
00046
00047
00048 typedef enum {
00049 LIVES_TEXT_MODE_FOREGROUND_ONLY,
00050 LIVES_TEXT_MODE_FOREGROUND_AND_BACKGROUND,
00051 LIVES_TEXT_MODE_BACKGROUND_ONLY
00052 } lives_text_mode_t;
00053
00054
00055 char **get_font_list(void);
00056
00057 gboolean render_text_to_layer(weed_plant_t *layer, const char *text, const char *fontname,\
00058 double size, lives_text_mode_t mode, lives_colRGBA32_t *fg_col, lives_colRGBA32_t *bg_col,\
00059 gboolean center, gboolean rising, double top);
00060
00061 #endif
00062