OSDN Git Service

MacGui: Use nil instead of NULL. Patch by blindjimmy. http://handbrake.djgraphite...
[handbrake-jp/handbrake-jp-git.git] / macosx / PictureController.h
1 /* $Id: PictureController.h,v 1.6 2005/04/14 20:40:05 titer Exp $
2
3    This file is part of the HandBrake source code.
4    Homepage: <http://handbrake.fr/>.
5    It may be used under the terms of the GNU General Public License. */
6
7 #include <Cocoa/Cocoa.h>
8
9 #include "hb.h"
10
11 #define HB_NUM_HBLIB_PICTURES      10   // hbilb generates 10 preview pictures
12
13 @interface PictureController : NSWindowController
14 {
15     hb_handle_t              * fHandle;
16     hb_title_t               * fTitle;
17
18     NSMutableDictionary      * fPicturePreviews;        // NSImages, one for each preview libhb creates, created lazily
19     int                        fPicture;
20
21     IBOutlet NSImageView     * fPictureView;
22     IBOutlet NSBox           * fPictureViewArea;
23     IBOutlet NSTextField     * fWidthField;
24     IBOutlet NSStepper       * fWidthStepper;
25     IBOutlet NSTextField     * fHeightField;
26     IBOutlet NSStepper       * fHeightStepper;
27     IBOutlet NSButton        * fRatioCheck;
28     IBOutlet NSMatrix        * fCropMatrix;
29     IBOutlet NSTextField     * fCropTopField;
30     IBOutlet NSStepper       * fCropTopStepper;
31     IBOutlet NSTextField     * fCropBottomField;
32     IBOutlet NSStepper       * fCropBottomStepper;
33     IBOutlet NSTextField     * fCropLeftField;
34     IBOutlet NSStepper       * fCropLeftStepper;
35     IBOutlet NSTextField     * fCropRightField;
36     IBOutlet NSStepper       * fCropRightStepper;
37     IBOutlet NSPopUpButton   * fDeinterlacePopUp;
38     IBOutlet NSPopUpButton   * fDecombPopUp;
39         IBOutlet NSButton        * fDetelecineCheck;
40     IBOutlet NSButton        * fVFRCheck;
41     IBOutlet NSButton        * fDeblockCheck;
42         IBOutlet NSPopUpButton   * fDenoisePopUp;
43         IBOutlet NSPopUpButton   * fAnamorphicPopUp;
44     IBOutlet NSButton        * fPrevButton;
45     IBOutlet NSButton        * fNextButton;
46     IBOutlet NSTextField     * fInfoField;
47         
48     int     MaxOutputWidth;
49     int     MaxOutputHeight;
50     BOOL    autoCrop;
51     BOOL    allowLooseAnamorphic;
52     int output_width, output_height, output_par_width, output_par_height;
53     int display_width;
54     /* used to track the previous state of the keep aspect
55     ratio checkbox when turning anamorphic on, so it can be
56     returned to the previous state when anamorphic is turned
57     off */
58     BOOL    keepAspectRatioPreviousState; 
59     
60     struct {
61         int     detelecine;
62         int     vfr;
63         int     deinterlace;
64         int     decomb;
65         int     denoise;
66         int     deblock;
67     } fPictureFilterSettings;
68
69     id delegate;
70 }
71 - (id)initWithDelegate:(id)del;
72
73 - (void) SetHandle: (hb_handle_t *) handle;
74 - (void) SetTitle:  (hb_title_t *)  title;
75 - (void) setInitialPictureFilters;
76 - (void) displayPreview;
77
78 - (IBAction) SettingsChanged: (id) sender;
79 - (IBAction) PreviousPicture: (id) sender;
80 - (IBAction) NextPicture: (id) sender;
81 - (IBAction) ClosePanel: (id) sender;
82
83 - (BOOL) autoCrop;
84 - (void) setAutoCrop: (BOOL) setting;
85
86 - (BOOL) allowLooseAnamorphic;
87 - (void) setAllowLooseAnamorphic: (BOOL) setting;
88
89 - (int) detelecine;
90 - (void) setDetelecine: (int) setting;
91 - (int) vfr;
92 - (void) setVFR: (int) setting;
93 - (int) deinterlace;
94 - (void) setDeinterlace: (int) setting;
95 - (int) decomb;
96 - (void) setDecomb: (int) setting;
97 - (int) denoise;
98 - (void) setDenoise: (int) setting;
99 - (int) deblock;
100 - (void) setDeblock: (int) setting;
101
102 - (void)showPanelInWindow: (NSWindow *)fWindow forTitle: (hb_title_t *)title;
103
104 + (NSImage *) makeImageForPicture: (int)pictureIndex
105                 libhb:(hb_handle_t*)handle
106                 title:(hb_title_t*)title
107                 removeBorders:(BOOL)removeBorders;
108 - (NSImage *) imageForPicture: (int) pictureIndex;
109 - (void) purgeImageCache;
110 @end
111
112 @interface NSObject (PictureControllertDelegateMethod)
113 - (void)pictureSettingsDidChange;
114 @end