OSDN Git Service

MacGui: Picture window now uses a subclass of HBController to access the main controller.
[handbrake-jp/handbrake-jp-git.git] / macosx / Controller.h
index 91f6b32..e05b0af 100644 (file)
@@ -15,6 +15,7 @@
 #import "HBAdvancedController.h"
 #import "HBPreferencesController.h"
 #import "HBPresets.h"
+
 @class HBOutputPanelController;
 
 /* We subclass NSView so that our drags show both the icon as well as PresetName columns */
@@ -102,7 +103,7 @@ BOOL                        fIsDragging;
     IBOutlet NSButton            * fVidTurboPassCheck;
        
        /* Picture Settings box */
-       IBOutlet NSTextField         * fPicLabelSettings;
+    IBOutlet NSTextField         * fPicLabelSettings;
        IBOutlet NSTextField         * fPicLabelSrc;
     IBOutlet NSTextField         * fPicSettingsSrc;
        IBOutlet NSTextField         * fPicLabelOutp;
@@ -198,11 +199,15 @@ BOOL                        fIsDragging;
        ChapterTitles                * fChapterTitlesDelegate;
        
     /* Bottom */
-    IBOutlet NSButton            * fPictureButton;
     IBOutlet NSTextField         * fStatusField;
     IBOutlet NSProgressIndicator * fRipIndicator;
        BOOL                           fRipIndicatorShown;
     
+    /* Queue File variables */
+    NSString                     * QueueFile;
+       NSMutableArray               * QueueFileArray;
+    int                            currentQueueEncodeIndex; // Used to track the currently encoding queueu item
+    
        /* User Preset variables here */
        HBPresets                    * fPresetsBuiltin;
        IBOutlet NSDrawer            * fPresetDrawer;
@@ -210,6 +215,7 @@ BOOL                        fIsDragging;
        IBOutlet NSTextField         * fPresetNewDesc;
        IBOutlet NSPopUpButton       * fPresetNewPicSettingsPopUp;
     IBOutlet NSButton            * fPresetNewPicFiltersCheck;
+    IBOutlet NSButton            * fPresetNewFolderCheck;
        IBOutlet NSTextField         * fPresetSelectedDisplay;
        
        NSString                     * AppSupportDirectory;
@@ -219,8 +225,10 @@ BOOL                        fIsDragging;
        NSMutableDictionary          * chosenPreset;
     int                            curUserPresetChosenNum;
         
-       int                            presetHbDefault; // this is 1 in "Default" preset key
-       int                            presetUserDefault;// this is 2 in "Default" preset key
+       NSMutableDictionary          *presetHbDefault; // this is 1 in "Default" preset key
+       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
     IBOutlet NSPanel             * fAddPresetPanel;
        /* new NSOutline View for the presets */
@@ -231,13 +239,24 @@ BOOL                        fIsDragging;
     IBOutlet NSPopUpButton       * fPresetsActionButton;
 
     hb_handle_t                  * fHandle;
+    
+    hb_handle_t              * fQueueEncodeLibhb;           // libhb for HB Encoding
        hb_title_t                   * fTitle;
+    hb_title_t                   * fQueueEncodeTitle;
+    int                          fEncodingQueueItem;     // corresponds to the index of fJobGroups encoding item
+    int                          fPendingCount;         // Number of various kinds of job groups in fJobGroups.
+    int                          fCompletedCount;
+    int                          fCanceledCount;
+    int                          fWorkingCount;
+    
+    
     /* integer to set to determine the previous state
                of encode 0==idle, 1==encoding, 2==cancelled*/
     int                            fEncodeState;
        int                            currentScanCount;
        int                            currentSuccessfulScanCount;
     BOOL                           SuccessfulScan;
+    BOOL                           applyQueueToScan;
        NSString                      * currentSource;
     NSString                     * browsedSourceDisplayName;
 }
@@ -270,7 +289,7 @@ BOOL                        fIsDragging;
 - (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;
@@ -280,9 +299,24 @@ BOOL                        fIsDragging;
 - (IBAction) audioDRCSliderChanged: (id) sender;
 
 - (IBAction) showPicturePanel: (id) sender;
+- (void)pictureSettingsDidChange;
 - (IBAction) calculatePictureSizing: (id) sender;
 - (IBAction) openMainWindow: (id) sender;
 
+/* Queue File Stuff */
+- (void) loadQueueFile;
+- (NSDictionary *)createQueueFileItem;
+- (void)saveQueueFileItem;
+- (void) incrementQueueItemDone:(int) queueItemDoneIndexNum;
+- (void) performNewQueueScan:(NSString *) scanPath scanTitleNum: (int) scanTitleNum;
+- (void) processNewQueueEncode;
+- (void) clearQueueEncodedItems;
+- (IBAction)applyQueueSettings:(id)sender;
+- (void) removeQueueFileItem:(int) queueItemToRemove;
+- (void) clearQueueAllItems;
+- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex;
+- (void)getQueueStats;
+- (void)setQueueEncodingItemsAsPending;
 - (IBAction) addToQueue: (id) sender;
 - (void) overwriteAddToQueueAlertDone: (NSWindow *) sheet
                            returnCode: (int) returnCode contextInfo: (void *) contextInfo;
@@ -299,7 +333,7 @@ BOOL                        fIsDragging;
 
 - (IBAction) Cancel: (id) sender;
 - (void)     doCancelCurrentJob;
-
+- (void) doCancelCurrentJobAndStop;
 - (IBAction) Pause: (id) sender;
 
 - (IBAction) calculateBitrate: (id) sender;
@@ -358,7 +392,7 @@ BOOL                        fIsDragging;
 - (IBAction)showDebugOutputPanel:(id)sender;
 - (void)setupToolbar;
 
-
+- (void) prepareJobForPreview;
 - (void) remindUserOfSleepOrShutdown;
 
 - (void)moveObjectsInPresetsArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex;