From c3ace011c01dfd0817622171613de5c014f61d44 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Fri, 17 Jul 2009 14:39:20 +0200 Subject: Improve API headers and documentation Improve APi documentation; each function is properly documented now. Add a new macro LIBASS_VERSION that encodes the version in a hexadecimal format, similar to OpenSSL. Fix formatting of the headers. --- libass/ass_types.h | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'libass/ass_types.h') diff --git a/libass/ass_types.h b/libass/ass_types.h index cdea14ef..fb74872e 100644 --- a/libass/ass_types.h +++ b/libass/ass_types.h @@ -30,7 +30,7 @@ #define HALIGN_CENTER 2 #define HALIGN_RIGHT 3 -/// ass Style: line +/* ASS Style: line */ typedef struct ass_style_s { char *Name; char *FontName; @@ -54,15 +54,16 @@ typedef struct ass_style_s { int MarginL; int MarginR; int MarginV; -// int AlphaLevel; int Encoding; int treat_fontname_as_pattern; } ass_style_t; typedef struct render_priv_s render_priv_t; -/// ass_event_t corresponds to a single Dialogue line -/// Text is stored as-is, style overrides will be parsed later +/* + * ass_event_t corresponds to a single Dialogue line; + * text is stored as-is, style overrides will be parsed later. + */ typedef struct ass_event_s { long long Start; // ms long long Duration; // ms @@ -81,26 +82,31 @@ typedef struct ass_event_s { } ass_event_t; typedef struct parser_priv_s parser_priv_t; - typedef struct ass_library_s ass_library_t; -/// ass track represent either an external script or a matroska subtitle stream (no real difference between them) -/// it can be used in rendering after the headers are parsed (i.e. events format line read) +/* + * ass track represent either an external script or a matroska subtitle stream + * (no real difference between them); it can be used in rendering after the + * headers are parsed (i.e. events format line read). + */ typedef struct ass_track_s { - int n_styles; // amount used - int max_styles; // amount allocated + int n_styles; // amount used + int max_styles; // amount allocated int n_events; int max_events; - ass_style_t *styles; // array of styles, max_styles length, n_styles used - ass_event_t *events; // the same as styles + ass_style_t *styles; // array of styles, max_styles length, n_styles used + ass_event_t *events; // the same as styles - char *style_format; // style format line (everything after "Format: ") - char *event_format; // event format line + char *style_format; // style format line (everything after "Format: ") + char *event_format; // event format line - enum { TRACK_TYPE_UNKNOWN = - 0, TRACK_TYPE_ASS, TRACK_TYPE_SSA } track_type; + enum { + TRACK_TYPE_UNKNOWN = 0, + TRACK_TYPE_ASS, + TRACK_TYPE_SSA + } track_type; - // script header fields + // Script header fields int PlayResX; int PlayResY; double Timer; @@ -108,11 +114,11 @@ typedef struct ass_track_s { char ScaledBorderAndShadow; - int default_style; // index of default style - char *name; // file name in case of external subs, 0 for streams + int default_style; // index of default style + char *name; // file name in case of external subs, 0 for streams ass_library_t *library; parser_priv_t *parser_priv; } ass_track_t; -#endif /* LIBASS_TYPES_H */ +#endif /* LIBASS_TYPES_H */ -- cgit v1.2.3