summaryrefslogtreecommitdiffstats
path: root/macosx/HBSubtitles.h
blob: 1f4930bd7a910f43dbb0b86d10079be7d1e99e8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* $Id: HBSubtitles.h,v 1.35 2005/08/01 14:29:50 titer Exp $

   This file is part of the HandBrake source code.
   Homepage: <http://handbrake.fr/>.
   It may be used under the terms of the GNU General Public License. */

#import <Cocoa/Cocoa.h>
#include "hb.h"




@interface HBSubtitles : NSObject <NSTableViewDataSource, NSTableViewDelegate> {
hb_title_t                   *fTitle;

NSMutableArray               *subtitleArray; // contains the output subtitle track info
NSMutableArray               *subtitleSourceArray;// contains the source subtitle track info
NSString                     *foreignAudioSearchTrackName;
NSMutableArray               *languagesArray; // array of languages taken from lang.c
NSInteger                     languagesArrayDefIndex;
NSMutableArray               *charCodeArray; // array of character codes
int                           charCodeArrayDefIndex;
int                           container;

}

// Trigger a refresh of data
- (void)resetWithTitle:(hb_title_t *)title;

// Create new subtitle track
- (void)addSubtitleTrack;
- (NSDictionary *)createSubtitleTrack;
- (NSMutableArray*) getSubtitleArray;
// Add an srt file
- (void)createSubtitleSrtTrack:(NSURL *)fileURL;

- (void)containerChanged:(int) newContainer;

- (void)setNewSubtitles:(NSMutableArray*) newSubtitleArray;

// Table View Delegates
- (NSUInteger)numberOfRowsInTableView:(NSTableView *)aTableView;

- (id)tableView:(NSTableView *)aTableView
      objectValueForTableColumn:(NSTableColumn *)aTableColumn
      row:(NSInteger)rowIndex;
      
- (void)tableView:(NSTableView *)aTableView
        setObjectValue:(id)anObject
        forTableColumn:(NSTableColumn *)aTableColumn
        row:(NSInteger)rowIndex;

- (void)tableView:(NSTableView *)aTableView
        willDisplayCell:(id)aCell
        forTableColumn:(NSTableColumn *)aTableColumn
        row:(NSInteger)rowIndex;

@end