X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fshapewipe%2Fshapewipe.h;h=b4fac85cc3074eeddaa8bdee7dabfd8d2b39b167;hb=9e3d90a964c0fbe97c0b58235336a47111932d5d;hp=83ac047ca5abe0cf200d942d5830f9bcce91a077;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/shapewipe/shapewipe.h b/cinelerra-5.1/plugins/shapewipe/shapewipe.h index 83ac047c..b4fac85c 100644 --- a/cinelerra-5.1/plugins/shapewipe/shapewipe.h +++ b/cinelerra-5.1/plugins/shapewipe/shapewipe.h @@ -22,8 +22,20 @@ #ifndef SHAPEWIPE_H #define SHAPEWIPE_H +class ShapeWipeConfig; class ShapeWipeMain; class ShapeWipeWindow; +class ShapeWipeW2B; +class ShapeWipeB2W; +class ShapeWipeTumble; +class ShapeWipeFeather; +class ShapeWipeFSlider; +class ShapeWipeReset; +class ShapeWipeShape; +class ShapeWipePreserveAspectRatio; +class ShapePackage; +class ShapeUnit; +class ShapeEngine; #include "overlayframe.inc" #include "pluginvclient.h" @@ -69,32 +81,48 @@ public: ShapeWipeWindow *window; }; -class ShapeWipeShape : public BC_PopupTextBox +class ShapeWipeFeather : public BC_TumbleTextBox { public: - ShapeWipeShape(ShapeWipeMain *client, - ShapeWipeWindow *window, - int x, - int y, - int text_w, - int list_h); + ShapeWipeFeather(ShapeWipeMain *client, + ShapeWipeWindow *window, int x, int y); int handle_event(); + ShapeWipeMain *client; ShapeWipeWindow *window; }; -class ShapeWipeAntiAlias : public BC_CheckBox +class ShapeWipeFSlider : public BC_FSlider { public: - ShapeWipeAntiAlias(ShapeWipeMain *plugin, - ShapeWipeWindow *window, - int x, - int y); + ShapeWipeFSlider(ShapeWipeMain *client, + ShapeWipeWindow *window, int x, int y, int w); int handle_event(); - ShapeWipeMain *plugin; + + ShapeWipeMain *client; + ShapeWipeWindow *window; +}; + +class ShapeWipeReset : public BC_Button +{ +public: + ShapeWipeReset(ShapeWipeMain *client, + ShapeWipeWindow *window, int x, int y); + int handle_event(); + + ShapeWipeMain *client; ShapeWipeWindow *window; }; +class ShapeWipeShape : public BC_PopupTextBox +{ +public: + ShapeWipeShape(ShapeWipeMain *client, ShapeWipeWindow *window, + int x, int y, int text_w, int list_h); + int handle_event(); + ShapeWipeMain *client; + ShapeWipeWindow *window; +}; class ShapeWipePreserveAspectRatio : public BC_CheckBox { @@ -121,48 +149,93 @@ public: ShapeWipeMain *plugin; ShapeWipeW2B *left; ShapeWipeB2W *right; -// ShapeWipeFilename *filename_widget; ShapeWipeTumble *shape_tumbler; ShapeWipeShape *shape_text; + ShapeWipeFeather *shape_feather; + ShapeWipeFSlider *shape_fslider; + ShapeWipeReset *shape_reset; ArrayList shapes; }; +class ShapeWipeConfig +{ +public: + ShapeWipeConfig(); + ~ShapeWipeConfig(); + void read_xml(KeyFrame *keyframe); + void save_xml(KeyFrame *keyframe); + + int direction; + float feather; + int preserve_aspect; + char shape_name[BCTEXTLEN]; +}; + class ShapeWipeMain : public PluginVClient { public: ShapeWipeMain(PluginServer *server); ~ShapeWipeMain(); -// required for all realtime plugins - int load_configuration(); - int process_realtime(VFrame *incoming, VFrame *outgoing); - void save_data(KeyFrame *keyframe); - void read_data(KeyFrame *keyframe); - PluginClientWindow* new_window(); + PLUGIN_CLASS_MEMBERS(ShapeWipeConfig) + int process_realtime(VFrame *input, VFrame *output); int uses_gui(); int is_transition(); - const char* plugin_title(); - int read_pattern_image(int new_frame_width, int new_frame_height); + void read_data(KeyFrame *keyframe); + void save_data(KeyFrame *keyframe); + + int read_pattern_image(char *shape_name, + int new_frame_width, int new_frame_height); void reset_pattern_image(); void init_shapes(); + VFrame *input, *output; + ShapeEngine *engine; ArrayList shape_paths; ArrayList shape_titles; int shapes_initialized; - int direction; - char filename[BCTEXTLEN]; - char last_read_filename[BCTEXTLEN]; - char shape_name[BCTEXTLEN]; + int threshold; + char current_filename[BCTEXTLEN]; char current_name[BCTEXTLEN]; unsigned char **pattern_image; unsigned char min_value; unsigned char max_value; int frame_width; int frame_height; - int antialias; int preserve_aspect; int last_preserve_aspect; }; + +class ShapePackage : public LoadPackage +{ +public: + ShapePackage(); + int y1, y2; +}; + +class ShapeUnit : public LoadClient +{ +public: + ShapeUnit(ShapeEngine *server); + ~ShapeUnit(); + void process_package(LoadPackage *package); + ShapeEngine *server; + unsigned char threshold; +}; + +class ShapeEngine : public LoadServer +{ +public: + ShapeEngine(ShapeWipeMain *plugin, + int total_clients, int total_packages); + ~ShapeEngine(); + + void init_packages(); + LoadClient *new_client(); + LoadPackage *new_package(); + ShapeWipeMain *plugin; +}; + #endif