X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fposterize%2Fposterize.h;fp=cinelerra-5.1%2Fplugins%2Fposterize%2Fposterize.h;h=aae6466a3bd5cd3785ce529b2571e7fda1ec5c5a;hp=0000000000000000000000000000000000000000;hb=1180ebf94abe64513c184997927634ef20ea9075;hpb=686c4d754c80b9865c0a5a7315c5fa4d0d39f4a7 diff --git a/cinelerra-5.1/plugins/posterize/posterize.h b/cinelerra-5.1/plugins/posterize/posterize.h new file mode 100644 index 00000000..aae6466a --- /dev/null +++ b/cinelerra-5.1/plugins/posterize/posterize.h @@ -0,0 +1,117 @@ + +/* + * CINELERRA + * Copyright (C) 2008-2020 Adam Williams + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef POSTERIZE_H +#define POSTERIZE_H + +class PosterizeMain; +class PosterizeWindow; + +#include "bchash.h" +#include "mutex.h" +#include "pluginvclient.h" +#include + +class PosterizeConfig +{ +public: + PosterizeConfig(); + int equivalent(PosterizeConfig &that); + void copy_from(PosterizeConfig &that); + void interpolate(PosterizeConfig &prev, + PosterizeConfig &next, + int64_t prev_frame, + int64_t next_frame, + int64_t current_frame); + void boundaries(); + int steps; +}; + +class PosterizeMain : public PluginVClient +{ +public: + PosterizeMain(PluginServer *server); + ~PosterizeMain(); + +// required for all realtime plugins + PLUGIN_CLASS_MEMBERS(PosterizeConfig); + int process_buffer(VFrame *frame, + int64_t start_position, + double frame_rate); + int is_realtime(); + void update_gui(); + void save_data(KeyFrame *keyframe); + void read_data(KeyFrame *keyframe); +}; + + + +class PosterizeSlider : public BC_ISlider +{ +public: + PosterizeSlider(PosterizeMain *plugin, + PosterizeWindow *gui, + int x, + int y, + int w, + int *output, + int min, + int max); + int handle_event(); + PosterizeMain *plugin; + PosterizeWindow *gui; + int *output; +}; + +class PosterizeText : public BC_TextBox +{ +public: + PosterizeText(PosterizeMain *plugin, + PosterizeWindow *gui, + int x, + int y, + int w, + int *output); + int handle_event(); + PosterizeMain *plugin; + PosterizeWindow *gui; + int *output; +}; + + + +class PosterizeWindow : public PluginClientWindow +{ +public: + PosterizeWindow(PosterizeMain *plugin); + ~PosterizeWindow(); + + void create_objects(); + + void update(int do_slider, int do_text); + + PosterizeMain *plugin; + PosterizeText *text; + PosterizeSlider *slider; +}; + + +#endif