1 /*****************************************************************************
2 * VideoEffects.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2011-2012 Felix Paul Kühne
7 * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
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.
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.
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 *****************************************************************************/
24 #import <Cocoa/Cocoa.h>
27 @interface VLCVideoEffects : NSObject {
29 intf_thread_t *p_intf;
31 IBOutlet id o_tableView;
32 IBOutlet id o_profile_pop;
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;
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;
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_clone_ckb;
86 IBOutlet id o_clone_number_fld;
87 IBOutlet id o_clone_number_stp;
88 IBOutlet id o_clone_number_lbl;
89 IBOutlet id o_wall_ckb;
90 IBOutlet id o_wall_numofrows_fld;
91 IBOutlet id o_wall_numofrows_stp;
92 IBOutlet id o_wall_numofrows_lbl;
93 IBOutlet id o_wall_numofcols_fld;
94 IBOutlet id o_wall_numofcols_stp;
95 IBOutlet id o_wall_numofcols_lbl;
98 IBOutlet id o_threshold_ckb;
99 IBOutlet id o_threshold_color_lbl;
100 IBOutlet id o_threshold_color_fld;
101 IBOutlet id o_threshold_saturation_lbl;
102 IBOutlet id o_threshold_saturation_sld;
103 IBOutlet id o_threshold_similarity_lbl;
104 IBOutlet id o_threshold_similarity_sld;
105 IBOutlet id o_sepia_ckb;
106 IBOutlet id o_sepia_lbl;
107 IBOutlet id o_sepia_fld;
108 IBOutlet id o_sepia_stp;
109 IBOutlet id o_noise_ckb;
110 IBOutlet id o_gradient_ckb;
111 IBOutlet id o_gradient_mode_lbl;
112 IBOutlet id o_gradient_mode_pop;
113 IBOutlet id o_gradient_color_ckb;
114 IBOutlet id o_gradient_cartoon_ckb;
115 IBOutlet id o_extract_ckb;
116 IBOutlet id o_extract_lbl;
117 IBOutlet id o_extract_fld;
118 IBOutlet id o_invert_ckb;
119 IBOutlet id o_posterize_ckb;
120 IBOutlet id o_posterize_lbl;
121 IBOutlet id o_posterize_fld;
122 IBOutlet id o_posterize_stp;
123 IBOutlet id o_blur_ckb;
124 IBOutlet id o_blur_sld;
125 IBOutlet id o_blur_lbl;
126 IBOutlet id o_motiondetect_ckb;
127 IBOutlet id o_watereffect_ckb;
128 IBOutlet id o_waves_ckb;
129 IBOutlet id o_psychedelic_ckb;
132 IBOutlet id o_addtext_ckb;
133 IBOutlet id o_addtext_text_fld;
134 IBOutlet id o_addtext_text_lbl;
135 IBOutlet id o_addtext_pos_lbl;
136 IBOutlet id o_addtext_pos_pop;
137 IBOutlet id o_addlogo_ckb;
138 IBOutlet id o_addlogo_logo_lbl;
139 IBOutlet id o_addlogo_logo_fld;
140 IBOutlet id o_addlogo_pos_lbl;
141 IBOutlet id o_addlogo_pos_pop;
142 IBOutlet id o_addlogo_transparency_lbl;
143 IBOutlet id o_addlogo_transparency_sld;
144 IBOutlet id o_anaglyph_ckb;
146 NSInteger i_old_profile_index;
150 + (VLCVideoEffects *)sharedInstance;
151 - (void)updateCocoaWindowLevel:(NSInteger)i_level;
154 - (void)setVideoFilter: (char *)psz_name on:(BOOL)b_on;
155 - (void)setVideoFilterProperty: (char *)psz_name forFilter: (char*)psz_filter integer: (int)i_value;
156 - (void)setVideoFilterProperty: (char *)psz_name forFilter: (char*)psz_filter float: (float)f_value;
157 - (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter string: (const char *)psz_value;
158 - (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter boolean: (BOOL)b_value;
160 - (void)saveCurrentProfile;
162 - (IBAction)toggleWindow:(id)sender;
163 - (IBAction)profileSelectorAction:(id)sender;
164 - (IBAction)addProfile:(id)sender;
165 - (IBAction)removeProfile:(id)sender;
169 - (IBAction)enableAdjust:(id)sender;
170 - (IBAction)adjustSliderChanged:(id)sender;
171 - (IBAction)enableAdjustBrightnessThreshold:(id)sender;
172 - (IBAction)enableSharpen:(id)sender;
173 - (IBAction)sharpenSliderChanged:(id)sender;
174 - (IBAction)enableBanding:(id)sender;
175 - (IBAction)bandingSliderChanged:(id)sender;
176 - (IBAction)enableGrain:(id)sender;
177 - (IBAction)grainSliderChanged:(id)sender;
180 - (IBAction)cropObjectChanged:(id)sender;
183 - (IBAction)enableTransform:(id)sender;
184 - (IBAction)transformModifierChanged:(id)sender;
185 - (IBAction)enableZoom:(id)sender;
186 - (IBAction)enablePuzzle:(id)sender;
187 - (IBAction)puzzleModifierChanged:(id)sender;
188 - (IBAction)enableClone:(id)sender;
189 - (IBAction)cloneModifierChanged:(id)sender;
190 - (IBAction)enableWall:(id)sender;
191 - (IBAction)wallModifierChanged:(id)sender;
194 - (IBAction)enableThreshold:(id)sender;
195 - (IBAction)thresholdModifierChanged:(id)sender;
196 - (IBAction)enableSepia:(id)sender;
197 - (IBAction)sepiaModifierChanged:(id)sender;
198 - (IBAction)enableNoise:(id)sender;
199 - (IBAction)enableGradient:(id)sender;
200 - (IBAction)gradientModifierChanged:(id)sender;
201 - (IBAction)enableExtract:(id)sender;
202 - (IBAction)extractModifierChanged:(id)sender;
203 - (IBAction)enableInvert:(id)sender;
204 - (IBAction)enablePosterize:(id)sender;
205 - (IBAction)posterizeModifierChanged:(id)sender;
206 - (IBAction)enableBlur:(id)sender;
207 - (IBAction)blurModifierChanged:(id)sender;
208 - (IBAction)enableMotionDetect:(id)sender;
209 - (IBAction)enableWaterEffect:(id)sender;
210 - (IBAction)enableWaves:(id)sender;
211 - (IBAction)enablePsychedelic:(id)sender;
214 - (IBAction)enableAddText:(id)sender;
215 - (IBAction)addTextModifierChanged:(id)sender;
216 - (IBAction)enableAddLogo:(id)sender;
217 - (IBAction)addLogoModifierChanged:(id)sender;
218 - (IBAction)enableAnaglyph:(id)sender;
220 /* text field / stepper binding values */
221 /* use setter to modify gui elements */
222 @property (nonatomic) int cropLeftValue;
223 @property (nonatomic) int cropTopValue;
224 @property (nonatomic) int cropRightValue;
225 @property (nonatomic) int cropBottomValue;
227 @property (nonatomic) int puzzleRowsValue;
228 @property (nonatomic) int puzzleColumnsValue;
230 @property (nonatomic) int wallRowsValue;
231 @property (nonatomic) int wallColumnsValue;
233 @property (nonatomic) int cloneValue;
235 @property (nonatomic) int sepiaValue;
237 @property (nonatomic) int posterizeValue;