source: trunk/Subtitles/SubParsing.h @ 658

Revision 658, 1.1 KB checked in by astrange, 7 years ago (diff)

Heavily rewrite the subtitle code, should be cleaner and faster and better-looking. Also it probably breaks everything.

Line 
1/*
2 *  SubParsing.h
3 *  SSARender2
4 *
5 *  Created by Alexander Strange on 7/25/07.
6 *  Copyright 2007 __MyCompanyName__. All rights reserved.
7 *
8 */
9
10#import <Cocoa/Cocoa.h>
11#import "SubContext.h"
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif
17
18@class SubSerializer, SubRenderer;
19
20@interface SubRenderDiv : NSObject {
21        @public;
22        NSMutableString *text;
23        SubStyle *styleLine;
24        unsigned marginL, marginR, marginV;
25        unsigned layer;
26        NSMutableArray *spans;
27       
28        int posX, posY;
29        UInt8 alignH, alignV, wrapStyle, render_complexity;
30        BOOL is_shape;
31}
32-(SubRenderDiv*)nextDivWithDelegate:(SubRenderer*)delegate;
33@end
34
35@interface SubRenderSpan : NSObject {
36        @public;
37        UniCharArrayOffset offset;
38        void *ex;
39        SubRenderer *delegate;
40}
41+(SubRenderSpan*)startingSpanForDiv:(SubRenderDiv*)div delegate:(SubRenderer*)delegate;
42-(SubRenderSpan*)cloneWithDelegate:(SubRenderer*)delegate;
43@end
44
45extern void SubParseSSAFile(const unichar *ssa, size_t len, NSDictionary **headers, NSArray **styles, NSArray **subs);
46extern NSArray *SubParsePacket(NSString *packet, SubContext *context, SubRenderer *delegate, unichar *linebuf);
47
48#ifdef __cplusplus
49}
50#endif
Note: See TracBrowser for help on using the repository browser.