OSDN Git Service

LinGui: make Help->Guide work on windows/mingw
[handbrake-jp/handbrake-jp-git.git] / macosx / Controller.h
index c9118c0..72b1c6d 100644 (file)
@@ -10,8 +10,8 @@
 #include "hb.h"
 
 #import "ChapterTitles.h"
+#import "HBSubtitles.h"
 #import "PictureController.h"
-#import "HBFilterController.h"
 #import "HBPreviewController.h"
 #import "HBQueueController.h"
 #import "HBAdvancedController.h"
@@ -19,7 +19,6 @@
 #import "HBPresets.h"
 
 @class HBOutputPanelController;
-@class PictureFilterController;
 
 /* We subclass NSView so that our drags show both the icon as well as PresetName columns */
 @interface HBPresetsOutlineView : NSOutlineView
@@ -32,6 +31,7 @@ BOOL                        fIsDragging;
 
 @interface HBController : NSObject <GrowlApplicationBridgeDelegate>
 {
+    NSImage                      * fApplicationIcon;
     IBOutlet NSWindow            * fWindow;
 
     /* Main Menu Outlets */
@@ -44,11 +44,11 @@ BOOL                        fIsDragging;
     IBOutlet NSTextField          * fScanSrcTitleNumField;
     IBOutlet NSButton             * fScanSrcTitleCancelButton;
     IBOutlet NSButton             * fScanSrcTitleOpenButton;
+
     
     /* Picture Settings */
     PictureController            * fPictureController;
-    /* Picture Filters */
-    PictureFilterController      * fPictureFilterController;
+    
     /* Picture Preview */
     PreviewController            * fPreviewController;
     
@@ -71,10 +71,27 @@ BOOL                        fIsDragging;
     IBOutlet NSTextField         * fSrcDVD2Field;
     IBOutlet NSTextField         * fSrcTitleField;
     IBOutlet NSPopUpButton       * fSrcTitlePopUp;
+    
+    
+    /* lib dvd nav specific */
+    IBOutlet NSTextField         * fSrcAngleLabel;
+    IBOutlet NSPopUpButton       * fSrcAnglePopUp;
+    
+    /* Source start and end points */
+    IBOutlet NSPopUpButton       * fEncodeStartStopPopUp;
+    /* pts based start / stop */
+    IBOutlet NSTextField         * fSrcTimeStartEncodingField;
+    IBOutlet NSTextField         * fSrcTimeEndEncodingField;
+    /* frame based based start / stop */
+    IBOutlet NSTextField         * fSrcFrameStartEncodingField;
+    IBOutlet NSTextField         * fSrcFrameEndEncodingField;
+    
     IBOutlet NSTextField         * fSrcChapterField;
     IBOutlet NSPopUpButton       * fSrcChapterStartPopUp;
     IBOutlet NSTextField         * fSrcChapterToField;
     IBOutlet NSPopUpButton       * fSrcChapterEndPopUp;
+    
+    /* Source duration information */
     IBOutlet NSTextField         * fSrcDuration1Field;
     IBOutlet NSTextField         * fSrcDuration2Field;
        
@@ -129,6 +146,12 @@ BOOL                        fIsDragging;
     IBOutlet NSTextField         * fSubField;
     IBOutlet NSPopUpButton       * fSubPopUp;
        IBOutlet NSButton            * fSubForcedCheck;
+    
+    
+    IBOutlet NSTableView         * fSubtitlesTable;
+       HBSubtitles                  * fSubtitlesDelegate;
+    IBOutlet NSButton            * fBrowseSrtFileButton;
+    
        
     /* Audio box */
     /* Track Labels */
@@ -187,6 +210,9 @@ BOOL                        fIsDragging;
     /* Chapters box */
     IBOutlet NSButton            * fCreateChapterMarkers;
     IBOutlet NSTableView         * fChapterTable;
+       IBOutlet NSButton            * fLoadChaptersButton;
+       IBOutlet NSButton            * fSaveChaptersButton;
+       IBOutlet NSTableColumn       * fChapterTableNameColumn;
        ChapterTitles                * fChapterTitlesDelegate;
        
     /* Bottom */
@@ -220,7 +246,7 @@ BOOL                        fIsDragging;
        NSMutableDictionary          *presetUserDefault;// this is 2 in "Default" preset key
     NSMutableDictionary          *presetUserDefaultParent;
     NSMutableDictionary          *presetUserDefaultParentParent;
-    int                        presetCurrentBuiltInCount; // keeps track of the current number of built in presets
+    int                           presetCurrentBuiltInCount; // keeps track of the current number of built in presets
     IBOutlet NSPanel             * fAddPresetPanel;
        
     /* NSOutline View for the presets */
@@ -242,6 +268,8 @@ BOOL                        fIsDragging;
     int                          fCanceledCount;
     int                          fWorkingCount;
     
+    int                          fqueueEditRescanItemNum; // queue array item to be reloaded into the main window
+    
     
     /* integer to set to determine the previous state
                of encode 0==idle, 1==encoding, 2==cancelled*/
@@ -252,9 +280,13 @@ BOOL                        fIsDragging;
     BOOL                           applyQueueToScan;
        NSString                      * currentSource;
     NSString                     * browsedSourceDisplayName;
+    
+    double                         dockIconProgress;
 }
 
-- (void) writeToActivityLog:(char *) format, ...;
+- (IBAction) showAboutPanel:(id)sender;
+
+- (void) writeToActivityLog:(const char *) format, ...;
 - (IBAction) browseSources: (id) sender;
 - (void) browseSourcesDone: (NSOpenPanel *) sheet
                 returnCode: (int) returnCode contextInfo: (void *) contextInfo;
