summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.h
blob: 400246af858bf83e04995d8f710654b7341ccbe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/* $Id: Controller.h,v 1.14 2004/02/13 13:45:51 titer Exp $

   This file is part of the HandBrake source code.
   Homepage: <http://handbrake.m0k.org/>.
   It may be used under the terms of the GNU General Public License. */

#include <Cocoa/Cocoa.h>

#include "HandBrake.h"
#include "PictureGLView.h"
#include "TargetSizeField.h"

@interface HBController : NSObject

{
    IBOutlet NSWindow            * fWindow;

    /* Scan view */
    IBOutlet NSView              * fScView;
    IBOutlet NSTextField         * fScWelcomeField;
    IBOutlet NSTextField         * fScSelectField;
    IBOutlet NSMatrix            * fScMatrix;
    IBOutlet NSButtonCell        * fScDetectedCell;
    IBOutlet NSPopUpButton       * fScDetectedPopUp;
    IBOutlet NSButtonCell        * fScFolderCell;
    IBOutlet NSTextField         * fScFolderField;
    IBOutlet NSButton            * fScBrowseButton;
    IBOutlet NSTextField         * fScStatusField;
    IBOutlet NSProgressIndicator * fScProgress;
    IBOutlet NSButton            * fScOpenButton;

    IBOutlet NSView              * fTempView;

    /* Rip view */
    IBOutlet NSView              * fRipView;

    /* General box */
    IBOutlet NSTextField         * fRipGeneralField;
    IBOutlet NSTextField         * fRipTitleField;
    IBOutlet NSPopUpButton       * fRipTitlePopUp;
    IBOutlet NSTextField         * fRipFormatField;
    IBOutlet NSPopUpButton       * fRipFormatPopUp;
    IBOutlet NSTextField         * fRipFileField1;
    IBOutlet NSTextField         * fRipFileField2;
    IBOutlet NSButton            * fRipBrowseButton;

    /* Video box */
    IBOutlet NSTextField         * fRipVideoField;
    IBOutlet NSTextField         * fRipEncoderField;
    IBOutlet NSPopUpButton       * fRipEncoderPopUp;
    IBOutlet NSTextField         * fRipBitrateField;
    IBOutlet NSMatrix            * fRipVideoMatrix;
    IBOutlet NSButtonCell        * fRipCustomCell;
    IBOutlet NSTextField         * fRipCustomField;
    IBOutlet NSButtonCell        * fRipTargetCell;
    IBOutlet HBTargetSizeField   * fRipTargetField;
    IBOutlet NSButton            * fRipTwoPassCheck;
    IBOutlet NSButton            * fRipCropButton;

    /* Audio box */
    IBOutlet NSTextField         * fRipAudioField;
    IBOutlet NSTextField         * fRipLang1Field;
    IBOutlet NSPopUpButton       * fRipLang1PopUp;
    IBOutlet NSTextField         * fRipLang2Field;
    IBOutlet NSPopUpButton       * fRipLang2PopUp;
    IBOutlet NSTextField         * fRipAudBitField;
    IBOutlet NSPopUpButton       * fRipAudBitPopUp;

    /* Bottom */
    IBOutlet NSTextField         * fRipStatusField;
    IBOutlet NSTextField         * fRipInfoField;
    IBOutlet NSProgressIndicator * fRipProgress;
    IBOutlet NSButton            * fRipPauseButton;
    IBOutlet NSButton            * fRipRipButton;

    /* "Done" alert panel */
    IBOutlet NSPanel             * fDonePanel;

    /* Crop & scale panel */
    IBOutlet NSPanel             * fPicturePanel;
    IBOutlet HBPictureGLView     * fPictureGLView;
    IBOutlet NSTextField         * fWidthField1;
    IBOutlet NSTextField         * fWidthField2;
    IBOutlet NSStepper           * fWidthStepper;
    IBOutlet NSButton            * fDeinterlaceCheck;
    IBOutlet NSTextField         * fTopField1;
    IBOutlet NSTextField         * fTopField2;
    IBOutlet NSStepper           * fTopStepper;
    IBOutlet NSTextField         * fBottomField1;
    IBOutlet NSTextField         * fBottomField2;
    IBOutlet NSStepper           * fBottomStepper;
    IBOutlet NSTextField         * fLeftField1;
    IBOutlet NSTextField         * fLeftField2;
    IBOutlet NSStepper           * fLeftStepper;
    IBOutlet NSTextField         * fRightField1;
    IBOutlet NSTextField         * fRightField2;
    IBOutlet NSStepper           * fRightStepper;
    IBOutlet NSButton            * fPreviousButton;
    IBOutlet NSButton            * fNextButton;
    IBOutlet NSButton            * fAutocropButton;
    IBOutlet NSButton            * fOpenGLCheck;
    IBOutlet NSTextField         * fInfoField;
    IBOutlet NSButton            * fCloseButton;
    int                            fPicture;

    HBHandle                     * fHandle;
    int                            fTitle;
    int                            fTitleCount;
    HBList                       * fTitleList;
    float                          fPosition;
    int                            fPass;
    int                            fPassCount;
    float                          fCurFrameRate;
    float                          fAvgFrameRate;
    int                            fRemainingTime;
    int                            fResult;
}

- (IBAction) ScanMatrixChanged: (id) sender;
- (IBAction) BrowseDVD: (id) sender;
- (void)     BrowseDVDDone: (NSOpenPanel *) sheet
    returnCode: (int) returnCode contextInfo: (void *) contextInfo;
- (IBAction) Scan: (id) sender;

- (IBAction) TitlePopUpChanged: (id) sender;
- (IBAction) FormatPopUpChanged: (id) sender;
- (IBAction) VideoMatrixChanged: (id) sender;
- (IBAction) AudioPopUpChanged: (id) sender;
- (IBAction) BrowseFile: (id) sender;
- (void)     BrowseFileDone: (NSSavePanel *) sheet
    returnCode: (int) returnCode contextInfo: (void *) contextInfo;
- (IBAction) ShowPicturePanel: (id) sender;
- (IBAction) ClosePanel: (id) sender;
- (IBAction) Rip: (id) sender;
- (void)     OverwriteAlertDone: (NSWindow *) sheet
    returnCode: (int) returnCode contextInfo: (void *) contextInfo;
- (void)     _Rip;
- (IBAction) Cancel: (id) sender;
- (void)     _Cancel: (NSWindow *) sheet returnCode: (int) returnCode
    contextInfo: (void *) contextInfo;
- (IBAction) Pause: (id) sender;
- (IBAction) Resume: (id) sender;

- (IBAction) PreviousPicture: (id) sender;
- (IBAction) NextPicture: (id) sender;
- (IBAction) UpdatePicture: (id) sender;
- (IBAction) AutoCrop: (id) sender;

- (void)     DetectDrives: (NSNotification *) notification;

/* libhb callbacks */
- (void) Scanning: (id) sender;
- (void) ScanDone: (id) sender;
- (void) Encoding: (id) sender;
- (void) RipDone:  (id) sender;

@end