summaryrefslogtreecommitdiff
path: root/src/Dimensions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Dimensions.c')
-rw-r--r--src/Dimensions.c3326
1 files changed, 1611 insertions, 1715 deletions
diff --git a/src/Dimensions.c b/src/Dimensions.c
index 20bd7e9..a547b10 100644
--- a/src/Dimensions.c
+++ b/src/Dimensions.c
@@ -1,4 +1,4 @@
-/* Dimensions.c generated by valac 0.36.6, the Vala compiler
+/* Dimensions.c generated by valac 0.40.4, the Vala compiler
* generated from Dimensions.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 <stdlib.h>
@@ -74,90 +75,186 @@ gchar* scale_constraint_to_string (ScaleConstraint self);
GType dimensions_get_type (void) G_GNUC_CONST;
Dimensions* dimensions_dup (const Dimensions* self);
void dimensions_free (Dimensions* self);
-void dimensions_init (Dimensions *self, gint width, gint height);
-void dimensions_for_pixbuf (GdkPixbuf* pixbuf, Dimensions* result);
-void dimensions_for_allocation (GtkAllocation* allocation, Dimensions* result);
-void dimensions_for_widget_allocation (GtkWidget* widget, Dimensions* result);
-void dimensions_for_rectangle (GdkRectangle* rect, Dimensions* result);
+void dimensions_init (Dimensions *self,
+ gint width,
+ gint height);
+void dimensions_for_pixbuf (GdkPixbuf* pixbuf,
+ Dimensions* result);
+void dimensions_for_allocation (GtkAllocation* allocation,
+ Dimensions* result);
+void dimensions_for_widget_allocation (GtkWidget* widget,
+ Dimensions* result);
+void dimensions_for_rectangle (GdkRectangle* rect,
+ Dimensions* result);
gboolean dimensions_has_area (Dimensions *self);
-void dimensions_floor (Dimensions *self, Dimensions* min, Dimensions* result);
+void dimensions_floor (Dimensions *self,
+ Dimensions* min,
+ Dimensions* result);
gchar* dimensions_to_string (Dimensions *self);
-gboolean dimensions_equals (Dimensions *self, Dimensions* dim);
-gboolean dimensions_approx_equals (Dimensions *self, Dimensions* dim, gint fudge);
-gboolean dimensions_approx_scaled (Dimensions *self, gint scale, gint fudge);
+gboolean dimensions_equals (Dimensions *self,
+ Dimensions* dim);
+gboolean dimensions_approx_equals (Dimensions *self,
+ Dimensions* dim,
+ gint fudge);
+gboolean dimensions_approx_scaled (Dimensions *self,
+ gint scale,
+ gint fudge);
gint dimensions_major_axis (Dimensions *self);
gint dimensions_minor_axis (Dimensions *self);
-void dimensions_with_min (Dimensions *self, gint min_width, gint min_height, Dimensions* result);
-void dimensions_with_max (Dimensions *self, gint max_width, gint max_height, Dimensions* result);
-void dimensions_get_scaled (Dimensions *self, gint scale, gboolean scale_up, Dimensions* result);
-void dimensions_get_scaled_by_width (Dimensions *self, gint scale, Dimensions* result);
-void dimensions_get_scaled_by_height (Dimensions *self, gint scale, Dimensions* result);
-void dimensions_get_scale_ratios (Dimensions *self, Dimensions* scaled, gdouble* width_ratio, gdouble* height_ratio);
+void dimensions_with_min (Dimensions *self,
+ gint min_width,
+ gint min_height,
+ Dimensions* result);
+void dimensions_with_max (Dimensions *self,
+ gint max_width,
+ gint max_height,
+ Dimensions* result);
+void dimensions_get_scaled (Dimensions *self,
+ gint scale,
+ gboolean scale_up,
+ Dimensions* result);
+void dimensions_get_scaled_by_width (Dimensions *self,
+ gint scale,
+ Dimensions* result);
+void dimensions_get_scaled_by_height (Dimensions *self,
+ gint scale,
+ Dimensions* result);
+void dimensions_get_scale_ratios (Dimensions *self,
+ Dimensions* scaled,
+ gdouble* width_ratio,
+ gdouble* height_ratio);
gdouble dimensions_get_aspect_ratio (Dimensions *self);
-void dimensions_get_scaled_proportional (Dimensions *self, Dimensions* viewport, Dimensions* result);
-void dimensions_get_scaled_to_fill_viewport (Dimensions *self, Dimensions* viewport, Dimensions* result);
-void dimensions_get_scaled_rectangle (Dimensions *self, Dimensions* scaled, GdkRectangle* rect, GdkRectangle* result);
-void dimensions_get_scaled_similar (Dimensions *self, Dimensions* original, Dimensions* scaled, Dimensions* result);
-void dimensions_get_scaled_by_constraint (Dimensions *self, gint scale, ScaleConstraint constraint, Dimensions* result);
+void dimensions_get_scaled_proportional (Dimensions *self,
+ Dimensions* viewport,
+ Dimensions* result);
+void dimensions_get_scaled_to_fill_viewport (Dimensions *self,
+ Dimensions* viewport,
+ Dimensions* result);
+void dimensions_get_scaled_rectangle (Dimensions *self,
+ Dimensions* scaled,
+ GdkRectangle* rect,
+ GdkRectangle* result);
+void dimensions_get_scaled_similar (Dimensions *self,
+ Dimensions* original,
+ Dimensions* scaled,
+ Dimensions* result);
+void dimensions_get_scaled_by_constraint (Dimensions *self,
+ gint scale,
+ ScaleConstraint constraint,
+ Dimensions* result);
GType scaling_get_type (void) G_GNUC_CONST;
Scaling* scaling_dup (const Scaling* self);
void scaling_free (Scaling* self);
#define SCALING_NO_SCALE 0
-static void scaling_init (Scaling *self, ScaleConstraint constraint, gint scale, Dimensions* viewport, gboolean scale_up);
+static void scaling_init (Scaling *self,
+ ScaleConstraint constraint,
+ gint scale,
+ Dimensions* viewport,
+ gboolean scale_up);
void scaling_for_original (Scaling* result);
-void scaling_for_screen (GtkWindow* window, gboolean scale_up, Scaling* result);
-void scaling_for_viewport (Dimensions* viewport, gboolean scale_up, Scaling* result);
-static void scaling_get_screen_dimensions (GtkWindow* window, Dimensions* result);
-void scaling_for_best_fit (gint pixels, gboolean scale_up, Scaling* result);
-void scaling_for_widget (GtkWidget* widget, gboolean scale_up, Scaling* result);
-void scaling_to_fill_viewport (Dimensions* viewport, Scaling* result);
-void scaling_to_fill_screen (GtkWindow* window, Scaling* result);
-void scaling_for_constraint (ScaleConstraint constraint, gint scale, gboolean scale_up, Scaling* result);
+void scaling_for_screen (GtkWindow* window,
+ gboolean scale_up,
+ Scaling* result);
+void scaling_for_viewport (Dimensions* viewport,
+ gboolean scale_up,
+ Scaling* result);
+static void scaling_get_screen_dimensions (GtkWindow* window,
+ Dimensions* result);
+void scaling_for_best_fit (gint pixels,
+ gboolean scale_up,
+ Scaling* result);
+void scaling_for_widget (GtkWidget* widget,
+ gboolean scale_up,
+ Scaling* result);
+void scaling_to_fill_viewport (Dimensions* viewport,
+ Scaling* result);
+void scaling_to_fill_screen (GtkWindow* window,
+ Scaling* result);
+void scaling_for_constraint (ScaleConstraint constraint,
+ gint scale,
+ gboolean scale_up,
+ Scaling* result);
static gint scaling_scale_to_pixels (Scaling *self);
gboolean scaling_is_unscaled (Scaling *self);
-gboolean scaling_is_best_fit (Scaling *self, Dimensions* original, gint* pixels);
-gboolean scaling_is_best_fit_dimensions (Scaling *self, Dimensions* original, Dimensions* scaled);
-gboolean scaling_is_for_viewport (Scaling *self, Dimensions* original, Dimensions* scaled);
-gboolean scaling_is_fill_viewport (Scaling *self, Dimensions* original, Dimensions* scaled);
-void scaling_get_scaled_dimensions (Scaling *self, Dimensions* original, Dimensions* result);
-GdkPixbuf* scaling_perform_on_pixbuf (Scaling *self, GdkPixbuf* pixbuf, GdkInterpType interp, gboolean scale_up);
-GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gboolean scale_up);
-GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType interp);
+gboolean scaling_is_best_fit (Scaling *self,
+ Dimensions* original,
+ gint* pixels);
+gboolean scaling_is_best_fit_dimensions (Scaling *self,
+ Dimensions* original,
+ Dimensions* scaled);
+gboolean scaling_is_for_viewport (Scaling *self,
+ Dimensions* original,
+ Dimensions* scaled);
+gboolean scaling_is_fill_viewport (Scaling *self,
+ Dimensions* original,
+ Dimensions* scaled);
+void scaling_get_scaled_dimensions (Scaling *self,
+ Dimensions* original,
+ Dimensions* result);
+GdkPixbuf* scaling_perform_on_pixbuf (Scaling *self,
+ GdkPixbuf* pixbuf,
+ GdkInterpType interp,
+ gboolean scale_up);
+GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf,
+ gint scale,
+ GdkInterpType interp,
+ gboolean scale_up);
+GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf,
+ Dimensions* resized,
+ GdkInterpType interp);
gchar* scaling_to_string (Scaling *self);
-gboolean scaling_equals (Scaling *self, Scaling* scaling);
+gboolean scaling_equals (Scaling *self,
+ Scaling* scaling);
GType zoom_state_get_type (void) G_GNUC_CONST;
ZoomState* zoom_state_dup (const ZoomState* self);
void zoom_state_free (ZoomState* self);
-void zoom_state_init (ZoomState *self, Dimensions* content_dimensions, Dimensions* viewport_dimensions, gdouble slider_val, GdkPoint* viewport_center);
+void zoom_state_init (ZoomState *self,
+ Dimensions* content_dimensions,
+ Dimensions* viewport_dimensions,
+ gdouble slider_val,
+ GdkPoint* viewport_center);
static void zoom_state_compute_zoom_factors (ZoomState *self);
static void zoom_state_center_viewport (ZoomState *self);
static void zoom_state_clamp_viewport_center (ZoomState *self);
-void zoom_state_init_rescale (ZoomState *self, ZoomState* existing, gdouble new_slider_val);
-void zoom_state_init_rescale_to_isomorphic (ZoomState *self, ZoomState* existing);
-void zoom_state_init_pan (ZoomState *self, ZoomState* existing, GdkPoint* new_viewport_center);
+void zoom_state_init_rescale (ZoomState *self,
+ ZoomState* existing,
+ gdouble new_slider_val);
+void zoom_state_init_rescale_to_isomorphic (ZoomState *self,
+ ZoomState* existing);
+void zoom_state_init_pan (ZoomState *self,
+ ZoomState* existing,
+ GdkPoint* new_viewport_center);
gint zoom_state_get_zoomed_width (ZoomState *self);
gint zoom_state_get_zoomed_height (ZoomState *self);
gdouble zoom_state_get_interpolation_factor (ZoomState *self);
-void zoom_state_get_viewing_rectangle_wrt_content (ZoomState *self, GdkRectangle* result);
-void zoom_state_get_viewing_rectangle_wrt_screen (ZoomState *self, GdkRectangle* result);
-void zoom_state_get_viewing_rectangle_projection (ZoomState *self, GdkPixbuf* for_pixbuf, GdkRectangle* result);
+void zoom_state_get_viewing_rectangle_wrt_content (ZoomState *self,
+ GdkRectangle* result);
+void zoom_state_get_viewing_rectangle_wrt_screen (ZoomState *self,
+ GdkRectangle* result);
+void zoom_state_get_viewing_rectangle_projection (ZoomState *self,
+ GdkPixbuf* for_pixbuf,
+ GdkRectangle* result);
gdouble zoom_state_get_zoom_factor (ZoomState *self);
-void zoom_state_get_viewport_center (ZoomState *self, GdkPoint* result);
+void zoom_state_get_viewport_center (ZoomState *self,
+ GdkPoint* result);
gchar* zoom_state_to_string (ZoomState *self);
gboolean zoom_state_is_min (ZoomState *self);
gboolean zoom_state_is_default (ZoomState *self);
gboolean zoom_state_is_isomorphic (ZoomState *self);
gboolean zoom_state_is_max (ZoomState *self);
-gboolean zoom_state_equals (ZoomState *self, ZoomState* other);
+gboolean zoom_state_equals (ZoomState *self,
+ ZoomState* other);
-gchar* scale_constraint_to_string (ScaleConstraint self) {
+gchar*
+scale_constraint_to_string (ScaleConstraint self)
+{
gchar* result = NULL;
#line 15 "/home/jens/Source/shotwell/src/Dimensions.vala"
switch (self) {
#line 15 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_ORIGINAL:
-#line 161 "Dimensions.c"
+#line 258 "Dimensions.c"
{
gchar* _tmp0_;
#line 17 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -166,11 +263,11 @@ gchar* scale_constraint_to_string (ScaleConstraint self) {
result = _tmp0_;
#line 17 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 170 "Dimensions.c"
+#line 267 "Dimensions.c"
}
#line 15 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_DIMENSIONS:
-#line 174 "Dimensions.c"
+#line 271 "Dimensions.c"
{
gchar* _tmp1_;
#line 20 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -179,11 +276,11 @@ gchar* scale_constraint_to_string (ScaleConstraint self) {
result = _tmp1_;
#line 20 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 183 "Dimensions.c"
+#line 280 "Dimensions.c"
}
#line 15 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_WIDTH:
-#line 187 "Dimensions.c"
+#line 284 "Dimensions.c"
{
gchar* _tmp2_;
#line 23 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -192,11 +289,11 @@ gchar* scale_constraint_to_string (ScaleConstraint self) {
result = _tmp2_;
#line 23 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 196 "Dimensions.c"
+#line 293 "Dimensions.c"
}
#line 15 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_HEIGHT:
-#line 200 "Dimensions.c"
+#line 297 "Dimensions.c"
{
gchar* _tmp3_;
#line 26 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -205,11 +302,11 @@ gchar* scale_constraint_to_string (ScaleConstraint self) {
result = _tmp3_;
#line 26 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 209 "Dimensions.c"
+#line 306 "Dimensions.c"
}
#line 15 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_FILL_VIEWPORT:
-#line 213 "Dimensions.c"
+#line 310 "Dimensions.c"
{
gchar* _tmp4_;
#line 30 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -218,12 +315,12 @@ gchar* scale_constraint_to_string (ScaleConstraint self) {
result = _tmp4_;
#line 30 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 222 "Dimensions.c"
+#line 319 "Dimensions.c"
}
default:
#line 15 "/home/jens/Source/shotwell/src/Dimensions.vala"
break;
-#line 227 "Dimensions.c"
+#line 324 "Dimensions.c"
}
#line 33 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_warn_if_reached ();
@@ -231,11 +328,13 @@ gchar* scale_constraint_to_string (ScaleConstraint self) {
result = NULL;
#line 35 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 235 "Dimensions.c"
+#line 332 "Dimensions.c"
}
-GType scale_constraint_get_type (void) {
+GType
+scale_constraint_get_type (void)
+{
static volatile gsize scale_constraint_type_id__volatile = 0;
if (g_once_init_enter (&scale_constraint_type_id__volatile)) {
static const GEnumValue values[] = {{SCALE_CONSTRAINT_ORIGINAL, "SCALE_CONSTRAINT_ORIGINAL", "original"}, {SCALE_CONSTRAINT_DIMENSIONS, "SCALE_CONSTRAINT_DIMENSIONS", "dimensions"}, {SCALE_CONSTRAINT_WIDTH, "SCALE_CONSTRAINT_WIDTH", "width"}, {SCALE_CONSTRAINT_HEIGHT, "SCALE_CONSTRAINT_HEIGHT", "height"}, {SCALE_CONSTRAINT_FILL_VIEWPORT, "SCALE_CONSTRAINT_FILL_VIEWPORT", "fill-viewport"}, {0, NULL, NULL}};
@@ -247,86 +346,60 @@ GType scale_constraint_get_type (void) {
}
-void dimensions_init (Dimensions *self, gint width, gint height) {
+void
+dimensions_init (Dimensions *self,
+ gint width,
+ gint height)
+{
gboolean _tmp0_ = FALSE;
- gint _tmp1_;
- gint _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
- gint _tmp6_;
- gint _tmp7_;
- gint _tmp8_;
#line 43 "/home/jens/Source/shotwell/src/Dimensions.vala"
memset (self, 0, sizeof (Dimensions));
#line 44 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = width;
-#line 44 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp1_ < 0) {
+ if (width < 0) {
#line 44 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = TRUE;
-#line 268 "Dimensions.c"
+#line 362 "Dimensions.c"
} else {
- gint _tmp2_;
-#line 44 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = height;
#line 44 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = _tmp2_ < 0;
-#line 275 "Dimensions.c"
+ _tmp0_ = height < 0;
+#line 366 "Dimensions.c"
}
#line 44 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp0_) {
#line 45 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_warning ("Dimensions.vala:45: Tried to construct a Dimensions object with negati" \
"ve width or height - forcing sensible default values.");
-#line 281 "Dimensions.c"
+#line 372 "Dimensions.c"
}
#line 47 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = width;
-#line 47 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = width;
-#line 47 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = CLAMP (_tmp3_, 0, _tmp4_);
-#line 47 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).width = _tmp5_;
-#line 48 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = height;
+ (*self).width = CLAMP (width, 0, width);
#line 48 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = height;
-#line 48 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = CLAMP (_tmp6_, 0, _tmp7_);
-#line 48 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).height = _tmp8_;
-#line 299 "Dimensions.c"
+ (*self).height = CLAMP (height, 0, height);
+#line 378 "Dimensions.c"
}
-void dimensions_for_pixbuf (GdkPixbuf* pixbuf, Dimensions* result) {
- GdkPixbuf* _tmp0_;
- gint _tmp1_;
- GdkPixbuf* _tmp2_;
- gint _tmp3_;
- Dimensions _tmp4_ = {0};
+void
+dimensions_for_pixbuf (GdkPixbuf* pixbuf,
+ Dimensions* result)
+{
+ Dimensions _tmp0_ = {0};
#line 51 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
#line 52 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = pixbuf;
-#line 52 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = gdk_pixbuf_get_width (_tmp0_);
-#line 52 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = pixbuf;
+ dimensions_init (&_tmp0_, gdk_pixbuf_get_width (pixbuf), gdk_pixbuf_get_height (pixbuf));
#line 52 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = gdk_pixbuf_get_height (_tmp2_);
-#line 52 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp4_, _tmp1_, _tmp3_);
-#line 52 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp4_;
+ *result = _tmp0_;
#line 52 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 325 "Dimensions.c"
+#line 395 "Dimensions.c"
}
-void dimensions_for_allocation (GtkAllocation* allocation, Dimensions* result) {
+void
+dimensions_for_allocation (GtkAllocation* allocation,
+ Dimensions* result)
+{
GtkAllocation _tmp0_;
gint _tmp1_;
GtkAllocation _tmp2_;
@@ -348,46 +421,49 @@ void dimensions_for_allocation (GtkAllocation* allocation, Dimensions* result) {
*result = _tmp4_;
#line 56 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 351 "Dimensions.c"
+#line 424 "Dimensions.c"
}
-void dimensions_for_widget_allocation (GtkWidget* widget, Dimensions* result) {
+void
+dimensions_for_widget_allocation (GtkWidget* widget,
+ Dimensions* result)
+{
GtkAllocation allocation = {0};
- GtkWidget* _tmp0_;
- GtkAllocation _tmp1_ = {0};
- GtkAllocation _tmp2_;
- gint _tmp3_;
- GtkAllocation _tmp4_;
- gint _tmp5_;
- Dimensions _tmp6_ = {0};
+ GtkAllocation _tmp0_ = {0};
+ GtkAllocation _tmp1_;
+ gint _tmp2_;
+ GtkAllocation _tmp3_;
+ gint _tmp4_;
+ Dimensions _tmp5_ = {0};
#line 59 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (GTK_IS_WIDGET (widget));
#line 61 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = widget;
-#line 61 "/home/jens/Source/shotwell/src/Dimensions.vala"
- gtk_widget_get_allocation (_tmp0_, &_tmp1_);
+ gtk_widget_get_allocation (widget, &_tmp0_);
#line 61 "/home/jens/Source/shotwell/src/Dimensions.vala"
- allocation = _tmp1_;
+ allocation = _tmp0_;
#line 63 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = allocation;
+ _tmp1_ = allocation;
#line 63 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = _tmp2_.width;
+ _tmp2_ = _tmp1_.width;
#line 63 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = allocation;
+ _tmp3_ = allocation;
#line 63 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = _tmp4_.height;
+ _tmp4_ = _tmp3_.height;
#line 63 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp6_, _tmp3_, _tmp5_);
+ dimensions_init (&_tmp5_, _tmp2_, _tmp4_);
#line 63 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp6_;
+ *result = _tmp5_;
#line 63 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 386 "Dimensions.c"
+#line 459 "Dimensions.c"
}
-void dimensions_for_rectangle (GdkRectangle* rect, Dimensions* result) {
+void
+dimensions_for_rectangle (GdkRectangle* rect,
+ Dimensions* result)
+{
GdkRectangle _tmp0_;
gint _tmp1_;
GdkRectangle _tmp2_;
@@ -409,11 +485,13 @@ void dimensions_for_rectangle (GdkRectangle* rect, Dimensions* result) {
*result = _tmp4_;
#line 67 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 412 "Dimensions.c"
+#line 488 "Dimensions.c"
}
-gboolean dimensions_has_area (Dimensions *self) {
+gboolean
+dimensions_has_area (Dimensions *self)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gint _tmp1_;
@@ -421,27 +499,31 @@ gboolean dimensions_has_area (Dimensions *self) {
_tmp1_ = (*self).width;
#line 71 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp1_ > 0) {
-#line 424 "Dimensions.c"
+#line 502 "Dimensions.c"
gint _tmp2_;
#line 71 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp2_ = (*self).height;
#line 71 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = _tmp2_ > 0;
-#line 430 "Dimensions.c"
+#line 508 "Dimensions.c"
} else {
#line 71 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = FALSE;
-#line 434 "Dimensions.c"
+#line 512 "Dimensions.c"
}
#line 71 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = _tmp0_;
#line 71 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 440 "Dimensions.c"
+#line 518 "Dimensions.c"
}
-void dimensions_floor (Dimensions *self, Dimensions* min, Dimensions* result) {
+void
+dimensions_floor (Dimensions *self,
+ Dimensions* min,
+ Dimensions* result)
+{
gint _tmp0_ = 0;
gint _tmp1_;
Dimensions _tmp2_;
@@ -461,13 +543,13 @@ void dimensions_floor (Dimensions *self, Dimensions* min, Dimensions* result) {
_tmp3_ = _tmp2_.width;
#line 75 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp1_ > _tmp3_) {
-#line 464 "Dimensions.c"
+#line 546 "Dimensions.c"
gint _tmp4_;
#line 75 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp4_ = (*self).width;
#line 75 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = _tmp4_;
-#line 470 "Dimensions.c"
+#line 552 "Dimensions.c"
} else {
Dimensions _tmp5_;
gint _tmp6_;
@@ -477,7 +559,7 @@ void dimensions_floor (Dimensions *self, Dimensions* min, Dimensions* result) {
_tmp6_ = _tmp5_.width;
#line 75 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = _tmp6_;
-#line 480 "Dimensions.c"
+#line 562 "Dimensions.c"
}
#line 76 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp8_ = (*self).height;
@@ -487,13 +569,13 @@ void dimensions_floor (Dimensions *self, Dimensions* min, Dimensions* result) {
_tmp10_ = _tmp9_.height;
#line 76 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp8_ > _tmp10_) {
-#line 490 "Dimensions.c"
+#line 572 "Dimensions.c"
gint _tmp11_;
#line 76 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp11_ = (*self).height;
#line 76 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp7_ = _tmp11_;
-#line 496 "Dimensions.c"
+#line 578 "Dimensions.c"
} else {
Dimensions _tmp12_;
gint _tmp13_;
@@ -503,7 +585,7 @@ void dimensions_floor (Dimensions *self, Dimensions* min, Dimensions* result) {
_tmp13_ = _tmp12_.height;
#line 76 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp7_ = _tmp13_;
-#line 506 "Dimensions.c"
+#line 588 "Dimensions.c"
}
#line 75 "/home/jens/Source/shotwell/src/Dimensions.vala"
dimensions_init (&_tmp14_, _tmp0_, _tmp7_);
@@ -511,11 +593,13 @@ void dimensions_floor (Dimensions *self, Dimensions* min, Dimensions* result) {
*result = _tmp14_;
#line 75 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 514 "Dimensions.c"
+#line 596 "Dimensions.c"
}
-gchar* dimensions_to_string (Dimensions *self) {
+gchar*
+dimensions_to_string (Dimensions *self)
+{
gchar* result = NULL;
gint _tmp0_;
gint _tmp1_;
@@ -530,11 +614,14 @@ gchar* dimensions_to_string (Dimensions *self) {
result = _tmp2_;
#line 80 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 533 "Dimensions.c"
+#line 617 "Dimensions.c"
}
-gboolean dimensions_equals (Dimensions *self, Dimensions* dim) {
+gboolean
+dimensions_equals (Dimensions *self,
+ Dimensions* dim)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gint _tmp1_;
@@ -550,7 +637,7 @@ gboolean dimensions_equals (Dimensions *self, Dimensions* dim) {
_tmp3_ = _tmp2_.width;
#line 84 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp1_ == _tmp3_) {
-#line 553 "Dimensions.c"
+#line 640 "Dimensions.c"
gint _tmp4_;
Dimensions _tmp5_;
gint _tmp6_;
@@ -562,28 +649,30 @@ gboolean dimensions_equals (Dimensions *self, Dimensions* dim) {
_tmp6_ = _tmp5_.height;
#line 84 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = _tmp4_ == _tmp6_;
-#line 565 "Dimensions.c"
+#line 652 "Dimensions.c"
} else {
#line 84 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = FALSE;
-#line 569 "Dimensions.c"
+#line 656 "Dimensions.c"
}
#line 84 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = _tmp0_;
#line 84 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 575 "Dimensions.c"
+#line 662 "Dimensions.c"
}
-gboolean dimensions_approx_equals (Dimensions *self, Dimensions* dim, gint fudge) {
+gboolean
+dimensions_approx_equals (Dimensions *self,
+ Dimensions* dim,
+ gint fudge)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gint _tmp1_;
Dimensions _tmp2_;
gint _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
#line 88 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_val_if_fail (dim != NULL, FALSE);
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -593,364 +682,304 @@ gboolean dimensions_approx_equals (Dimensions *self, Dimensions* dim, gint fudge
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp3_ = _tmp2_.width;
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = abs (_tmp1_ - _tmp3_);
-#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = fudge;
-#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp4_ <= _tmp5_) {
-#line 601 "Dimensions.c"
+ if (abs (_tmp1_ - _tmp3_) <= fudge) {
+#line 686 "Dimensions.c"
+ gint _tmp4_;
+ Dimensions _tmp5_;
gint _tmp6_;
- Dimensions _tmp7_;
- gint _tmp8_;
- gint _tmp9_;
- gint _tmp10_;
-#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = (*self).height;
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = *dim;
-#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = _tmp7_.height;
+ _tmp4_ = (*self).height;
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = abs (_tmp6_ - _tmp8_);
+ _tmp5_ = *dim;
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = fudge;
+ _tmp6_ = _tmp5_.height;
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = _tmp9_ <= _tmp10_;
-#line 619 "Dimensions.c"
+ _tmp0_ = abs (_tmp4_ - _tmp6_) <= fudge;
+#line 698 "Dimensions.c"
} else {
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = FALSE;
-#line 623 "Dimensions.c"
+#line 702 "Dimensions.c"
}
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = _tmp0_;
#line 89 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 629 "Dimensions.c"
+#line 708 "Dimensions.c"
}
-gboolean dimensions_approx_scaled (Dimensions *self, gint scale, gint fudge) {
+gboolean
+dimensions_approx_scaled (Dimensions *self,
+ gint scale,
+ gint fudge)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gint _tmp1_;
- gint _tmp2_;
- gint _tmp3_;
#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = (*self).width;
#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = scale;
-#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = fudge;
-#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp1_ <= (_tmp2_ + _tmp3_)) {
-#line 647 "Dimensions.c"
- gint _tmp4_;
- gint _tmp5_;
- gint _tmp6_;
-#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = (*self).height;
-#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = scale;
+ if (_tmp1_ <= (scale + fudge)) {
+#line 724 "Dimensions.c"
+ gint _tmp2_;
#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = fudge;
+ _tmp2_ = (*self).height;
#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = _tmp4_ <= (_tmp5_ + _tmp6_);
-#line 659 "Dimensions.c"
+ _tmp0_ = _tmp2_ <= (scale + fudge);
+#line 730 "Dimensions.c"
} else {
#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = FALSE;
-#line 663 "Dimensions.c"
+#line 734 "Dimensions.c"
}
#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = _tmp0_;
#line 93 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 669 "Dimensions.c"
+#line 740 "Dimensions.c"
}
-gint dimensions_major_axis (Dimensions *self) {
+gint
+dimensions_major_axis (Dimensions *self)
+{
gint result = 0;
gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
#line 97 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = (*self).width;
#line 97 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = (*self).height;
#line 97 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = MAX (_tmp0_, _tmp1_);
-#line 97 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp2_;
+ result = MAX (_tmp0_, _tmp1_);
#line 97 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 688 "Dimensions.c"
+#line 758 "Dimensions.c"
}
-gint dimensions_minor_axis (Dimensions *self) {
+gint
+dimensions_minor_axis (Dimensions *self)
+{
gint result = 0;
gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
#line 101 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = (*self).width;
#line 101 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = (*self).height;
#line 101 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = MIN (_tmp0_, _tmp1_);
-#line 101 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp2_;
+ result = MIN (_tmp0_, _tmp1_);
#line 101 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 707 "Dimensions.c"
+#line 776 "Dimensions.c"
}
-void dimensions_with_min (Dimensions *self, gint min_width, gint min_height, Dimensions* result) {
+void
+dimensions_with_min (Dimensions *self,
+ gint min_width,
+ gint min_height,
+ Dimensions* result)
+{
gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
- Dimensions _tmp6_ = {0};
+ Dimensions _tmp2_ = {0};
#line 105 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = (*self).width;
#line 105 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = min_width;
-#line 105 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = MAX (_tmp0_, _tmp1_);
-#line 105 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = (*self).height;
-#line 105 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = min_height;
-#line 105 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = MAX (_tmp3_, _tmp4_);
+ _tmp1_ = (*self).height;
#line 105 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp6_, _tmp2_, _tmp5_);
+ dimensions_init (&_tmp2_, MAX (_tmp0_, min_width), MAX (_tmp1_, min_height));
#line 105 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp6_;
+ *result = _tmp2_;
#line 105 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 737 "Dimensions.c"
+#line 799 "Dimensions.c"
}
-void dimensions_with_max (Dimensions *self, gint max_width, gint max_height, Dimensions* result) {
+void
+dimensions_with_max (Dimensions *self,
+ gint max_width,
+ gint max_height,
+ Dimensions* result)
+{
gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
- Dimensions _tmp6_ = {0};
+ Dimensions _tmp2_ = {0};
#line 109 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = (*self).width;
#line 109 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = max_width;
-#line 109 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = MIN (_tmp0_, _tmp1_);
-#line 109 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = (*self).height;
-#line 109 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = max_height;
-#line 109 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = MIN (_tmp3_, _tmp4_);
+ _tmp1_ = (*self).height;
#line 109 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp6_, _tmp2_, _tmp5_);
+ dimensions_init (&_tmp2_, MIN (_tmp0_, max_width), MIN (_tmp1_, max_height));
#line 109 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp6_;
+ *result = _tmp2_;
#line 109 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 767 "Dimensions.c"
+#line 822 "Dimensions.c"
}
-void dimensions_get_scaled (Dimensions *self, gint scale, gboolean scale_up, Dimensions* result) {
- gint _tmp0_;
+void
+dimensions_get_scaled (Dimensions *self,
+ gint scale,
+ gboolean scale_up,
+ Dimensions* result)
+{
+ gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
- gboolean _tmp2_ = FALSE;
- gint _tmp3_;
- gint _tmp4_;
- gboolean _tmp15_ = FALSE;
- gboolean _tmp16_;
- gint _tmp25_;
- gint _tmp26_;
- gint _tmp27_;
- gint _tmp28_;
-#line 113 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = scale;
+ gint _tmp2_;
+ gboolean _tmp10_ = FALSE;
+ gint _tmp17_;
+ gint _tmp18_;
#line 113 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp0_ > 0, "scale > 0");
+ _vala_assert (scale > 0, "scale > 0");
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = (*self).width;
-#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = scale;
-#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp3_ == _tmp4_) {
-#line 793 "Dimensions.c"
- gint _tmp5_;
- gint _tmp6_;
+ _tmp2_ = (*self).width;
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = (*self).height;
+ if (_tmp2_ == scale) {
+#line 844 "Dimensions.c"
+ gint _tmp3_;
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = scale;
+ _tmp3_ = (*self).height;
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = _tmp5_ < _tmp6_;
-#line 802 "Dimensions.c"
+ _tmp1_ = _tmp3_ < scale;
+#line 850 "Dimensions.c"
} else {
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = FALSE;
-#line 806 "Dimensions.c"
+ _tmp1_ = FALSE;
+#line 854 "Dimensions.c"
}
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp2_) {
+ if (_tmp1_) {
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = TRUE;
-#line 812 "Dimensions.c"
+ _tmp0_ = TRUE;
+#line 860 "Dimensions.c"
} else {
- gboolean _tmp7_ = FALSE;
- gint _tmp8_;
- gint _tmp9_;
-#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = (*self).height;
-#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = scale;
+ gboolean _tmp4_ = FALSE;
+ gint _tmp5_;
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp8_ == _tmp9_) {
-#line 823 "Dimensions.c"
- gint _tmp10_;
- gint _tmp11_;
+ _tmp5_ = (*self).height;
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = (*self).width;
+ if (_tmp5_ == scale) {
+#line 868 "Dimensions.c"
+ gint _tmp6_;
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = scale;
+ _tmp6_ = (*self).width;
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = _tmp10_ < _tmp11_;
-#line 832 "Dimensions.c"
+ _tmp4_ = _tmp6_ < scale;
+#line 874 "Dimensions.c"
} else {
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = FALSE;
-#line 836 "Dimensions.c"
+ _tmp4_ = FALSE;
+#line 878 "Dimensions.c"
}
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = _tmp7_;
-#line 840 "Dimensions.c"
+ _tmp0_ = _tmp4_;
+#line 882 "Dimensions.c"
}
#line 116 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp1_) {
-#line 844 "Dimensions.c"
- gint _tmp12_;
- gint _tmp13_;
- Dimensions _tmp14_ = {0};
+ if (_tmp0_) {
+#line 886 "Dimensions.c"
+ gint _tmp7_;
+ gint _tmp8_;
+ Dimensions _tmp9_ = {0};
#line 117 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = (*self).width;
+ _tmp7_ = (*self).width;
#line 117 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = (*self).height;
+ _tmp8_ = (*self).height;
#line 117 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp14_, _tmp12_, _tmp13_);
+ dimensions_init (&_tmp9_, _tmp7_, _tmp8_);
#line 117 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp14_;
+ *result = _tmp9_;
#line 117 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 858 "Dimensions.c"
+#line 900 "Dimensions.c"
}
#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = scale_up;
-#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (!_tmp16_) {
-#line 864 "Dimensions.c"
- gboolean _tmp17_ = FALSE;
- gint _tmp18_;
- gint _tmp19_;
-#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp18_ = (*self).width;
-#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp19_ = scale;
+ if (!scale_up) {
+#line 904 "Dimensions.c"
+ gboolean _tmp11_ = FALSE;
+ gint _tmp12_;
#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp18_ < _tmp19_) {
-#line 874 "Dimensions.c"
- gint _tmp20_;
- gint _tmp21_;
+ _tmp12_ = (*self).width;
#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = (*self).height;
+ if (_tmp12_ < scale) {
+#line 911 "Dimensions.c"
+ gint _tmp13_;
#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp21_ = scale;
+ _tmp13_ = (*self).height;
#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = _tmp20_ < _tmp21_;
-#line 883 "Dimensions.c"
+ _tmp11_ = _tmp13_ < scale;
+#line 917 "Dimensions.c"
} else {
#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = FALSE;
-#line 887 "Dimensions.c"
+ _tmp11_ = FALSE;
+#line 921 "Dimensions.c"
}
#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = _tmp17_;
-#line 891 "Dimensions.c"
+ _tmp10_ = _tmp11_;
+#line 925 "Dimensions.c"
} else {
#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = FALSE;
-#line 895 "Dimensions.c"
+ _tmp10_ = FALSE;
+#line 929 "Dimensions.c"
}
#line 120 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp15_) {
-#line 899 "Dimensions.c"
- gint _tmp22_;
- gint _tmp23_;
- Dimensions _tmp24_ = {0};
+ if (_tmp10_) {
+#line 933 "Dimensions.c"
+ gint _tmp14_;
+ gint _tmp15_;
+ Dimensions _tmp16_ = {0};
#line 121 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp22_ = (*self).width;
+ _tmp14_ = (*self).width;
#line 121 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp23_ = (*self).height;
+ _tmp15_ = (*self).height;
#line 121 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp24_, _tmp22_, _tmp23_);
+ dimensions_init (&_tmp16_, _tmp14_, _tmp15_);
#line 121 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp24_;
+ *result = _tmp16_;
#line 121 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 913 "Dimensions.c"
+#line 947 "Dimensions.c"
}
#line 123 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp25_ = (*self).width;
+ _tmp17_ = (*self).width;
#line 123 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp26_ = scale;
+ _tmp18_ = (*self).height;
#line 123 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp27_ = (*self).height;
-#line 123 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp28_ = scale;
-#line 123 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if ((_tmp25_ - _tmp26_) > (_tmp27_ - _tmp28_)) {
-#line 925 "Dimensions.c"
- gint _tmp29_;
- Dimensions _tmp30_ = {0};
+ if ((_tmp17_ - scale) > (_tmp18_ - scale)) {
+#line 955 "Dimensions.c"
+ Dimensions _tmp19_ = {0};
#line 124 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp29_ = scale;
+ dimensions_get_scaled_by_width (&(*self), scale, &_tmp19_);
#line 124 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_get_scaled_by_width (&(*self), _tmp29_, &_tmp30_);
-#line 124 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp30_;
+ *result = _tmp19_;
#line 124 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 936 "Dimensions.c"
+#line 963 "Dimensions.c"
} else {
- gint _tmp31_;
- Dimensions _tmp32_ = {0};
-#line 126 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp31_ = scale;
+ Dimensions _tmp20_ = {0};
#line 126 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_get_scaled_by_height (&(*self), _tmp31_, &_tmp32_);
+ dimensions_get_scaled_by_height (&(*self), scale, &_tmp20_);
#line 126 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp32_;
+ *result = _tmp20_;
#line 126 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 948 "Dimensions.c"
+#line 972 "Dimensions.c"
}
}
-void dimensions_get_scale_ratios (Dimensions *self, Dimensions* scaled, gdouble* width_ratio, gdouble* height_ratio) {
+void
+dimensions_get_scale_ratios (Dimensions *self,
+ Dimensions* scaled,
+ gdouble* width_ratio,
+ gdouble* height_ratio)
+{
gdouble _vala_width_ratio = 0.0;
gdouble _vala_height_ratio = 0.0;
Dimensions _tmp0_;
@@ -981,18 +1010,20 @@ void dimensions_get_scale_ratios (Dimensions *self, Dimensions* scaled, gdouble*
if (width_ratio) {
#line 129 "/home/jens/Source/shotwell/src/Dimensions.vala"
*width_ratio = _vala_width_ratio;
-#line 984 "Dimensions.c"
+#line 1013 "Dimensions.c"
}
#line 129 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (height_ratio) {
#line 129 "/home/jens/Source/shotwell/src/Dimensions.vala"
*height_ratio = _vala_height_ratio;
-#line 990 "Dimensions.c"
+#line 1019 "Dimensions.c"
}
}
-gdouble dimensions_get_aspect_ratio (Dimensions *self) {
+gdouble
+dimensions_get_aspect_ratio (Dimensions *self)
+{
gdouble result = 0.0;
gint _tmp0_;
gint _tmp1_;
@@ -1004,11 +1035,15 @@ gdouble dimensions_get_aspect_ratio (Dimensions *self) {
result = ((gdouble) _tmp0_) / _tmp1_;
#line 135 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 1007 "Dimensions.c"
+#line 1038 "Dimensions.c"
}
-void dimensions_get_scaled_proportional (Dimensions *self, Dimensions* viewport, Dimensions* result) {
+void
+dimensions_get_scaled_proportional (Dimensions *self,
+ Dimensions* viewport,
+ Dimensions* result)
+{
gdouble width_ratio = 0.0;
gdouble height_ratio = 0.0;
Dimensions _tmp0_;
@@ -1021,19 +1056,17 @@ void dimensions_get_scaled_proportional (Dimensions *self, Dimensions* viewport,
Dimensions scaled = {0};
gdouble _tmp13_;
gdouble _tmp14_;
- gdouble _tmp15_;
- gdouble _tmp16_;
+ Dimensions _tmp15_ = {0};
+ Dimensions _tmp16_ = {0};
Dimensions _tmp17_ = {0};
- Dimensions _tmp18_ = {0};
- Dimensions _tmp19_ = {0};
+ Dimensions _tmp18_;
+ gint _tmp19_;
Dimensions _tmp20_;
gint _tmp21_;
Dimensions _tmp22_;
gint _tmp23_;
Dimensions _tmp24_;
gint _tmp25_;
- Dimensions _tmp26_;
- gint _tmp27_;
#line 138 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (viewport != NULL);
#line 140 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -1050,7 +1083,7 @@ void dimensions_get_scaled_proportional (Dimensions *self, Dimensions* viewport,
_tmp4_ = height_ratio;
#line 143 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp3_ < _tmp4_) {
-#line 1053 "Dimensions.c"
+#line 1086 "Dimensions.c"
Dimensions _tmp5_;
gint _tmp6_;
gint _tmp7_;
@@ -1067,7 +1100,7 @@ void dimensions_get_scaled_proportional (Dimensions *self, Dimensions* viewport,
_tmp8_ = width_ratio;
#line 145 "/home/jens/Source/shotwell/src/Dimensions.vala"
scaled_height = ((gdouble) _tmp7_) * _tmp8_;
-#line 1070 "Dimensions.c"
+#line 1103 "Dimensions.c"
} else {
gint _tmp9_;
gdouble _tmp10_;
@@ -1085,53 +1118,53 @@ void dimensions_get_scaled_proportional (Dimensions *self, Dimensions* viewport,
_tmp12_ = _tmp11_.height;
#line 148 "/home/jens/Source/shotwell/src/Dimensions.vala"
scaled_height = (gdouble) _tmp12_;
-#line 1088 "Dimensions.c"
+#line 1121 "Dimensions.c"
}
#line 151 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp13_ = scaled_width;
#line 151 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = round (_tmp13_);
+ _tmp14_ = scaled_height;
#line 151 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = scaled_height;
+ dimensions_init (&_tmp15_, (gint) round (_tmp13_), (gint) round (_tmp14_));
#line 151 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = round (_tmp15_);
+ dimensions_init (&_tmp16_, 1, 1);
#line 151 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp17_, (gint) _tmp14_, (gint) _tmp16_);
+ dimensions_floor (&_tmp15_, &_tmp16_, &_tmp17_);
#line 151 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp18_, 1, 1);
-#line 151 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_floor (&_tmp17_, &_tmp18_, &_tmp19_);
-#line 151 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled = _tmp19_;
+ scaled = _tmp17_;
#line 153 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = scaled;
+ _tmp18_ = scaled;
#line 153 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp21_ = _tmp20_.height;
+ _tmp19_ = _tmp18_.height;
#line 153 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp22_ = *viewport;
+ _tmp20_ = *viewport;
#line 153 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp23_ = _tmp22_.height;
+ _tmp21_ = _tmp20_.height;
#line 153 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp21_ <= _tmp23_, "scaled.height <= viewport.height");
+ _vala_assert (_tmp19_ <= _tmp21_, "scaled.height <= viewport.height");
#line 154 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp24_ = scaled;
+ _tmp22_ = scaled;
#line 154 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp25_ = _tmp24_.width;
+ _tmp23_ = _tmp22_.width;
#line 154 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp26_ = *viewport;
+ _tmp24_ = *viewport;
#line 154 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp27_ = _tmp26_.width;
+ _tmp25_ = _tmp24_.width;
#line 154 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp25_ <= _tmp27_, "scaled.width <= viewport.width");
+ _vala_assert (_tmp23_ <= _tmp25_, "scaled.width <= viewport.width");
#line 156 "/home/jens/Source/shotwell/src/Dimensions.vala"
*result = scaled;
#line 156 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1130 "Dimensions.c"
+#line 1159 "Dimensions.c"
}
-void dimensions_get_scaled_to_fill_viewport (Dimensions *self, Dimensions* viewport, Dimensions* result) {
+void
+dimensions_get_scaled_to_fill_viewport (Dimensions *self,
+ Dimensions* viewport,
+ Dimensions* result)
+{
gdouble width_ratio = 0.0;
gdouble height_ratio = 0.0;
Dimensions _tmp0_;
@@ -1143,13 +1176,11 @@ void dimensions_get_scaled_to_fill_viewport (Dimensions *self, Dimensions* viewp
gint _tmp4_;
Dimensions _tmp5_;
gint _tmp6_;
+ gdouble _tmp31_;
gdouble _tmp32_;
- gdouble _tmp33_;
- gdouble _tmp34_;
- gdouble _tmp35_;
- Dimensions _tmp36_ = {0};
- Dimensions _tmp37_ = {0};
- Dimensions _tmp38_ = {0};
+ Dimensions _tmp33_ = {0};
+ Dimensions _tmp34_ = {0};
+ Dimensions _tmp35_ = {0};
#line 159 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (viewport != NULL);
#line 161 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -1168,7 +1199,7 @@ void dimensions_get_scaled_to_fill_viewport (Dimensions *self, Dimensions* viewp
_tmp6_ = _tmp5_.width;
#line 164 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp4_ < _tmp6_) {
-#line 1171 "Dimensions.c"
+#line 1202 "Dimensions.c"
gint _tmp7_;
Dimensions _tmp8_;
gint _tmp9_;
@@ -1180,15 +1211,15 @@ void dimensions_get_scaled_to_fill_viewport (Dimensions *self, Dimensions* viewp
_tmp9_ = _tmp8_.height;
#line 164 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp3_ = _tmp7_ >= _tmp9_;
-#line 1183 "Dimensions.c"
+#line 1214 "Dimensions.c"
} else {
#line 164 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp3_ = FALSE;
-#line 1187 "Dimensions.c"
+#line 1218 "Dimensions.c"
}
#line 164 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp3_) {
-#line 1191 "Dimensions.c"
+#line 1222 "Dimensions.c"
Dimensions _tmp10_;
gint _tmp11_;
gint _tmp12_;
@@ -1205,7 +1236,7 @@ void dimensions_get_scaled_to_fill_viewport (Dimensions *self, Dimensions* viewp
_tmp13_ = width_ratio;
#line 167 "/home/jens/Source/shotwell/src/Dimensions.vala"
scaled_height = ((gdouble) _tmp12_) * _tmp13_;
-#line 1208 "Dimensions.c"
+#line 1239 "Dimensions.c"
} else {
gboolean _tmp14_ = FALSE;
gint _tmp15_;
@@ -1219,7 +1250,7 @@ void dimensions_get_scaled_to_fill_viewport (Dimensions *self, Dimensions* viewp
_tmp17_ = _tmp16_.width;
#line 168 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp15_ >= _tmp17_) {
-#line 1222 "Dimensions.c"
+#line 1253 "Dimensions.c"
gint _tmp18_;
Dimensions _tmp19_;
gint _tmp20_;
@@ -1231,15 +1262,15 @@ void dimensions_get_scaled_to_fill_viewport (Dimensions *self, Dimensions* viewp
_tmp20_ = _tmp19_.height;
#line 168 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp14_ = _tmp18_ < _tmp20_;
-#line 1234 "Dimensions.c"
+#line 1265 "Dimensions.c"
} else {
#line 168 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp14_ = FALSE;
-#line 1238 "Dimensions.c"
+#line 1269 "Dimensions.c"
}
#line 168 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp14_) {
-#line 1242 "Dimensions.c"
+#line 1273 "Dimensions.c"
gint _tmp21_;
gdouble _tmp22_;
Dimensions _tmp23_;
@@ -1256,62 +1287,60 @@ void dimensions_get_scaled_to_fill_viewport (Dimensions *self, Dimensions* viewp
_tmp24_ = _tmp23_.height;
#line 171 "/home/jens/Source/shotwell/src/Dimensions.vala"
scaled_height = (gdouble) _tmp24_;
-#line 1259 "Dimensions.c"
+#line 1290 "Dimensions.c"
} else {
gdouble ratio = 0.0;
gdouble _tmp25_;
gdouble _tmp26_;
- gdouble _tmp27_;
- gint _tmp28_;
- gdouble _tmp29_;
- gint _tmp30_;
- gdouble _tmp31_;
+ gint _tmp27_;
+ gdouble _tmp28_;
+ gint _tmp29_;
+ gdouble _tmp30_;
#line 174 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp25_ = width_ratio;
#line 174 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp26_ = height_ratio;
#line 174 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp27_ = MAX (_tmp25_, _tmp26_);
-#line 174 "/home/jens/Source/shotwell/src/Dimensions.vala"
- ratio = _tmp27_;
+ ratio = MAX (_tmp25_, _tmp26_);
#line 176 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp28_ = (*self).width;
+ _tmp27_ = (*self).width;
#line 176 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp29_ = ratio;
+ _tmp28_ = ratio;
#line 176 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled_width = ((gdouble) _tmp28_) * _tmp29_;
+ scaled_width = ((gdouble) _tmp27_) * _tmp28_;
#line 177 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp30_ = (*self).height;
+ _tmp29_ = (*self).height;
#line 177 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp31_ = ratio;
+ _tmp30_ = ratio;
#line 177 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled_height = ((gdouble) _tmp30_) * _tmp31_;
-#line 1289 "Dimensions.c"
+ scaled_height = ((gdouble) _tmp29_) * _tmp30_;
+#line 1317 "Dimensions.c"
}
}
#line 180 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp32_ = scaled_width;
+ _tmp31_ = scaled_width;
#line 180 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp33_ = round (_tmp32_);
+ _tmp32_ = scaled_height;
#line 180 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp34_ = scaled_height;
+ dimensions_init (&_tmp33_, (gint) round (_tmp31_), (gint) round (_tmp32_));
#line 180 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp35_ = round (_tmp34_);
+ dimensions_init (&_tmp34_, 1, 1);
#line 180 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp36_, (gint) _tmp33_, (gint) _tmp35_);
+ dimensions_floor (&_tmp33_, &_tmp34_, &_tmp35_);
#line 180 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp37_, 1, 1);
-#line 180 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_floor (&_tmp36_, &_tmp37_, &_tmp38_);
-#line 180 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp38_;
+ *result = _tmp35_;
#line 180 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1310 "Dimensions.c"
+#line 1334 "Dimensions.c"
}
-void dimensions_get_scaled_rectangle (Dimensions *self, Dimensions* scaled, GdkRectangle* rect, GdkRectangle* result) {
+void
+dimensions_get_scaled_rectangle (Dimensions *self,
+ Dimensions* scaled,
+ GdkRectangle* rect,
+ GdkRectangle* result)
+{
gdouble x_scale = 0.0;
gdouble y_scale = 0.0;
Dimensions _tmp0_;
@@ -1321,23 +1350,19 @@ void dimensions_get_scaled_rectangle (Dimensions *self, Dimensions* scaled, GdkR
GdkRectangle _tmp3_;
gint _tmp4_;
gdouble _tmp5_;
- gdouble _tmp6_;
- GdkRectangle _tmp7_;
- gint _tmp8_;
- gdouble _tmp9_;
- gdouble _tmp10_;
- GdkRectangle _tmp11_;
- gint _tmp12_;
- gdouble _tmp13_;
+ GdkRectangle _tmp6_;
+ gint _tmp7_;
+ gdouble _tmp8_;
+ GdkRectangle _tmp9_;
+ gint _tmp10_;
+ gdouble _tmp11_;
+ GdkRectangle _tmp12_;
+ gint _tmp13_;
gdouble _tmp14_;
GdkRectangle _tmp15_;
gint _tmp16_;
- gdouble _tmp17_;
- gdouble _tmp18_;
- GdkRectangle _tmp19_;
- gint _tmp20_;
- GdkRectangle _tmp21_;
- gint _tmp22_;
+ GdkRectangle _tmp17_;
+ gint _tmp18_;
#line 183 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (scaled != NULL);
#line 183 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -1359,82 +1384,76 @@ void dimensions_get_scaled_rectangle (Dimensions *self, Dimensions* scaled, GdkR
#line 188 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp5_ = x_scale;
#line 188 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = round (((gdouble) _tmp4_) * _tmp5_);
-#line 188 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled_rect.x = (gint) _tmp6_;
+ scaled_rect.x = (gint) round (((gdouble) _tmp4_) * _tmp5_);
#line 189 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = *rect;
+ _tmp6_ = *rect;
#line 189 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = _tmp7_.y;
+ _tmp7_ = _tmp6_.y;
#line 189 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = y_scale;
+ _tmp8_ = y_scale;
#line 189 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = round (((gdouble) _tmp8_) * _tmp9_);
-#line 189 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled_rect.y = (gint) _tmp10_;
-#line 190 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = *rect;
+ scaled_rect.y = (gint) round (((gdouble) _tmp7_) * _tmp8_);
#line 190 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = _tmp11_.width;
+ _tmp9_ = *rect;
#line 190 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = x_scale;
+ _tmp10_ = _tmp9_.width;
#line 190 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = round (((gdouble) _tmp12_) * _tmp13_);
+ _tmp11_ = x_scale;
#line 190 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled_rect.width = (gint) _tmp14_;
+ scaled_rect.width = (gint) round (((gdouble) _tmp10_) * _tmp11_);
#line 191 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = *rect;
+ _tmp12_ = *rect;
#line 191 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = _tmp15_.height;
+ _tmp13_ = _tmp12_.height;
#line 191 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = y_scale;
+ _tmp14_ = y_scale;
#line 191 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp18_ = round (((gdouble) _tmp16_) * _tmp17_);
-#line 191 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled_rect.height = (gint) _tmp18_;
+ scaled_rect.height = (gint) round (((gdouble) _tmp13_) * _tmp14_);
#line 193 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp19_ = scaled_rect;
+ _tmp15_ = scaled_rect;
#line 193 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = _tmp19_.width;
+ _tmp16_ = _tmp15_.width;
#line 193 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp20_ <= 0) {
+ if (_tmp16_ <= 0) {
#line 194 "/home/jens/Source/shotwell/src/Dimensions.vala"
scaled_rect.width = 1;
-#line 1403 "Dimensions.c"
+#line 1420 "Dimensions.c"
}
#line 196 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp21_ = scaled_rect;
+ _tmp17_ = scaled_rect;
#line 196 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp22_ = _tmp21_.height;
+ _tmp18_ = _tmp17_.height;
#line 196 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp22_ <= 0) {
+ if (_tmp18_ <= 0) {
#line 197 "/home/jens/Source/shotwell/src/Dimensions.vala"
scaled_rect.height = 1;
-#line 1413 "Dimensions.c"
+#line 1430 "Dimensions.c"
}
#line 199 "/home/jens/Source/shotwell/src/Dimensions.vala"
*result = scaled_rect;
#line 199 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1419 "Dimensions.c"
+#line 1436 "Dimensions.c"
}
-void dimensions_get_scaled_similar (Dimensions *self, Dimensions* original, Dimensions* scaled, Dimensions* result) {
+void
+dimensions_get_scaled_similar (Dimensions *self,
+ Dimensions* original,
+ Dimensions* scaled,
+ Dimensions* result)
+{
gdouble x_scale = 0.0;
gdouble y_scale = 0.0;
Dimensions _tmp0_;
gdouble _tmp1_ = 0.0;
gdouble _tmp2_ = 0.0;
gdouble scale = 0.0;
- gdouble _tmp3_;
+ gint _tmp3_;
gint _tmp4_;
- gdouble _tmp5_;
- gint _tmp6_;
- gdouble _tmp7_;
- Dimensions _tmp8_ = {0};
- Dimensions _tmp9_ = {0};
- Dimensions _tmp10_ = {0};
+ Dimensions _tmp5_ = {0};
+ Dimensions _tmp6_ = {0};
+ Dimensions _tmp7_ = {0};
#line 203 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (original != NULL);
#line 203 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -1448,224 +1467,191 @@ void dimensions_get_scaled_similar (Dimensions *self, Dimensions* original, Dime
#line 205 "/home/jens/Source/shotwell/src/Dimensions.vala"
y_scale = _tmp2_;
#line 207 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = MIN (x_scale, y_scale);
-#line 207 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scale = _tmp3_;
-#line 209 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = (*self).width;
+ scale = MIN (x_scale, y_scale);
#line 209 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = round (((gdouble) _tmp4_) * scale);
-#line 209 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = (*self).height;
+ _tmp3_ = (*self).width;
#line 209 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = round (((gdouble) _tmp6_) * scale);
+ _tmp4_ = (*self).height;
#line 209 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp8_, (gint) _tmp5_, (gint) _tmp7_);
+ dimensions_init (&_tmp5_, (gint) round (((gdouble) _tmp3_) * scale), (gint) round (((gdouble) _tmp4_) * scale));
#line 209 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp9_, 1, 1);
+ dimensions_init (&_tmp6_, 1, 1);
#line 209 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_floor (&_tmp8_, &_tmp9_, &_tmp10_);
+ dimensions_floor (&_tmp5_, &_tmp6_, &_tmp7_);
#line 209 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp10_;
+ *result = _tmp7_;
#line 209 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1472 "Dimensions.c"
+#line 1485 "Dimensions.c"
}
-void dimensions_get_scaled_by_width (Dimensions *self, gint scale, Dimensions* result) {
- gint _tmp0_;
+void
+dimensions_get_scaled_by_width (Dimensions *self,
+ gint scale,
+ Dimensions* result)
+{
gdouble ratio = 0.0;
+ gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- gdouble _tmp5_;
- Dimensions _tmp6_ = {0};
- Dimensions _tmp7_ = {0};
- Dimensions _tmp8_ = {0};
-#line 214 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = scale;
+ Dimensions _tmp2_ = {0};
+ Dimensions _tmp3_ = {0};
+ Dimensions _tmp4_ = {0};
#line 214 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp0_ > 0, "scale > 0");
-#line 216 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = scale;
+ _vala_assert (scale > 0, "scale > 0");
#line 216 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = (*self).width;
+ _tmp0_ = (*self).width;
#line 216 "/home/jens/Source/shotwell/src/Dimensions.vala"
- ratio = ((gdouble) _tmp1_) / ((gdouble) _tmp2_);
-#line 218 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = scale;
-#line 218 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = (*self).height;
+ ratio = ((gdouble) scale) / ((gdouble) _tmp0_);
#line 218 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = round (((gdouble) _tmp4_) * ratio);
+ _tmp1_ = (*self).height;
#line 218 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp6_, _tmp3_, (gint) _tmp5_);
+ dimensions_init (&_tmp2_, scale, (gint) round (((gdouble) _tmp1_) * ratio));
#line 218 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp7_, 1, 1);
+ dimensions_init (&_tmp3_, 1, 1);
#line 218 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_floor (&_tmp6_, &_tmp7_, &_tmp8_);
+ dimensions_floor (&_tmp2_, &_tmp3_, &_tmp4_);
#line 218 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp8_;
+ *result = _tmp4_;
#line 218 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1513 "Dimensions.c"
+#line 1518 "Dimensions.c"
}
-void dimensions_get_scaled_by_height (Dimensions *self, gint scale, Dimensions* result) {
- gint _tmp0_;
+void
+dimensions_get_scaled_by_height (Dimensions *self,
+ gint scale,
+ Dimensions* result)
+{
gdouble ratio = 0.0;
+ gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
- gint _tmp3_;
- gdouble _tmp4_;
- gint _tmp5_;
- Dimensions _tmp6_ = {0};
- Dimensions _tmp7_ = {0};
- Dimensions _tmp8_ = {0};
-#line 222 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = scale;
+ Dimensions _tmp2_ = {0};
+ Dimensions _tmp3_ = {0};
+ Dimensions _tmp4_ = {0};
#line 222 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp0_ > 0, "scale > 0");
+ _vala_assert (scale > 0, "scale > 0");
#line 224 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = scale;
+ _tmp0_ = (*self).height;
#line 224 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = (*self).height;
-#line 224 "/home/jens/Source/shotwell/src/Dimensions.vala"
- ratio = ((gdouble) _tmp1_) / ((gdouble) _tmp2_);
-#line 226 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = (*self).width;
+ ratio = ((gdouble) scale) / ((gdouble) _tmp0_);
#line 226 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = round (((gdouble) _tmp3_) * ratio);
-#line 226 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = scale;
+ _tmp1_ = (*self).width;
#line 226 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp6_, (gint) _tmp4_, _tmp5_);
+ dimensions_init (&_tmp2_, (gint) round (((gdouble) _tmp1_) * ratio), scale);
#line 226 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp7_, 1, 1);
+ dimensions_init (&_tmp3_, 1, 1);
#line 226 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_floor (&_tmp6_, &_tmp7_, &_tmp8_);
+ dimensions_floor (&_tmp2_, &_tmp3_, &_tmp4_);
#line 226 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp8_;
+ *result = _tmp4_;
#line 226 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1554 "Dimensions.c"
+#line 1551 "Dimensions.c"
}
-void dimensions_get_scaled_by_constraint (Dimensions *self, gint scale, ScaleConstraint constraint, Dimensions* result) {
- ScaleConstraint _tmp0_;
+void
+dimensions_get_scaled_by_constraint (Dimensions *self,
+ gint scale,
+ ScaleConstraint constraint,
+ Dimensions* result)
+{
#line 230 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = constraint;
-#line 230 "/home/jens/Source/shotwell/src/Dimensions.vala"
- switch (_tmp0_) {
+ switch (constraint) {
#line 230 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_ORIGINAL:
-#line 1566 "Dimensions.c"
+#line 1565 "Dimensions.c"
{
+ gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
- Dimensions _tmp3_ = {0};
+ Dimensions _tmp2_ = {0};
#line 232 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = (*self).width;
+ _tmp0_ = (*self).width;
#line 232 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = (*self).height;
+ _tmp1_ = (*self).height;
#line 232 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp3_, _tmp1_, _tmp2_);
+ dimensions_init (&_tmp2_, _tmp0_, _tmp1_);
#line 232 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp3_;
+ *result = _tmp2_;
#line 232 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1581 "Dimensions.c"
+#line 1580 "Dimensions.c"
}
#line 230 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_DIMENSIONS:
-#line 1585 "Dimensions.c"
+#line 1584 "Dimensions.c"
{
- Dimensions _tmp4_ = {0};
+ Dimensions _tmp3_ = {0};
+ gint _tmp4_;
gint _tmp5_;
- gint _tmp6_;
-#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = (*self).width;
#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = (*self).height;
+ _tmp4_ = (*self).width;
#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp5_ >= _tmp6_) {
-#line 1596 "Dimensions.c"
- gint _tmp7_;
- Dimensions _tmp8_ = {0};
+ _tmp5_ = (*self).height;
#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = scale;
+ if (_tmp4_ >= _tmp5_) {
+#line 1595 "Dimensions.c"
+ Dimensions _tmp6_ = {0};
#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_get_scaled_by_width (&(*self), _tmp7_, &_tmp8_);
+ dimensions_get_scaled_by_width (&(*self), scale, &_tmp6_);
#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = _tmp8_;
-#line 1605 "Dimensions.c"
+ _tmp3_ = _tmp6_;
+#line 1601 "Dimensions.c"
} else {
- gint _tmp9_;
- Dimensions _tmp10_ = {0};
-#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = scale;
+ Dimensions _tmp7_ = {0};
#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_get_scaled_by_height (&(*self), _tmp9_, &_tmp10_);
+ dimensions_get_scaled_by_height (&(*self), scale, &_tmp7_);
#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = _tmp10_;
-#line 1615 "Dimensions.c"
+ _tmp3_ = _tmp7_;
+#line 1608 "Dimensions.c"
}
#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp4_;
+ *result = _tmp3_;
#line 235 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1621 "Dimensions.c"
+#line 1614 "Dimensions.c"
}
#line 230 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_WIDTH:
-#line 1625 "Dimensions.c"
+#line 1618 "Dimensions.c"
{
- gint _tmp11_;
- Dimensions _tmp12_ = {0};
-#line 238 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = scale;
+ Dimensions _tmp8_ = {0};
#line 238 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_get_scaled_by_width (&(*self), _tmp11_, &_tmp12_);
+ dimensions_get_scaled_by_width (&(*self), scale, &_tmp8_);
#line 238 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp12_;
+ *result = _tmp8_;
#line 238 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1637 "Dimensions.c"
+#line 1627 "Dimensions.c"
}
#line 230 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_HEIGHT:
-#line 1641 "Dimensions.c"
+#line 1631 "Dimensions.c"
{
- gint _tmp13_;
- Dimensions _tmp14_ = {0};
-#line 241 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = scale;
+ Dimensions _tmp9_ = {0};
#line 241 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_get_scaled_by_height (&(*self), _tmp13_, &_tmp14_);
+ dimensions_get_scaled_by_height (&(*self), scale, &_tmp9_);
#line 241 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp14_;
+ *result = _tmp9_;
#line 241 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1653 "Dimensions.c"
+#line 1640 "Dimensions.c"
}
default:
{
- ScaleConstraint _tmp15_;
-#line 244 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = constraint;
#line 244 "/home/jens/Source/shotwell/src/Dimensions.vala"
- g_error ("Dimensions.vala:244: Bad constraint: %d", (gint) _tmp15_);
-#line 1662 "Dimensions.c"
+ g_error ("Dimensions.vala:244: Bad constraint: %d", (gint) constraint);
+#line 1646 "Dimensions.c"
}
}
}
-Dimensions* dimensions_dup (const Dimensions* self) {
+Dimensions*
+dimensions_dup (const Dimensions* self)
+{
Dimensions* dup;
#line 39 "/home/jens/Source/shotwell/src/Dimensions.vala"
dup = g_new0 (Dimensions, 1);
@@ -1673,18 +1659,22 @@ Dimensions* dimensions_dup (const Dimensions* self) {
memcpy (dup, self, sizeof (Dimensions));
#line 39 "/home/jens/Source/shotwell/src/Dimensions.vala"
return dup;
-#line 1676 "Dimensions.c"
+#line 1662 "Dimensions.c"
}
-void dimensions_free (Dimensions* self) {
+void
+dimensions_free (Dimensions* self)
+{
#line 39 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_free (self);
-#line 1683 "Dimensions.c"
+#line 1671 "Dimensions.c"
}
-GType dimensions_get_type (void) {
+GType
+dimensions_get_type (void)
+{
static volatile gsize dimensions_type_id__volatile = 0;
if (g_once_init_enter (&dimensions_type_id__volatile)) {
GType dimensions_type_id;
@@ -1695,36 +1685,35 @@ GType dimensions_get_type (void) {
}
-static void scaling_init (Scaling *self, ScaleConstraint constraint, gint scale, Dimensions* viewport, gboolean scale_up) {
- ScaleConstraint _tmp0_;
- gint _tmp1_;
- Dimensions _tmp2_;
- gboolean _tmp3_;
+static void
+scaling_init (Scaling *self,
+ ScaleConstraint constraint,
+ gint scale,
+ Dimensions* viewport,
+ gboolean scale_up)
+{
+ Dimensions _tmp0_;
#line 257 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (viewport != NULL);
#line 257 "/home/jens/Source/shotwell/src/Dimensions.vala"
memset (self, 0, sizeof (Scaling));
#line 258 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = constraint;
-#line 258 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).constraint = _tmp0_;
-#line 259 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = scale;
+ (*self).constraint = constraint;
#line 259 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).scale = _tmp1_;
+ (*self).scale = scale;
#line 260 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = *viewport;
+ _tmp0_ = *viewport;
#line 260 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport = _tmp2_;
-#line 261 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = scale_up;
+ (*self).viewport = _tmp0_;
#line 261 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).scale_up = _tmp3_;
-#line 1723 "Dimensions.c"
+ (*self).scale_up = scale_up;
+#line 1710 "Dimensions.c"
}
-void scaling_for_original (Scaling* result) {
+void
+scaling_for_original (Scaling* result)
+{
Dimensions _tmp0_ = {0};
Scaling _tmp1_ = {0};
#line 265 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -1735,149 +1724,141 @@ void scaling_for_original (Scaling* result) {
*result = _tmp1_;
#line 265 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1738 "Dimensions.c"
+#line 1727 "Dimensions.c"
}
-void scaling_for_screen (GtkWindow* window, gboolean scale_up, Scaling* result) {
- GtkWindow* _tmp0_;
- Dimensions _tmp1_ = {0};
- gboolean _tmp2_;
- Scaling _tmp3_ = {0};
+void
+scaling_for_screen (GtkWindow* window,
+ gboolean scale_up,
+ Scaling* result)
+{
+ Dimensions _tmp0_ = {0};
+ Scaling _tmp1_ = {0};
#line 268 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (GTK_IS_WINDOW (window));
#line 269 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = window;
-#line 269 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaling_get_screen_dimensions (_tmp0_, &_tmp1_);
+ scaling_get_screen_dimensions (window, &_tmp0_);
#line 269 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = scale_up;
+ scaling_for_viewport (&_tmp0_, scale_up, &_tmp1_);
#line 269 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaling_for_viewport (&_tmp1_, _tmp2_, &_tmp3_);
-#line 269 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp3_;
+ *result = _tmp1_;
#line 269 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1761 "Dimensions.c"
+#line 1748 "Dimensions.c"
}
-void scaling_for_best_fit (gint pixels, gboolean scale_up, Scaling* result) {
- gint _tmp0_;
- gint _tmp1_;
- Dimensions _tmp2_ = {0};
- gboolean _tmp3_;
- Scaling _tmp4_ = {0};
-#line 273 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = pixels;
+void
+scaling_for_best_fit (gint pixels,
+ gboolean scale_up,
+ Scaling* result)
+{
+ Dimensions _tmp0_ = {0};
+ Scaling _tmp1_ = {0};
#line 273 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp0_ > 0, "pixels > 0");
-#line 275 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = pixels;
-#line 275 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp2_, 0, 0);
+ _vala_assert (pixels > 0, "pixels > 0");
#line 275 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = scale_up;
+ dimensions_init (&_tmp0_, 0, 0);
#line 275 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaling_init (&_tmp4_, SCALE_CONSTRAINT_DIMENSIONS, _tmp1_, &_tmp2_, _tmp3_);
+ scaling_init (&_tmp1_, SCALE_CONSTRAINT_DIMENSIONS, pixels, &_tmp0_, scale_up);
#line 275 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp4_;
+ *result = _tmp1_;
#line 275 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1787 "Dimensions.c"
+#line 1769 "Dimensions.c"
}
-void scaling_for_viewport (Dimensions* viewport, gboolean scale_up, Scaling* result) {
- gboolean _tmp0_;
- Dimensions _tmp1_;
- gboolean _tmp2_;
- Scaling _tmp3_ = {0};
+void
+scaling_for_viewport (Dimensions* viewport,
+ gboolean scale_up,
+ Scaling* result)
+{
+ Dimensions _tmp0_;
+ Scaling _tmp1_ = {0};
#line 278 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (viewport != NULL);
#line 279 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = dimensions_has_area (viewport);
-#line 279 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp0_, "viewport.has_area()");
-#line 281 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = *viewport;
+ _vala_assert (dimensions_has_area (viewport), "viewport.has_area()");
#line 281 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = scale_up;
+ _tmp0_ = *viewport;
#line 281 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaling_init (&_tmp3_, SCALE_CONSTRAINT_DIMENSIONS, SCALING_NO_SCALE, &_tmp1_, _tmp2_);
+ scaling_init (&_tmp1_, SCALE_CONSTRAINT_DIMENSIONS, SCALING_NO_SCALE, &_tmp0_, scale_up);
#line 281 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp3_;
+ *result = _tmp1_;
#line 281 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1812 "Dimensions.c"
+#line 1792 "Dimensions.c"
}
-void scaling_for_widget (GtkWidget* widget, gboolean scale_up, Scaling* result) {
+void
+scaling_for_widget (GtkWidget* widget,
+ gboolean scale_up,
+ Scaling* result)
+{
Dimensions viewport = {0};
- GtkWidget* _tmp0_;
- Dimensions _tmp1_ = {0};
- gboolean _tmp2_ = FALSE;
- Dimensions _tmp3_;
- gint _tmp4_;
- Dimensions _tmp8_;
- gboolean _tmp9_;
- Scaling _tmp10_ = {0};
+ Dimensions _tmp0_ = {0};
+ gboolean _tmp1_ = FALSE;
+ Dimensions _tmp2_;
+ gint _tmp3_;
+ Dimensions _tmp7_;
+ Scaling _tmp8_ = {0};
#line 284 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (GTK_IS_WIDGET (widget));
#line 285 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = widget;
+ dimensions_for_widget_allocation (widget, &_tmp0_);
#line 285 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_for_widget_allocation (_tmp0_, &_tmp1_);
-#line 285 "/home/jens/Source/shotwell/src/Dimensions.vala"
- viewport = _tmp1_;
+ viewport = _tmp0_;
#line 295 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = viewport;
+ _tmp2_ = viewport;
#line 295 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = _tmp3_.width;
+ _tmp3_ = _tmp2_.width;
#line 295 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp4_ <= 1) {
+ if (_tmp3_ <= 1) {
#line 295 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = TRUE;
-#line 1842 "Dimensions.c"
+ _tmp1_ = TRUE;
+#line 1822 "Dimensions.c"
} else {
- Dimensions _tmp5_;
- gint _tmp6_;
+ Dimensions _tmp4_;
+ gint _tmp5_;
#line 295 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = viewport;
+ _tmp4_ = viewport;
#line 295 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = _tmp5_.height;
+ _tmp5_ = _tmp4_.height;
#line 295 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = _tmp6_ <= 1;
-#line 1852 "Dimensions.c"
+ _tmp1_ = _tmp5_ <= 1;
+#line 1832 "Dimensions.c"
}
#line 295 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp2_) {
-#line 1856 "Dimensions.c"
- Scaling _tmp7_ = {0};
+ if (_tmp1_) {
+#line 1836 "Dimensions.c"
+ Scaling _tmp6_ = {0};
#line 296 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaling_for_original (&_tmp7_);
+ scaling_for_original (&_tmp6_);
#line 296 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp7_;
+ *result = _tmp6_;
#line 296 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1864 "Dimensions.c"
+#line 1844 "Dimensions.c"
}
#line 298 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = viewport;
-#line 298 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = scale_up;
+ _tmp7_ = viewport;
#line 298 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaling_init (&_tmp10_, SCALE_CONSTRAINT_DIMENSIONS, SCALING_NO_SCALE, &_tmp8_, _tmp9_);
+ scaling_init (&_tmp8_, SCALE_CONSTRAINT_DIMENSIONS, SCALING_NO_SCALE, &_tmp7_, scale_up);
#line 298 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp10_;
+ *result = _tmp8_;
#line 298 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1876 "Dimensions.c"
+#line 1854 "Dimensions.c"
}
-void scaling_to_fill_viewport (Dimensions* viewport, Scaling* result) {
+void
+scaling_to_fill_viewport (Dimensions* viewport,
+ Scaling* result)
+{
gboolean _tmp0_ = FALSE;
Dimensions _tmp1_;
gint _tmp2_;
@@ -1893,7 +1874,7 @@ void scaling_to_fill_viewport (Dimensions* viewport, Scaling* result) {
if (_tmp2_ <= 1) {
#line 304 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = TRUE;
-#line 1896 "Dimensions.c"
+#line 1877 "Dimensions.c"
} else {
Dimensions _tmp3_;
gint _tmp4_;
@@ -1903,11 +1884,11 @@ void scaling_to_fill_viewport (Dimensions* viewport, Scaling* result) {
_tmp4_ = _tmp3_.height;
#line 304 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = _tmp4_ <= 1;
-#line 1906 "Dimensions.c"
+#line 1887 "Dimensions.c"
}
#line 304 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp0_) {
-#line 1910 "Dimensions.c"
+#line 1891 "Dimensions.c"
Scaling _tmp5_ = {0};
#line 305 "/home/jens/Source/shotwell/src/Dimensions.vala"
scaling_for_original (&_tmp5_);
@@ -1915,7 +1896,7 @@ void scaling_to_fill_viewport (Dimensions* viewport, Scaling* result) {
*result = _tmp5_;
#line 305 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1918 "Dimensions.c"
+#line 1899 "Dimensions.c"
}
#line 307 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp6_ = *viewport;
@@ -1925,96 +1906,90 @@ void scaling_to_fill_viewport (Dimensions* viewport, Scaling* result) {
*result = _tmp7_;
#line 307 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1928 "Dimensions.c"
+#line 1909 "Dimensions.c"
}
-void scaling_to_fill_screen (GtkWindow* window, Scaling* result) {
- GtkWindow* _tmp0_;
- Dimensions _tmp1_ = {0};
- Scaling _tmp2_ = {0};
+void
+scaling_to_fill_screen (GtkWindow* window,
+ Scaling* result)
+{
+ Dimensions _tmp0_ = {0};
+ Scaling _tmp1_ = {0};
#line 310 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (GTK_IS_WINDOW (window));
#line 311 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = window;
-#line 311 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaling_get_screen_dimensions (_tmp0_, &_tmp1_);
+ scaling_get_screen_dimensions (window, &_tmp0_);
#line 311 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaling_to_fill_viewport (&_tmp1_, &_tmp2_);
+ scaling_to_fill_viewport (&_tmp0_, &_tmp1_);
#line 311 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp2_;
+ *result = _tmp1_;
#line 311 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1948 "Dimensions.c"
+#line 1929 "Dimensions.c"
}
-void scaling_for_constraint (ScaleConstraint constraint, gint scale, gboolean scale_up, Scaling* result) {
- ScaleConstraint _tmp0_;
- gint _tmp1_;
- Dimensions _tmp2_ = {0};
- gboolean _tmp3_;
- Scaling _tmp4_ = {0};
-#line 315 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = constraint;
-#line 315 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = scale;
-#line 315 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp2_, 0, 0);
+void
+scaling_for_constraint (ScaleConstraint constraint,
+ gint scale,
+ gboolean scale_up,
+ Scaling* result)
+{
+ Dimensions _tmp0_ = {0};
+ Scaling _tmp1_ = {0};
#line 315 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = scale_up;
+ dimensions_init (&_tmp0_, 0, 0);
#line 315 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaling_init (&_tmp4_, _tmp0_, _tmp1_, &_tmp2_, _tmp3_);
+ scaling_init (&_tmp1_, constraint, scale, &_tmp0_, scale_up);
#line 315 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp4_;
+ *result = _tmp1_;
#line 315 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 1972 "Dimensions.c"
+#line 1949 "Dimensions.c"
}
-static gpointer _g_object_ref0 (gpointer self) {
+static gpointer
+_g_object_ref0 (gpointer self)
+{
#line 319 "/home/jens/Source/shotwell/src/Dimensions.vala"
return self ? g_object_ref (self) : NULL;
-#line 1979 "Dimensions.c"
+#line 1958 "Dimensions.c"
}
-static void scaling_get_screen_dimensions (GtkWindow* window, Dimensions* result) {
+static void
+scaling_get_screen_dimensions (GtkWindow* window,
+ Dimensions* result)
+{
GdkScreen* screen = NULL;
- GtkWindow* _tmp0_;
+ GdkScreen* _tmp0_;
GdkScreen* _tmp1_;
- GdkScreen* _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- Dimensions _tmp5_ = {0};
+ Dimensions _tmp2_ = {0};
#line 318 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (GTK_IS_WINDOW (window));
#line 319 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = window;
-#line 319 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = gtk_window_get_screen (_tmp0_);
+ _tmp0_ = gtk_window_get_screen (window);
#line 319 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = _g_object_ref0 (_tmp1_);
+ _tmp1_ = _g_object_ref0 (_tmp0_);
#line 319 "/home/jens/Source/shotwell/src/Dimensions.vala"
- screen = _tmp2_;
-#line 321 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = gdk_screen_get_width (screen);
+ screen = _tmp1_;
#line 321 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = gdk_screen_get_height (screen);
+ dimensions_init (&_tmp2_, gdk_screen_get_width (screen), gdk_screen_get_height (screen));
#line 321 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_init (&_tmp5_, _tmp3_, _tmp4_);
-#line 321 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp5_;
+ *result = _tmp2_;
#line 321 "/home/jens/Source/shotwell/src/Dimensions.vala"
_g_object_unref0 (screen);
#line 321 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 2013 "Dimensions.c"
+#line 1986 "Dimensions.c"
}
-static gint scaling_scale_to_pixels (Scaling *self) {
+static gint
+scaling_scale_to_pixels (Scaling *self)
+{
gint result = 0;
gint _tmp0_ = 0;
gint _tmp1_;
@@ -2022,27 +1997,29 @@ static gint scaling_scale_to_pixels (Scaling *self) {
_tmp1_ = (*self).scale;
#line 325 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp1_ >= 0) {
-#line 2025 "Dimensions.c"
+#line 2000 "Dimensions.c"
gint _tmp2_;
#line 325 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp2_ = (*self).scale;
#line 325 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = _tmp2_;
-#line 2031 "Dimensions.c"
+#line 2006 "Dimensions.c"
} else {
#line 325 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = 0;
-#line 2035 "Dimensions.c"
+#line 2010 "Dimensions.c"
}
#line 325 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = _tmp0_;
#line 325 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2041 "Dimensions.c"
+#line 2016 "Dimensions.c"
}
-gboolean scaling_is_unscaled (Scaling *self) {
+gboolean
+scaling_is_unscaled (Scaling *self)
+{
gboolean result = FALSE;
ScaleConstraint _tmp0_;
#line 329 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -2051,11 +2028,15 @@ gboolean scaling_is_unscaled (Scaling *self) {
result = _tmp0_ == SCALE_CONSTRAINT_ORIGINAL;
#line 329 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2054 "Dimensions.c"
+#line 2031 "Dimensions.c"
}
-gboolean scaling_is_best_fit (Scaling *self, Dimensions* original, gint* pixels) {
+gboolean
+scaling_is_best_fit (Scaling *self,
+ Dimensions* original,
+ gint* pixels)
+{
gint _vala_pixels = 0;
gboolean result = FALSE;
gint _tmp0_;
@@ -2074,11 +2055,11 @@ gboolean scaling_is_best_fit (Scaling *self, Dimensions* original, gint* pixels)
if (pixels) {
#line 336 "/home/jens/Source/shotwell/src/Dimensions.vala"
*pixels = _vala_pixels;
-#line 2077 "Dimensions.c"
+#line 2058 "Dimensions.c"
}
#line 336 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2081 "Dimensions.c"
+#line 2062 "Dimensions.c"
}
#line 338 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = (*self).constraint;
@@ -2088,7 +2069,7 @@ gboolean scaling_is_best_fit (Scaling *self, Dimensions* original, gint* pixels)
case SCALE_CONSTRAINT_ORIGINAL:
#line 338 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_FILL_VIEWPORT:
-#line 2091 "Dimensions.c"
+#line 2072 "Dimensions.c"
{
#line 341 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
@@ -2096,47 +2077,48 @@ gboolean scaling_is_best_fit (Scaling *self, Dimensions* original, gint* pixels)
if (pixels) {
#line 341 "/home/jens/Source/shotwell/src/Dimensions.vala"
*pixels = _vala_pixels;
-#line 2099 "Dimensions.c"
+#line 2080 "Dimensions.c"
}
#line 341 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2103 "Dimensions.c"
+#line 2084 "Dimensions.c"
}
default:
{
gint _tmp2_;
- gint _tmp3_;
-#line 344 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = scaling_scale_to_pixels (&(*self));
#line 344 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_pixels = _tmp2_;
+ _vala_pixels = scaling_scale_to_pixels (&(*self));
#line 345 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = _vala_pixels;
+ _tmp2_ = _vala_pixels;
#line 345 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp3_ > 0, "pixels > 0");
+ _vala_assert (_tmp2_ > 0, "pixels > 0");
#line 347 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = TRUE;
#line 347 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (pixels) {
#line 347 "/home/jens/Source/shotwell/src/Dimensions.vala"
*pixels = _vala_pixels;
-#line 2123 "Dimensions.c"
+#line 2101 "Dimensions.c"
}
#line 347 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2127 "Dimensions.c"
+#line 2105 "Dimensions.c"
}
}
#line 332 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (pixels) {
#line 332 "/home/jens/Source/shotwell/src/Dimensions.vala"
*pixels = _vala_pixels;
-#line 2134 "Dimensions.c"
+#line 2112 "Dimensions.c"
}
}
-gboolean scaling_is_best_fit_dimensions (Scaling *self, Dimensions* original, Dimensions* scaled) {
+gboolean
+scaling_is_best_fit_dimensions (Scaling *self,
+ Dimensions* original,
+ Dimensions* scaled)
+{
Dimensions _vala_scaled = {0};
gboolean result = FALSE;
gint _tmp0_;
@@ -2155,11 +2137,11 @@ gboolean scaling_is_best_fit_dimensions (Scaling *self, Dimensions* original, Di
if (scaled) {
#line 355 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2158 "Dimensions.c"
+#line 2140 "Dimensions.c"
}
#line 355 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2162 "Dimensions.c"
+#line 2144 "Dimensions.c"
}
#line 357 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = (*self).constraint;
@@ -2169,7 +2151,7 @@ gboolean scaling_is_best_fit_dimensions (Scaling *self, Dimensions* original, Di
case SCALE_CONSTRAINT_ORIGINAL:
#line 357 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_FILL_VIEWPORT:
-#line 2172 "Dimensions.c"
+#line 2154 "Dimensions.c"
{
#line 360 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
@@ -2177,59 +2159,60 @@ gboolean scaling_is_best_fit_dimensions (Scaling *self, Dimensions* original, Di
if (scaled) {
#line 360 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2180 "Dimensions.c"
+#line 2162 "Dimensions.c"
}
#line 360 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2184 "Dimensions.c"
+#line 2166 "Dimensions.c"
}
default:
{
gint pixels = 0;
gint _tmp2_;
gint _tmp3_;
- gint _tmp4_;
- ScaleConstraint _tmp5_;
- Dimensions _tmp6_ = {0};
-#line 363 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = scaling_scale_to_pixels (&(*self));
+ ScaleConstraint _tmp4_;
+ Dimensions _tmp5_ = {0};
#line 363 "/home/jens/Source/shotwell/src/Dimensions.vala"
- pixels = _tmp2_;
+ pixels = scaling_scale_to_pixels (&(*self));
#line 364 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = pixels;
+ _tmp2_ = pixels;
#line 364 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp3_ > 0, "pixels > 0");
+ _vala_assert (_tmp2_ > 0, "pixels > 0");
#line 366 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = pixels;
+ _tmp3_ = pixels;
#line 366 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = (*self).constraint;
+ _tmp4_ = (*self).constraint;
#line 366 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_get_scaled_by_constraint (original, _tmp4_, _tmp5_, &_tmp6_);
+ dimensions_get_scaled_by_constraint (original, _tmp3_, _tmp4_, &_tmp5_);
#line 366 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_scaled = _tmp6_;
+ _vala_scaled = _tmp5_;
#line 368 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = TRUE;
#line 368 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (scaled) {
#line 368 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2216 "Dimensions.c"
+#line 2195 "Dimensions.c"
}
#line 368 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2220 "Dimensions.c"
+#line 2199 "Dimensions.c"
}
}
#line 351 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (scaled) {
#line 351 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2227 "Dimensions.c"
+#line 2206 "Dimensions.c"
}
}
-gboolean scaling_is_for_viewport (Scaling *self, Dimensions* original, Dimensions* scaled) {
+gboolean
+scaling_is_for_viewport (Scaling *self,
+ Dimensions* original,
+ Dimensions* scaled)
+{
Dimensions _vala_scaled = {0};
gboolean result = FALSE;
gint _tmp0_;
@@ -2248,11 +2231,11 @@ gboolean scaling_is_for_viewport (Scaling *self, Dimensions* original, Dimension
if (scaled) {
#line 376 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2251 "Dimensions.c"
+#line 2234 "Dimensions.c"
}
#line 376 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2255 "Dimensions.c"
+#line 2238 "Dimensions.c"
}
#line 378 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = (*self).constraint;
@@ -2262,7 +2245,7 @@ gboolean scaling_is_for_viewport (Scaling *self, Dimensions* original, Dimension
case SCALE_CONSTRAINT_ORIGINAL:
#line 378 "/home/jens/Source/shotwell/src/Dimensions.vala"
case SCALE_CONSTRAINT_FILL_VIEWPORT:
-#line 2265 "Dimensions.c"
+#line 2248 "Dimensions.c"
{
#line 381 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
@@ -2270,89 +2253,86 @@ gboolean scaling_is_for_viewport (Scaling *self, Dimensions* original, Dimension
if (scaled) {
#line 381 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2273 "Dimensions.c"
+#line 2256 "Dimensions.c"
}
#line 381 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2277 "Dimensions.c"
+#line 2260 "Dimensions.c"
}
default:
{
- gboolean _tmp2_;
+ gboolean _tmp2_ = FALSE;
gboolean _tmp3_ = FALSE;
- gboolean _tmp4_ = FALSE;
- gboolean _tmp5_;
+ gboolean _tmp4_;
#line 384 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = dimensions_has_area (&(*self).viewport);
-#line 384 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp2_, "viewport.has_area()");
+ _vala_assert (dimensions_has_area (&(*self).viewport), "viewport.has_area()");
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = (*self).scale_up;
+ _tmp4_ = (*self).scale_up;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (!_tmp5_) {
-#line 2293 "Dimensions.c"
- Dimensions _tmp6_;
- gint _tmp7_;
- Dimensions _tmp8_;
- gint _tmp9_;
+ if (!_tmp4_) {
+#line 2273 "Dimensions.c"
+ Dimensions _tmp5_;
+ gint _tmp6_;
+ Dimensions _tmp7_;
+ gint _tmp8_;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = *original;
+ _tmp5_ = *original;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = _tmp6_.width;
+ _tmp6_ = _tmp5_.width;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = (*self).viewport;
+ _tmp7_ = (*self).viewport;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = _tmp8_.width;
+ _tmp8_ = _tmp7_.width;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = _tmp7_ < _tmp9_;
-#line 2308 "Dimensions.c"
+ _tmp3_ = _tmp6_ < _tmp8_;
+#line 2288 "Dimensions.c"
} else {
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = FALSE;
-#line 2312 "Dimensions.c"
+ _tmp3_ = FALSE;
+#line 2292 "Dimensions.c"
}
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp4_) {
-#line 2316 "Dimensions.c"
- Dimensions _tmp10_;
- gint _tmp11_;
- Dimensions _tmp12_;
- gint _tmp13_;
+ if (_tmp3_) {
+#line 2296 "Dimensions.c"
+ Dimensions _tmp9_;
+ gint _tmp10_;
+ Dimensions _tmp11_;
+ gint _tmp12_;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = *original;
+ _tmp9_ = *original;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = _tmp10_.height;
+ _tmp10_ = _tmp9_.height;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = (*self).viewport;
+ _tmp11_ = (*self).viewport;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = _tmp12_.height;
+ _tmp12_ = _tmp11_.height;
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = _tmp11_ < _tmp13_;
-#line 2331 "Dimensions.c"
+ _tmp2_ = _tmp10_ < _tmp12_;
+#line 2311 "Dimensions.c"
} else {
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = FALSE;
-#line 2335 "Dimensions.c"
+ _tmp2_ = FALSE;
+#line 2315 "Dimensions.c"
}
#line 386 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp3_) {
-#line 2339 "Dimensions.c"
- Dimensions _tmp14_;
+ if (_tmp2_) {
+#line 2319 "Dimensions.c"
+ Dimensions _tmp13_;
#line 387 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = *original;
+ _tmp13_ = *original;
#line 387 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_scaled = _tmp14_;
-#line 2345 "Dimensions.c"
+ _vala_scaled = _tmp13_;
+#line 2325 "Dimensions.c"
} else {
- Dimensions _tmp15_;
- Dimensions _tmp16_ = {0};
+ Dimensions _tmp14_;
+ Dimensions _tmp15_ = {0};
#line 389 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = (*self).viewport;
+ _tmp14_ = (*self).viewport;
#line 389 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_get_scaled_proportional (original, &_tmp15_, &_tmp16_);
+ dimensions_get_scaled_proportional (original, &_tmp14_, &_tmp15_);
#line 389 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_scaled = _tmp16_;
-#line 2355 "Dimensions.c"
+ _vala_scaled = _tmp15_;
+#line 2335 "Dimensions.c"
}
#line 391 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = TRUE;
@@ -2360,29 +2340,32 @@ gboolean scaling_is_for_viewport (Scaling *self, Dimensions* original, Dimension
if (scaled) {
#line 391 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2363 "Dimensions.c"
+#line 2343 "Dimensions.c"
}
#line 391 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2367 "Dimensions.c"
+#line 2347 "Dimensions.c"
}
}
#line 372 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (scaled) {
#line 372 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2374 "Dimensions.c"
+#line 2354 "Dimensions.c"
}
}
-gboolean scaling_is_fill_viewport (Scaling *self, Dimensions* original, Dimensions* scaled) {
+gboolean
+scaling_is_fill_viewport (Scaling *self,
+ Dimensions* original,
+ Dimensions* scaled)
+{
Dimensions _vala_scaled = {0};
gboolean result = FALSE;
ScaleConstraint _tmp0_;
- gboolean _tmp1_;
- Dimensions _tmp2_;
- Dimensions _tmp3_ = {0};
+ Dimensions _tmp1_;
+ Dimensions _tmp2_ = {0};
#line 395 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_val_if_fail (original != NULL, FALSE);
#line 396 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -2397,255 +2380,231 @@ gboolean scaling_is_fill_viewport (Scaling *self, Dimensions* original, Dimensio
if (scaled) {
#line 399 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2400 "Dimensions.c"
+#line 2383 "Dimensions.c"
}
#line 399 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2404 "Dimensions.c"
+#line 2387 "Dimensions.c"
}
#line 401 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = dimensions_has_area (&(*self).viewport);
-#line 401 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp1_, "viewport.has_area()");
+ _vala_assert (dimensions_has_area (&(*self).viewport), "viewport.has_area()");
#line 402 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = (*self).viewport;
+ _tmp1_ = (*self).viewport;
#line 402 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_get_scaled_to_fill_viewport (original, &_tmp2_, &_tmp3_);
+ dimensions_get_scaled_to_fill_viewport (original, &_tmp1_, &_tmp2_);
#line 402 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_scaled = _tmp3_;
+ _vala_scaled = _tmp2_;
#line 404 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = TRUE;
#line 404 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (scaled) {
#line 404 "/home/jens/Source/shotwell/src/Dimensions.vala"
*scaled = _vala_scaled;
-#line 2422 "Dimensions.c"
+#line 2403 "Dimensions.c"
}
#line 404 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2426 "Dimensions.c"
+#line 2407 "Dimensions.c"
}
-void scaling_get_scaled_dimensions (Scaling *self, Dimensions* original, Dimensions* result) {
- gboolean _tmp0_;
+void
+scaling_get_scaled_dimensions (Scaling *self,
+ Dimensions* original,
+ Dimensions* result)
+{
Dimensions scaled = {0};
- Dimensions _tmp2_;
- Dimensions _tmp3_ = {0};
- gboolean _tmp4_;
- Dimensions _tmp5_;
- Dimensions _tmp6_ = {0};
- gboolean _tmp7_;
+ Dimensions _tmp1_;
+ Dimensions _tmp2_ = {0};
+ gboolean _tmp3_;
+ Dimensions _tmp4_;
+ Dimensions _tmp5_ = {0};
+ gboolean _tmp6_;
gboolean is_viewport = FALSE;
- Dimensions _tmp8_;
- Dimensions _tmp9_ = {0};
+ Dimensions _tmp7_;
+ Dimensions _tmp8_ = {0};
+ gboolean _tmp9_;
gboolean _tmp10_;
- gboolean _tmp11_;
#line 407 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (original != NULL);
#line 408 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = scaling_is_unscaled (&(*self));
-#line 408 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp0_) {
-#line 2450 "Dimensions.c"
- Dimensions _tmp1_;
+ if (scaling_is_unscaled (&(*self))) {
+#line 2432 "Dimensions.c"
+ Dimensions _tmp0_;
#line 409 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = *original;
+ _tmp0_ = *original;
#line 409 "/home/jens/Source/shotwell/src/Dimensions.vala"
- *result = _tmp1_;
+ *result = _tmp0_;
#line 409 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 2458 "Dimensions.c"
+#line 2440 "Dimensions.c"
}
#line 412 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = *original;
+ _tmp1_ = *original;
#line 412 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = scaling_is_fill_viewport (&(*self), &_tmp2_, &_tmp3_);
+ _tmp3_ = scaling_is_fill_viewport (&(*self), &_tmp1_, &_tmp2_);
#line 412 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled = _tmp3_;
+ scaled = _tmp2_;
#line 412 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp4_) {
+ if (_tmp3_) {
#line 413 "/home/jens/Source/shotwell/src/Dimensions.vala"
*result = scaled;
#line 413 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 2472 "Dimensions.c"
+#line 2454 "Dimensions.c"
}
#line 415 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = *original;
+ _tmp4_ = *original;
#line 415 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = scaling_is_best_fit_dimensions (&(*self), &_tmp5_, &_tmp6_);
+ _tmp6_ = scaling_is_best_fit_dimensions (&(*self), &_tmp4_, &_tmp5_);
#line 415 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled = _tmp6_;
+ scaled = _tmp5_;
#line 415 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp7_) {
+ if (_tmp6_) {
#line 416 "/home/jens/Source/shotwell/src/Dimensions.vala"
*result = scaled;
#line 416 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 2486 "Dimensions.c"
+#line 2468 "Dimensions.c"
}
#line 418 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = *original;
+ _tmp7_ = *original;
#line 418 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = scaling_is_for_viewport (&(*self), &_tmp8_, &_tmp9_);
+ _tmp9_ = scaling_is_for_viewport (&(*self), &_tmp7_, &_tmp8_);
#line 418 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled = _tmp9_;
+ scaled = _tmp8_;
#line 418 "/home/jens/Source/shotwell/src/Dimensions.vala"
- is_viewport = _tmp10_;
+ is_viewport = _tmp9_;
#line 419 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = is_viewport;
+ _tmp10_ = is_viewport;
#line 419 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp11_, "is_viewport");
+ _vala_assert (_tmp10_, "is_viewport");
#line 421 "/home/jens/Source/shotwell/src/Dimensions.vala"
*result = scaled;
#line 421 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 2504 "Dimensions.c"
+#line 2486 "Dimensions.c"
}
-GdkPixbuf* scaling_perform_on_pixbuf (Scaling *self, GdkPixbuf* pixbuf, GdkInterpType interp, gboolean scale_up) {
+GdkPixbuf*
+scaling_perform_on_pixbuf (Scaling *self,
+ GdkPixbuf* pixbuf,
+ GdkInterpType interp,
+ gboolean scale_up)
+{
GdkPixbuf* result = NULL;
- gboolean _tmp0_;
Dimensions pixbuf_dim = {0};
- GdkPixbuf* _tmp3_;
- Dimensions _tmp4_ = {0};
+ Dimensions _tmp1_ = {0};
gint pixels = 0;
- Dimensions _tmp5_;
- gint _tmp6_ = 0;
- gboolean _tmp7_;
+ Dimensions _tmp2_;
+ gint _tmp3_ = 0;
+ gboolean _tmp4_;
Dimensions scaled = {0};
- Dimensions _tmp13_;
- Dimensions _tmp14_ = {0};
- gboolean _tmp15_;
+ Dimensions _tmp7_;
+ Dimensions _tmp8_ = {0};
+ gboolean _tmp9_;
gboolean is_viewport = FALSE;
- Dimensions _tmp20_;
- Dimensions _tmp21_ = {0};
- gboolean _tmp22_;
- gboolean _tmp23_;
- GdkPixbuf* _tmp24_;
- Dimensions _tmp25_;
- GdkInterpType _tmp26_;
- GdkPixbuf* _tmp27_;
+ Dimensions _tmp12_;
+ Dimensions _tmp13_ = {0};
+ gboolean _tmp14_;
+ gboolean _tmp15_;
+ Dimensions _tmp16_;
+ GdkPixbuf* _tmp17_;
#line 424 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
#line 425 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = scaling_is_unscaled (&(*self));
-#line 425 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp0_) {
-#line 2537 "Dimensions.c"
- GdkPixbuf* _tmp1_;
- GdkPixbuf* _tmp2_;
+ if (scaling_is_unscaled (&(*self))) {
+#line 2518 "Dimensions.c"
+ GdkPixbuf* _tmp0_;
#line 426 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = pixbuf;
+ _tmp0_ = _g_object_ref0 (pixbuf);
#line 426 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = _g_object_ref0 (_tmp1_);
-#line 426 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp2_;
+ result = _tmp0_;
#line 426 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2548 "Dimensions.c"
+#line 2526 "Dimensions.c"
}
#line 428 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = pixbuf;
-#line 428 "/home/jens/Source/shotwell/src/Dimensions.vala"
- dimensions_for_pixbuf (_tmp3_, &_tmp4_);
+ dimensions_for_pixbuf (pixbuf, &_tmp1_);
#line 428 "/home/jens/Source/shotwell/src/Dimensions.vala"
- pixbuf_dim = _tmp4_;
+ pixbuf_dim = _tmp1_;
#line 431 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = pixbuf_dim;
+ _tmp2_ = pixbuf_dim;
#line 431 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = scaling_is_best_fit (&(*self), &_tmp5_, &_tmp6_);
+ _tmp4_ = scaling_is_best_fit (&(*self), &_tmp2_, &_tmp3_);
#line 431 "/home/jens/Source/shotwell/src/Dimensions.vala"
- pixels = _tmp6_;
+ pixels = _tmp3_;
#line 431 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp7_) {
-#line 2564 "Dimensions.c"
- GdkPixbuf* _tmp8_;
- gint _tmp9_;
- GdkInterpType _tmp10_;
- gboolean _tmp11_;
- GdkPixbuf* _tmp12_;
-#line 432 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = pixbuf;
-#line 432 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = pixels;
-#line 432 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = interp;
+ if (_tmp4_) {
+#line 2540 "Dimensions.c"
+ gint _tmp5_;
+ GdkPixbuf* _tmp6_;
#line 432 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = scale_up;
+ _tmp5_ = pixels;
#line 432 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = scale_pixbuf (_tmp8_, _tmp9_, _tmp10_, _tmp11_);
+ _tmp6_ = scale_pixbuf (pixbuf, _tmp5_, interp, scale_up);
#line 432 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp12_;
+ result = _tmp6_;
#line 432 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2584 "Dimensions.c"
+#line 2551 "Dimensions.c"
}
#line 435 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = pixbuf_dim;
+ _tmp7_ = pixbuf_dim;
#line 435 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = scaling_is_fill_viewport (&(*self), &_tmp13_, &_tmp14_);
+ _tmp9_ = scaling_is_fill_viewport (&(*self), &_tmp7_, &_tmp8_);
#line 435 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled = _tmp14_;
+ scaled = _tmp8_;
#line 435 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp15_) {
-#line 2594 "Dimensions.c"
- GdkPixbuf* _tmp16_;
- Dimensions _tmp17_;
- GdkInterpType _tmp18_;
- GdkPixbuf* _tmp19_;
-#line 436 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = pixbuf;
-#line 436 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = scaled;
+ if (_tmp9_) {
+#line 2561 "Dimensions.c"
+ Dimensions _tmp10_;
+ GdkPixbuf* _tmp11_;
#line 436 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp18_ = interp;
+ _tmp10_ = scaled;
#line 436 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp19_ = resize_pixbuf (_tmp16_, &_tmp17_, _tmp18_);
+ _tmp11_ = resize_pixbuf (pixbuf, &_tmp10_, interp);
#line 436 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp19_;
+ result = _tmp11_;
#line 436 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2611 "Dimensions.c"
+#line 2572 "Dimensions.c"
}
#line 438 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = pixbuf_dim;
+ _tmp12_ = pixbuf_dim;
#line 438 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp22_ = scaling_is_for_viewport (&(*self), &_tmp20_, &_tmp21_);
+ _tmp14_ = scaling_is_for_viewport (&(*self), &_tmp12_, &_tmp13_);
#line 438 "/home/jens/Source/shotwell/src/Dimensions.vala"
- scaled = _tmp21_;
+ scaled = _tmp13_;
#line 438 "/home/jens/Source/shotwell/src/Dimensions.vala"
- is_viewport = _tmp22_;
+ is_viewport = _tmp14_;
#line 439 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp23_ = is_viewport;
+ _tmp15_ = is_viewport;
#line 439 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _vala_assert (_tmp23_, "is_viewport");
-#line 441 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp24_ = pixbuf;
+ _vala_assert (_tmp15_, "is_viewport");
#line 441 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp25_ = scaled;
+ _tmp16_ = scaled;
#line 441 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp26_ = interp;
+ _tmp17_ = resize_pixbuf (pixbuf, &_tmp16_, interp);
#line 441 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp27_ = resize_pixbuf (_tmp24_, &_tmp25_, _tmp26_);
-#line 441 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp27_;
+ result = _tmp17_;
#line 441 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2637 "Dimensions.c"
+#line 2594 "Dimensions.c"
}
-gchar* scaling_to_string (Scaling *self) {
+gchar*
+scaling_to_string (Scaling *self)
+{
gchar* result = NULL;
ScaleConstraint _tmp0_;
#line 445 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = (*self).constraint;
#line 445 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp0_ == SCALE_CONSTRAINT_ORIGINAL) {
-#line 2648 "Dimensions.c"
+#line 2607 "Dimensions.c"
gchar* _tmp1_;
#line 446 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = g_strdup ("scaling: UNSCALED");
@@ -2653,14 +2612,14 @@ gchar* scaling_to_string (Scaling *self) {
result = _tmp1_;
#line 446 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2656 "Dimensions.c"
+#line 2615 "Dimensions.c"
} else {
ScaleConstraint _tmp2_;
#line 447 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp2_ = (*self).constraint;
#line 447 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp2_ == SCALE_CONSTRAINT_FILL_VIEWPORT) {
-#line 2663 "Dimensions.c"
+#line 2622 "Dimensions.c"
gchar* _tmp3_;
gchar* _tmp4_;
gchar* _tmp5_;
@@ -2679,33 +2638,32 @@ gchar* scaling_to_string (Scaling *self) {
result = _tmp6_;
#line 448 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2682 "Dimensions.c"
+#line 2641 "Dimensions.c"
} else {
gint _tmp7_;
#line 449 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp7_ = (*self).scale;
#line 449 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp7_ != SCALING_NO_SCALE) {
-#line 2689 "Dimensions.c"
+#line 2648 "Dimensions.c"
const gchar* _tmp8_ = NULL;
gboolean _tmp9_;
ScaleConstraint _tmp10_;
gchar* _tmp11_;
gchar* _tmp12_;
- gint _tmp13_;
+ gchar* _tmp13_;
gchar* _tmp14_;
- gchar* _tmp15_;
#line 451 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp9_ = (*self).scale_up;
#line 451 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp9_) {
#line 451 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp8_ = "scaled up";
-#line 2704 "Dimensions.c"
+#line 2662 "Dimensions.c"
} else {
#line 451 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp8_ = "not scaled up";
-#line 2708 "Dimensions.c"
+#line 2666 "Dimensions.c"
}
#line 450 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp10_ = (*self).constraint;
@@ -2714,59 +2672,60 @@ gchar* scaling_to_string (Scaling *self) {
#line 450 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp12_ = _tmp11_;
#line 450 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = scaling_scale_to_pixels (&(*self));
-#line 450 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = g_strdup_printf ("scaling: best-fit (%s %d pixels %s)", _tmp12_, _tmp13_, _tmp8_);
+ _tmp13_ = g_strdup_printf ("scaling: best-fit (%s %d pixels %s)", _tmp12_, scaling_scale_to_pixels (&(*self)), _tmp8_);
#line 450 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = _tmp14_;
+ _tmp14_ = _tmp13_;
#line 450 "/home/jens/Source/shotwell/src/Dimensions.vala"
_g_free0 (_tmp12_);
#line 450 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp15_;
+ result = _tmp14_;
#line 450 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2728 "Dimensions.c"
+#line 2684 "Dimensions.c"
} else {
- const gchar* _tmp16_ = NULL;
- gboolean _tmp17_;
+ const gchar* _tmp15_ = NULL;
+ gboolean _tmp16_;
+ gchar* _tmp17_;
gchar* _tmp18_;
gchar* _tmp19_;
gchar* _tmp20_;
- gchar* _tmp21_;
#line 454 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = (*self).scale_up;
+ _tmp16_ = (*self).scale_up;
#line 454 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp17_) {
+ if (_tmp16_) {
#line 454 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = "scaled up";
-#line 2742 "Dimensions.c"
+ _tmp15_ = "scaled up";
+#line 2698 "Dimensions.c"
} else {
#line 454 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = "not scaled up";
-#line 2746 "Dimensions.c"
+ _tmp15_ = "not scaled up";
+#line 2702 "Dimensions.c"
}
#line 453 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp18_ = dimensions_to_string (&(*self).viewport);
+ _tmp17_ = dimensions_to_string (&(*self).viewport);
#line 453 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp19_ = _tmp18_;
+ _tmp18_ = _tmp17_;
#line 453 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = g_strdup_printf ("scaling: viewport %s (%s)", _tmp19_, _tmp16_);
+ _tmp19_ = g_strdup_printf ("scaling: viewport %s (%s)", _tmp18_, _tmp15_);
#line 453 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp21_ = _tmp20_;
+ _tmp20_ = _tmp19_;
#line 453 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _g_free0 (_tmp19_);
+ _g_free0 (_tmp18_);
#line 453 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp21_;
+ result = _tmp20_;
#line 453 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2762 "Dimensions.c"
+#line 2718 "Dimensions.c"
}
}
}
}
-gboolean scaling_equals (Scaling *self, Scaling* scaling) {
+gboolean
+scaling_equals (Scaling *self,
+ Scaling* scaling)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
@@ -2783,7 +2742,7 @@ gboolean scaling_equals (Scaling *self, Scaling* scaling) {
_tmp4_ = _tmp3_.constraint;
#line 458 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp2_ == _tmp4_) {
-#line 2786 "Dimensions.c"
+#line 2745 "Dimensions.c"
gint _tmp5_;
Scaling _tmp6_;
gint _tmp7_;
@@ -2795,41 +2754,40 @@ gboolean scaling_equals (Scaling *self, Scaling* scaling) {
_tmp7_ = _tmp6_.scale;
#line 458 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = _tmp5_ == _tmp7_;
-#line 2798 "Dimensions.c"
+#line 2757 "Dimensions.c"
} else {
#line 458 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = FALSE;
-#line 2802 "Dimensions.c"
+#line 2761 "Dimensions.c"
}
#line 458 "/home/jens/Source/shotwell/src/Dimensions.vala"
if (_tmp1_) {
-#line 2806 "Dimensions.c"
+#line 2765 "Dimensions.c"
Scaling _tmp8_;
Dimensions _tmp9_;
- gboolean _tmp10_;
#line 459 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp8_ = *scaling;
#line 459 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp9_ = _tmp8_.viewport;
#line 459 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = dimensions_equals (&(*self).viewport, &_tmp9_);
-#line 459 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = _tmp10_;
-#line 2818 "Dimensions.c"
+ _tmp0_ = dimensions_equals (&(*self).viewport, &_tmp9_);
+#line 2774 "Dimensions.c"
} else {
#line 458 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = FALSE;
-#line 2822 "Dimensions.c"
+#line 2778 "Dimensions.c"
}
#line 458 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = _tmp0_;
#line 458 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 2828 "Dimensions.c"
+#line 2784 "Dimensions.c"
}
-Scaling* scaling_dup (const Scaling* self) {
+Scaling*
+scaling_dup (const Scaling* self)
+{
Scaling* dup;
#line 249 "/home/jens/Source/shotwell/src/Dimensions.vala"
dup = g_new0 (Scaling, 1);
@@ -2837,18 +2795,22 @@ Scaling* scaling_dup (const Scaling* self) {
memcpy (dup, self, sizeof (Scaling));
#line 249 "/home/jens/Source/shotwell/src/Dimensions.vala"
return dup;
-#line 2840 "Dimensions.c"
+#line 2798 "Dimensions.c"
}
-void scaling_free (Scaling* self) {
+void
+scaling_free (Scaling* self)
+{
#line 249 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_free (self);
-#line 2847 "Dimensions.c"
+#line 2807 "Dimensions.c"
}
-GType scaling_get_type (void) {
+GType
+scaling_get_type (void)
+{
static volatile gsize scaling_type_id__volatile = 0;
if (g_once_init_enter (&scaling_type_id__volatile)) {
GType scaling_type_id;
@@ -2859,13 +2821,17 @@ GType scaling_get_type (void) {
}
-void zoom_state_init (ZoomState *self, Dimensions* content_dimensions, Dimensions* viewport_dimensions, gdouble slider_val, GdkPoint* viewport_center) {
+void
+zoom_state_init (ZoomState *self,
+ Dimensions* content_dimensions,
+ Dimensions* viewport_dimensions,
+ gdouble slider_val,
+ GdkPoint* viewport_center)
+{
Dimensions _tmp0_;
Dimensions _tmp1_;
- gdouble _tmp2_;
+ gboolean _tmp2_ = FALSE;
gboolean _tmp3_ = FALSE;
- gboolean _tmp4_ = FALSE;
- GdkPoint* _tmp5_;
#line 472 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (content_dimensions != NULL);
#line 472 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -2881,85 +2847,71 @@ void zoom_state_init (ZoomState *self, Dimensions* content_dimensions, Dimension
#line 475 "/home/jens/Source/shotwell/src/Dimensions.vala"
(*self).viewport_dimensions = _tmp1_;
#line 476 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = slider_val;
-#line 476 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).interpolation_factor = _tmp2_;
+ (*self).interpolation_factor = slider_val;
#line 478 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_compute_zoom_factors (&(*self));
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = viewport_center;
+ if (viewport_center == NULL) {
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp5_ == NULL) {
-#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = TRUE;
-#line 2895 "Dimensions.c"
+ _tmp3_ = TRUE;
+#line 2857 "Dimensions.c"
} else {
- gboolean _tmp6_ = FALSE;
- GdkPoint* _tmp7_;
- gint _tmp8_;
-#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = viewport_center;
-#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = (*_tmp7_).x;
+ gboolean _tmp4_ = FALSE;
+ gint _tmp5_;
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp8_ == 0) {
-#line 2906 "Dimensions.c"
- GdkPoint* _tmp9_;
- gint _tmp10_;
+ _tmp5_ = (*viewport_center).x;
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = viewport_center;
+ if (_tmp5_ == 0) {
+#line 2865 "Dimensions.c"
+ gint _tmp6_;
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = (*_tmp9_).y;
+ _tmp6_ = (*viewport_center).y;
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = _tmp10_ == 0;
-#line 2915 "Dimensions.c"
+ _tmp4_ = _tmp6_ == 0;
+#line 2871 "Dimensions.c"
} else {
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = FALSE;
-#line 2919 "Dimensions.c"
+ _tmp4_ = FALSE;
+#line 2875 "Dimensions.c"
}
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = _tmp6_;
-#line 2923 "Dimensions.c"
+ _tmp3_ = _tmp4_;
+#line 2879 "Dimensions.c"
}
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp4_) {
+ if (_tmp3_) {
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = TRUE;
-#line 2929 "Dimensions.c"
+ _tmp2_ = TRUE;
+#line 2885 "Dimensions.c"
} else {
- gdouble _tmp11_;
-#line 481 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = slider_val;
#line 481 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = _tmp11_ == 0.0;
-#line 2936 "Dimensions.c"
+ _tmp2_ = slider_val == 0.0;
+#line 2889 "Dimensions.c"
}
#line 480 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp3_) {
+ if (_tmp2_) {
#line 482 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_center_viewport (&(*self));
-#line 2942 "Dimensions.c"
+#line 2895 "Dimensions.c"
} else {
- GdkPoint* _tmp12_;
#line 484 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = viewport_center;
-#line 484 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport_center = *_tmp12_;
+ (*self).viewport_center = *viewport_center;
#line 485 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_clamp_viewport_center (&(*self));
-#line 2951 "Dimensions.c"
+#line 2901 "Dimensions.c"
}
}
-void zoom_state_init_rescale (ZoomState *self, ZoomState* existing, gdouble new_slider_val) {
+void
+zoom_state_init_rescale (ZoomState *self,
+ ZoomState* existing,
+ gdouble new_slider_val)
+{
ZoomState _tmp0_;
Dimensions _tmp1_;
ZoomState _tmp2_;
Dimensions _tmp3_;
- gdouble _tmp4_;
- gdouble _tmp5_;
#line 489 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (existing != NULL);
#line 489 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -2977,80 +2929,77 @@ void zoom_state_init_rescale (ZoomState *self, ZoomState* existing, gdouble new_
#line 491 "/home/jens/Source/shotwell/src/Dimensions.vala"
(*self).viewport_dimensions = _tmp3_;
#line 492 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = new_slider_val;
-#line 492 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).interpolation_factor = _tmp4_;
+ (*self).interpolation_factor = new_slider_val;
#line 494 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_compute_zoom_factors (&(*self));
#line 496 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = new_slider_val;
-#line 496 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp5_ == 0.0) {
+ if (new_slider_val == 0.0) {
#line 497 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_center_viewport (&(*self));
-#line 2991 "Dimensions.c"
+#line 2939 "Dimensions.c"
} else {
- gdouble _tmp6_;
- ZoomState _tmp7_;
- GdkPoint _tmp8_;
- gint _tmp9_;
- ZoomState _tmp10_;
- gdouble _tmp11_;
- gdouble _tmp12_;
- ZoomState _tmp13_;
- GdkPoint _tmp14_;
- gint _tmp15_;
- ZoomState _tmp16_;
- gdouble _tmp17_;
+ gdouble _tmp4_;
+ ZoomState _tmp5_;
+ GdkPoint _tmp6_;
+ gint _tmp7_;
+ ZoomState _tmp8_;
+ gdouble _tmp9_;
+ gdouble _tmp10_;
+ ZoomState _tmp11_;
+ GdkPoint _tmp12_;
+ gint _tmp13_;
+ ZoomState _tmp14_;
+ gdouble _tmp15_;
#line 499 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = (*self).zoom_factor;
+ _tmp4_ = (*self).zoom_factor;
#line 499 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = *existing;
+ _tmp5_ = *existing;
#line 499 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = _tmp7_.viewport_center;
+ _tmp6_ = _tmp5_.viewport_center;
#line 499 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = _tmp8_.x;
+ _tmp7_ = _tmp6_.x;
#line 499 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = *existing;
+ _tmp8_ = *existing;
#line 499 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = _tmp10_.zoom_factor;
+ _tmp9_ = _tmp8_.zoom_factor;
#line 499 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport_center.x = (gint) (_tmp6_ * (_tmp9_ / _tmp11_));
+ (*self).viewport_center.x = (gint) (_tmp4_ * (_tmp7_ / _tmp9_));
#line 501 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = (*self).zoom_factor;
+ _tmp10_ = (*self).zoom_factor;
#line 501 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = *existing;
+ _tmp11_ = *existing;
#line 501 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = _tmp13_.viewport_center;
+ _tmp12_ = _tmp11_.viewport_center;
#line 501 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = _tmp14_.y;
+ _tmp13_ = _tmp12_.y;
#line 501 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = *existing;
+ _tmp14_ = *existing;
#line 501 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = _tmp16_.zoom_factor;
+ _tmp15_ = _tmp14_.zoom_factor;
#line 501 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport_center.y = (gint) (_tmp12_ * (_tmp15_ / _tmp17_));
+ (*self).viewport_center.y = (gint) (_tmp10_ * (_tmp13_ / _tmp15_));
#line 503 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_clamp_viewport_center (&(*self));
-#line 3035 "Dimensions.c"
+#line 2983 "Dimensions.c"
}
}
-void zoom_state_init_rescale_to_isomorphic (ZoomState *self, ZoomState* existing) {
+void
+zoom_state_init_rescale_to_isomorphic (ZoomState *self,
+ ZoomState* existing)
+{
ZoomState _tmp0_;
Dimensions _tmp1_;
ZoomState _tmp2_;
Dimensions _tmp3_;
ZoomState _tmp4_;
gdouble _tmp5_;
- gdouble _tmp6_;
- ZoomState _tmp7_;
- gdouble _tmp8_;
- ZoomState _tmp9_;
+ ZoomState _tmp6_;
+ gdouble _tmp7_;
+ ZoomState _tmp8_;
+ gdouble _tmp9_;
gdouble _tmp10_;
- gdouble _tmp11_;
- gdouble _tmp12_;
#line 507 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (existing != NULL);
#line 507 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -3072,77 +3021,77 @@ void zoom_state_init_rescale_to_isomorphic (ZoomState *self, ZoomState* existing
#line 510 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp5_ = _tmp4_.min_factor;
#line 510 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = log (1.0 / _tmp5_);
-#line 510 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = *existing;
-#line 510 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = _tmp7_.max_factor;
+ _tmp6_ = *existing;
#line 510 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = *existing;
+ _tmp7_ = _tmp6_.max_factor;
#line 510 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = _tmp9_.min_factor;
+ _tmp8_ = *existing;
#line 510 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = log (_tmp8_ / _tmp10_);
+ _tmp9_ = _tmp8_.min_factor;
#line 510 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).interpolation_factor = _tmp6_ / _tmp11_;
+ (*self).interpolation_factor = log (1.0 / _tmp5_) / log (_tmp7_ / _tmp9_);
#line 513 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_compute_zoom_factors (&(*self));
#line 515 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = (*self).interpolation_factor;
+ _tmp10_ = (*self).interpolation_factor;
#line 515 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp12_ == 0.0) {
+ if (_tmp10_ == 0.0) {
#line 516 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_center_viewport (&(*self));
-#line 3096 "Dimensions.c"
+#line 3041 "Dimensions.c"
} else {
- gdouble _tmp13_;
- ZoomState _tmp14_;
- GdkPoint _tmp15_;
- gint _tmp16_;
- ZoomState _tmp17_;
- gdouble _tmp18_;
- gdouble _tmp19_;
- ZoomState _tmp20_;
- GdkPoint _tmp21_;
- gint _tmp22_;
- ZoomState _tmp23_;
- gdouble _tmp24_;
+ gdouble _tmp11_;
+ ZoomState _tmp12_;
+ GdkPoint _tmp13_;
+ gint _tmp14_;
+ ZoomState _tmp15_;
+ gdouble _tmp16_;
+ gdouble _tmp17_;
+ ZoomState _tmp18_;
+ GdkPoint _tmp19_;
+ gint _tmp20_;
+ ZoomState _tmp21_;
+ gdouble _tmp22_;
#line 518 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = (*self).zoom_factor;
+ _tmp11_ = (*self).zoom_factor;
#line 518 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = *existing;
+ _tmp12_ = *existing;
#line 518 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = _tmp14_.viewport_center;
+ _tmp13_ = _tmp12_.viewport_center;
#line 518 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = _tmp15_.x;
+ _tmp14_ = _tmp13_.x;
#line 518 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = *existing;
+ _tmp15_ = *existing;
#line 518 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp18_ = _tmp17_.zoom_factor;
+ _tmp16_ = _tmp15_.zoom_factor;
#line 518 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport_center.x = (gint) (_tmp13_ * (_tmp16_ / _tmp18_));
+ (*self).viewport_center.x = (gint) (_tmp11_ * (_tmp14_ / _tmp16_));
#line 520 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp19_ = (*self).zoom_factor;
+ _tmp17_ = (*self).zoom_factor;
#line 520 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = *existing;
+ _tmp18_ = *existing;
#line 520 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp21_ = _tmp20_.viewport_center;
+ _tmp19_ = _tmp18_.viewport_center;
#line 520 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp22_ = _tmp21_.y;
+ _tmp20_ = _tmp19_.y;
#line 520 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp23_ = *existing;
+ _tmp21_ = *existing;
#line 520 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp24_ = _tmp23_.zoom_factor;
+ _tmp22_ = _tmp21_.zoom_factor;
#line 520 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport_center.y = (gint) (_tmp19_ * (_tmp22_ / _tmp24_));
+ (*self).viewport_center.y = (gint) (_tmp17_ * (_tmp20_ / _tmp22_));
#line 522 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_clamp_viewport_center (&(*self));
-#line 3140 "Dimensions.c"
+#line 3085 "Dimensions.c"
}
}
-void zoom_state_init_pan (ZoomState *self, ZoomState* existing, GdkPoint* new_viewport_center) {
+void
+zoom_state_init_pan (ZoomState *self,
+ ZoomState* existing,
+ GdkPoint* new_viewport_center)
+{
ZoomState _tmp0_;
Dimensions _tmp1_;
ZoomState _tmp2_;
@@ -3182,89 +3131,77 @@ void zoom_state_init_pan (ZoomState *self, ZoomState* existing, GdkPoint* new_vi
(*self).viewport_center = _tmp6_;
#line 535 "/home/jens/Source/shotwell/src/Dimensions.vala"
zoom_state_clamp_viewport_center (&(*self));
-#line 3185 "Dimensions.c"
+#line 3134 "Dimensions.c"
}
-static void zoom_state_clamp_viewport_center (ZoomState *self) {
+static void
+zoom_state_clamp_viewport_center (ZoomState *self)
+{
gint zoomed_width = 0;
- gint _tmp0_;
gint zoomed_height = 0;
+ GdkPoint _tmp0_;
gint _tmp1_;
- GdkPoint _tmp2_;
+ Dimensions _tmp2_;
gint _tmp3_;
Dimensions _tmp4_;
gint _tmp5_;
- Dimensions _tmp6_;
+ GdkPoint _tmp6_;
gint _tmp7_;
- gint _tmp8_;
- GdkPoint _tmp9_;
- gint _tmp10_;
- Dimensions _tmp11_;
- gint _tmp12_;
- Dimensions _tmp13_;
- gint _tmp14_;
- gint _tmp15_;
-#line 539 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = zoom_state_get_zoomed_width (&(*self));
+ Dimensions _tmp8_;
+ gint _tmp9_;
+ Dimensions _tmp10_;
+ gint _tmp11_;
#line 539 "/home/jens/Source/shotwell/src/Dimensions.vala"
- zoomed_width = _tmp0_;
-#line 540 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = zoom_state_get_zoomed_height (&(*self));
+ zoomed_width = zoom_state_get_zoomed_width (&(*self));
#line 540 "/home/jens/Source/shotwell/src/Dimensions.vala"
- zoomed_height = _tmp1_;
-#line 542 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = (*self).viewport_center;
+ zoomed_height = zoom_state_get_zoomed_height (&(*self));
#line 542 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = _tmp2_.x;
+ _tmp0_ = (*self).viewport_center;
#line 542 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = (*self).viewport_dimensions;
+ _tmp1_ = _tmp0_.x;
#line 542 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = _tmp4_.width;
+ _tmp2_ = (*self).viewport_dimensions;
#line 542 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = (*self).viewport_dimensions;
+ _tmp3_ = _tmp2_.width;
#line 542 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = _tmp6_.width;
+ _tmp4_ = (*self).viewport_dimensions;
#line 542 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = CLAMP (_tmp3_, _tmp5_ / 2, (zoomed_width - (_tmp7_ / 2)) - 1);
+ _tmp5_ = _tmp4_.width;
#line 542 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport_center.x = _tmp8_;
-#line 544 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = (*self).viewport_center;
+ (*self).viewport_center.x = CLAMP (_tmp1_, _tmp3_ / 2, (zoomed_width - (_tmp5_ / 2)) - 1);
#line 544 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = _tmp9_.y;
+ _tmp6_ = (*self).viewport_center;
#line 544 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = (*self).viewport_dimensions;
+ _tmp7_ = _tmp6_.y;
#line 544 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = _tmp11_.height;
+ _tmp8_ = (*self).viewport_dimensions;
#line 544 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = (*self).viewport_dimensions;
+ _tmp9_ = _tmp8_.height;
#line 544 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = _tmp13_.height;
+ _tmp10_ = (*self).viewport_dimensions;
#line 544 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = CLAMP (_tmp10_, _tmp12_ / 2, (zoomed_height - (_tmp14_ / 2)) - 1);
+ _tmp11_ = _tmp10_.height;
#line 544 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport_center.y = _tmp15_;
-#line 3248 "Dimensions.c"
+ (*self).viewport_center.y = CLAMP (_tmp7_, _tmp9_ / 2, (zoomed_height - (_tmp11_ / 2)) - 1);
+#line 3187 "Dimensions.c"
}
-static void zoom_state_center_viewport (ZoomState *self) {
- gint _tmp0_;
- gint _tmp1_;
-#line 549 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = zoom_state_get_zoomed_width (&(*self));
+static void
+zoom_state_center_viewport (ZoomState *self)
+{
#line 549 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport_center.x = _tmp0_ / 2;
+ (*self).viewport_center.x = zoom_state_get_zoomed_width (&(*self)) / 2;
#line 550 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = zoom_state_get_zoomed_height (&(*self));
-#line 550 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).viewport_center.y = _tmp1_ / 2;
-#line 3263 "Dimensions.c"
+ (*self).viewport_center.y = zoom_state_get_zoomed_height (&(*self)) / 2;
+#line 3198 "Dimensions.c"
}
-static void zoom_state_compute_zoom_factors (ZoomState *self) {
+static void
+zoom_state_compute_zoom_factors (ZoomState *self)
+{
gdouble viewport_to_content_x = 0.0;
gdouble viewport_to_content_y = 0.0;
Dimensions _tmp0_;
@@ -3277,8 +3214,6 @@ static void zoom_state_compute_zoom_factors (ZoomState *self) {
gdouble _tmp7_;
gdouble _tmp8_;
gdouble _tmp9_;
- gdouble _tmp10_;
- gdouble _tmp11_;
#line 554 "/home/jens/Source/shotwell/src/Dimensions.vala"
(*self).max_factor = 2.0;
#line 558 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -3294,34 +3229,32 @@ static void zoom_state_compute_zoom_factors (ZoomState *self) {
#line 560 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp4_ = viewport_to_content_y;
#line 560 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = MIN (_tmp3_, _tmp4_);
-#line 560 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).min_factor = _tmp5_;
+ (*self).min_factor = MIN (_tmp3_, _tmp4_);
#line 561 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = (*self).min_factor;
+ _tmp5_ = (*self).min_factor;
#line 561 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp6_ > 1.0) {
+ if (_tmp5_ > 1.0) {
#line 562 "/home/jens/Source/shotwell/src/Dimensions.vala"
(*self).min_factor = 1.0;
-#line 3306 "Dimensions.c"
+#line 3239 "Dimensions.c"
}
#line 564 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = (*self).min_factor;
-#line 564 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = (*self).max_factor;
+ _tmp6_ = (*self).min_factor;
#line 564 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = (*self).min_factor;
+ _tmp7_ = (*self).max_factor;
#line 564 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = (*self).interpolation_factor;
+ _tmp8_ = (*self).min_factor;
#line 564 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = pow (_tmp8_ / _tmp9_, _tmp10_);
+ _tmp9_ = (*self).interpolation_factor;
#line 564 "/home/jens/Source/shotwell/src/Dimensions.vala"
- (*self).zoom_factor = _tmp7_ * _tmp11_;
-#line 3320 "Dimensions.c"
+ (*self).zoom_factor = _tmp6_ * pow (_tmp7_ / _tmp8_, _tmp9_);
+#line 3251 "Dimensions.c"
}
-gdouble zoom_state_get_interpolation_factor (ZoomState *self) {
+gdouble
+zoom_state_get_interpolation_factor (ZoomState *self)
+{
gdouble result = 0.0;
gdouble _tmp0_;
#line 568 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -3330,247 +3263,241 @@ gdouble zoom_state_get_interpolation_factor (ZoomState *self) {
result = _tmp0_;
#line 568 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 3333 "Dimensions.c"
+#line 3266 "Dimensions.c"
}
-void zoom_state_get_viewing_rectangle_wrt_content (ZoomState *self, GdkRectangle* result) {
+void
+zoom_state_get_viewing_rectangle_wrt_content (ZoomState *self,
+ GdkRectangle* result)
+{
gint zoomed_width = 0;
- gint _tmp0_;
gint zoomed_height = 0;
- gint _tmp1_;
GdkRectangle _result_ = {0};
- Dimensions _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- GdkRectangle _tmp12_;
+ Dimensions _tmp0_;
+ gint _tmp1_;
+ gint _tmp2_;
+ GdkRectangle _tmp10_;
+ gint _tmp11_;
+ Dimensions _tmp12_;
gint _tmp13_;
- Dimensions _tmp14_;
- gint _tmp15_;
- gint _tmp16_;
+ gint _tmp14_;
+ GdkRectangle _tmp22_;
+ gint _tmp23_;
+ gint right = 0;
GdkRectangle _tmp24_;
gint _tmp25_;
- gint right = 0;
- GdkRectangle _tmp26_;
+ Dimensions _tmp26_;
gint _tmp27_;
- Dimensions _tmp28_;
+ gint _tmp28_;
gint _tmp29_;
- gint _tmp30_;
gint _tmp31_;
+ GdkRectangle _tmp32_;
gint _tmp33_;
+ gint bottom = 0;
GdkRectangle _tmp34_;
gint _tmp35_;
- gint bottom = 0;
- GdkRectangle _tmp36_;
+ Dimensions _tmp36_;
gint _tmp37_;
- Dimensions _tmp38_;
+ gint _tmp38_;
gint _tmp39_;
- gint _tmp40_;
gint _tmp41_;
+ GdkRectangle _tmp42_;
gint _tmp43_;
GdkRectangle _tmp44_;
gint _tmp45_;
GdkRectangle _tmp46_;
gint _tmp47_;
- gint _tmp48_;
- GdkRectangle _tmp49_;
- gint _tmp50_;
- gint _tmp51_;
-#line 573 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = zoom_state_get_zoomed_width (&(*self));
#line 573 "/home/jens/Source/shotwell/src/Dimensions.vala"
- zoomed_width = _tmp0_;
+ zoomed_width = zoom_state_get_zoomed_width (&(*self));
#line 574 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = zoom_state_get_zoomed_height (&(*self));
-#line 574 "/home/jens/Source/shotwell/src/Dimensions.vala"
- zoomed_height = _tmp1_;
+ zoomed_height = zoom_state_get_zoomed_height (&(*self));
#line 576 "/home/jens/Source/shotwell/src/Dimensions.vala"
memset (&_result_, 0, sizeof (GdkRectangle));
#line 578 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = (*self).viewport_dimensions;
+ _tmp0_ = (*self).viewport_dimensions;
#line 578 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = _tmp2_.width;
+ _tmp1_ = _tmp0_.width;
#line 578 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = zoomed_width;
+ _tmp2_ = zoomed_width;
#line 578 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp3_ < _tmp4_) {
-#line 3397 "Dimensions.c"
- GdkPoint _tmp5_;
+ if (_tmp1_ < _tmp2_) {
+#line 3325 "Dimensions.c"
+ GdkPoint _tmp3_;
+ gint _tmp4_;
+ Dimensions _tmp5_;
gint _tmp6_;
- Dimensions _tmp7_;
- gint _tmp8_;
#line 579 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = (*self).viewport_center;
+ _tmp3_ = (*self).viewport_center;
#line 579 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = _tmp5_.x;
+ _tmp4_ = _tmp3_.x;
#line 579 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = (*self).viewport_dimensions;
+ _tmp5_ = (*self).viewport_dimensions;
#line 579 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = _tmp7_.width;
+ _tmp6_ = _tmp5_.width;
#line 579 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.x = _tmp6_ - (_tmp8_ / 2);
-#line 3412 "Dimensions.c"
+ _result_.x = _tmp4_ - (_tmp6_ / 2);
+#line 3340 "Dimensions.c"
} else {
+ gint _tmp7_;
+ Dimensions _tmp8_;
gint _tmp9_;
- Dimensions _tmp10_;
- gint _tmp11_;
#line 581 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = zoomed_width;
+ _tmp7_ = zoomed_width;
#line 581 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = (*self).viewport_dimensions;
+ _tmp8_ = (*self).viewport_dimensions;
#line 581 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = _tmp10_.width;
+ _tmp9_ = _tmp8_.width;
#line 581 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.x = (_tmp9_ - _tmp11_) / 2;
-#line 3425 "Dimensions.c"
+ _result_.x = (_tmp7_ - _tmp9_) / 2;
+#line 3353 "Dimensions.c"
}
#line 583 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = _result_;
+ _tmp10_ = _result_;
#line 583 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = _tmp12_.x;
+ _tmp11_ = _tmp10_.x;
#line 583 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp13_ < 0) {
+ if (_tmp11_ < 0) {
#line 584 "/home/jens/Source/shotwell/src/Dimensions.vala"
_result_.x = 0;
-#line 3435 "Dimensions.c"
+#line 3363 "Dimensions.c"
}
#line 586 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = (*self).viewport_dimensions;
+ _tmp12_ = (*self).viewport_dimensions;
#line 586 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = _tmp14_.height;
+ _tmp13_ = _tmp12_.height;
#line 586 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = zoomed_height;
+ _tmp14_ = zoomed_height;
#line 586 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp15_ < _tmp16_) {
-#line 3445 "Dimensions.c"
- GdkPoint _tmp17_;
+ if (_tmp13_ < _tmp14_) {
+#line 3373 "Dimensions.c"
+ GdkPoint _tmp15_;
+ gint _tmp16_;
+ Dimensions _tmp17_;
gint _tmp18_;
- Dimensions _tmp19_;
- gint _tmp20_;
#line 587 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = (*self).viewport_center;
+ _tmp15_ = (*self).viewport_center;
#line 587 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp18_ = _tmp17_.y;
+ _tmp16_ = _tmp15_.y;
#line 587 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp19_ = (*self).viewport_dimensions;
+ _tmp17_ = (*self).viewport_dimensions;
#line 587 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = _tmp19_.height;
+ _tmp18_ = _tmp17_.height;
#line 587 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.y = _tmp18_ - (_tmp20_ / 2);
-#line 3460 "Dimensions.c"
+ _result_.y = _tmp16_ - (_tmp18_ / 2);
+#line 3388 "Dimensions.c"
} else {
+ gint _tmp19_;
+ Dimensions _tmp20_;
gint _tmp21_;
- Dimensions _tmp22_;
- gint _tmp23_;
#line 589 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp21_ = zoomed_height;
+ _tmp19_ = zoomed_height;
#line 589 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp22_ = (*self).viewport_dimensions;
+ _tmp20_ = (*self).viewport_dimensions;
#line 589 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp23_ = _tmp22_.height;
+ _tmp21_ = _tmp20_.height;
#line 589 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.y = (_tmp21_ - _tmp23_) / 2;
-#line 3473 "Dimensions.c"
+ _result_.y = (_tmp19_ - _tmp21_) / 2;
+#line 3401 "Dimensions.c"
}
#line 591 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp24_ = _result_;
+ _tmp22_ = _result_;
#line 591 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp25_ = _tmp24_.y;
+ _tmp23_ = _tmp22_.y;
#line 591 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp25_ < 0) {
+ if (_tmp23_ < 0) {
#line 592 "/home/jens/Source/shotwell/src/Dimensions.vala"
_result_.y = 0;
-#line 3483 "Dimensions.c"
+#line 3411 "Dimensions.c"
}
#line 594 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp26_ = _result_;
+ _tmp24_ = _result_;
#line 594 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp27_ = _tmp26_.x;
+ _tmp25_ = _tmp24_.x;
#line 594 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp28_ = (*self).viewport_dimensions;
+ _tmp26_ = (*self).viewport_dimensions;
#line 594 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp29_ = _tmp28_.width;
+ _tmp27_ = _tmp26_.width;
#line 594 "/home/jens/Source/shotwell/src/Dimensions.vala"
- right = _tmp27_ + _tmp29_;
+ right = _tmp25_ + _tmp27_;
#line 595 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp30_ = right;
+ _tmp28_ = right;
#line 595 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp31_ = zoomed_width;
+ _tmp29_ = zoomed_width;
#line 595 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp30_ > _tmp31_) {
-#line 3501 "Dimensions.c"
- gint _tmp32_;
+ if (_tmp28_ > _tmp29_) {
+#line 3429 "Dimensions.c"
+ gint _tmp30_;
#line 596 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp32_ = zoomed_width;
+ _tmp30_ = zoomed_width;
#line 596 "/home/jens/Source/shotwell/src/Dimensions.vala"
- right = _tmp32_;
-#line 3507 "Dimensions.c"
+ right = _tmp30_;
+#line 3435 "Dimensions.c"
}
#line 597 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp33_ = right;
+ _tmp31_ = right;
#line 597 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp34_ = _result_;
+ _tmp32_ = _result_;
#line 597 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp35_ = _tmp34_.x;
+ _tmp33_ = _tmp32_.x;
#line 597 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.width = _tmp33_ - _tmp35_;
+ _result_.width = _tmp31_ - _tmp33_;
#line 599 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp36_ = _result_;
+ _tmp34_ = _result_;
#line 599 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp37_ = _tmp36_.y;
+ _tmp35_ = _tmp34_.y;
#line 599 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp38_ = (*self).viewport_dimensions;
+ _tmp36_ = (*self).viewport_dimensions;
#line 599 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp39_ = _tmp38_.height;
+ _tmp37_ = _tmp36_.height;
#line 599 "/home/jens/Source/shotwell/src/Dimensions.vala"
- bottom = _tmp37_ + _tmp39_;
+ bottom = _tmp35_ + _tmp37_;
#line 600 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp40_ = bottom;
+ _tmp38_ = bottom;
#line 600 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp41_ = zoomed_height;
+ _tmp39_ = zoomed_height;
#line 600 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp40_ > _tmp41_) {
-#line 3533 "Dimensions.c"
- gint _tmp42_;
+ if (_tmp38_ > _tmp39_) {
+#line 3461 "Dimensions.c"
+ gint _tmp40_;
#line 601 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp42_ = zoomed_height;
+ _tmp40_ = zoomed_height;
#line 601 "/home/jens/Source/shotwell/src/Dimensions.vala"
- bottom = _tmp42_;
-#line 3539 "Dimensions.c"
+ bottom = _tmp40_;
+#line 3467 "Dimensions.c"
}
#line 602 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp43_ = bottom;
+ _tmp41_ = bottom;
#line 602 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp44_ = _result_;
+ _tmp42_ = _result_;
#line 602 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp45_ = _tmp44_.y;
+ _tmp43_ = _tmp42_.y;
#line 602 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.height = _tmp43_ - _tmp45_;
+ _result_.height = _tmp41_ - _tmp43_;
#line 604 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp46_ = _result_;
-#line 604 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp47_ = _tmp46_.width;
+ _tmp44_ = _result_;
#line 604 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp48_ = CLAMP (_tmp47_, 1, G_MAXINT);
+ _tmp45_ = _tmp44_.width;
#line 604 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.width = _tmp48_;
+ _result_.width = CLAMP (_tmp45_, 1, G_MAXINT);
#line 605 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp49_ = _result_;
-#line 605 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp50_ = _tmp49_.height;
+ _tmp46_ = _result_;
#line 605 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp51_ = CLAMP (_tmp50_, 1, G_MAXINT);
+ _tmp47_ = _tmp46_.height;
#line 605 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.height = _tmp51_;
+ _result_.height = CLAMP (_tmp47_, 1, G_MAXINT);
#line 607 "/home/jens/Source/shotwell/src/Dimensions.vala"
*result = _result_;
#line 607 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 3569 "Dimensions.c"
+#line 3493 "Dimensions.c"
}
-void zoom_state_get_viewing_rectangle_wrt_screen (ZoomState *self, GdkRectangle* result) {
+void
+zoom_state_get_viewing_rectangle_wrt_screen (ZoomState *self,
+ GdkRectangle* result)
+{
GdkRectangle wrt_content = {0};
GdkRectangle _tmp0_ = {0};
GdkRectangle _result_ = {0};
@@ -3614,7 +3541,7 @@ void zoom_state_get_viewing_rectangle_wrt_screen (ZoomState *self, GdkRectangle*
if (_tmp6_ < 0) {
#line 618 "/home/jens/Source/shotwell/src/Dimensions.vala"
_result_.x = 0;
-#line 3617 "Dimensions.c"
+#line 3544 "Dimensions.c"
}
#line 619 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp7_ = (*self).viewport_dimensions;
@@ -3634,7 +3561,7 @@ void zoom_state_get_viewing_rectangle_wrt_screen (ZoomState *self, GdkRectangle*
if (_tmp12_ < 0) {
#line 621 "/home/jens/Source/shotwell/src/Dimensions.vala"
_result_.y = 0;
-#line 3637 "Dimensions.c"
+#line 3564 "Dimensions.c"
}
#line 622 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp13_ = wrt_content;
@@ -3652,212 +3579,182 @@ void zoom_state_get_viewing_rectangle_wrt_screen (ZoomState *self, GdkRectangle*
*result = _result_;
#line 625 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 3655 "Dimensions.c"
+#line 3582 "Dimensions.c"
}
-void zoom_state_get_viewing_rectangle_projection (ZoomState *self, GdkPixbuf* for_pixbuf, GdkRectangle* result) {
+void
+zoom_state_get_viewing_rectangle_projection (ZoomState *self,
+ GdkPixbuf* for_pixbuf,
+ GdkRectangle* result)
+{
gdouble zoomed_width = 0.0;
- gint _tmp0_;
gdouble zoomed_height = 0.0;
- gint _tmp1_;
gdouble horiz_scale = 0.0;
- GdkPixbuf* _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
+ gint _tmp0_;
+ gint _tmp1_;
gdouble vert_scale = 0.0;
- GdkPixbuf* _tmp5_;
- gint _tmp6_;
- gint _tmp7_;
+ gint _tmp2_;
+ gint _tmp3_;
gdouble scale = 0.0;
GdkRectangle viewing_rectangle = {0};
- GdkRectangle _tmp8_ = {0};
+ GdkRectangle _tmp4_ = {0};
GdkRectangle _result_ = {0};
- GdkRectangle _tmp9_;
+ GdkRectangle _tmp5_;
+ gint _tmp6_;
+ GdkRectangle _tmp7_;
+ gint _tmp8_;
+ gint _tmp9_;
gint _tmp10_;
GdkRectangle _tmp11_;
gint _tmp12_;
- GdkPixbuf* _tmp13_;
+ GdkRectangle _tmp13_;
gint _tmp14_;
gint _tmp15_;
gint _tmp16_;
+ gint right = 0;
GdkRectangle _tmp17_;
gint _tmp18_;
GdkRectangle _tmp19_;
gint _tmp20_;
- GdkPixbuf* _tmp21_;
+ gint _tmp21_;
gint _tmp22_;
gint _tmp23_;
- gint _tmp24_;
- gint right = 0;
- GdkRectangle _tmp25_;
- gint _tmp26_;
- GdkRectangle _tmp27_;
+ gint bottom = 0;
+ GdkRectangle _tmp24_;
+ gint _tmp25_;
+ GdkRectangle _tmp26_;
+ gint _tmp27_;
gint _tmp28_;
gint _tmp29_;
- GdkPixbuf* _tmp30_;
+ gint _tmp30_;
gint _tmp31_;
- gint _tmp32_;
+ GdkRectangle _tmp32_;
gint _tmp33_;
- gint bottom = 0;
- GdkRectangle _tmp34_;
- gint _tmp35_;
- GdkRectangle _tmp36_;
- gint _tmp37_;
- gint _tmp38_;
- GdkPixbuf* _tmp39_;
- gint _tmp40_;
- gint _tmp41_;
- gint _tmp42_;
- gint _tmp43_;
- GdkRectangle _tmp44_;
- gint _tmp45_;
- gint _tmp46_;
- GdkRectangle _tmp47_;
- gint _tmp48_;
+ gint _tmp34_;
+ GdkRectangle _tmp35_;
+ gint _tmp36_;
#line 629 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_if_fail (GDK_IS_PIXBUF (for_pixbuf));
#line 630 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = zoom_state_get_zoomed_width (&(*self));
-#line 630 "/home/jens/Source/shotwell/src/Dimensions.vala"
- zoomed_width = (gdouble) _tmp0_;
+ zoomed_width = (gdouble) zoom_state_get_zoomed_width (&(*self));
#line 631 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = zoom_state_get_zoomed_height (&(*self));
-#line 631 "/home/jens/Source/shotwell/src/Dimensions.vala"
- zoomed_height = (gdouble) _tmp1_;
-#line 633 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = for_pixbuf;
+ zoomed_height = (gdouble) zoom_state_get_zoomed_height (&(*self));
#line 633 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = gdk_pixbuf_get_width (_tmp2_);
+ _tmp0_ = gdk_pixbuf_get_width (for_pixbuf);
#line 633 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = _tmp3_;
+ _tmp1_ = _tmp0_;
#line 633 "/home/jens/Source/shotwell/src/Dimensions.vala"
- horiz_scale = _tmp4_ / zoomed_width;
-#line 634 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = for_pixbuf;
+ horiz_scale = _tmp1_ / zoomed_width;
#line 634 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = gdk_pixbuf_get_height (_tmp5_);
+ _tmp2_ = gdk_pixbuf_get_height (for_pixbuf);
#line 634 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = _tmp6_;
+ _tmp3_ = _tmp2_;
#line 634 "/home/jens/Source/shotwell/src/Dimensions.vala"
- vert_scale = _tmp7_ / zoomed_height;
+ vert_scale = _tmp3_ / zoomed_height;
#line 635 "/home/jens/Source/shotwell/src/Dimensions.vala"
scale = (horiz_scale + vert_scale) / 2.0;
#line 637 "/home/jens/Source/shotwell/src/Dimensions.vala"
- zoom_state_get_viewing_rectangle_wrt_content (&(*self), &_tmp8_);
+ zoom_state_get_viewing_rectangle_wrt_content (&(*self), &_tmp4_);
#line 637 "/home/jens/Source/shotwell/src/Dimensions.vala"
- viewing_rectangle = _tmp8_;
+ viewing_rectangle = _tmp4_;
#line 639 "/home/jens/Source/shotwell/src/Dimensions.vala"
memset (&_result_, 0, sizeof (GdkRectangle));
#line 640 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = viewing_rectangle;
+ _tmp5_ = viewing_rectangle;
#line 640 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = _tmp9_.x;
+ _tmp6_ = _tmp5_.x;
#line 640 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.x = (gint) (_tmp10_ * scale);
-#line 641 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = _result_;
+ _result_.x = (gint) (_tmp6_ * scale);
#line 641 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = _tmp11_.x;
+ _tmp7_ = _result_;
#line 641 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = for_pixbuf;
+ _tmp8_ = _tmp7_.x;
#line 641 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = gdk_pixbuf_get_width (_tmp13_);
+ _tmp9_ = gdk_pixbuf_get_width (for_pixbuf);
#line 641 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = _tmp14_;
+ _tmp10_ = _tmp9_;
#line 641 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = CLAMP (_tmp12_, 0, _tmp15_);
-#line 641 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.x = _tmp16_;
+ _result_.x = CLAMP (_tmp8_, 0, _tmp10_);
#line 642 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = viewing_rectangle;
+ _tmp11_ = viewing_rectangle;
#line 642 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp18_ = _tmp17_.y;
+ _tmp12_ = _tmp11_.y;
#line 642 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.y = (gint) (_tmp18_ * scale);
+ _result_.y = (gint) (_tmp12_ * scale);
#line 643 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp19_ = _result_;
+ _tmp13_ = _result_;
#line 643 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = _tmp19_.y;
+ _tmp14_ = _tmp13_.y;
#line 643 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp21_ = for_pixbuf;
-#line 643 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp22_ = gdk_pixbuf_get_height (_tmp21_);
-#line 643 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp23_ = _tmp22_;
+ _tmp15_ = gdk_pixbuf_get_height (for_pixbuf);
#line 643 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp24_ = CLAMP (_tmp20_, 0, _tmp23_);
+ _tmp16_ = _tmp15_;
#line 643 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.y = _tmp24_;
+ _result_.y = CLAMP (_tmp14_, 0, _tmp16_);
#line 644 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp25_ = viewing_rectangle;
+ _tmp17_ = viewing_rectangle;
#line 644 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp26_ = _tmp25_.x;
+ _tmp18_ = _tmp17_.x;
#line 644 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp27_ = viewing_rectangle;
+ _tmp19_ = viewing_rectangle;
#line 644 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp28_ = _tmp27_.width;
+ _tmp20_ = _tmp19_.width;
#line 644 "/home/jens/Source/shotwell/src/Dimensions.vala"
- right = (gint) ((_tmp26_ + _tmp28_) * scale);
-#line 645 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp29_ = right;
+ right = (gint) ((_tmp18_ + _tmp20_) * scale);
#line 645 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp30_ = for_pixbuf;
+ _tmp21_ = right;
#line 645 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp31_ = gdk_pixbuf_get_width (_tmp30_);
+ _tmp22_ = gdk_pixbuf_get_width (for_pixbuf);
#line 645 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp32_ = _tmp31_;
-#line 645 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp33_ = CLAMP (_tmp29_, 0, _tmp32_);
+ _tmp23_ = _tmp22_;
#line 645 "/home/jens/Source/shotwell/src/Dimensions.vala"
- right = _tmp33_;
+ right = CLAMP (_tmp21_, 0, _tmp23_);
#line 646 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp34_ = viewing_rectangle;
+ _tmp24_ = viewing_rectangle;
#line 646 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp35_ = _tmp34_.y;
+ _tmp25_ = _tmp24_.y;
#line 646 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp36_ = viewing_rectangle;
+ _tmp26_ = viewing_rectangle;
#line 646 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp37_ = _tmp36_.height;
+ _tmp27_ = _tmp26_.height;
#line 646 "/home/jens/Source/shotwell/src/Dimensions.vala"
- bottom = (gint) ((_tmp35_ + _tmp37_) * scale);
-#line 647 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp38_ = bottom;
+ bottom = (gint) ((_tmp25_ + _tmp27_) * scale);
#line 647 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp39_ = for_pixbuf;
+ _tmp28_ = bottom;
#line 647 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp40_ = gdk_pixbuf_get_height (_tmp39_);
+ _tmp29_ = gdk_pixbuf_get_height (for_pixbuf);
#line 647 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp41_ = _tmp40_;
+ _tmp30_ = _tmp29_;
#line 647 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp42_ = CLAMP (_tmp38_, 0, _tmp41_);
-#line 647 "/home/jens/Source/shotwell/src/Dimensions.vala"
- bottom = _tmp42_;
+ bottom = CLAMP (_tmp28_, 0, _tmp30_);
#line 648 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp43_ = right;
+ _tmp31_ = right;
#line 648 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp44_ = _result_;
+ _tmp32_ = _result_;
#line 648 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp45_ = _tmp44_.x;
+ _tmp33_ = _tmp32_.x;
#line 648 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.width = _tmp43_ - _tmp45_;
+ _result_.width = _tmp31_ - _tmp33_;
#line 649 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp46_ = bottom;
+ _tmp34_ = bottom;
#line 649 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp47_ = _result_;
+ _tmp35_ = _result_;
#line 649 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp48_ = _tmp47_.y;
+ _tmp36_ = _tmp35_.y;
#line 649 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _result_.height = _tmp46_ - _tmp48_;
+ _result_.height = _tmp34_ - _tmp36_;
#line 651 "/home/jens/Source/shotwell/src/Dimensions.vala"
*result = _result_;
#line 651 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 3856 "Dimensions.c"
+#line 3751 "Dimensions.c"
}
-gdouble zoom_state_get_zoom_factor (ZoomState *self) {
+gdouble
+zoom_state_get_zoom_factor (ZoomState *self)
+{
gdouble result = 0.0;
gdouble _tmp0_;
#line 656 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -3866,11 +3763,13 @@ gdouble zoom_state_get_zoom_factor (ZoomState *self) {
result = _tmp0_;
#line 656 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 3869 "Dimensions.c"
+#line 3766 "Dimensions.c"
}
-gint zoom_state_get_zoomed_width (ZoomState *self) {
+gint
+zoom_state_get_zoomed_width (ZoomState *self)
+{
gint result = 0;
Dimensions _tmp0_;
gint _tmp1_;
@@ -3885,11 +3784,13 @@ gint zoom_state_get_zoomed_width (ZoomState *self) {
result = (gint) (_tmp1_ * _tmp2_);
#line 660 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 3888 "Dimensions.c"
+#line 3787 "Dimensions.c"
}
-gint zoom_state_get_zoomed_height (ZoomState *self) {
+gint
+zoom_state_get_zoomed_height (ZoomState *self)
+{
gint result = 0;
Dimensions _tmp0_;
gint _tmp1_;
@@ -3904,11 +3805,14 @@ gint zoom_state_get_zoomed_height (ZoomState *self) {
result = (gint) (_tmp1_ * _tmp2_);
#line 664 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 3907 "Dimensions.c"
+#line 3808 "Dimensions.c"
}
-void zoom_state_get_viewport_center (ZoomState *self, GdkPoint* result) {
+void
+zoom_state_get_viewport_center (ZoomState *self,
+ GdkPoint* result)
+{
GdkPoint _tmp0_;
#line 668 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = (*self).viewport_center;
@@ -3916,248 +3820,232 @@ void zoom_state_get_viewport_center (ZoomState *self, GdkPoint* result) {
*result = _tmp0_;
#line 668 "/home/jens/Source/shotwell/src/Dimensions.vala"
return;
-#line 3919 "Dimensions.c"
+#line 3823 "Dimensions.c"
}
-gchar* zoom_state_to_string (ZoomState *self) {
+gchar*
+zoom_state_to_string (ZoomState *self)
+{
gchar* result = NULL;
gchar* named_modes = NULL;
gchar* _tmp0_;
- gboolean _tmp1_;
- gboolean _tmp6_;
- gboolean _tmp11_;
- gboolean _tmp16_;
- const gchar* _tmp21_;
+ const gchar* _tmp17_;
GdkRectangle viewing_rect = {0};
- GdkRectangle _tmp23_ = {0};
+ GdkRectangle _tmp19_ = {0};
+ Dimensions _tmp20_;
+ gint _tmp21_;
+ Dimensions _tmp22_;
+ gint _tmp23_;
Dimensions _tmp24_;
gint _tmp25_;
Dimensions _tmp26_;
gint _tmp27_;
- Dimensions _tmp28_;
- gint _tmp29_;
- Dimensions _tmp30_;
- gint _tmp31_;
- gdouble _tmp32_;
- gdouble _tmp33_;
- gdouble _tmp34_;
+ gdouble _tmp28_;
+ gdouble _tmp29_;
+ gdouble _tmp30_;
+ const gchar* _tmp31_;
+ GdkRectangle _tmp32_;
+ gint _tmp33_;
+ GdkRectangle _tmp34_;
gint _tmp35_;
- gint _tmp36_;
- const gchar* _tmp37_;
+ GdkRectangle _tmp36_;
+ gint _tmp37_;
GdkRectangle _tmp38_;
gint _tmp39_;
- GdkRectangle _tmp40_;
+ GdkPoint _tmp40_;
gint _tmp41_;
- GdkRectangle _tmp42_;
+ GdkPoint _tmp42_;
gint _tmp43_;
- GdkRectangle _tmp44_;
- gint _tmp45_;
- GdkPoint _tmp46_;
- gint _tmp47_;
- GdkPoint _tmp48_;
- gint _tmp49_;
- gchar* _tmp50_;
+ gchar* _tmp44_;
#line 672 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp0_ = g_strdup ("");
#line 672 "/home/jens/Source/shotwell/src/Dimensions.vala"
named_modes = _tmp0_;
#line 673 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp1_ = zoom_state_is_min (&(*self));
-#line 673 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp1_) {
-#line 3969 "Dimensions.c"
- const gchar* _tmp2_ = NULL;
+ if (zoom_state_is_min (&(*self))) {
+#line 3867 "Dimensions.c"
+ const gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_;
const gchar* _tmp3_;
- const gchar* _tmp4_;
- gchar* _tmp5_;
+ gchar* _tmp4_;
#line 674 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = named_modes;
+ _tmp2_ = named_modes;
#line 674 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (g_strcmp0 (_tmp3_, "") == 0) {
+ if (g_strcmp0 (_tmp2_, "") == 0) {
#line 674 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = "MIN";
-#line 3980 "Dimensions.c"
+ _tmp1_ = "MIN";
+#line 3878 "Dimensions.c"
} else {
#line 674 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = ", MIN";
-#line 3984 "Dimensions.c"
+ _tmp1_ = ", MIN";
+#line 3882 "Dimensions.c"
}
#line 674 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = named_modes;
+ _tmp3_ = named_modes;
#line 674 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = g_strconcat (_tmp4_, _tmp2_, NULL);
+ _tmp4_ = g_strconcat (_tmp3_, _tmp1_, NULL);
#line 674 "/home/jens/Source/shotwell/src/Dimensions.vala"
_g_free0 (named_modes);
#line 674 "/home/jens/Source/shotwell/src/Dimensions.vala"
- named_modes = _tmp5_;
-#line 3994 "Dimensions.c"
+ named_modes = _tmp4_;
+#line 3892 "Dimensions.c"
}
#line 675 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = zoom_state_is_default (&(*self));
-#line 675 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp6_) {
-#line 4000 "Dimensions.c"
- const gchar* _tmp7_ = NULL;
- const gchar* _tmp8_;
- const gchar* _tmp9_;
- gchar* _tmp10_;
+ if (zoom_state_is_default (&(*self))) {
+#line 3896 "Dimensions.c"
+ const gchar* _tmp5_ = NULL;
+ const gchar* _tmp6_;
+ const gchar* _tmp7_;
+ gchar* _tmp8_;
#line 676 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = named_modes;
+ _tmp6_ = named_modes;
#line 676 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (g_strcmp0 (_tmp8_, "") == 0) {
+ if (g_strcmp0 (_tmp6_, "") == 0) {
#line 676 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = "DEFAULT";
-#line 4011 "Dimensions.c"
+ _tmp5_ = "DEFAULT";
+#line 3907 "Dimensions.c"
} else {
#line 676 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = ", DEFAULT";
-#line 4015 "Dimensions.c"
+ _tmp5_ = ", DEFAULT";
+#line 3911 "Dimensions.c"
}
#line 676 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = named_modes;
+ _tmp7_ = named_modes;
#line 676 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = g_strconcat (_tmp9_, _tmp7_, NULL);
+ _tmp8_ = g_strconcat (_tmp7_, _tmp5_, NULL);
#line 676 "/home/jens/Source/shotwell/src/Dimensions.vala"
_g_free0 (named_modes);
#line 676 "/home/jens/Source/shotwell/src/Dimensions.vala"
- named_modes = _tmp10_;
-#line 4025 "Dimensions.c"
+ named_modes = _tmp8_;
+#line 3921 "Dimensions.c"
}
#line 677 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = zoom_state_is_isomorphic (&(*self));
-#line 677 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp11_) {
-#line 4031 "Dimensions.c"
- const gchar* _tmp12_ = NULL;
- const gchar* _tmp13_;
- const gchar* _tmp14_;
- gchar* _tmp15_;
+ if (zoom_state_is_isomorphic (&(*self))) {
+#line 3925 "Dimensions.c"
+ const gchar* _tmp9_ = NULL;
+ const gchar* _tmp10_;
+ const gchar* _tmp11_;
+ gchar* _tmp12_;
#line 678 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = named_modes;
+ _tmp10_ = named_modes;
#line 678 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (g_strcmp0 (_tmp13_, "") == 0) {
+ if (g_strcmp0 (_tmp10_, "") == 0) {
#line 678 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = "ISOMORPHIC";
-#line 4042 "Dimensions.c"
+ _tmp9_ = "ISOMORPHIC";
+#line 3936 "Dimensions.c"
} else {
#line 678 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = ", ISOMORPHIC";
-#line 4046 "Dimensions.c"
+ _tmp9_ = ", ISOMORPHIC";
+#line 3940 "Dimensions.c"
}
#line 678 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = named_modes;
+ _tmp11_ = named_modes;
#line 678 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = g_strconcat (_tmp14_, _tmp12_, NULL);
+ _tmp12_ = g_strconcat (_tmp11_, _tmp9_, NULL);
#line 678 "/home/jens/Source/shotwell/src/Dimensions.vala"
_g_free0 (named_modes);
#line 678 "/home/jens/Source/shotwell/src/Dimensions.vala"
- named_modes = _tmp15_;
-#line 4056 "Dimensions.c"
+ named_modes = _tmp12_;
+#line 3950 "Dimensions.c"
}
#line 679 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = zoom_state_is_max (&(*self));
-#line 679 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp16_) {
-#line 4062 "Dimensions.c"
- const gchar* _tmp17_ = NULL;
- const gchar* _tmp18_;
- const gchar* _tmp19_;
- gchar* _tmp20_;
+ if (zoom_state_is_max (&(*self))) {
+#line 3954 "Dimensions.c"
+ const gchar* _tmp13_ = NULL;
+ const gchar* _tmp14_;
+ const gchar* _tmp15_;
+ gchar* _tmp16_;
#line 680 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp18_ = named_modes;
+ _tmp14_ = named_modes;
#line 680 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (g_strcmp0 (_tmp18_, "") == 0) {
+ if (g_strcmp0 (_tmp14_, "") == 0) {
#line 680 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = "MAX";
-#line 4073 "Dimensions.c"
+ _tmp13_ = "MAX";
+#line 3965 "Dimensions.c"
} else {
#line 680 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = ", MAX";
-#line 4077 "Dimensions.c"
+ _tmp13_ = ", MAX";
+#line 3969 "Dimensions.c"
}
#line 680 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp19_ = named_modes;
+ _tmp15_ = named_modes;
#line 680 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = g_strconcat (_tmp19_, _tmp17_, NULL);
+ _tmp16_ = g_strconcat (_tmp15_, _tmp13_, NULL);
#line 680 "/home/jens/Source/shotwell/src/Dimensions.vala"
_g_free0 (named_modes);
#line 680 "/home/jens/Source/shotwell/src/Dimensions.vala"
- named_modes = _tmp20_;
-#line 4087 "Dimensions.c"
+ named_modes = _tmp16_;
+#line 3979 "Dimensions.c"
}
#line 681 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp21_ = named_modes;
+ _tmp17_ = named_modes;
#line 681 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (g_strcmp0 (_tmp21_, "") == 0) {
-#line 4093 "Dimensions.c"
- gchar* _tmp22_;
+ if (g_strcmp0 (_tmp17_, "") == 0) {
+#line 3985 "Dimensions.c"
+ gchar* _tmp18_;
#line 682 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp22_ = g_strdup ("(none)");
+ _tmp18_ = g_strdup ("(none)");
#line 682 "/home/jens/Source/shotwell/src/Dimensions.vala"
_g_free0 (named_modes);
#line 682 "/home/jens/Source/shotwell/src/Dimensions.vala"
- named_modes = _tmp22_;
-#line 4101 "Dimensions.c"
+ named_modes = _tmp18_;
+#line 3993 "Dimensions.c"
}
#line 684 "/home/jens/Source/shotwell/src/Dimensions.vala"
- zoom_state_get_viewing_rectangle_wrt_content (&(*self), &_tmp23_);
+ zoom_state_get_viewing_rectangle_wrt_content (&(*self), &_tmp19_);
#line 684 "/home/jens/Source/shotwell/src/Dimensions.vala"
- viewing_rect = _tmp23_;
-#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp24_ = (*self).content_dimensions;
+ viewing_rect = _tmp19_;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp25_ = _tmp24_.width;
-#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp26_ = (*self).content_dimensions;
+ _tmp20_ = (*self).content_dimensions;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp27_ = _tmp26_.height;
+ _tmp21_ = _tmp20_.width;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp28_ = (*self).viewport_dimensions;
+ _tmp22_ = (*self).content_dimensions;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp29_ = _tmp28_.width;
+ _tmp23_ = _tmp22_.height;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp30_ = (*self).viewport_dimensions;
+ _tmp24_ = (*self).viewport_dimensions;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp31_ = _tmp30_.height;
+ _tmp25_ = _tmp24_.width;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp32_ = (*self).min_factor;
+ _tmp26_ = (*self).viewport_dimensions;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp33_ = (*self).max_factor;
+ _tmp27_ = _tmp26_.height;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp34_ = (*self).zoom_factor;
+ _tmp28_ = (*self).min_factor;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp35_ = zoom_state_get_zoomed_width (&(*self));
+ _tmp29_ = (*self).max_factor;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp36_ = zoom_state_get_zoomed_height (&(*self));
+ _tmp30_ = (*self).zoom_factor;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp37_ = named_modes;
+ _tmp31_ = named_modes;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp38_ = viewing_rect;
+ _tmp32_ = viewing_rect;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp39_ = _tmp38_.x;
+ _tmp33_ = _tmp32_.x;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp40_ = viewing_rect;
+ _tmp34_ = viewing_rect;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp41_ = _tmp40_.y;
+ _tmp35_ = _tmp34_.y;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp42_ = viewing_rect;
+ _tmp36_ = viewing_rect;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp43_ = _tmp42_.width;
+ _tmp37_ = _tmp36_.width;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp44_ = viewing_rect;
+ _tmp38_ = viewing_rect;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp45_ = _tmp44_.height;
+ _tmp39_ = _tmp38_.height;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp46_ = (*self).viewport_center;
+ _tmp40_ = (*self).viewport_center;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp47_ = _tmp46_.x;
+ _tmp41_ = _tmp40_.x;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp48_ = (*self).viewport_center;
+ _tmp42_ = (*self).viewport_center;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp49_ = _tmp48_.y;
+ _tmp43_ = _tmp42_.y;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp50_ = g_strdup_printf ("ZoomState {\n" \
+ _tmp44_ = g_strdup_printf ("ZoomState {\n" \
" content dimensions = %d x %d;\n" \
" viewport dimensions = " "%d x %d;\n" \
" min factor = %f;\n" \
@@ -4165,18 +4053,20 @@ gchar* zoom_state_to_string (ZoomState *self) {
" current factor = %f;" "\n" \
" zoomed width = %d;\n" \
" zoomed height = %d;\n" \
-" named modes = %s;" "\n viewing rectangle = { x: %d, y: %d, width: %d, height: %d };" "\n viewport center = (%d, %d);\n}\n", _tmp25_, _tmp27_, _tmp29_, _tmp31_, _tmp32_, _tmp33_, _tmp34_, _tmp35_, _tmp36_, _tmp37_, _tmp39_, _tmp41_, _tmp43_, _tmp45_, _tmp47_, _tmp49_);
+" named modes = %s;" "\n viewing rectangle = { x: %d, y: %d, width: %d, height: %d };" "\n viewport center = (%d, %d);\n}\n", _tmp21_, _tmp23_, _tmp25_, _tmp27_, _tmp28_, _tmp29_, _tmp30_, zoom_state_get_zoomed_width (&(*self)), zoom_state_get_zoomed_height (&(*self)), _tmp31_, _tmp33_, _tmp35_, _tmp37_, _tmp39_, _tmp41_, _tmp43_);
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp50_;
+ result = _tmp44_;
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
_g_free0 (named_modes);
#line 686 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4167 "Dimensions.c"
+#line 4055 "Dimensions.c"
}
-gboolean zoom_state_is_min (ZoomState *self) {
+gboolean
+zoom_state_is_min (ZoomState *self)
+{
gboolean result = FALSE;
gdouble _tmp0_;
gdouble _tmp1_;
@@ -4188,24 +4078,25 @@ gboolean zoom_state_is_min (ZoomState *self) {
result = _tmp0_ == _tmp1_;
#line 698 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4183 "Dimensions.c"
+#line 4073 "Dimensions.c"
}
-gboolean zoom_state_is_default (ZoomState *self) {
+gboolean
+zoom_state_is_default (ZoomState *self)
+{
gboolean result = FALSE;
- gboolean _tmp0_;
#line 702 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp0_ = zoom_state_is_min (&(*self));
-#line 702 "/home/jens/Source/shotwell/src/Dimensions.vala"
- result = _tmp0_;
+ result = zoom_state_is_min (&(*self));
#line 702 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4196 "Dimensions.c"
+#line 4085 "Dimensions.c"
}
-gboolean zoom_state_is_max (ZoomState *self) {
+gboolean
+zoom_state_is_max (ZoomState *self)
+{
gboolean result = FALSE;
gdouble _tmp0_;
gdouble _tmp1_;
@@ -4217,11 +4108,13 @@ gboolean zoom_state_is_max (ZoomState *self) {
result = _tmp0_ == _tmp1_;
#line 706 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4212 "Dimensions.c"
+#line 4103 "Dimensions.c"
}
-gboolean zoom_state_is_isomorphic (ZoomState *self) {
+gboolean
+zoom_state_is_isomorphic (ZoomState *self)
+{
gboolean result = FALSE;
gdouble _tmp0_;
#line 710 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -4230,37 +4123,38 @@ gboolean zoom_state_is_isomorphic (ZoomState *self) {
result = _tmp0_ == 1.0;
#line 710 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4225 "Dimensions.c"
+#line 4118 "Dimensions.c"
}
-gboolean zoom_state_equals (ZoomState *self, ZoomState* other) {
+gboolean
+zoom_state_equals (ZoomState *self,
+ ZoomState* other)
+{
gboolean result = FALSE;
ZoomState _tmp0_;
Dimensions _tmp1_;
- gboolean _tmp2_;
- ZoomState _tmp3_;
- Dimensions _tmp4_;
- gboolean _tmp5_;
+ ZoomState _tmp2_;
+ Dimensions _tmp3_;
+ gdouble _tmp4_;
+ ZoomState _tmp5_;
gdouble _tmp6_;
- ZoomState _tmp7_;
- gdouble _tmp8_;
+ gdouble _tmp7_;
+ ZoomState _tmp8_;
gdouble _tmp9_;
- ZoomState _tmp10_;
- gdouble _tmp11_;
+ gdouble _tmp10_;
+ ZoomState _tmp11_;
gdouble _tmp12_;
- ZoomState _tmp13_;
- gdouble _tmp14_;
- GdkPoint _tmp15_;
- gint _tmp16_;
- ZoomState _tmp17_;
+ GdkPoint _tmp13_;
+ gint _tmp14_;
+ ZoomState _tmp15_;
+ GdkPoint _tmp16_;
+ gint _tmp17_;
GdkPoint _tmp18_;
gint _tmp19_;
- GdkPoint _tmp20_;
- gint _tmp21_;
- ZoomState _tmp22_;
- GdkPoint _tmp23_;
- gint _tmp24_;
+ ZoomState _tmp20_;
+ GdkPoint _tmp21_;
+ gint _tmp22_;
#line 713 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_return_val_if_fail (other != NULL, FALSE);
#line 714 "/home/jens/Source/shotwell/src/Dimensions.vala"
@@ -4268,116 +4162,114 @@ gboolean zoom_state_equals (ZoomState *self, ZoomState* other) {
#line 714 "/home/jens/Source/shotwell/src/Dimensions.vala"
_tmp1_ = _tmp0_.content_dimensions;
#line 714 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp2_ = dimensions_equals (&(*self).content_dimensions, &_tmp1_);
-#line 714 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (!_tmp2_) {
+ if (!dimensions_equals (&(*self).content_dimensions, &_tmp1_)) {
#line 715 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
#line 715 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4270 "Dimensions.c"
+#line 4162 "Dimensions.c"
}
#line 716 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp3_ = *other;
-#line 716 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp4_ = _tmp3_.viewport_dimensions;
+ _tmp2_ = *other;
#line 716 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp5_ = dimensions_equals (&(*self).viewport_dimensions, &_tmp4_);
+ _tmp3_ = _tmp2_.viewport_dimensions;
#line 716 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (!_tmp5_) {
+ if (!dimensions_equals (&(*self).viewport_dimensions, &_tmp3_)) {
#line 717 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
#line 717 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4284 "Dimensions.c"
+#line 4174 "Dimensions.c"
}
#line 718 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp6_ = (*self).zoom_factor;
+ _tmp4_ = (*self).zoom_factor;
#line 718 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp7_ = *other;
+ _tmp5_ = *other;
#line 718 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp8_ = _tmp7_.zoom_factor;
+ _tmp6_ = _tmp5_.zoom_factor;
#line 718 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp6_ != _tmp8_) {
+ if (_tmp4_ != _tmp6_) {
#line 719 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
#line 719 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4298 "Dimensions.c"
+#line 4188 "Dimensions.c"
}
#line 720 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp9_ = (*self).min_factor;
+ _tmp7_ = (*self).min_factor;
#line 720 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp10_ = *other;
+ _tmp8_ = *other;
#line 720 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp11_ = _tmp10_.min_factor;
+ _tmp9_ = _tmp8_.min_factor;
#line 720 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp9_ != _tmp11_) {
+ if (_tmp7_ != _tmp9_) {
#line 721 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
#line 721 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4312 "Dimensions.c"
+#line 4202 "Dimensions.c"
}
#line 722 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp12_ = (*self).max_factor;
+ _tmp10_ = (*self).max_factor;
#line 722 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp13_ = *other;
+ _tmp11_ = *other;
#line 722 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp14_ = _tmp13_.max_factor;
+ _tmp12_ = _tmp11_.max_factor;
#line 722 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp12_ != _tmp14_) {
+ if (_tmp10_ != _tmp12_) {
#line 723 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
#line 723 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4326 "Dimensions.c"
+#line 4216 "Dimensions.c"
}
#line 724 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp15_ = (*self).viewport_center;
+ _tmp13_ = (*self).viewport_center;
#line 724 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp16_ = _tmp15_.x;
+ _tmp14_ = _tmp13_.x;
#line 724 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp17_ = *other;
+ _tmp15_ = *other;
#line 724 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp18_ = _tmp17_.viewport_center;
+ _tmp16_ = _tmp15_.viewport_center;
#line 724 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp19_ = _tmp18_.x;
+ _tmp17_ = _tmp16_.x;
#line 724 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp16_ != _tmp19_) {
+ if (_tmp14_ != _tmp17_) {
#line 725 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
#line 725 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4344 "Dimensions.c"
+#line 4234 "Dimensions.c"
}
#line 726 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp20_ = (*self).viewport_center;
+ _tmp18_ = (*self).viewport_center;
#line 726 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp21_ = _tmp20_.y;
+ _tmp19_ = _tmp18_.y;
#line 726 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp22_ = *other;
+ _tmp20_ = *other;
#line 726 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp23_ = _tmp22_.viewport_center;
+ _tmp21_ = _tmp20_.viewport_center;
#line 726 "/home/jens/Source/shotwell/src/Dimensions.vala"
- _tmp24_ = _tmp23_.y;
+ _tmp22_ = _tmp21_.y;
#line 726 "/home/jens/Source/shotwell/src/Dimensions.vala"
- if (_tmp21_ != _tmp24_) {
+ if (_tmp19_ != _tmp22_) {
#line 727 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = FALSE;
#line 727 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4362 "Dimensions.c"
+#line 4252 "Dimensions.c"
}
#line 729 "/home/jens/Source/shotwell/src/Dimensions.vala"
result = TRUE;
#line 729 "/home/jens/Source/shotwell/src/Dimensions.vala"
return result;
-#line 4368 "Dimensions.c"
+#line 4258 "Dimensions.c"
}
-ZoomState* zoom_state_dup (const ZoomState* self) {
+ZoomState*
+zoom_state_dup (const ZoomState* self)
+{
ZoomState* dup;
#line 463 "/home/jens/Source/shotwell/src/Dimensions.vala"
dup = g_new0 (ZoomState, 1);
@@ -4385,18 +4277,22 @@ ZoomState* zoom_state_dup (const ZoomState* self) {
memcpy (dup, self, sizeof (ZoomState));
#line 463 "/home/jens/Source/shotwell/src/Dimensions.vala"
return dup;
-#line 4380 "Dimensions.c"
+#line 4272 "Dimensions.c"
}
-void zoom_state_free (ZoomState* self) {
+void
+zoom_state_free (ZoomState* self)
+{
#line 463 "/home/jens/Source/shotwell/src/Dimensions.vala"
g_free (self);
-#line 4387 "Dimensions.c"
+#line 4281 "Dimensions.c"
}
-GType zoom_state_get_type (void) {
+GType
+zoom_state_get_type (void)
+{
static volatile gsize zoom_state_type_id__volatile = 0;
if (g_once_init_enter (&zoom_state_type_id__volatile)) {
GType zoom_state_type_id;