ffmpeg versioning mods from Andrew
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / brightness / brightnesswindow.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 #ifndef BRIGHTNESSWINDOW_H
23 #define BRIGHTNESSWINDOW_H
24
25 #include "brightness.h"
26 #include "guicast.h"
27 #include "mutex.h"
28 #include "pluginvclient.h"
29 #include "thread.h"
30
31 #define RESET_ALL 0
32 #define RESET_CONTRAST   1
33 #define RESET_BRIGHTNESS 2
34
35 #define MAXVALUE 100.00
36
37 class BrightnessThread;
38 class BrightnessWindow;
39 class BrightnessFText;
40 class BrightnessFSlider;
41 class BrightnessLuma;
42 class BrightnessReset;
43 class BrightnessClr;
44
45
46 class BrightnessWindow : public PluginClientWindow
47 {
48 public:
49         BrightnessWindow(BrightnessMain *client);
50         ~BrightnessWindow();
51         void update_gui(int clear);
52         void create_objects();
53
54         BrightnessMain *client;
55
56         BrightnessFText *brightness_text;
57         BrightnessFSlider *brightness_slider;
58         BrightnessClr *brightness_Clr;
59
60         BrightnessFText *contrast_text;
61         BrightnessFSlider *contrast_slider;
62         BrightnessClr *contrast_Clr;
63
64         BrightnessLuma *luma;
65         BrightnessReset *reset;
66 };
67
68 class BrightnessFText : public BC_TumbleTextBox
69 {
70 public:
71         BrightnessFText(BrightnessWindow *window, BrightnessMain *client,
72                 BrightnessFSlider *slider, float *output, int x, int y, float min, float max);
73         ~BrightnessFText();
74         int handle_event();
75         BrightnessWindow *window;
76         BrightnessMain *client;
77         BrightnessFSlider *slider;
78         float *output;
79         float min, max;
80 };
81
82 class BrightnessFSlider : public BC_FSlider
83 {
84 public:
85         BrightnessFSlider(BrightnessMain *client,
86                 BrightnessFText *text, float *output, int x, int y,
87                 float min, float max, int w, int is_brightness);
88         ~BrightnessFSlider();
89         int handle_event();
90         char* get_caption();
91
92         BrightnessMain *client;
93         BrightnessFText *text;
94         float *output;
95         int is_brightness;
96         char string[BCTEXTLEN];
97 };
98
99 class BrightnessLuma : public BC_CheckBox
100 {
101 public:
102         BrightnessLuma(BrightnessMain *client, int x, int y);
103         ~BrightnessLuma();
104         int handle_event();
105         BrightnessMain *client;
106 };
107
108 class BrightnessReset : public BC_GenericButton
109 {
110 public:
111         BrightnessReset(BrightnessMain *client, BrightnessWindow *window, int x, int y);
112         ~BrightnessReset();
113         int handle_event();
114         BrightnessMain *client;
115         BrightnessWindow *window;
116 };
117
118 class BrightnessClr : public BC_Button
119 {
120 public:
121         BrightnessClr(BrightnessMain *client, BrightnessWindow *window, int x, int y, int clear);
122         ~BrightnessClr();
123         int handle_event();
124         BrightnessMain *client;
125         BrightnessWindow *window;
126         int clear;
127 };
128
129 #endif
130
131
132
133