1 #include "bcdisplayinfo.h"
2 #include "sharpenwindow.h"
5 #define _(String) gettext(String)
6 #define gettext_noop(String) String
7 #define N_(String) gettext_noop (String)
10 PLUGIN_THREAD_OBJECT(SharpenMain, SharpenThread, SharpenWindow)
18 SharpenWindow::SharpenWindow(SharpenMain *client, int x, int y)
19 : BC_Window(client->gui_string,
30 this->client = client;
33 SharpenWindow::~SharpenWindow()
37 int SharpenWindow::create_objects()
40 add_tool(new BC_Title(x, y, _("Sharpness")));
42 add_tool(sharpen_slider = new SharpenSlider(client, &(client->config.sharpness), x, y));
44 add_tool(sharpen_interlace = new SharpenInterlace(client, x, y));
46 add_tool(sharpen_horizontal = new SharpenHorizontal(client, x, y));
48 add_tool(sharpen_luminance = new SharpenLuminance(client, x, y));
54 int SharpenWindow::close_event()
56 // Set result to 1 to indicate a client side close
61 SharpenSlider::SharpenSlider(SharpenMain *client, float *output, int x, int y)
74 this->client = client;
75 this->output = output;
77 SharpenSlider::~SharpenSlider()
80 int SharpenSlider::handle_event()
82 *output = get_value();
83 client->send_configure_change();
90 SharpenInterlace::SharpenInterlace(SharpenMain *client, int x, int y)
91 : BC_CheckBox(x, y, client->config.interlace, _("Interlace"))
93 this->client = client;
95 SharpenInterlace::~SharpenInterlace()
98 int SharpenInterlace::handle_event()
100 client->config.interlace = get_value();
101 client->send_configure_change();
108 SharpenHorizontal::SharpenHorizontal(SharpenMain *client, int x, int y)
109 : BC_CheckBox(x, y, client->config.horizontal, _("Horizontal only"))
111 this->client = client;
113 SharpenHorizontal::~SharpenHorizontal()
116 int SharpenHorizontal::handle_event()
118 client->config.horizontal = get_value();
119 client->send_configure_change();
125 SharpenLuminance::SharpenLuminance(SharpenMain *client, int x, int y)
126 : BC_CheckBox(x, y, client->config.luminance, _("Luminance only"))
128 this->client = client;
130 SharpenLuminance::~SharpenLuminance()
133 int SharpenLuminance::handle_event()
135 client->config.luminance = get_value();
136 client->send_configure_change();