summaryrefslogtreecommitdiffstats
path: root/macosx/HBStateFormatter.h
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-04-30 16:04:37 +0000
committerritsuka <[email protected]>2015-04-30 16:04:37 +0000
commit96bf5cafd9e7891d2ad5741543e6e1e76ae52f77 (patch)
tree36e14374381e55963fd603bc32c2079fea9d6170 /macosx/HBStateFormatter.h
parent1c59ab0f6e1a92c0f79629658302936796c6f7ed (diff)
MacGui: add a new formatter to convert a hb_state_t to a textual representation.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7134 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBStateFormatter.h')
-rw-r--r--macosx/HBStateFormatter.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/macosx/HBStateFormatter.h b/macosx/HBStateFormatter.h
new file mode 100644
index 000000000..f5b97f2fb
--- /dev/null
+++ b/macosx/HBStateFormatter.h
@@ -0,0 +1,41 @@
+/* HBStateFormatter.h
+
+ 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 <Foundation/Foundation.h>
+#include "hb.h"
+
+/**
+ * Instances of HBStateFormatter format and conver a hb_state_t struct to a textual representation.
+ */
+@interface HBStateFormatter : NSObject
+
+/**
+ * Returns a string containing the formatted value of the provided hb_state_t struct.
+ *
+ * @param s hb_state_t
+ * @param title the title of the current job
+ */
+- (NSString *)stateToString:(hb_state_t)s title:(NSString *)title;
+
+/**
+ * Returns a CGFloat containing the completion percent.
+ * the CGFloat range is [0,1]
+ *
+ * @param s hb_state_t
+ */
+- (CGFloat)stateToPercentComplete:(hb_state_t)s;
+
+/**
+ * Break the output string in two lines.
+ */
+@property (nonatomic, readwrite) BOOL twoLines;
+
+/**
+ * Shows the pass number in the output string
+ */
+@property (nonatomic, readwrite) BOOL showPassNumber;
+
+@end