summaryrefslogtreecommitdiff
path: root/src/editing_tools/RGBHistogramManipulator.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:57:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:57:00 +0200
commita9bafe967a7a664c43dec4aeb64a6f6e0f284e05 (patch)
tree653c43a63b70c47278367ad2a4e92640a6669b44 /src/editing_tools/RGBHistogramManipulator.c
parent55778740c211992cc86ea87588ab62c6750f36d1 (diff)
parentab841afa5cb39058d9ab2cebb67cfe6369443f6e (diff)
Update upstream source from tag 'upstream/0.28.3'
Update to upstream version '0.28.3' with Debian dir 828a38627ed9287d7cf2466fb15ebdea073742b7
Diffstat (limited to 'src/editing_tools/RGBHistogramManipulator.c')
-rw-r--r--src/editing_tools/RGBHistogramManipulator.c1174
1 files changed, 531 insertions, 643 deletions
diff --git a/src/editing_tools/RGBHistogramManipulator.c b/src/editing_tools/RGBHistogramManipulator.c
index ffbf0b8..bb9a9b0 100644
--- a/src/editing_tools/RGBHistogramManipulator.c
+++ b/src/editing_tools/RGBHistogramManipulator.c
@@ -1,4 +1,4 @@
-/* RGBHistogramManipulator.c generated by valac 0.36.6, the Vala compiler
+/* RGBHistogramManipulator.c generated by valac 0.40.4, the Vala compiler
* generated from RGBHistogramManipulator.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
@@ -29,15 +30,20 @@
typedef struct _RGBHistogramManipulator RGBHistogramManipulator;
typedef struct _RGBHistogramManipulatorClass RGBHistogramManipulatorClass;
typedef struct _RGBHistogramManipulatorPrivate RGBHistogramManipulatorPrivate;
+enum {
+ RGB_HISTOGRAM_MANIPULATOR_0_PROPERTY,
+ RGB_HISTOGRAM_MANIPULATOR_NUM_PROPERTIES
+};
+static GParamSpec* rgb_histogram_manipulator_properties[RGB_HISTOGRAM_MANIPULATOR_NUM_PROPERTIES];
#define RGB_HISTOGRAM_MANIPULATOR_TYPE_LOCATION_CODE (rgb_histogram_manipulator_location_code_get_type ())
#define _rgb_histogram_unref0(var) ((var == NULL) ? NULL : (var = (rgb_histogram_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum {
RGB_HISTOGRAM_MANIPULATOR_NUB_POSITION_CHANGED_SIGNAL,
- RGB_HISTOGRAM_MANIPULATOR_LAST_SIGNAL
+ RGB_HISTOGRAM_MANIPULATOR_NUM_SIGNALS
};
-static guint rgb_histogram_manipulator_signals[RGB_HISTOGRAM_MANIPULATOR_LAST_SIGNAL] = {0};
+static guint rgb_histogram_manipulator_signals[RGB_HISTOGRAM_MANIPULATOR_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
@@ -84,9 +90,6 @@ static gboolean rgb_histogram_manipulator_paths_setup = FALSE;
GType rgb_histogram_manipulator_get_type (void) G_GNUC_CONST;
#define RGB_HISTOGRAM_MANIPULATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_RGB_HISTOGRAM_MANIPULATOR, RGBHistogramManipulatorPrivate))
-enum {
- RGB_HISTOGRAM_MANIPULATOR_DUMMY_PROPERTY
-};
static GType rgb_histogram_manipulator_location_code_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE 13
#define RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH (RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE / 2)
@@ -99,31 +102,58 @@ static GType rgb_histogram_manipulator_location_code_get_type (void) G_GNUC_CONS
#define RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION (((((RGB_HISTOGRAM_MANIPULATOR_CONTROL_HEIGHT - RGB_HISTOGRAM_MANIPULATOR_TROUGH_HEIGHT) - RGB_HISTOGRAM_MANIPULATOR_TROUGH_BOTTOM_OFFSET) - ((RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE - RGB_HISTOGRAM_MANIPULATOR_TROUGH_HEIGHT) / 2)) - RGB_HISTOGRAM_MANIPULATOR_NUB_V_NUDGE) - 2)
RGBHistogramManipulator* rgb_histogram_manipulator_new (void);
RGBHistogramManipulator* rgb_histogram_manipulator_construct (GType object_type);
-static gboolean rgb_histogram_manipulator_on_button_press (RGBHistogramManipulator* self, GdkEventButton* event_record);
-static gboolean _rgb_histogram_manipulator_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
-static gboolean rgb_histogram_manipulator_on_button_release (RGBHistogramManipulator* self, GdkEventButton* event_record);
-static gboolean _rgb_histogram_manipulator_on_button_release_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
-static gboolean rgb_histogram_manipulator_on_button_motion (RGBHistogramManipulator* self, GdkEventMotion* event_record);
-static gboolean _rgb_histogram_manipulator_on_button_motion_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self);
-static void rgb_histogram_manipulator_on_size_allocate (RGBHistogramManipulator* self, GtkAllocation* region);
-static void _rgb_histogram_manipulator_on_size_allocate_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self);
-static RGBHistogramManipulatorLocationCode rgb_histogram_manipulator_hit_test_point (RGBHistogramManipulator* self, gint x, gint y);
+static gboolean rgb_histogram_manipulator_on_button_press (RGBHistogramManipulator* self,
+ GdkEventButton* event_record);
+static gboolean _rgb_histogram_manipulator_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender,
+ GdkEventButton* event,
+ gpointer self);
+static gboolean rgb_histogram_manipulator_on_button_release (RGBHistogramManipulator* self,
+ GdkEventButton* event_record);
+static gboolean _rgb_histogram_manipulator_on_button_release_gtk_widget_button_release_event (GtkWidget* _sender,
+ GdkEventButton* event,
+ gpointer self);
+static gboolean rgb_histogram_manipulator_on_button_motion (RGBHistogramManipulator* self,
+ GdkEventMotion* event_record);
+static gboolean _rgb_histogram_manipulator_on_button_motion_gtk_widget_motion_notify_event (GtkWidget* _sender,
+ GdkEventMotion* event,
+ gpointer self);
+static void rgb_histogram_manipulator_on_size_allocate (RGBHistogramManipulator* self,
+ GtkAllocation* region);
+static void _rgb_histogram_manipulator_on_size_allocate_gtk_widget_size_allocate (GtkWidget* _sender,
+ GtkAllocation* allocation,
+ gpointer self);
+static RGBHistogramManipulatorLocationCode rgb_histogram_manipulator_hit_test_point (RGBHistogramManipulator* self,
+ gint x,
+ gint y);
static void rgb_histogram_manipulator_force_update (RGBHistogramManipulator* self);
static void rgb_histogram_manipulator_update_nub_extrema (RGBHistogramManipulator* self);
-static gboolean rgb_histogram_manipulator_real_focus_out_event (GtkWidget* base, GdkEventFocus* event);
-static gboolean rgb_histogram_manipulator_real_key_press_event (GtkWidget* base, GdkEventKey* event);
-static gboolean rgb_histogram_manipulator_real_draw (GtkWidget* base, cairo_t* ctx);
-static void rgb_histogram_manipulator_draw_histogram (RGBHistogramManipulator* self, cairo_t* ctx, GdkRectangle* area);
-static void rgb_histogram_manipulator_draw_nub (RGBHistogramManipulator* self, cairo_t* ctx, GdkRectangle* area, gint position);
-void rgb_histogram_manipulator_update_histogram (RGBHistogramManipulator* self, GdkPixbuf* source_pixbuf);
+static gboolean rgb_histogram_manipulator_real_focus_out_event (GtkWidget* base,
+ GdkEventFocus* event);
+static gboolean rgb_histogram_manipulator_real_key_press_event (GtkWidget* base,
+ GdkEventKey* event);
+static gboolean rgb_histogram_manipulator_real_draw (GtkWidget* base,
+ cairo_t* ctx);
+static void rgb_histogram_manipulator_draw_histogram (RGBHistogramManipulator* self,
+ cairo_t* ctx,
+ GdkRectangle* area);
+static void rgb_histogram_manipulator_draw_nub (RGBHistogramManipulator* self,
+ cairo_t* ctx,
+ GdkRectangle* area,
+ gint position);
+void rgb_histogram_manipulator_update_histogram (RGBHistogramManipulator* self,
+ GdkPixbuf* source_pixbuf);
gint rgb_histogram_manipulator_get_left_nub_position (RGBHistogramManipulator* self);
gint rgb_histogram_manipulator_get_right_nub_position (RGBHistogramManipulator* self);
-void rgb_histogram_manipulator_set_left_nub_position (RGBHistogramManipulator* self, gint user_nub_pos);
-void rgb_histogram_manipulator_set_right_nub_position (RGBHistogramManipulator* self, gint user_nub_pos);
+void rgb_histogram_manipulator_set_left_nub_position (RGBHistogramManipulator* self,
+ gint user_nub_pos);
+void rgb_histogram_manipulator_set_right_nub_position (RGBHistogramManipulator* self,
+ gint user_nub_pos);
static void rgb_histogram_manipulator_finalize (GObject * obj);
-static GType rgb_histogram_manipulator_location_code_get_type (void) {
+static GType
+rgb_histogram_manipulator_location_code_get_type (void)
+{
static volatile gsize rgb_histogram_manipulator_location_code_type_id__volatile = 0;
if (g_once_init_enter (&rgb_histogram_manipulator_location_code_type_id__volatile)) {
static const GEnumValue values[] = {{RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_LEFT_NUB, "RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_LEFT_NUB", "left-nub"}, {RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_RIGHT_NUB, "RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_RIGHT_NUB", "right-nub"}, {RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_LEFT_TROUGH, "RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_LEFT_TROUGH", "left-trough"}, {RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_RIGHT_TROUGH, "RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_RIGHT_TROUGH", "right-trough"}, {RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_INSENSITIVE_AREA, "RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_INSENSITIVE_AREA", "insensitive-area"}, {0, NULL, NULL}};
@@ -135,41 +165,59 @@ static GType rgb_histogram_manipulator_location_code_get_type (void) {
}
-static gboolean _rgb_histogram_manipulator_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
+static gboolean
+_rgb_histogram_manipulator_on_button_press_gtk_widget_button_press_event (GtkWidget* _sender,
+ GdkEventButton* event,
+ gpointer self)
+{
gboolean result;
result = rgb_histogram_manipulator_on_button_press ((RGBHistogramManipulator*) self, event);
#line 57 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 144 "RGBHistogramManipulator.c"
+#line 178 "RGBHistogramManipulator.c"
}
-static gboolean _rgb_histogram_manipulator_on_button_release_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
+static gboolean
+_rgb_histogram_manipulator_on_button_release_gtk_widget_button_release_event (GtkWidget* _sender,
+ GdkEventButton* event,
+ gpointer self)
+{
gboolean result;
result = rgb_histogram_manipulator_on_button_release ((RGBHistogramManipulator*) self, event);
#line 58 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 153 "RGBHistogramManipulator.c"
+#line 191 "RGBHistogramManipulator.c"
}
-static gboolean _rgb_histogram_manipulator_on_button_motion_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self) {
+static gboolean
+_rgb_histogram_manipulator_on_button_motion_gtk_widget_motion_notify_event (GtkWidget* _sender,
+ GdkEventMotion* event,
+ gpointer self)
+{
gboolean result;
result = rgb_histogram_manipulator_on_button_motion ((RGBHistogramManipulator*) self, event);
#line 59 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 162 "RGBHistogramManipulator.c"
+#line 204 "RGBHistogramManipulator.c"
}
-static void _rgb_histogram_manipulator_on_size_allocate_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self) {
+static void
+_rgb_histogram_manipulator_on_size_allocate_gtk_widget_size_allocate (GtkWidget* _sender,
+ GtkAllocation* allocation,
+ gpointer self)
+{
#line 61 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_on_size_allocate ((RGBHistogramManipulator*) self, allocation);
-#line 169 "RGBHistogramManipulator.c"
+#line 215 "RGBHistogramManipulator.c"
}
-RGBHistogramManipulator* rgb_histogram_manipulator_construct (GType object_type) {
+RGBHistogramManipulator*
+rgb_histogram_manipulator_construct (GType object_type)
+{
RGBHistogramManipulator * self = NULL;
gboolean _tmp0_;
#line 36 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -177,12 +225,12 @@ RGBHistogramManipulator* rgb_histogram_manipulator_construct (GType object_type)
#line 37 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), RGB_HISTOGRAM_MANIPULATOR_CONTROL_WIDTH, RGB_HISTOGRAM_MANIPULATOR_CONTROL_HEIGHT);
#line 38 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- g_object_set (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "can-focus", TRUE, NULL);
+ gtk_widget_set_can_focus (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), TRUE);
#line 40 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp0_ = rgb_histogram_manipulator_paths_setup;
#line 40 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
if (!_tmp0_) {
-#line 186 "RGBHistogramManipulator.c"
+#line 234 "RGBHistogramManipulator.c"
GtkWidgetPath* _tmp1_;
GtkWidgetPath* _tmp2_;
GtkWidgetPath* _tmp3_;
@@ -210,7 +258,7 @@ RGBHistogramManipulator* rgb_histogram_manipulator_construct (GType object_type)
gtk_widget_path_iter_add_class (_tmp5_, 0, "default");
#line 48 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_paths_setup = TRUE;
-#line 214 "RGBHistogramManipulator.c"
+#line 262 "RGBHistogramManipulator.c"
}
#line 51 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
gtk_widget_add_events (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), (gint) GDK_BUTTON_PRESS_MASK);
@@ -232,18 +280,23 @@ RGBHistogramManipulator* rgb_histogram_manipulator_construct (GType object_type)
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "size-allocate", (GCallback) _rgb_histogram_manipulator_on_size_allocate_gtk_widget_size_allocate, self, 0);
#line 36 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return self;
-#line 236 "RGBHistogramManipulator.c"
+#line 284 "RGBHistogramManipulator.c"
}
-RGBHistogramManipulator* rgb_histogram_manipulator_new (void) {
+RGBHistogramManipulator*
+rgb_histogram_manipulator_new (void)
+{
#line 36 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return rgb_histogram_manipulator_construct (TYPE_RGB_HISTOGRAM_MANIPULATOR);
-#line 243 "RGBHistogramManipulator.c"
+#line 293 "RGBHistogramManipulator.c"
}
-static void rgb_histogram_manipulator_on_size_allocate (RGBHistogramManipulator* self, GtkAllocation* region) {
+static void
+rgb_histogram_manipulator_on_size_allocate (RGBHistogramManipulator* self,
+ GtkAllocation* region)
+{
GtkAllocation _tmp0_;
gint _tmp1_;
#line 64 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -256,260 +309,208 @@ static void rgb_histogram_manipulator_on_size_allocate (RGBHistogramManipulator*
_tmp1_ = _tmp0_.width;
#line 65 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self->priv->offset = ((_tmp1_ - RGB_HISTOGRAM_GRAPHIC_WIDTH) - RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE) / 2;
-#line 260 "RGBHistogramManipulator.c"
+#line 313 "RGBHistogramManipulator.c"
}
-static RGBHistogramManipulatorLocationCode rgb_histogram_manipulator_hit_test_point (RGBHistogramManipulator* self, gint x, gint y) {
+static RGBHistogramManipulatorLocationCode
+rgb_histogram_manipulator_hit_test_point (RGBHistogramManipulator* self,
+ gint x,
+ gint y)
+{
RGBHistogramManipulatorLocationCode result = 0;
- gint _tmp0_;
- gboolean _tmp1_ = FALSE;
- gint _tmp2_;
- gint _tmp3_;
- gboolean _tmp6_ = FALSE;
+ gboolean _tmp0_ = FALSE;
+ gint _tmp1_;
+ gboolean _tmp3_ = FALSE;
+ gint _tmp4_;
+ gint _tmp6_;
gint _tmp7_;
gint _tmp8_;
- gint _tmp11_;
- gint _tmp12_;
- gint _tmp13_;
- gint _tmp14_;
- gint _tmp15_;
- gint _tmp16_;
- gint _tmp17_;
- gint _tmp18_;
- gint _tmp19_;
+ gint _tmp9_;
#line 68 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_val_if_fail (IS_RGB_HISTOGRAM_MANIPULATOR (self), 0);
#line 69 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp0_ = y;
-#line 69 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp0_ < RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION) {
+ if (y < RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION) {
#line 70 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_INSENSITIVE_AREA;
#line 70 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 292 "RGBHistogramManipulator.c"
+#line 339 "RGBHistogramManipulator.c"
}
#line 72 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp2_ = x;
-#line 72 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp3_ = self->priv->left_nub_position;
+ _tmp1_ = self->priv->left_nub_position;
#line 72 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp2_ > _tmp3_) {
-#line 300 "RGBHistogramManipulator.c"
- gint _tmp4_;
- gint _tmp5_;
-#line 72 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp4_ = x;
+ if (x > _tmp1_) {
+#line 345 "RGBHistogramManipulator.c"
+ gint _tmp2_;
#line 72 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp5_ = self->priv->left_nub_position;
+ _tmp2_ = self->priv->left_nub_position;
#line 72 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_ = _tmp4_ < (_tmp5_ + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE);
-#line 309 "RGBHistogramManipulator.c"
+ _tmp0_ = x < (_tmp2_ + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE);
+#line 351 "RGBHistogramManipulator.c"
} else {
#line 72 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_ = FALSE;
-#line 313 "RGBHistogramManipulator.c"
+ _tmp0_ = FALSE;
+#line 355 "RGBHistogramManipulator.c"
}
#line 72 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp1_) {
+ if (_tmp0_) {
#line 73 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_LEFT_NUB;
#line 73 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 321 "RGBHistogramManipulator.c"
+#line 363 "RGBHistogramManipulator.c"
}
#line 75 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp7_ = x;
+ _tmp4_ = self->priv->right_nub_position;
#line 75 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp8_ = self->priv->right_nub_position;
-#line 75 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp7_ > _tmp8_) {
-#line 329 "RGBHistogramManipulator.c"
- gint _tmp9_;
- gint _tmp10_;
-#line 75 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp9_ = x;
+ if (x > _tmp4_) {
+#line 369 "RGBHistogramManipulator.c"
+ gint _tmp5_;
#line 75 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp10_ = self->priv->right_nub_position;
+ _tmp5_ = self->priv->right_nub_position;
#line 75 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp6_ = _tmp9_ < (_tmp10_ + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE);
-#line 338 "RGBHistogramManipulator.c"
+ _tmp3_ = x < (_tmp5_ + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE);
+#line 375 "RGBHistogramManipulator.c"
} else {
#line 75 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp6_ = FALSE;
-#line 342 "RGBHistogramManipulator.c"
+ _tmp3_ = FALSE;
+#line 379 "RGBHistogramManipulator.c"
}
#line 75 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp6_) {
+ if (_tmp3_) {
#line 76 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_RIGHT_NUB;
#line 76 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 350 "RGBHistogramManipulator.c"
+#line 387 "RGBHistogramManipulator.c"
}
#line 78 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp11_ = y;
-#line 78 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp11_ < ((RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION + RGB_HISTOGRAM_MANIPULATOR_NUB_V_NUDGE) + 1)) {
+ if (y < ((RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION + RGB_HISTOGRAM_MANIPULATOR_NUB_V_NUDGE) + 1)) {
#line 79 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_INSENSITIVE_AREA;
#line 79 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 360 "RGBHistogramManipulator.c"
+#line 395 "RGBHistogramManipulator.c"
}
#line 81 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp12_ = x;
-#line 81 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp13_ = self->priv->left_nub_position;
-#line 81 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp14_ = x;
+ _tmp6_ = self->priv->left_nub_position;
#line 81 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp15_ = self->priv->left_nub_position;
-#line 81 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp16_ = x;
-#line 81 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp17_ = self->priv->right_nub_position;
+ _tmp7_ = self->priv->left_nub_position;
#line 81 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp18_ = x;
+ _tmp8_ = self->priv->right_nub_position;
#line 81 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp19_ = self->priv->right_nub_position;
+ _tmp9_ = self->priv->right_nub_position;
#line 81 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (((_tmp12_ - _tmp13_) * (_tmp14_ - _tmp15_)) < ((_tmp16_ - _tmp17_) * (_tmp18_ - _tmp19_))) {
+ if (((x - _tmp6_) * (x - _tmp7_)) < ((x - _tmp8_) * (x - _tmp9_))) {
#line 83 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_LEFT_TROUGH;
#line 83 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 384 "RGBHistogramManipulator.c"
+#line 411 "RGBHistogramManipulator.c"
} else {
#line 85 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_RIGHT_TROUGH;
#line 85 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 390 "RGBHistogramManipulator.c"
+#line 417 "RGBHistogramManipulator.c"
}
}
-static gboolean rgb_histogram_manipulator_on_button_press (RGBHistogramManipulator* self, GdkEventButton* event_record) {
+static gboolean
+rgb_histogram_manipulator_on_button_press (RGBHistogramManipulator* self,
+ GdkEventButton* event_record)
+{
gboolean result = FALSE;
- GdkEventButton* _tmp0_;
- GdkEventButton* _tmp1_;
- gdouble _tmp2_;
- gint _tmp3_;
+ gdouble _tmp0_;
+ gint _tmp1_;
RGBHistogramManipulatorLocationCode loc = 0;
- GdkEventButton* _tmp4_;
- gdouble _tmp5_;
- GdkEventButton* _tmp6_;
- gdouble _tmp7_;
- RGBHistogramManipulatorLocationCode _tmp8_;
+ gdouble _tmp2_;
+ gdouble _tmp3_;
gboolean retval = FALSE;
- RGBHistogramManipulatorLocationCode _tmp9_;
- GdkEventButton* _tmp26_;
- GdkEventButton* _tmp27_;
- gdouble _tmp28_;
- gint _tmp29_;
+ RGBHistogramManipulatorLocationCode _tmp4_;
+ gdouble _tmp15_;
+ gint _tmp16_;
#line 88 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_val_if_fail (IS_RGB_HISTOGRAM_MANIPULATOR (self), FALSE);
#line 88 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_val_if_fail (event_record != NULL, FALSE);
#line 91 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp0_ = event_record;
+ _tmp0_ = event_record->x;
#line 91 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_ = event_record;
+ _tmp1_ = self->priv->offset;
#line 91 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp2_ = _tmp1_->x;
-#line 91 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp3_ = self->priv->offset;
-#line 91 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_->x = _tmp2_ - _tmp3_;
-#line 92 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp4_ = event_record;
+ event_record->x = _tmp0_ - _tmp1_;
#line 92 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp5_ = _tmp4_->x;
+ _tmp2_ = event_record->x;
#line 92 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp6_ = event_record;
+ _tmp3_ = event_record->y;
#line 92 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp7_ = _tmp6_->y;
-#line 92 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp8_ = rgb_histogram_manipulator_hit_test_point (self, (gint) _tmp5_, (gint) _tmp7_);
-#line 92 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- loc = _tmp8_;
+ loc = rgb_histogram_manipulator_hit_test_point (self, (gint) _tmp2_, (gint) _tmp3_);
#line 93 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
retval = TRUE;
#line 95 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp9_ = loc;
+ _tmp4_ = loc;
#line 95 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- switch (_tmp9_) {
+ switch (_tmp4_) {
#line 95 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
case RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_LEFT_NUB:
-#line 447 "RGBHistogramManipulator.c"
+#line 460 "RGBHistogramManipulator.c"
{
- GdkEventButton* _tmp10_;
- gdouble _tmp11_;
- gint _tmp12_;
-#line 97 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp10_ = event_record;
+ gdouble _tmp5_;
+ gint _tmp6_;
#line 97 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp11_ = _tmp10_->x;
+ _tmp5_ = event_record->x;
#line 97 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->track_start_x = (gint) _tmp11_;
+ self->priv->track_start_x = (gint) _tmp5_;
#line 98 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp12_ = self->priv->left_nub_position;
+ _tmp6_ = self->priv->left_nub_position;
#line 98 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->track_nub_start_position = _tmp12_;
+ self->priv->track_nub_start_position = _tmp6_;
#line 99 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self->priv->is_left_nub_tracking = TRUE;
#line 100 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
break;
-#line 466 "RGBHistogramManipulator.c"
+#line 476 "RGBHistogramManipulator.c"
}
#line 95 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
case RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_RIGHT_NUB:
-#line 470 "RGBHistogramManipulator.c"
+#line 480 "RGBHistogramManipulator.c"
{
- GdkEventButton* _tmp13_;
- gdouble _tmp14_;
- gint _tmp15_;
+ gdouble _tmp7_;
+ gint _tmp8_;
#line 103 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp13_ = event_record;
+ _tmp7_ = event_record->x;
#line 103 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp14_ = _tmp13_->x;
-#line 103 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->track_start_x = (gint) _tmp14_;
+ self->priv->track_start_x = (gint) _tmp7_;
#line 104 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp15_ = self->priv->right_nub_position;
+ _tmp8_ = self->priv->right_nub_position;
#line 104 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->track_nub_start_position = _tmp15_;
+ self->priv->track_nub_start_position = _tmp8_;
#line 105 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self->priv->is_right_nub_tracking = TRUE;
#line 106 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
break;
-#line 489 "RGBHistogramManipulator.c"
+#line 496 "RGBHistogramManipulator.c"
}
#line 95 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
case RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_LEFT_TROUGH:
-#line 493 "RGBHistogramManipulator.c"
+#line 500 "RGBHistogramManipulator.c"
{
- GdkEventButton* _tmp16_;
- gdouble _tmp17_;
- gint _tmp18_;
- gint _tmp19_;
- gint _tmp20_;
-#line 109 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp16_ = event_record;
+ gdouble _tmp9_;
+ gint _tmp10_;
+ gint _tmp11_;
#line 109 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp17_ = _tmp16_->x;
+ _tmp9_ = event_record->x;
#line 109 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->left_nub_position = ((gint) _tmp17_) - RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH;
+ self->priv->left_nub_position = ((gint) _tmp9_) - RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH;
#line 110 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp18_ = self->priv->left_nub_position;
+ _tmp10_ = self->priv->left_nub_position;
#line 110 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp19_ = self->priv->left_nub_max;
+ _tmp11_ = self->priv->left_nub_max;
#line 110 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp20_ = CLAMP (_tmp18_, 0, _tmp19_);
-#line 110 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->left_nub_position = _tmp20_;
+ self->priv->left_nub_position = CLAMP (_tmp10_, 0, _tmp11_);
#line 111 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_force_update (self);
#line 112 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -518,31 +519,25 @@ static gboolean rgb_histogram_manipulator_on_button_press (RGBHistogramManipulat
rgb_histogram_manipulator_update_nub_extrema (self);
#line 114 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
break;
-#line 522 "RGBHistogramManipulator.c"
+#line 523 "RGBHistogramManipulator.c"
}
#line 95 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
case RGB_HISTOGRAM_MANIPULATOR_LOCATION_CODE_RIGHT_TROUGH:
-#line 526 "RGBHistogramManipulator.c"
+#line 527 "RGBHistogramManipulator.c"
{
- GdkEventButton* _tmp21_;
- gdouble _tmp22_;
- gint _tmp23_;
- gint _tmp24_;
- gint _tmp25_;
-#line 117 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp21_ = event_record;
+ gdouble _tmp12_;
+ gint _tmp13_;
+ gint _tmp14_;
#line 117 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp22_ = _tmp21_->x;
+ _tmp12_ = event_record->x;
#line 117 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->right_nub_position = ((gint) _tmp22_) - RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH;
+ self->priv->right_nub_position = ((gint) _tmp12_) - RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH;
#line 118 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp23_ = self->priv->right_nub_position;
+ _tmp13_ = self->priv->right_nub_position;
#line 118 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp24_ = self->priv->right_nub_min;
+ _tmp14_ = self->priv->right_nub_min;
#line 118 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp25_ = CLAMP (_tmp23_, _tmp24_, 255);
-#line 118 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->right_nub_position = _tmp25_;
+ self->priv->right_nub_position = CLAMP (_tmp13_, _tmp14_, 255);
#line 119 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_force_update (self);
#line 120 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -551,7 +546,7 @@ static gboolean rgb_histogram_manipulator_on_button_press (RGBHistogramManipulat
rgb_histogram_manipulator_update_nub_extrema (self);
#line 122 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
break;
-#line 555 "RGBHistogramManipulator.c"
+#line 550 "RGBHistogramManipulator.c"
}
default:
{
@@ -559,28 +554,27 @@ static gboolean rgb_histogram_manipulator_on_button_press (RGBHistogramManipulat
retval = FALSE;
#line 126 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
break;
-#line 563 "RGBHistogramManipulator.c"
+#line 558 "RGBHistogramManipulator.c"
}
}
#line 130 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp26_ = event_record;
-#line 130 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp27_ = event_record;
-#line 130 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp28_ = _tmp27_->x;
+ _tmp15_ = event_record->x;
#line 130 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp29_ = self->priv->offset;
+ _tmp16_ = self->priv->offset;
#line 130 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp27_->x = _tmp28_ + _tmp29_;
+ event_record->x = _tmp15_ + _tmp16_;
#line 132 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = retval;
#line 132 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 580 "RGBHistogramManipulator.c"
+#line 571 "RGBHistogramManipulator.c"
}
-static gboolean rgb_histogram_manipulator_on_button_release (RGBHistogramManipulator* self, GdkEventButton* event_record) {
+static gboolean
+rgb_histogram_manipulator_on_button_release (RGBHistogramManipulator* self,
+ GdkEventButton* event_record)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_;
@@ -594,14 +588,14 @@ static gboolean rgb_histogram_manipulator_on_button_release (RGBHistogramManipul
if (_tmp1_) {
#line 136 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp0_ = TRUE;
-#line 598 "RGBHistogramManipulator.c"
+#line 592 "RGBHistogramManipulator.c"
} else {
gboolean _tmp2_;
#line 136 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp2_ = self->priv->is_right_nub_tracking;
#line 136 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp0_ = _tmp2_;
-#line 605 "RGBHistogramManipulator.c"
+#line 599 "RGBHistogramManipulator.c"
}
#line 136 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
if (_tmp0_) {
@@ -609,7 +603,7 @@ static gboolean rgb_histogram_manipulator_on_button_release (RGBHistogramManipul
g_signal_emit (self, rgb_histogram_manipulator_signals[RGB_HISTOGRAM_MANIPULATOR_NUB_POSITION_CHANGED_SIGNAL], 0);
#line 138 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_update_nub_extrema (self);
-#line 613 "RGBHistogramManipulator.c"
+#line 607 "RGBHistogramManipulator.c"
}
#line 141 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self->priv->is_left_nub_tracking = FALSE;
@@ -619,23 +613,22 @@ static gboolean rgb_histogram_manipulator_on_button_release (RGBHistogramManipul
result = FALSE;
#line 144 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 623 "RGBHistogramManipulator.c"
+#line 617 "RGBHistogramManipulator.c"
}
-static gboolean rgb_histogram_manipulator_on_button_motion (RGBHistogramManipulator* self, GdkEventMotion* event_record) {
+static gboolean
+rgb_histogram_manipulator_on_button_motion (RGBHistogramManipulator* self,
+ GdkEventMotion* event_record)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_;
- GdkEventMotion* _tmp3_;
- GdkEventMotion* _tmp4_;
- gdouble _tmp5_;
- gint _tmp6_;
- gboolean _tmp7_;
- GdkEventMotion* _tmp24_;
- GdkEventMotion* _tmp25_;
- gdouble _tmp26_;
- gint _tmp27_;
+ gdouble _tmp3_;
+ gint _tmp4_;
+ gboolean _tmp5_;
+ gdouble _tmp18_;
+ gint _tmp19_;
#line 147 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_val_if_fail (IS_RGB_HISTOGRAM_MANIPULATOR (self), FALSE);
#line 147 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -644,17 +637,17 @@ static gboolean rgb_histogram_manipulator_on_button_motion (RGBHistogramManipula
_tmp1_ = self->priv->is_left_nub_tracking;
#line 148 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
if (!_tmp1_) {
-#line 648 "RGBHistogramManipulator.c"
+#line 641 "RGBHistogramManipulator.c"
gboolean _tmp2_;
#line 148 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp2_ = self->priv->is_right_nub_tracking;
#line 148 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp0_ = !_tmp2_;
-#line 654 "RGBHistogramManipulator.c"
+#line 647 "RGBHistogramManipulator.c"
} else {
#line 148 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp0_ = FALSE;
-#line 658 "RGBHistogramManipulator.c"
+#line 651 "RGBHistogramManipulator.c"
}
#line 148 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
if (_tmp0_) {
@@ -662,129 +655,106 @@ static gboolean rgb_histogram_manipulator_on_button_motion (RGBHistogramManipula
result = FALSE;
#line 149 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 666 "RGBHistogramManipulator.c"
+#line 659 "RGBHistogramManipulator.c"
}
#line 151 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp3_ = event_record;
+ _tmp3_ = event_record->x;
#line 151 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp4_ = event_record;
-#line 151 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp5_ = _tmp4_->x;
-#line 151 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp6_ = self->priv->offset;
+ _tmp4_ = self->priv->offset;
#line 151 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp4_->x = _tmp5_ - _tmp6_;
+ event_record->x = _tmp3_ - _tmp4_;
#line 152 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp7_ = self->priv->is_left_nub_tracking;
+ _tmp5_ = self->priv->is_left_nub_tracking;
#line 152 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp7_) {
-#line 682 "RGBHistogramManipulator.c"
+ if (_tmp5_) {
+#line 671 "RGBHistogramManipulator.c"
gint track_x_delta = 0;
- GdkEventMotion* _tmp8_;
- gdouble _tmp9_;
+ gdouble _tmp6_;
+ gint _tmp7_;
+ gint _tmp8_;
+ gint _tmp9_;
gint _tmp10_;
gint _tmp11_;
- gint _tmp12_;
- gint _tmp13_;
- gint _tmp14_;
- gint _tmp15_;
-#line 153 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp8_ = event_record;
#line 153 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp9_ = _tmp8_->x;
+ _tmp6_ = event_record->x;
#line 153 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp10_ = self->priv->track_start_x;
+ _tmp7_ = self->priv->track_start_x;
#line 153 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- track_x_delta = ((gint) _tmp9_) - _tmp10_;
+ track_x_delta = ((gint) _tmp6_) - _tmp7_;
#line 154 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp11_ = self->priv->track_nub_start_position;
+ _tmp8_ = self->priv->track_nub_start_position;
#line 154 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp12_ = track_x_delta;
+ _tmp9_ = track_x_delta;
#line 154 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->left_nub_position = _tmp11_ + _tmp12_;
+ self->priv->left_nub_position = _tmp8_ + _tmp9_;
#line 155 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp13_ = self->priv->left_nub_position;
+ _tmp10_ = self->priv->left_nub_position;
#line 155 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp14_ = self->priv->left_nub_max;
+ _tmp11_ = self->priv->left_nub_max;
#line 155 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp15_ = CLAMP (_tmp13_, 0, _tmp14_);
-#line 155 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->left_nub_position = _tmp15_;
-#line 714 "RGBHistogramManipulator.c"
+ self->priv->left_nub_position = CLAMP (_tmp10_, 0, _tmp11_);
+#line 697 "RGBHistogramManipulator.c"
} else {
gint track_x_delta = 0;
- GdkEventMotion* _tmp16_;
- gdouble _tmp17_;
- gint _tmp18_;
- gint _tmp19_;
- gint _tmp20_;
- gint _tmp21_;
- gint _tmp22_;
- gint _tmp23_;
-#line 157 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp16_ = event_record;
+ gdouble _tmp12_;
+ gint _tmp13_;
+ gint _tmp14_;
+ gint _tmp15_;
+ gint _tmp16_;
+ gint _tmp17_;
#line 157 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp17_ = _tmp16_->x;
+ _tmp12_ = event_record->x;
#line 157 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp18_ = self->priv->track_start_x;
+ _tmp13_ = self->priv->track_start_x;
#line 157 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- track_x_delta = ((gint) _tmp17_) - _tmp18_;
+ track_x_delta = ((gint) _tmp12_) - _tmp13_;
#line 158 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp19_ = self->priv->track_nub_start_position;
+ _tmp14_ = self->priv->track_nub_start_position;
#line 158 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp20_ = track_x_delta;
+ _tmp15_ = track_x_delta;
#line 158 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->right_nub_position = _tmp19_ + _tmp20_;
+ self->priv->right_nub_position = _tmp14_ + _tmp15_;
#line 159 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp21_ = self->priv->right_nub_position;
+ _tmp16_ = self->priv->right_nub_position;
#line 159 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp22_ = self->priv->right_nub_min;
+ _tmp17_ = self->priv->right_nub_min;
#line 159 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp23_ = CLAMP (_tmp21_, _tmp22_, 255);
-#line 159 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->right_nub_position = _tmp23_;
-#line 747 "RGBHistogramManipulator.c"
+ self->priv->right_nub_position = CLAMP (_tmp16_, _tmp17_, 255);
+#line 724 "RGBHistogramManipulator.c"
}
#line 162 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_force_update (self);
#line 163 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp24_ = event_record;
-#line 163 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp25_ = event_record;
-#line 163 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp26_ = _tmp25_->x;
+ _tmp18_ = event_record->x;
#line 163 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp27_ = self->priv->offset;
+ _tmp19_ = self->priv->offset;
#line 163 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp25_->x = _tmp26_ + _tmp27_;
+ event_record->x = _tmp18_ + _tmp19_;
#line 165 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = TRUE;
#line 165 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 765 "RGBHistogramManipulator.c"
+#line 738 "RGBHistogramManipulator.c"
}
-static gboolean rgb_histogram_manipulator_real_focus_out_event (GtkWidget* base, GdkEventFocus* event) {
+static gboolean
+rgb_histogram_manipulator_real_focus_out_event (GtkWidget* base,
+ GdkEventFocus* event)
+{
RGBHistogramManipulator * self;
gboolean result = FALSE;
- GdkEventFocus* _tmp0_;
- gboolean _tmp1_;
#line 168 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RGB_HISTOGRAM_MANIPULATOR, RGBHistogramManipulator);
#line 168 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_val_if_fail (event != NULL, FALSE);
#line 169 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp0_ = event;
-#line 169 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_ = GTK_WIDGET_CLASS (rgb_histogram_manipulator_parent_class)->focus_out_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_drawing_area_get_type (), GtkDrawingArea), gtk_widget_get_type (), GtkWidget), _tmp0_);
-#line 169 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp1_) {
+ if (GTK_WIDGET_CLASS (rgb_histogram_manipulator_parent_class)->focus_out_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_drawing_area_get_type (), GtkDrawingArea), gtk_widget_get_type (), GtkWidget), event)) {
#line 170 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = TRUE;
#line 170 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 788 "RGBHistogramManipulator.c"
+#line 758 "RGBHistogramManipulator.c"
}
#line 173 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
gtk_widget_queue_draw (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
@@ -792,169 +762,142 @@ static gboolean rgb_histogram_manipulator_real_focus_out_event (GtkWidget* base,
result = FALSE;
#line 175 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 796 "RGBHistogramManipulator.c"
+#line 766 "RGBHistogramManipulator.c"
}
-static gboolean rgb_histogram_manipulator_real_key_press_event (GtkWidget* base, GdkEventKey* event) {
+static gboolean
+rgb_histogram_manipulator_real_key_press_event (GtkWidget* base,
+ GdkEventKey* event)
+{
RGBHistogramManipulator * self;
gboolean result = FALSE;
- GdkEventKey* _tmp0_;
- gboolean _tmp1_;
gint delta = 0;
- gboolean _tmp2_ = FALSE;
- GdkEventKey* _tmp3_;
+ gboolean _tmp0_ = FALSE;
+ guint _tmp1_;
+ gboolean _tmp3_ = FALSE;
guint _tmp4_;
- gboolean _tmp7_ = FALSE;
- GdkEventKey* _tmp8_;
- guint _tmp9_;
- GdkEventKey* _tmp12_;
- GdkModifierType _tmp13_;
- gint _tmp15_;
- GdkEventKey* _tmp16_;
- GdkModifierType _tmp17_;
+ GdkModifierType _tmp6_;
+ gint _tmp8_;
+ GdkModifierType _tmp9_;
#line 178 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RGB_HISTOGRAM_MANIPULATOR, RGBHistogramManipulator);
#line 178 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_val_if_fail (event != NULL, FALSE);
#line 179 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp0_ = event;
-#line 179 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_ = GTK_WIDGET_CLASS (rgb_histogram_manipulator_parent_class)->key_press_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_drawing_area_get_type (), GtkDrawingArea), gtk_widget_get_type (), GtkWidget), _tmp0_);
-#line 179 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp1_) {
+ if (GTK_WIDGET_CLASS (rgb_histogram_manipulator_parent_class)->key_press_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_drawing_area_get_type (), GtkDrawingArea), gtk_widget_get_type (), GtkWidget), event)) {
#line 180 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = TRUE;
#line 180 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 831 "RGBHistogramManipulator.c"
+#line 794 "RGBHistogramManipulator.c"
}
#line 183 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
delta = 0;
#line 185 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp3_ = event;
-#line 185 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp4_ = _tmp3_->keyval;
+ _tmp1_ = event->keyval;
#line 185 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp4_ == ((guint) GDK_KEY_Left)) {
+ if (_tmp1_ == ((guint) GDK_KEY_Left)) {
#line 185 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp2_ = TRUE;
-#line 843 "RGBHistogramManipulator.c"
+ _tmp0_ = TRUE;
+#line 804 "RGBHistogramManipulator.c"
} else {
- GdkEventKey* _tmp5_;
- guint _tmp6_;
+ guint _tmp2_;
#line 185 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp5_ = event;
+ _tmp2_ = event->keyval;
#line 185 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp6_ = _tmp5_->keyval;
-#line 185 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp2_ = _tmp6_ == ((guint) GDK_KEY_Up);
-#line 853 "RGBHistogramManipulator.c"
+ _tmp0_ = _tmp2_ == ((guint) GDK_KEY_Up);
+#line 811 "RGBHistogramManipulator.c"
}
#line 185 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp2_) {
+ if (_tmp0_) {
#line 186 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
delta = -1;
-#line 859 "RGBHistogramManipulator.c"
+#line 817 "RGBHistogramManipulator.c"
}
#line 189 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp8_ = event;
-#line 189 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp9_ = _tmp8_->keyval;
+ _tmp4_ = event->keyval;
#line 189 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp9_ == ((guint) GDK_KEY_Right)) {
+ if (_tmp4_ == ((guint) GDK_KEY_Right)) {
#line 189 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp7_ = TRUE;
-#line 869 "RGBHistogramManipulator.c"
+ _tmp3_ = TRUE;
+#line 825 "RGBHistogramManipulator.c"
} else {
- GdkEventKey* _tmp10_;
- guint _tmp11_;
+ guint _tmp5_;
#line 189 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp10_ = event;
+ _tmp5_ = event->keyval;
#line 189 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp11_ = _tmp10_->keyval;
-#line 189 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp7_ = _tmp11_ == ((guint) GDK_KEY_Down);
-#line 879 "RGBHistogramManipulator.c"
+ _tmp3_ = _tmp5_ == ((guint) GDK_KEY_Down);
+#line 832 "RGBHistogramManipulator.c"
}
#line 189 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp7_) {
+ if (_tmp3_) {
#line 190 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
delta = 1;
-#line 885 "RGBHistogramManipulator.c"
+#line 838 "RGBHistogramManipulator.c"
}
#line 193 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp12_ = event;
-#line 193 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp13_ = _tmp12_->state;
+ _tmp6_ = event->state;
#line 193 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (!((_tmp13_ & GDK_CONTROL_MASK) == GDK_CONTROL_MASK)) {
-#line 893 "RGBHistogramManipulator.c"
- gint _tmp14_;
+ if (!((_tmp6_ & GDK_CONTROL_MASK) == GDK_CONTROL_MASK)) {
+#line 844 "RGBHistogramManipulator.c"
+ gint _tmp7_;
#line 194 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp14_ = delta;
+ _tmp7_ = delta;
#line 194 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- delta = _tmp14_ * 5;
-#line 899 "RGBHistogramManipulator.c"
+ delta = _tmp7_ * 5;
+#line 850 "RGBHistogramManipulator.c"
}
#line 197 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp15_ = delta;
+ _tmp8_ = delta;
#line 197 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp15_ == 0) {
+ if (_tmp8_ == 0) {
#line 198 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = FALSE;
#line 198 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 909 "RGBHistogramManipulator.c"
+#line 860 "RGBHistogramManipulator.c"
}
#line 201 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp16_ = event;
+ _tmp9_ = event->state;
#line 201 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp17_ = _tmp16_->state;
-#line 201 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if ((_tmp17_ & GDK_SHIFT_MASK) == GDK_SHIFT_MASK) {
-#line 917 "RGBHistogramManipulator.c"
- gint _tmp18_;
- gint _tmp19_;
- gint _tmp20_;
- gint _tmp21_;
- gint _tmp22_;
+ if ((_tmp9_ & GDK_SHIFT_MASK) == GDK_SHIFT_MASK) {
+#line 866 "RGBHistogramManipulator.c"
+ gint _tmp10_;
+ gint _tmp11_;
+ gint _tmp12_;
+ gint _tmp13_;
#line 202 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp18_ = self->priv->right_nub_position;
+ _tmp10_ = self->priv->right_nub_position;
#line 202 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp19_ = delta;
+ _tmp11_ = delta;
#line 202 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->right_nub_position = _tmp18_ + _tmp19_;
+ self->priv->right_nub_position = _tmp10_ + _tmp11_;
#line 203 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp20_ = self->priv->right_nub_position;
-#line 203 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp21_ = self->priv->right_nub_min;
+ _tmp12_ = self->priv->right_nub_position;
#line 203 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp22_ = CLAMP (_tmp20_, _tmp21_, 255);
+ _tmp13_ = self->priv->right_nub_min;
#line 203 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->right_nub_position = _tmp22_;
-#line 937 "RGBHistogramManipulator.c"
+ self->priv->right_nub_position = CLAMP (_tmp12_, _tmp13_, 255);
+#line 883 "RGBHistogramManipulator.c"
} else {
- gint _tmp23_;
- gint _tmp24_;
- gint _tmp25_;
- gint _tmp26_;
- gint _tmp27_;
+ gint _tmp14_;
+ gint _tmp15_;
+ gint _tmp16_;
+ gint _tmp17_;
#line 205 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp23_ = self->priv->left_nub_position;
+ _tmp14_ = self->priv->left_nub_position;
#line 205 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp24_ = delta;
+ _tmp15_ = delta;
#line 205 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->left_nub_position = _tmp23_ + _tmp24_;
-#line 206 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp25_ = self->priv->left_nub_position;
+ self->priv->left_nub_position = _tmp14_ + _tmp15_;
#line 206 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp26_ = self->priv->left_nub_max;
+ _tmp16_ = self->priv->left_nub_position;
#line 206 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp27_ = CLAMP (_tmp25_, 0, _tmp26_);
+ _tmp17_ = self->priv->left_nub_max;
#line 206 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->left_nub_position = _tmp27_;
-#line 958 "RGBHistogramManipulator.c"
+ self->priv->left_nub_position = CLAMP (_tmp16_, 0, _tmp17_);
+#line 901 "RGBHistogramManipulator.c"
}
#line 210 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_signal_emit (self, rgb_histogram_manipulator_signals[RGB_HISTOGRAM_MANIPULATOR_NUB_POSITION_CHANGED_SIGNAL], 0);
@@ -966,11 +909,14 @@ static gboolean rgb_histogram_manipulator_real_key_press_event (GtkWidget* base,
result = TRUE;
#line 214 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 970 "RGBHistogramManipulator.c"
+#line 913 "RGBHistogramManipulator.c"
}
-static gboolean rgb_histogram_manipulator_real_draw (GtkWidget* base, cairo_t* ctx) {
+static gboolean
+rgb_histogram_manipulator_real_draw (GtkWidget* base,
+ cairo_t* ctx)
+{
RGBHistogramManipulator * self;
gboolean result = FALSE;
GtkBorder padding = {0};
@@ -988,14 +934,11 @@ static gboolean rgb_histogram_manipulator_real_draw (GtkWidget* base, cairo_t* c
gint16 _tmp10_;
gboolean _tmp11_;
gboolean _tmp12_;
- cairo_t* _tmp23_;
- GdkRectangle _tmp24_;
- cairo_t* _tmp25_;
- GdkRectangle _tmp26_;
- gint _tmp27_;
- cairo_t* _tmp28_;
- GdkRectangle _tmp29_;
- gint _tmp30_;
+ GdkRectangle _tmp22_;
+ GdkRectangle _tmp23_;
+ gint _tmp24_;
+ GdkRectangle _tmp25_;
+ gint _tmp26_;
#line 217 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RGB_HISTOGRAM_MANIPULATOR, RGBHistogramManipulator);
#line 217 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -1040,85 +983,78 @@ static gboolean rgb_histogram_manipulator_real_draw (GtkWidget* base, cairo_t* c
_tmp12_ = _tmp11_;
#line 226 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
if (_tmp12_) {
-#line 1044 "RGBHistogramManipulator.c"
+#line 987 "RGBHistogramManipulator.c"
GtkStyleContext* _tmp13_;
- cairo_t* _tmp14_;
- GdkRectangle _tmp15_;
- gint _tmp16_;
- GdkRectangle _tmp17_;
- gint _tmp18_;
- GdkRectangle _tmp19_;
- gint _tmp20_;
- GdkRectangle _tmp21_;
- gint _tmp22_;
+ GdkRectangle _tmp14_;
+ gint _tmp15_;
+ GdkRectangle _tmp16_;
+ gint _tmp17_;
+ GdkRectangle _tmp18_;
+ gint _tmp19_;
+ GdkRectangle _tmp20_;
+ gint _tmp21_;
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp13_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp14_ = ctx;
+ _tmp14_ = area;
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp15_ = area;
+ _tmp15_ = _tmp14_.x;
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp16_ = _tmp15_.x;
+ _tmp16_ = area;
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp17_ = area;
+ _tmp17_ = _tmp16_.y;
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp18_ = _tmp17_.y;
+ _tmp18_ = area;
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp19_ = area;
+ _tmp19_ = _tmp18_.width;
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp20_ = _tmp19_.width;
+ _tmp20_ = area;
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp21_ = area;
+ _tmp21_ = _tmp20_.height;
#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp22_ = _tmp21_.height;
-#line 227 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- gtk_render_focus (_tmp13_, _tmp14_, (gdouble) _tmp16_, (gdouble) _tmp18_, (gdouble) (_tmp20_ + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE), (gdouble) ((_tmp22_ + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE) + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH));
-#line 1077 "RGBHistogramManipulator.c"
+ gtk_render_focus (_tmp13_, ctx, (gdouble) _tmp15_, (gdouble) _tmp17_, (gdouble) (_tmp19_ + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE), (gdouble) ((_tmp21_ + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE) + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH));
+#line 1017 "RGBHistogramManipulator.c"
}
#line 232 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp23_ = ctx;
-#line 232 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp24_ = area;
+ _tmp22_ = area;
#line 232 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- rgb_histogram_manipulator_draw_histogram (self, _tmp23_, &_tmp24_);
+ rgb_histogram_manipulator_draw_histogram (self, ctx, &_tmp22_);
#line 233 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp25_ = ctx;
+ _tmp23_ = area;
#line 233 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp26_ = area;
+ _tmp24_ = self->priv->left_nub_position;
#line 233 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp27_ = self->priv->left_nub_position;
-#line 233 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- rgb_histogram_manipulator_draw_nub (self, _tmp25_, &_tmp26_, _tmp27_);
-#line 234 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp28_ = ctx;
+ rgb_histogram_manipulator_draw_nub (self, ctx, &_tmp23_, _tmp24_);
#line 234 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp29_ = area;
+ _tmp25_ = area;
#line 234 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp30_ = self->priv->right_nub_position;
+ _tmp26_ = self->priv->right_nub_position;
#line 234 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- rgb_histogram_manipulator_draw_nub (self, _tmp28_, &_tmp29_, _tmp30_);
+ rgb_histogram_manipulator_draw_nub (self, ctx, &_tmp25_, _tmp26_);
#line 236 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
result = TRUE;
#line 236 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 1105 "RGBHistogramManipulator.c"
+#line 1039 "RGBHistogramManipulator.c"
}
-static void rgb_histogram_manipulator_draw_histogram (RGBHistogramManipulator* self, cairo_t* ctx, GdkRectangle* area) {
+static void
+rgb_histogram_manipulator_draw_histogram (RGBHistogramManipulator* self,
+ cairo_t* ctx,
+ GdkRectangle* area)
+{
RGBHistogram* _tmp0_;
GdkPixbuf* histogram_graphic = NULL;
RGBHistogram* _tmp1_;
GdkPixbuf* _tmp2_;
- cairo_t* _tmp3_;
- GdkPixbuf* _tmp4_;
- GdkRectangle _tmp5_;
- gint _tmp6_;
- GdkRectangle _tmp7_;
+ GdkPixbuf* _tmp3_;
+ GdkRectangle _tmp4_;
+ gint _tmp5_;
+ GdkRectangle _tmp6_;
+ gint _tmp7_;
gint _tmp8_;
- cairo_t* _tmp9_;
- gint _tmp10_;
- gint _tmp22_;
+ gint _tmp17_;
#line 239 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_if_fail (IS_RGB_HISTOGRAM_MANIPULATOR (self));
#line 239 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -1131,7 +1067,7 @@ static void rgb_histogram_manipulator_draw_histogram (RGBHistogramManipulator* s
if (_tmp0_ == NULL) {
#line 241 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return;
-#line 1135 "RGBHistogramManipulator.c"
+#line 1071 "RGBHistogramManipulator.c"
}
#line 243 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp1_ = self->priv->histogram;
@@ -1140,155 +1076,129 @@ static void rgb_histogram_manipulator_draw_histogram (RGBHistogramManipulator* s
#line 243 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
histogram_graphic = _tmp2_;
#line 245 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp3_ = ctx;
-#line 245 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp4_ = histogram_graphic;
+ _tmp3_ = histogram_graphic;
#line 245 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp5_ = *area;
+ _tmp4_ = *area;
#line 245 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp6_ = _tmp5_.x;
+ _tmp5_ = _tmp4_.x;
#line 245 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp7_ = *area;
+ _tmp6_ = *area;
#line 245 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp8_ = _tmp7_.y;
+ _tmp7_ = _tmp6_.y;
#line 245 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- gdk_cairo_set_source_pixbuf (_tmp3_, _tmp4_, (gdouble) (_tmp6_ + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH), (gdouble) (_tmp8_ + 2));
+ gdk_cairo_set_source_pixbuf (ctx, _tmp3_, (gdouble) (_tmp5_ + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH), (gdouble) (_tmp7_ + 2));
#line 246 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp9_ = ctx;
-#line 246 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_paint (_tmp9_);
+ cairo_paint (ctx);
#line 248 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp10_ = self->priv->left_nub_position;
+ _tmp8_ = self->priv->left_nub_position;
#line 248 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp10_ > 0) {
-#line 1165 "RGBHistogramManipulator.c"
- cairo_t* _tmp11_;
- GdkRectangle _tmp12_;
+ if (_tmp8_ > 0) {
+#line 1097 "RGBHistogramManipulator.c"
+ GdkRectangle _tmp9_;
+ gint _tmp10_;
+ GdkRectangle _tmp11_;
+ gint _tmp12_;
gint _tmp13_;
- GdkRectangle _tmp14_;
+ GdkPixbuf* _tmp14_;
gint _tmp15_;
gint _tmp16_;
- GdkPixbuf* _tmp17_;
- gint _tmp18_;
- gint _tmp19_;
- cairo_t* _tmp20_;
- cairo_t* _tmp21_;
-#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp11_ = ctx;
#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp12_ = *area;
+ _tmp9_ = *area;
#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp13_ = _tmp12_.x;
+ _tmp10_ = _tmp9_.x;
#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp14_ = *area;
+ _tmp11_ = *area;
#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp15_ = _tmp14_.y;
+ _tmp12_ = _tmp11_.y;
#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp16_ = self->priv->left_nub_position;
+ _tmp13_ = self->priv->left_nub_position;
#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp17_ = histogram_graphic;
+ _tmp14_ = histogram_graphic;
#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp18_ = gdk_pixbuf_get_height (_tmp17_);
+ _tmp15_ = gdk_pixbuf_get_height (_tmp14_);
#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp19_ = _tmp18_;
+ _tmp16_ = _tmp15_;
#line 249 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_rectangle (_tmp11_, (gdouble) (_tmp13_ + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH), (gdouble) (_tmp15_ + 2), (gdouble) _tmp16_, (gdouble) _tmp19_);
-#line 252 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp20_ = ctx;
+ cairo_rectangle (ctx, (gdouble) (_tmp10_ + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH), (gdouble) (_tmp12_ + 2), (gdouble) _tmp13_, (gdouble) _tmp16_);
#line 252 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_set_source_rgba (_tmp20_, 0.0, 0.0, 0.0, 0.45);
+ cairo_set_source_rgba (ctx, 0.0, 0.0, 0.0, 0.45);
#line 253 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp21_ = ctx;
-#line 253 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_fill (_tmp21_);
-#line 1205 "RGBHistogramManipulator.c"
+ cairo_fill (ctx);
+#line 1128 "RGBHistogramManipulator.c"
}
#line 256 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp22_ = self->priv->right_nub_position;
+ _tmp17_ = self->priv->right_nub_position;
#line 256 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp22_ < 255) {
-#line 1211 "RGBHistogramManipulator.c"
- cairo_t* _tmp23_;
- GdkRectangle _tmp24_;
+ if (_tmp17_ < 255) {
+#line 1134 "RGBHistogramManipulator.c"
+ GdkRectangle _tmp18_;
+ gint _tmp19_;
+ gint _tmp20_;
+ GdkRectangle _tmp21_;
+ gint _tmp22_;
+ GdkPixbuf* _tmp23_;
+ gint _tmp24_;
gint _tmp25_;
gint _tmp26_;
- GdkRectangle _tmp27_;
+ GdkPixbuf* _tmp27_;
gint _tmp28_;
- GdkPixbuf* _tmp29_;
- gint _tmp30_;
- gint _tmp31_;
- gint _tmp32_;
- GdkPixbuf* _tmp33_;
- gint _tmp34_;
- gint _tmp35_;
- cairo_t* _tmp36_;
- cairo_t* _tmp37_;
+ gint _tmp29_;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp23_ = ctx;
+ _tmp18_ = *area;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp24_ = *area;
+ _tmp19_ = _tmp18_.x;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp25_ = _tmp24_.x;
-#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp26_ = self->priv->right_nub_position;
+ _tmp20_ = self->priv->right_nub_position;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp27_ = *area;
+ _tmp21_ = *area;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp28_ = _tmp27_.y;
+ _tmp22_ = _tmp21_.y;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp29_ = histogram_graphic;
+ _tmp23_ = histogram_graphic;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp30_ = gdk_pixbuf_get_width (_tmp29_);
+ _tmp24_ = gdk_pixbuf_get_width (_tmp23_);
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp31_ = _tmp30_;
+ _tmp25_ = _tmp24_;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp32_ = self->priv->right_nub_position;
+ _tmp26_ = self->priv->right_nub_position;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp33_ = histogram_graphic;
+ _tmp27_ = histogram_graphic;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp34_ = gdk_pixbuf_get_height (_tmp33_);
+ _tmp28_ = gdk_pixbuf_get_height (_tmp27_);
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp35_ = _tmp34_;
+ _tmp29_ = _tmp28_;
#line 257 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_rectangle (_tmp23_, (gdouble) ((_tmp25_ + _tmp26_) + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH), (gdouble) (_tmp28_ + 2), (gdouble) (_tmp31_ - _tmp32_), (gdouble) _tmp35_);
-#line 261 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp36_ = ctx;
+ cairo_rectangle (ctx, (gdouble) ((_tmp19_ + _tmp20_) + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH), (gdouble) (_tmp22_ + 2), (gdouble) (_tmp25_ - _tmp26_), (gdouble) _tmp29_);
#line 261 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_set_source_rgba (_tmp36_, 1.0, 1.0, 1.0, 0.45);
-#line 262 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp37_ = ctx;
+ cairo_set_source_rgba (ctx, 1.0, 1.0, 1.0, 0.45);
#line 262 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_fill (_tmp37_);
-#line 1263 "RGBHistogramManipulator.c"
+ cairo_fill (ctx);
+#line 1177 "RGBHistogramManipulator.c"
}
#line 239 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_g_object_unref0 (histogram_graphic);
-#line 1267 "RGBHistogramManipulator.c"
+#line 1181 "RGBHistogramManipulator.c"
}
-static void rgb_histogram_manipulator_draw_nub (RGBHistogramManipulator* self, cairo_t* ctx, GdkRectangle* area, gint position) {
- cairo_t* _tmp0_;
- GdkRectangle _tmp1_;
- gint _tmp2_;
+static void
+rgb_histogram_manipulator_draw_nub (RGBHistogramManipulator* self,
+ cairo_t* ctx,
+ GdkRectangle* area,
+ gint position)
+{
+ GdkRectangle _tmp0_;
+ gint _tmp1_;
+ GdkRectangle _tmp2_;
gint _tmp3_;
GdkRectangle _tmp4_;
gint _tmp5_;
- cairo_t* _tmp6_;
- GdkRectangle _tmp7_;
- gint _tmp8_;
+ GdkRectangle _tmp6_;
+ gint _tmp7_;
+ GdkRectangle _tmp8_;
gint _tmp9_;
GdkRectangle _tmp10_;
gint _tmp11_;
- cairo_t* _tmp12_;
- GdkRectangle _tmp13_;
- gint _tmp14_;
- gint _tmp15_;
- GdkRectangle _tmp16_;
- gint _tmp17_;
- cairo_t* _tmp18_;
- cairo_t* _tmp19_;
- cairo_t* _tmp20_;
#line 266 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_if_fail (IS_RGB_HISTOGRAM_MANIPULATOR (self));
#line 266 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -1296,64 +1206,48 @@ static void rgb_histogram_manipulator_draw_nub (RGBHistogramManipulator* self, c
#line 266 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_if_fail (area != NULL);
#line 267 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp0_ = ctx;
-#line 267 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_ = *area;
-#line 267 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp2_ = _tmp1_.x;
+ _tmp0_ = *area;
#line 267 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp3_ = position;
+ _tmp1_ = _tmp0_.x;
#line 267 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp4_ = *area;
+ _tmp2_ = *area;
#line 267 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp5_ = _tmp4_.y;
+ _tmp3_ = _tmp2_.y;
#line 267 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_move_to (_tmp0_, (gdouble) (_tmp2_ + _tmp3_), (gdouble) ((_tmp5_ + RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION) + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE));
-#line 268 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp6_ = ctx;
-#line 268 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp7_ = *area;
+ cairo_move_to (ctx, (gdouble) (_tmp1_ + position), (gdouble) ((_tmp3_ + RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION) + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE));
#line 268 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp8_ = _tmp7_.x;
+ _tmp4_ = *area;
#line 268 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp9_ = position;
+ _tmp5_ = _tmp4_.x;
#line 268 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp10_ = *area;
+ _tmp6_ = *area;
#line 268 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp11_ = _tmp10_.y;
+ _tmp7_ = _tmp6_.y;
#line 268 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_line_to (_tmp6_, (gdouble) ((_tmp8_ + _tmp9_) + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH), (gdouble) (_tmp11_ + RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION));
+ cairo_line_to (ctx, (gdouble) ((_tmp5_ + position) + RGB_HISTOGRAM_MANIPULATOR_NUB_HALF_WIDTH), (gdouble) (_tmp7_ + RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION));
#line 269 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp12_ = ctx;
+ _tmp8_ = *area;
#line 269 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp13_ = *area;
+ _tmp9_ = _tmp8_.x;
#line 269 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp14_ = _tmp13_.x;
-#line 269 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp15_ = position;
-#line 269 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp16_ = *area;
+ _tmp10_ = *area;
#line 269 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp17_ = _tmp16_.y;
+ _tmp11_ = _tmp10_.y;
#line 269 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_line_to (_tmp12_, (gdouble) ((_tmp14_ + _tmp15_) + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE), (gdouble) ((_tmp17_ + RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION) + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE));
-#line 270 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp18_ = ctx;
+ cairo_line_to (ctx, (gdouble) ((_tmp9_ + position) + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE), (gdouble) ((_tmp11_ + RGB_HISTOGRAM_MANIPULATOR_NUB_V_POSITION) + RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE));
#line 270 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_close_path (_tmp18_);
+ cairo_close_path (ctx);
#line 271 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp19_ = ctx;
-#line 271 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_set_source_rgb (_tmp19_, 0.333, 0.333, 0.333);
-#line 272 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp20_ = ctx;
+ cairo_set_source_rgb (ctx, 0.333, 0.333, 0.333);
#line 272 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- cairo_fill (_tmp20_);
-#line 1353 "RGBHistogramManipulator.c"
+ cairo_fill (ctx);
+#line 1245 "RGBHistogramManipulator.c"
}
-static void rgb_histogram_manipulator_force_update (RGBHistogramManipulator* self) {
+static void
+rgb_histogram_manipulator_force_update (RGBHistogramManipulator* self)
+{
GdkWindow* _tmp0_;
#line 275 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_if_fail (IS_RGB_HISTOGRAM_MANIPULATOR (self));
@@ -1361,11 +1255,13 @@ static void rgb_histogram_manipulator_force_update (RGBHistogramManipulator* sel
_tmp0_ = gtk_widget_get_window (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 276 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
gdk_window_invalidate_rect (_tmp0_, NULL, TRUE);
-#line 1365 "RGBHistogramManipulator.c"
+#line 1259 "RGBHistogramManipulator.c"
}
-static void rgb_histogram_manipulator_update_nub_extrema (RGBHistogramManipulator* self) {
+static void
+rgb_histogram_manipulator_update_nub_extrema (RGBHistogramManipulator* self)
+{
gint _tmp0_;
gint _tmp1_;
#line 279 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -1378,32 +1274,34 @@ static void rgb_histogram_manipulator_update_nub_extrema (RGBHistogramManipulato
_tmp1_ = self->priv->right_nub_position;
#line 281 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self->priv->left_nub_max = (_tmp1_ - RGB_HISTOGRAM_MANIPULATOR_NUB_SIZE) - 1;
-#line 1382 "RGBHistogramManipulator.c"
+#line 1278 "RGBHistogramManipulator.c"
}
-void rgb_histogram_manipulator_update_histogram (RGBHistogramManipulator* self, GdkPixbuf* source_pixbuf) {
- GdkPixbuf* _tmp0_;
- RGBHistogram* _tmp1_;
+void
+rgb_histogram_manipulator_update_histogram (RGBHistogramManipulator* self,
+ GdkPixbuf* source_pixbuf)
+{
+ RGBHistogram* _tmp0_;
#line 286 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_if_fail (IS_RGB_HISTOGRAM_MANIPULATOR (self));
#line 286 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_if_fail (GDK_IS_PIXBUF (source_pixbuf));
#line 287 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp0_ = source_pixbuf;
-#line 287 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_ = rgb_histogram_new (_tmp0_);
+ _tmp0_ = rgb_histogram_new (source_pixbuf);
#line 287 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_rgb_histogram_unref0 (self->priv->histogram);
#line 287 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->histogram = _tmp1_;
+ self->priv->histogram = _tmp0_;
#line 288 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_force_update (self);
-#line 1403 "RGBHistogramManipulator.c"
+#line 1299 "RGBHistogramManipulator.c"
}
-gint rgb_histogram_manipulator_get_left_nub_position (RGBHistogramManipulator* self) {
+gint
+rgb_histogram_manipulator_get_left_nub_position (RGBHistogramManipulator* self)
+{
gint result = 0;
gint _tmp0_;
#line 291 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -1414,11 +1312,13 @@ gint rgb_histogram_manipulator_get_left_nub_position (RGBHistogramManipulator* s
result = _tmp0_;
#line 292 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 1418 "RGBHistogramManipulator.c"
+#line 1316 "RGBHistogramManipulator.c"
}
-gint rgb_histogram_manipulator_get_right_nub_position (RGBHistogramManipulator* self) {
+gint
+rgb_histogram_manipulator_get_right_nub_position (RGBHistogramManipulator* self)
+{
gint result = 0;
gint _tmp0_;
#line 295 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -1429,91 +1329,73 @@ gint rgb_histogram_manipulator_get_right_nub_position (RGBHistogramManipulator*
result = _tmp0_;
#line 296 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
return result;
-#line 1433 "RGBHistogramManipulator.c"
+#line 1333 "RGBHistogramManipulator.c"
}
-void rgb_histogram_manipulator_set_left_nub_position (RGBHistogramManipulator* self, gint user_nub_pos) {
+void
+rgb_histogram_manipulator_set_left_nub_position (RGBHistogramManipulator* self,
+ gint user_nub_pos)
+{
gboolean _tmp0_ = FALSE;
gint _tmp1_;
- gint _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
#line 299 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_if_fail (IS_RGB_HISTOGRAM_MANIPULATOR (self));
#line 300 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_ = user_nub_pos;
-#line 300 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp1_ >= 0) {
-#line 1449 "RGBHistogramManipulator.c"
- gint _tmp2_;
+ if (user_nub_pos >= 0) {
#line 300 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp2_ = user_nub_pos;
-#line 300 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp0_ = _tmp2_ <= 255;
-#line 1455 "RGBHistogramManipulator.c"
+ _tmp0_ = user_nub_pos <= 255;
+#line 1349 "RGBHistogramManipulator.c"
} else {
#line 300 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp0_ = FALSE;
-#line 1459 "RGBHistogramManipulator.c"
+#line 1353 "RGBHistogramManipulator.c"
}
#line 300 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_vala_assert (_tmp0_, "(user_nub_pos >= 0) && (user_nub_pos <= 255)");
#line 301 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp3_ = user_nub_pos;
-#line 301 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp4_ = self->priv->left_nub_max;
+ _tmp1_ = self->priv->left_nub_max;
#line 301 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp5_ = CLAMP (_tmp3_, 0, _tmp4_);
-#line 301 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->left_nub_position = _tmp5_;
+ self->priv->left_nub_position = CLAMP (user_nub_pos, 0, _tmp1_);
#line 302 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_update_nub_extrema (self);
-#line 1473 "RGBHistogramManipulator.c"
+#line 1363 "RGBHistogramManipulator.c"
}
-void rgb_histogram_manipulator_set_right_nub_position (RGBHistogramManipulator* self, gint user_nub_pos) {
+void
+rgb_histogram_manipulator_set_right_nub_position (RGBHistogramManipulator* self,
+ gint user_nub_pos)
+{
gboolean _tmp0_ = FALSE;
gint _tmp1_;
- gint _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
#line 305 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
g_return_if_fail (IS_RGB_HISTOGRAM_MANIPULATOR (self));
#line 306 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp1_ = user_nub_pos;
-#line 306 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- if (_tmp1_ >= 0) {
-#line 1489 "RGBHistogramManipulator.c"
- gint _tmp2_;
-#line 306 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp2_ = user_nub_pos;
+ if (user_nub_pos >= 0) {
#line 306 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp0_ = _tmp2_ <= 255;
-#line 1495 "RGBHistogramManipulator.c"
+ _tmp0_ = user_nub_pos <= 255;
+#line 1379 "RGBHistogramManipulator.c"
} else {
#line 306 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_tmp0_ = FALSE;
-#line 1499 "RGBHistogramManipulator.c"
+#line 1383 "RGBHistogramManipulator.c"
}
#line 306 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
_vala_assert (_tmp0_, "(user_nub_pos >= 0) && (user_nub_pos <= 255)");
#line 307 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp3_ = user_nub_pos;
-#line 307 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp4_ = self->priv->right_nub_min;
-#line 307 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- _tmp5_ = CLAMP (_tmp3_, _tmp4_, 255);
+ _tmp1_ = self->priv->right_nub_min;
#line 307 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
- self->priv->right_nub_position = _tmp5_;
+ self->priv->right_nub_position = CLAMP (user_nub_pos, _tmp1_, 255);
#line 308 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_update_nub_extrema (self);
-#line 1513 "RGBHistogramManipulator.c"
+#line 1393 "RGBHistogramManipulator.c"
}
-static void rgb_histogram_manipulator_class_init (RGBHistogramManipulatorClass * klass) {
+static void
+rgb_histogram_manipulator_class_init (RGBHistogramManipulatorClass * klass)
+{
GtkWidgetPath* _tmp0_;
GtkWidgetPath* _tmp1_;
#line 7 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -1538,11 +1420,13 @@ static void rgb_histogram_manipulator_class_init (RGBHistogramManipulatorClass *
_tmp1_ = gtk_widget_path_new ();
#line 24 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
rgb_histogram_manipulator_frame_draw_path = _tmp1_;
-#line 1542 "RGBHistogramManipulator.c"
+#line 1424 "RGBHistogramManipulator.c"
}
-static void rgb_histogram_manipulator_instance_init (RGBHistogramManipulator * self) {
+static void
+rgb_histogram_manipulator_instance_init (RGBHistogramManipulator * self)
+{
#line 7 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self->priv = RGB_HISTOGRAM_MANIPULATOR_GET_PRIVATE (self);
#line 20 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
@@ -1565,11 +1449,13 @@ static void rgb_histogram_manipulator_instance_init (RGBHistogramManipulator * s
self->priv->track_nub_start_position = 0;
#line 34 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self->priv->offset = 0;
-#line 1569 "RGBHistogramManipulator.c"
+#line 1453 "RGBHistogramManipulator.c"
}
-static void rgb_histogram_manipulator_finalize (GObject * obj) {
+static void
+rgb_histogram_manipulator_finalize (GObject * obj)
+{
RGBHistogramManipulator * self;
#line 7 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RGB_HISTOGRAM_MANIPULATOR, RGBHistogramManipulator);
@@ -1577,11 +1463,13 @@ static void rgb_histogram_manipulator_finalize (GObject * obj) {
_rgb_histogram_unref0 (self->priv->histogram);
#line 7 "/home/jens/Source/shotwell/src/editing_tools/RGBHistogramManipulator.vala"
G_OBJECT_CLASS (rgb_histogram_manipulator_parent_class)->finalize (obj);
-#line 1581 "RGBHistogramManipulator.c"
+#line 1467 "RGBHistogramManipulator.c"
}
-GType rgb_histogram_manipulator_get_type (void) {
+GType
+rgb_histogram_manipulator_get_type (void)
+{
static volatile gsize rgb_histogram_manipulator_type_id__volatile = 0;
if (g_once_init_enter (&rgb_histogram_manipulator_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (RGBHistogramManipulatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rgb_histogram_manipulator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RGBHistogramManipulator), 0, (GInstanceInitFunc) rgb_histogram_manipulator_instance_init, NULL };