@@ -263,11 +295,17 @@ BOOL                        fIsDragging;
 - (void) performScan:(NSString *) scanPath scanTitleNum: (int) scanTitleNum;
 - (IBAction) showNewScan: (id) sender;
 
+
+- (IBAction) cancelScanning:(id)sender;
+
 - (void)     updateUI: (NSTimer *) timer;
 - (void)     enableUI: (bool) enable;
-
+- (IBAction) encodeStartStopPopUpChanged: (id) sender;
 - (IBAction) titlePopUpChanged: (id) sender;
 - (IBAction) chapterPopUpChanged: (id) sender;
+- (IBAction) startEndSecValueChanged: (id) sender;
+- (IBAction) startEndFrameValueChanged: (id) sender;
+
 
 - (IBAction) formatPopUpChanged: (id) sender;
 - (IBAction) videoEncoderPopUpChanged: (id) sender;
@@ -282,22 +320,24 @@ BOOL                        fIsDragging;
 - (IBAction) audioTrackPopUpChanged: (id) sender;
 - (IBAction) audioTrackPopUpChanged: (id) sender mixdownToUse: (int) mixdownToUse;
 - (IBAction) audioTrackMixdownChanged: (id) sender;
-- (IBAction) subtitleSelectionChanged: (id) sender;
 - (void) prepareJob;
 - (IBAction) browseFile: (id) sender;
 - (void)     browseFileDone: (NSSavePanel *) sheet
                  returnCode: (int) returnCode contextInfo: (void *) contextInfo;
 
 - (IBAction) videoMatrixChanged: (id) sender;
+
 - (IBAction) qualitySliderChanged: (id) sender;
 - (void) setupQualitySlider;
 
 - (IBAction) audioDRCSliderChanged: (id) sender;
+- (IBAction) browseImportSrtFile: (id) sender;
+- (void) browseImportSrtFileDone: (NSSavePanel *) sheet
+                     returnCode: (int) returnCode contextInfo: (void *) contextInfo;
 
 - (IBAction) showPicturePanel: (id) sender;
 - (void) picturePanelFullScreen;
 - (void) picturePanelWindowed;
-- (IBAction) showFiltersPanel: (id) sender;
 - (IBAction) showPreviewWindow: (id) sender;
 - (void)pictureSettingsDidChange;
 - (IBAction) calculatePictureSizing: (id) sender;
@@ -311,10 +351,14 @@ BOOL                        fIsDragging;
 - (void) performNewQueueScan:(NSString *) scanPath scanTitleNum: (int) scanTitleNum;
 - (void) processNewQueueEncode;
 - (void) clearQueueEncodedItems;
-- (IBAction)applyQueueSettings:(id)sender;
+/* Queue Editing */
+- (IBAction)applyQueueSettingsToMainWindow:(id)sender;
+- (IBAction)rescanQueueItemToMainWindow:(NSString *) scanPath scanTitleNum: (int) scanTitleNum selectedQueueItem: (int) selectedQueueItem;
+
+
 - (void) removeQueueFileItem:(int) queueItemToRemove;
 - (void) clearQueueAllItems;
-- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex;
+- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(NSUInteger)insertIndex;
 - (void)getQueueStats;
 - (void)setQueueEncodingItemsAsPending;
 - (IBAction) addToQueue: (id) sender;
@@ -360,10 +404,19 @@ BOOL                        fIsDragging;
 - (void)outlineView:(NSOutlineView *)fPresetsOutlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
 /* We use this to provide tooltips for the items in the presets outline view */
 - (NSString *)outlineView:(NSOutlineView *)fPresetsOutlineView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tc item:(id)item mouseLocation:(NSPoint)mouseLocation;
-
+- (void) checkBuiltInsForUpdates;
 /* We use this to actually select the preset and act accordingly */
 - (IBAction)selectPreset:(id)sender;    
 
+/* Export / Import Presets */
+- (IBAction) browseExportPresetFile: (id) sender;
+- (void) browseExportPresetFileDone: (NSSavePanel *) sheet
+             returnCode: (int) returnCode contextInfo: (void *) contextInfo;
+             
+- (IBAction) browseImportPresetFile: (id) sender;
+- (void) browseImportPresetDone: (NSSavePanel *) sheet
+                   returnCode: (int) returnCode contextInfo: (void *) contextInfo;
+
 /* Manage User presets */    
 - (void) loadPresets;
 - (IBAction) customSettingUsed: (id) sender;
@@ -386,7 +439,7 @@ BOOL                        fIsDragging;
 - (IBAction)getDefaultPresets:(id)sender;
 
 -(void)sendToMetaX:(NSString *) filePath;
-    // Growl methods
+// Growl methods
 - (NSDictionary *) registrationDictionaryForGrowl;
 -(void)showGrowlDoneNotification:(NSString *) filePath;
 - (IBAction)showDebugOutputPanel:(id)sender;
@@ -395,6 +448,18 @@ BOOL                        fIsDragging;
 - (void) prepareJobForPreview;
 - (void) remindUserOfSleepOrShutdown;
 
-- (void)moveObjectsInPresetsArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex;
+- (void)moveObjectsInPresetsArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(NSUInteger)insertIndex;
+
+- (int) hbInstances;
+
+// Chapter files methods
+- (IBAction) browseForChapterFile: (id) sender;
+- (void)     browseForChapterFileDone: (NSOpenPanel *) sheet
+                 returnCode: (int) returnCode contextInfo: (void *) contextInfo;
+
+- (IBAction) browseForChapterFileSave: (id) sender;
+- (void)     browseForChapterFileSaveDone: (NSSavePanel *) sheet
+                 returnCode: (int) returnCode contextInfo: (void *) contextInfo;
+
 @end