summaryrefslogtreecommitdiffstats
path: root/macosx/HBDockTile.h
blob: caac2844e22d1cce5410121f7834c899c620ddb9 (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
//
//  HBDockTile.h
//  HandBrake
//
//  Created by Damiano Galassi on 20/08/14.
//
//

#import <Cocoa/Cocoa.h>

@interface HBDockTile : NSObject

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithDockTile:(NSDockTile *)dockTile image:(NSImage *)image NS_DESIGNATED_INITIALIZER;

/**
 *  Updates two DockTextFields on the dockTile,
 *  one with total percentage, the other one with the ETA.
 *  The ETA string is formated by the callers *
 */
- (void)updateDockIcon:(double)progress withETA:(NSString *)etaStr;


/**
 *  Updates two DockTextFields on the dockTile,
 *  one with total percentage, the other one with the ETA.
 *
 *  ETA format is [XX]X:XX:XX when ETA is greater than one hour
 *  [X]X:XX when ETA is greater than 0 (minutes or seconds)
 *  When these conditions doesn't applied (eg. when ETA is undefined)
 *  we show just a tilde (~)
 */
- (void)updateDockIcon:(double)progress hours:(NSInteger)hours minutes:(NSInteger)minutes seconds:(NSInteger)seconds;

@end