r123: Merged HEAD and TEST. New stuff shall be committed to HEAD from now on.
[cinelerra_cv/mob.git] / plugins / swapchannels / swapchannels.h
blob404b4d987c1c2a4f8f505824506307c893606114
1 #ifndef SWAPCHANNELS_H
2 #define SWAPCHANNELS_H
4 #include "defaults.inc"
5 #include "guicast.h"
6 #include "mutex.h"
7 #include "pluginvclient.h"
8 #include "vframe.inc"
14 class SwapMain;
16 #define RED_SRC 0
17 #define GREEN_SRC 1
18 #define BLUE_SRC 2
19 #define ALPHA_SRC 3
20 #define NO_SRC 4
21 #define MAX_SRC 5
25 class SwapConfig
27 public:
28 SwapConfig();
30 int equivalent(SwapConfig &that);
31 void copy_from(SwapConfig &that);
33 int red;
34 int green;
35 int blue;
36 int alpha;
41 class SwapMenu : public BC_PopupMenu
43 public:
44 SwapMenu(SwapMain *client, int *output, int x, int y);
47 int handle_event();
48 int create_objects();
50 SwapMain *client;
51 int *output;
55 class SwapItem : public BC_MenuItem
57 public:
58 SwapItem(SwapMenu *menu, char *title);
60 int handle_event();
62 SwapMenu *menu;
63 char *title;
66 class SwapWindow : public BC_Window
68 public:
69 SwapWindow(SwapMain *plugin, int x, int y);
70 ~SwapWindow();
73 void create_objects();
74 int close_event();
76 SwapMain *plugin;
77 SwapMenu *red;
78 SwapMenu *green;
79 SwapMenu *blue;
80 SwapMenu *alpha;
86 PLUGIN_THREAD_HEADER(SwapMain, SwapThread, SwapWindow)
90 class SwapMain : public PluginVClient
92 public:
93 SwapMain(PluginServer *server);
94 ~SwapMain();
96 // required for all realtime plugins
97 int process_realtime(VFrame *input_ptr, VFrame *output_ptr);
98 int is_realtime();
99 int is_synthesis();
100 char* plugin_title();
101 VFrame* new_picon();
102 int show_gui();
103 void raise_window();
104 void update_gui();
105 int set_string();
106 void save_data(KeyFrame *keyframe);
107 void read_data(KeyFrame *keyframe);
115 void reset();
116 void load_configuration();
117 int load_defaults();
118 int save_defaults();
123 // parameters needed for processor
124 char* output_to_text(int value);
125 int text_to_output(char *text);
127 VFrame *temp;
128 SwapConfig config;
129 SwapThread *thread;
130 Defaults *defaults;
134 #endif