OSDN Git Service

import 0.9.3
[handbrake-jp/handbrake-jp.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 #import <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        * fDeblockCheck;
41     IBOutlet NSTextField     * fDeblockField;
42     IBOutlet NSSlider        * fDeblockSlider;
43         IBOutlet NSPopUpButton   * fDenoisePopUp;
44         IBOutlet NSPopUpButton   * fAnamorphicPopUp;
45     IBOutlet NSButton        * fPrevButton;
46     IBOutlet NSButton        * fNextButton;
47     IBOutlet NSTextField     * fInfoField;
48         
49     int     MaxOutputWidth;
50     int     MaxOutputHeight;
51     BOOL    autoCrop;
52     BOOL    allowLooseAnamorphic;
53     int output_width, output_height, output_par_width, output_par_height;
54     int display_width;
55     /* used to track the previous state of the keep aspect
56     ratio checkbox when turning anamorphic on, so it can be
57     returned to the previous state when anamorphic is turned
58     off */
59     BOOL    keepAspectRatioPreviousState; 
60     
61     struct {
62         int     detelecine;
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 - (IBAction) deblockSliderChanged: (id) sender;
89 - (int) detelecine;
90 - (void) setDetelecine: (int) setting;
91 - (int) deinterlace;
92 - (void) setDeinterlace: (int) setting;
93 - (int) decomb;
94 - (void) setDecomb: (int) setting;
95 - (int) denoise;
96 - (void) setDenoise: (int) setting;
97 - (int) deblock;
98 - (void) setDeblock: (int) setting;
99
100 - (void)showPanelInWindow: (NSWindow *)fWindow forTitle: (hb_title_t *)title;
101
102 + (NSImage *) makeImageForPicture: (int)pictureIndex
103                 libhb:(hb_handle_t*)handle
104                 title:(hb_title_t*)title
105                 removeBorders:(BOOL)removeBorders;
106 - (NSImage *) imageForPicture: (int) pictureIndex;
107 - (void) purgeImageCache;
108 @end
109
110 @interface NSObject (PictureControllertDelegateMethod)
111 - (void)pictureSettingsDidChange;
112 @end