4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "bcdisplayinfo.h"
33 #include "loadbalance.h"
34 #include "pluginvclient.h"
48 #define RESET_DEFAULT_SETTINGS 10
50 #define RESET_AMPLITUDE 1
52 #define RESET_WAVELENGTH 3
54 #define AMPLITUDE_MIN 0.00
55 #define AMPLITUDE_MAX 100.00
56 #define PHASE_MIN 0.00
57 #define PHASE_MAX 360.00
58 #define WAVELENGTH_MIN 0.00
59 #define WAVELENGTH_MAX 50.00
66 class WaveDefaultSettings;
74 void reset(int clear);
75 void copy_from(WaveConfig &src);
76 int equivalent(WaveConfig &src);
77 void interpolate(WaveConfig &prev,
89 class WaveSmear : public BC_Radial
92 WaveSmear(WaveEffect *plugin, WaveWindow *window, int x, int y);
98 class WaveBlacken : public BC_Radial
101 WaveBlacken(WaveEffect *plugin, WaveWindow *window, int x, int y);
108 class WaveReflective : public BC_CheckBox
111 WaveReflective(WaveEffect *plugin, int x, int y);
117 class WaveFText : public BC_TumbleTextBox
120 WaveFText(WaveWindow *gui, WaveEffect *plugin,
121 WaveFSlider *slider, float *output, int x, int y, float min, float max);
131 class WaveFSlider : public BC_FSlider
134 WaveFSlider(WaveEffect *plugin,
135 WaveFText *text, float *output, int x, int y,
136 float min, float max);
144 class WaveReset : public BC_GenericButton
147 WaveReset(WaveEffect *plugin, WaveWindow *gui, int x, int y);
154 class WaveDefaultSettings : public BC_GenericButton
157 WaveDefaultSettings(WaveEffect *plugin, WaveWindow *gui, int x, int y, int w);
158 ~WaveDefaultSettings();
164 class WaveClr : public BC_Button
167 WaveClr(WaveEffect *plugin, WaveWindow *gui, int x, int y, int clear);
179 class WaveWindow : public PluginClientWindow
182 WaveWindow(WaveEffect *plugin);
184 void create_objects();
186 void update_gui(int clear);
190 // WaveBlacken *blacken;
191 // WaveReflective *reflective;
193 WaveFText *amplitude_text;
194 WaveFSlider *amplitude_slider;
195 WaveClr *amplitude_Clr;
197 WaveFText *phase_text;
198 WaveFSlider *phase_slider;
201 WaveFText *wavelength_text;
202 WaveFSlider *wavelength_slider;
203 WaveClr *wavelength_Clr;
206 WaveDefaultSettings *default_settings;
215 class WaveServer : public LoadServer
218 WaveServer(WaveEffect *plugin, int cpus);
219 void init_packages();
220 LoadClient* new_client();
221 LoadPackage* new_package();
225 class WavePackage : public LoadPackage
232 class WaveUnit : public LoadClient
235 WaveUnit(WaveEffect *plugin, WaveServer *server);
236 void process_package(LoadPackage *package);
248 class WaveEffect : public PluginVClient
251 WaveEffect(PluginServer *server);
254 PLUGIN_CLASS_MEMBERS(WaveConfig)
255 int process_realtime(VFrame *input, VFrame *output);
257 void save_data(KeyFrame *keyframe);
258 void read_data(KeyFrame *keyframe);
262 VFrame *input, *output;