]> git.sesse.net Git - vlc/blob - modules/gui/macosx/VideoEffects.h
macosx: video effects panel: synchronize text field and stepper values properly by...
[vlc] / modules / gui / macosx / VideoEffects.h
1 /*****************************************************************************
2  * VideoEffects.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2011-2012 Felix Paul Kühne
5  * $Id$
6  *
7  * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #import <Cocoa/Cocoa.h>
25
26
27 @interface VLCVideoEffects : NSObject {
28     /* generic */
29     intf_thread_t *p_intf;
30     IBOutlet id o_window;
31     IBOutlet id o_tableView;
32     IBOutlet id o_profile_pop;
33
34     /* basic */
35     IBOutlet id o_adjust_ckb;
36     IBOutlet id o_adjust_hue_lbl;
37     IBOutlet id o_adjust_hue_sld;
38     IBOutlet id o_adjust_contrast_lbl;
39     IBOutlet id o_adjust_contrast_sld;
40     IBOutlet id o_adjust_brightness_lbl;
41     IBOutlet id o_adjust_brightness_sld;
42     IBOutlet id o_adjust_brightness_ckb;
43     IBOutlet id o_adjust_saturation_lbl;
44     IBOutlet id o_adjust_saturation_sld;
45     IBOutlet id o_adjust_gamma_lbl;
46     IBOutlet id o_adjust_gamma_sld;
47     IBOutlet id o_adjust_reset_btn;
48     IBOutlet id o_sharpen_ckb;
49     IBOutlet id o_sharpen_lbl;
50     IBOutlet id o_sharpen_sld;
51     IBOutlet id o_banding_ckb;
52     IBOutlet id o_banding_lbl;
53     IBOutlet id o_banding_sld;
54     IBOutlet id o_grain_ckb;
55     IBOutlet id o_grain_sld;
56     IBOutlet id o_grain_lbl;
57
58     /* crop */
59     IBOutlet id o_crop_top_lbl;
60     IBOutlet id o_crop_top_fld;
61     IBOutlet id o_crop_top_stp;
62     IBOutlet id o_crop_left_lbl;
63     IBOutlet id o_crop_left_fld;
64     IBOutlet id o_crop_left_stp;
65     IBOutlet id o_crop_right_lbl;
66     IBOutlet id o_crop_right_fld;
67     IBOutlet id o_crop_right_stp;
68     IBOutlet id o_crop_bottom_lbl;
69     IBOutlet id o_crop_bottom_fld;
70     IBOutlet id o_crop_bottom_stp;
71     IBOutlet id o_crop_sync_top_bottom_ckb;
72     IBOutlet id o_crop_sync_left_right_ckb;
73
74     /* geometry */
75     IBOutlet id o_transform_ckb;
76     IBOutlet id o_transform_pop;
77     IBOutlet id o_zoom_ckb;
78     IBOutlet id o_puzzle_ckb;
79     IBOutlet id o_puzzle_rows_lbl;
80     IBOutlet id o_puzzle_rows_fld;
81     IBOutlet id o_puzzle_rows_stp;
82     IBOutlet id o_puzzle_columns_lbl;
83     IBOutlet id o_puzzle_columns_fld;
84     IBOutlet id o_puzzle_columns_stp;
85     IBOutlet id o_puzzle_blackslot_ckb;
86     IBOutlet id o_clone_ckb;
87     IBOutlet id o_clone_number_fld;
88     IBOutlet id o_clone_number_stp;
89     IBOutlet id o_clone_number_lbl;
90     IBOutlet id o_wall_ckb;
91     IBOutlet id o_wall_numofrows_fld;
92     IBOutlet id o_wall_numofrows_stp;
93     IBOutlet id o_wall_numofrows_lbl;
94     IBOutlet id o_wall_numofcols_fld;
95     IBOutlet id o_wall_numofcols_stp;
96     IBOutlet id o_wall_numofcols_lbl;
97
98     /* color */
99     IBOutlet id o_threshold_ckb;
100     IBOutlet id o_threshold_color_lbl;
101     IBOutlet id o_threshold_color_fld;
102     IBOutlet id o_threshold_saturation_lbl;
103     IBOutlet id o_threshold_saturation_sld;
104     IBOutlet id o_threshold_similarity_lbl;
105     IBOutlet id o_threshold_similarity_sld;
106     IBOutlet id o_sepia_ckb;
107     IBOutlet id o_sepia_lbl;
108     IBOutlet id o_sepia_fld;
109     IBOutlet id o_sepia_stp;
110     IBOutlet id o_noise_ckb;
111     IBOutlet id o_gradient_ckb;
112     IBOutlet id o_gradient_mode_lbl;
113     IBOutlet id o_gradient_mode_pop;
114     IBOutlet id o_gradient_color_ckb;
115     IBOutlet id o_gradient_cartoon_ckb;
116     IBOutlet id o_extract_ckb;
117     IBOutlet id o_extract_lbl;
118     IBOutlet id o_extract_fld;
119     IBOutlet id o_invert_ckb;
120     IBOutlet id o_posterize_ckb;
121     IBOutlet id o_posterize_lbl;
122     IBOutlet id o_posterize_fld;
123     IBOutlet id o_posterize_stp;
124     IBOutlet id o_blur_ckb;
125     IBOutlet id o_blur_sld;
126     IBOutlet id o_blur_lbl;
127     IBOutlet id o_motiondetect_ckb;
128     IBOutlet id o_watereffect_ckb;
129     IBOutlet id o_waves_ckb;
130     IBOutlet id o_psychedelic_ckb;
131
132     /* misc */
133     IBOutlet id o_addtext_ckb;
134     IBOutlet id o_addtext_text_fld;
135     IBOutlet id o_addtext_text_lbl;
136     IBOutlet id o_addtext_pos_lbl;
137     IBOutlet id o_addtext_pos_pop;
138     IBOutlet id o_addlogo_ckb;
139     IBOutlet id o_addlogo_logo_lbl;
140     IBOutlet id o_addlogo_logo_fld;
141     IBOutlet id o_addlogo_pos_lbl;
142     IBOutlet id o_addlogo_pos_pop;
143     IBOutlet id o_addlogo_transparency_lbl;
144     IBOutlet id o_addlogo_transparency_sld;
145     IBOutlet id o_anaglyph_ckb;
146 }
147
148 /* generic */
149 + (VLCVideoEffects *)sharedInstance;
150 - (void)resetValues;
151 - (void)setVideoFilter: (char *)psz_name on:(BOOL)b_on;
152 - (void)setVideoFilterProperty: (char *)psz_name forFilter: (char*)psz_filter integer: (int)i_value;
153 - (void)setVideoFilterProperty: (char *)psz_name forFilter: (char*)psz_filter float: (float)f_value;
154 - (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter string: (char *)psz_value;
155 - (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter boolean: (BOOL)b_value;
156
157 - (IBAction)toggleWindow:(id)sender;
158 - (IBAction)profileSelectorAction:(id)sender;
159 - (IBAction)addProfile:(id)sender;
160 - (IBAction)removeProfile:(id)sender;
161
162
163 /* basic */
164 - (IBAction)enableAdjust:(id)sender;
165 - (IBAction)adjustSliderChanged:(id)sender;
166 - (IBAction)enableAdjustBrightnessThreshold:(id)sender;
167 - (IBAction)enableSharpen:(id)sender;
168 - (IBAction)sharpenSliderChanged:(id)sender;
169 - (IBAction)enableBanding:(id)sender;
170 - (IBAction)bandingSliderChanged:(id)sender;
171 - (IBAction)enableGrain:(id)sender;
172 - (IBAction)grainSliderChanged:(id)sender;
173
174 /* crop */
175 - (IBAction)cropObjectChanged:(id)sender;
176
177 /* geometry */
178 - (IBAction)enableTransform:(id)sender;
179 - (IBAction)transformModifierChanged:(id)sender;
180 - (IBAction)enableZoom:(id)sender;
181 - (IBAction)enablePuzzle:(id)sender;
182 - (IBAction)puzzleModifierChanged:(id)sender;
183 - (IBAction)enableClone:(id)sender;
184 - (IBAction)cloneModifierChanged:(id)sender;
185 - (IBAction)enableWall:(id)sender;
186 - (IBAction)wallModifierChanged:(id)sender;
187
188 /* color */
189 - (IBAction)enableThreshold:(id)sender;
190 - (IBAction)thresholdModifierChanged:(id)sender;
191 - (IBAction)enableSepia:(id)sender;
192 - (IBAction)sepiaModifierChanged:(id)sender;
193 - (IBAction)enableNoise:(id)sender;
194 - (IBAction)enableGradient:(id)sender;
195 - (IBAction)gradientModifierChanged:(id)sender;
196 - (IBAction)enableExtract:(id)sender;
197 - (IBAction)extractModifierChanged:(id)sender;
198 - (IBAction)enableInvert:(id)sender;
199 - (IBAction)enablePosterize:(id)sender;
200 - (IBAction)posterizeModifierChanged:(id)sender;
201 - (IBAction)enableBlur:(id)sender;
202 - (IBAction)blurModifierChanged:(id)sender;
203 - (IBAction)enableMotionDetect:(id)sender;
204 - (IBAction)enableWaterEffect:(id)sender;
205 - (IBAction)enableWaves:(id)sender;
206 - (IBAction)enablePsychedelic:(id)sender;
207
208 /* miscellaneous */
209 - (IBAction)enableAddText:(id)sender;
210 - (IBAction)addTextModifierChanged:(id)sender;
211 - (IBAction)enableAddLogo:(id)sender;
212 - (IBAction)addLogoModifierChanged:(id)sender;
213 - (IBAction)enableAnaglyph:(id)sender;
214
215 /* text field / stepper binding values */
216 /* use setter to modify gui elements */
217 @property (nonatomic) int cropLeftValue;
218 @property (nonatomic) int cropTopValue;
219 @property (nonatomic) int cropRightValue;
220 @property (nonatomic) int cropBottomValue;
221
222 @property (nonatomic) int puzzleRowsValue;
223 @property (nonatomic) int puzzleColumnsValue;
224
225 @property (nonatomic) int wallRowsValue;
226 @property (nonatomic) int wallColumnsValue;
227
228 @property (nonatomic) int cloneValue;
229
230 @property (nonatomic) int sepiaValue;
231
232 @property (nonatomic) int posterizeValue;
233
234 @end