diff options
Diffstat (limited to 'src/editing_tools/EditingTools.c')
-rw-r--r-- | src/editing_tools/EditingTools.c | 19377 |
1 files changed, 19377 insertions, 0 deletions
diff --git a/src/editing_tools/EditingTools.c b/src/editing_tools/EditingTools.c new file mode 100644 index 0000000..ffb8d35 --- /dev/null +++ b/src/editing_tools/EditingTools.c @@ -0,0 +1,19377 @@ +/* EditingTools.c generated by valac 0.32.1, the Vala compiler + * generated from EditingTools.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ +/* This file is the master unit file for the EditingTools unit. It should be edited to include + * whatever code is deemed necessary. + * + * The init() and terminate() methods are mandatory. + * + * If the unit needs to be configured prior to initialization, add the proper parameters to + * the preconfigure() method, implement it, and ensure in init() that it's been called. + */ + +#include <glib.h> +#include <glib-object.h> +#include <gtk/gtk.h> +#include <gdk/gdk.h> +#include <stdlib.h> +#include <string.h> +#include <float.h> +#include <math.h> +#include <cairo.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <glib/gi18n-lib.h> +#include <gee.h> +#include <gio/gio.h> +#include <gobject/gvaluecollector.h> + + +#define EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW (editing_tools_editing_tool_window_get_type ()) +#define EDITING_TOOLS_EDITING_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow)) +#define EDITING_TOOLS_EDITING_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindowClass)) +#define EDITING_TOOLS_IS_EDITING_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW)) +#define EDITING_TOOLS_IS_EDITING_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW)) +#define EDITING_TOOLS_EDITING_TOOL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindowClass)) + +typedef struct _EditingToolsEditingToolWindow EditingToolsEditingToolWindow; +typedef struct _EditingToolsEditingToolWindowClass EditingToolsEditingToolWindowClass; +typedef struct _EditingToolsEditingToolWindowPrivate EditingToolsEditingToolWindowPrivate; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define TYPE_PAGE_WINDOW (page_window_get_type ()) +#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow)) +#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass)) +#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW)) +#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW)) +#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass)) + +typedef struct _PageWindow PageWindow; +typedef struct _PageWindowClass PageWindowClass; + +#define TYPE_APP_WINDOW (app_window_get_type ()) +#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow)) +#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass)) +#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW)) +#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW)) +#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass)) + +typedef struct _AppWindow AppWindow; +typedef struct _AppWindowClass AppWindowClass; + +#define EDITING_TOOLS_TYPE_PHOTO_CANVAS (editing_tools_photo_canvas_get_type ()) +#define EDITING_TOOLS_PHOTO_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_PHOTO_CANVAS, EditingToolsPhotoCanvas)) +#define EDITING_TOOLS_PHOTO_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_PHOTO_CANVAS, EditingToolsPhotoCanvasClass)) +#define EDITING_TOOLS_IS_PHOTO_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_PHOTO_CANVAS)) +#define EDITING_TOOLS_IS_PHOTO_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_PHOTO_CANVAS)) +#define EDITING_TOOLS_PHOTO_CANVAS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_PHOTO_CANVAS, EditingToolsPhotoCanvasClass)) + +typedef struct _EditingToolsPhotoCanvas EditingToolsPhotoCanvas; +typedef struct _EditingToolsPhotoCanvasClass EditingToolsPhotoCanvasClass; +typedef struct _EditingToolsPhotoCanvasPrivate EditingToolsPhotoCanvasPrivate; + +#define TYPE_DATA_OBJECT (data_object_get_type ()) +#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) +#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) +#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) +#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) +#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) + +typedef struct _DataObject DataObject; +typedef struct _DataObjectClass DataObjectClass; + +#define TYPE_DATA_SOURCE (data_source_get_type ()) +#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) +#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) +#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) +#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) +#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) + +typedef struct _DataSource DataSource; +typedef struct _DataSourceClass DataSourceClass; + +#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) +#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) +#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) +#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) +#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) +#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) + +typedef struct _ThumbnailSource ThumbnailSource; +typedef struct _ThumbnailSourceClass ThumbnailSourceClass; + +#define TYPE_MEDIA_SOURCE (media_source_get_type ()) +#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) +#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) +#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) +#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) +#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) + +typedef struct _MediaSource MediaSource; +typedef struct _MediaSourceClass MediaSourceClass; + +#define TYPE_PHOTO_SOURCE (photo_source_get_type ()) +#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource)) +#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass)) +#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE)) +#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE)) +#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass)) + +typedef struct _PhotoSource PhotoSource; +typedef struct _PhotoSourceClass PhotoSourceClass; + +#define TYPE_PHOTO (photo_get_type ()) +#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo)) +#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass)) +#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO)) +#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO)) +#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass)) + +typedef struct _Photo Photo; +typedef struct _PhotoClass PhotoClass; + +#define TYPE_DIMENSIONS (dimensions_get_type ()) +typedef struct _Dimensions Dimensions; +#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) +#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL))) + +#define PHOTO_TYPE_EXCEPTION (photo_exception_get_type ()) + +#define TYPE_SCALING (scaling_get_type ()) + +#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ()) +typedef struct _Scaling Scaling; + +#define TYPE_BOX (box_get_type ()) +typedef struct _Box Box; +typedef struct _EditingToolsParamSpecPhotoCanvas EditingToolsParamSpecPhotoCanvas; + +#define EDITING_TOOLS_TYPE_EDITING_TOOL (editing_tools_editing_tool_get_type ()) +#define EDITING_TOOLS_EDITING_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)) +#define EDITING_TOOLS_EDITING_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingToolClass)) +#define EDITING_TOOLS_IS_EDITING_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL)) +#define EDITING_TOOLS_IS_EDITING_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_EDITING_TOOL)) +#define EDITING_TOOLS_EDITING_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingToolClass)) + +typedef struct _EditingToolsEditingTool EditingToolsEditingTool; +typedef struct _EditingToolsEditingToolClass EditingToolsEditingToolClass; +typedef struct _EditingToolsEditingToolPrivate EditingToolsEditingToolPrivate; +#define _editing_tools_photo_canvas_unref0(var) ((var == NULL) ? NULL : (var = (editing_tools_photo_canvas_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define TYPE_COMMAND (command_get_type ()) +#define COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND, Command)) +#define COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND, CommandClass)) +#define IS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND)) +#define IS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND)) +#define COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND, CommandClass)) + +typedef struct _Command Command; +typedef struct _CommandClass CommandClass; +typedef struct _EditingToolsParamSpecEditingTool EditingToolsParamSpecEditingTool; + +#define EDITING_TOOLS_TYPE_CROP_TOOL (editing_tools_crop_tool_get_type ()) +#define EDITING_TOOLS_CROP_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool)) +#define EDITING_TOOLS_CROP_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropToolClass)) +#define EDITING_TOOLS_IS_CROP_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_CROP_TOOL)) +#define EDITING_TOOLS_IS_CROP_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_CROP_TOOL)) +#define EDITING_TOOLS_CROP_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropToolClass)) + +typedef struct _EditingToolsCropTool EditingToolsCropTool; +typedef struct _EditingToolsCropToolClass EditingToolsCropToolClass; +typedef struct _EditingToolsCropToolPrivate EditingToolsCropToolPrivate; + +#define EDITING_TOOLS_CROP_TOOL_TYPE_CROP_TOOL_WINDOW (editing_tools_crop_tool_crop_tool_window_get_type ()) +#define EDITING_TOOLS_CROP_TOOL_CROP_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_CROP_TOOL_TYPE_CROP_TOOL_WINDOW, EditingToolsCropToolCropToolWindow)) +#define EDITING_TOOLS_CROP_TOOL_CROP_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_CROP_TOOL_TYPE_CROP_TOOL_WINDOW, EditingToolsCropToolCropToolWindowClass)) +#define EDITING_TOOLS_CROP_TOOL_IS_CROP_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_CROP_TOOL_TYPE_CROP_TOOL_WINDOW)) +#define EDITING_TOOLS_CROP_TOOL_IS_CROP_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_CROP_TOOL_TYPE_CROP_TOOL_WINDOW)) +#define EDITING_TOOLS_CROP_TOOL_CROP_TOOL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_CROP_TOOL_TYPE_CROP_TOOL_WINDOW, EditingToolsCropToolCropToolWindowClass)) + +typedef struct _EditingToolsCropToolCropToolWindow EditingToolsCropToolCropToolWindow; +typedef struct _EditingToolsCropToolCropToolWindowClass EditingToolsCropToolCropToolWindowClass; + +#define TYPE_BOX_LOCATION (box_location_get_type ()) + +#define EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION (editing_tools_crop_tool_constraint_description_get_type ()) +#define EDITING_TOOLS_CROP_TOOL_CONSTRAINT_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION, EditingToolsCropToolConstraintDescription)) +#define EDITING_TOOLS_CROP_TOOL_CONSTRAINT_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION, EditingToolsCropToolConstraintDescriptionClass)) +#define EDITING_TOOLS_CROP_TOOL_IS_CONSTRAINT_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION)) +#define EDITING_TOOLS_CROP_TOOL_IS_CONSTRAINT_DESCRIPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION)) +#define EDITING_TOOLS_CROP_TOOL_CONSTRAINT_DESCRIPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION, EditingToolsCropToolConstraintDescriptionClass)) + +typedef struct _EditingToolsCropToolConstraintDescription EditingToolsCropToolConstraintDescription; +typedef struct _EditingToolsCropToolConstraintDescriptionClass EditingToolsCropToolConstraintDescriptionClass; + +#define EDITING_TOOLS_CROP_TOOL_TYPE_RETICLE_ORIENTATION (editing_tools_crop_tool_reticle_orientation_get_type ()) + +#define EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_MODE (editing_tools_crop_tool_constraint_mode_get_type ()) +typedef struct _EditingToolsCropToolConstraintDescriptionPrivate EditingToolsCropToolConstraintDescriptionPrivate; +#define _editing_tools_crop_tool_constraint_description_unref0(var) ((var == NULL) ? NULL : (var = (editing_tools_crop_tool_constraint_description_unref (var), NULL))) +typedef struct _EditingToolsCropToolCropToolWindowPrivate EditingToolsCropToolCropToolWindowPrivate; + +#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ()) +#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade)) +#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) +#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE)) +#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE)) +#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) + +typedef struct _ConfigurationFacade ConfigurationFacade; +typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass; + +#define CONFIG_TYPE_FACADE (config_facade_get_type ()) +#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade)) +#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass)) +#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE)) +#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE)) +#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass)) + +typedef struct _ConfigFacade ConfigFacade; +typedef struct _ConfigFacadeClass ConfigFacadeClass; + +#define TYPE_BACKING_FETCH_MODE (backing_fetch_mode_get_type ()) + +#define TYPE_PAGE_COMMAND (page_command_get_type ()) +#define PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_COMMAND, PageCommand)) +#define PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_COMMAND, PageCommandClass)) +#define IS_PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_COMMAND)) +#define IS_PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_COMMAND)) +#define PAGE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_COMMAND, PageCommandClass)) + +typedef struct _PageCommand PageCommand; +typedef struct _PageCommandClass PageCommandClass; + +#define TYPE_SINGLE_DATA_SOURCE_COMMAND (single_data_source_command_get_type ()) +#define SINGLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)) +#define SINGLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommandClass)) +#define IS_SINGLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_DATA_SOURCE_COMMAND)) +#define IS_SINGLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_DATA_SOURCE_COMMAND)) +#define SINGLE_DATA_SOURCE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommandClass)) + +typedef struct _SingleDataSourceCommand SingleDataSourceCommand; +typedef struct _SingleDataSourceCommandClass SingleDataSourceCommandClass; + +#define TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND (generic_photo_transformation_command_get_type ()) +#define GENERIC_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand)) +#define GENERIC_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommandClass)) +#define IS_GENERIC_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND)) +#define IS_GENERIC_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND)) +#define GENERIC_PHOTO_TRANSFORMATION_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommandClass)) + +typedef struct _GenericPhotoTransformationCommand GenericPhotoTransformationCommand; +typedef struct _GenericPhotoTransformationCommandClass GenericPhotoTransformationCommandClass; + +#define TYPE_CROP_COMMAND (crop_command_get_type ()) +#define CROP_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CROP_COMMAND, CropCommand)) +#define CROP_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CROP_COMMAND, CropCommandClass)) +#define IS_CROP_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CROP_COMMAND)) +#define IS_CROP_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CROP_COMMAND)) +#define CROP_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CROP_COMMAND, CropCommandClass)) + +typedef struct _CropCommand CropCommand; +typedef struct _CropCommandClass CropCommandClass; + +#define TYPE_BOX_COMPLEMENTS (box_complements_get_type ()) +typedef struct _EditingToolsCropToolParamSpecConstraintDescription EditingToolsCropToolParamSpecConstraintDescription; + +#define EDITING_TOOLS_TYPE_REDEYE_INSTANCE (editing_tools_redeye_instance_get_type ()) +typedef struct _EditingToolsRedeyeInstance EditingToolsRedeyeInstance; + +#define EDITING_TOOLS_TYPE_REDEYE_TOOL (editing_tools_redeye_tool_get_type ()) +#define EDITING_TOOLS_REDEYE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool)) +#define EDITING_TOOLS_REDEYE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeToolClass)) +#define EDITING_TOOLS_IS_REDEYE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_REDEYE_TOOL)) +#define EDITING_TOOLS_IS_REDEYE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_REDEYE_TOOL)) +#define EDITING_TOOLS_REDEYE_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeToolClass)) + +typedef struct _EditingToolsRedeyeTool EditingToolsRedeyeTool; +typedef struct _EditingToolsRedeyeToolClass EditingToolsRedeyeToolClass; +typedef struct _EditingToolsRedeyeToolPrivate EditingToolsRedeyeToolPrivate; + +#define EDITING_TOOLS_REDEYE_TOOL_TYPE_REDEYE_TOOL_WINDOW (editing_tools_redeye_tool_redeye_tool_window_get_type ()) +#define EDITING_TOOLS_REDEYE_TOOL_REDEYE_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_REDEYE_TOOL_TYPE_REDEYE_TOOL_WINDOW, EditingToolsRedeyeToolRedeyeToolWindow)) +#define EDITING_TOOLS_REDEYE_TOOL_REDEYE_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_REDEYE_TOOL_TYPE_REDEYE_TOOL_WINDOW, EditingToolsRedeyeToolRedeyeToolWindowClass)) +#define EDITING_TOOLS_REDEYE_TOOL_IS_REDEYE_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_REDEYE_TOOL_TYPE_REDEYE_TOOL_WINDOW)) +#define EDITING_TOOLS_REDEYE_TOOL_IS_REDEYE_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_REDEYE_TOOL_TYPE_REDEYE_TOOL_WINDOW)) +#define EDITING_TOOLS_REDEYE_TOOL_REDEYE_TOOL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_REDEYE_TOOL_TYPE_REDEYE_TOOL_WINDOW, EditingToolsRedeyeToolRedeyeToolWindowClass)) + +typedef struct _EditingToolsRedeyeToolRedeyeToolWindow EditingToolsRedeyeToolRedeyeToolWindow; +typedef struct _EditingToolsRedeyeToolRedeyeToolWindowClass EditingToolsRedeyeToolRedeyeToolWindowClass; +typedef struct _EditingToolsRedeyeToolRedeyeToolWindowPrivate EditingToolsRedeyeToolRedeyeToolWindowPrivate; + +#define TYPE_REDEYE_COMMAND (redeye_command_get_type ()) +#define REDEYE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REDEYE_COMMAND, RedeyeCommand)) +#define REDEYE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REDEYE_COMMAND, RedeyeCommandClass)) +#define IS_REDEYE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REDEYE_COMMAND)) +#define IS_REDEYE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REDEYE_COMMAND)) +#define REDEYE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REDEYE_COMMAND, RedeyeCommandClass)) + +typedef struct _RedeyeCommand RedeyeCommand; +typedef struct _RedeyeCommandClass RedeyeCommandClass; + +#define TYPE_COMMAND_MANAGER (command_manager_get_type ()) +#define COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND_MANAGER, CommandManager)) +#define COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND_MANAGER, CommandManagerClass)) +#define IS_COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND_MANAGER)) +#define IS_COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND_MANAGER)) +#define COMMAND_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND_MANAGER, CommandManagerClass)) + +typedef struct _CommandManager CommandManager; +typedef struct _CommandManagerClass CommandManagerClass; +#define _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL))) + +#define TYPE_ALTERATION (alteration_get_type ()) +#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) +#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) +#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) +#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) +#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) + +typedef struct _Alteration Alteration; +typedef struct _AlterationClass AlterationClass; +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define TYPE_DATA_COLLECTION (data_collection_get_type ()) +#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) +#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) +#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) +#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) +#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) + +typedef struct _DataCollection DataCollection; +typedef struct _DataCollectionClass DataCollectionClass; +#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) + +#define EDITING_TOOLS_TYPE_ADJUST_TOOL (editing_tools_adjust_tool_get_type ()) +#define EDITING_TOOLS_ADJUST_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustTool)) +#define EDITING_TOOLS_ADJUST_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustToolClass)) +#define EDITING_TOOLS_IS_ADJUST_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_ADJUST_TOOL)) +#define EDITING_TOOLS_IS_ADJUST_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_ADJUST_TOOL)) +#define EDITING_TOOLS_ADJUST_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustToolClass)) + +typedef struct _EditingToolsAdjustTool EditingToolsAdjustTool; +typedef struct _EditingToolsAdjustToolClass EditingToolsAdjustToolClass; +typedef struct _EditingToolsAdjustToolPrivate EditingToolsAdjustToolPrivate; + +#define EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_WINDOW (editing_tools_adjust_tool_adjust_tool_window_get_type ()) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_WINDOW, EditingToolsAdjustToolAdjustToolWindow)) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_WINDOW, EditingToolsAdjustToolAdjustToolWindowClass)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_ADJUST_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_WINDOW)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_ADJUST_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_WINDOW)) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_TOOL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_WINDOW, EditingToolsAdjustToolAdjustToolWindowClass)) + +typedef struct _EditingToolsAdjustToolAdjustToolWindow EditingToolsAdjustToolAdjustToolWindow; +typedef struct _EditingToolsAdjustToolAdjustToolWindowClass EditingToolsAdjustToolAdjustToolWindowClass; + +#define TYPE_PIXEL_TRANSFORMER (pixel_transformer_get_type ()) +#define PIXEL_TRANSFORMER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIXEL_TRANSFORMER, PixelTransformer)) +#define PIXEL_TRANSFORMER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIXEL_TRANSFORMER, PixelTransformerClass)) +#define IS_PIXEL_TRANSFORMER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIXEL_TRANSFORMER)) +#define IS_PIXEL_TRANSFORMER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIXEL_TRANSFORMER)) +#define PIXEL_TRANSFORMER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIXEL_TRANSFORMER, PixelTransformerClass)) + +typedef struct _PixelTransformer PixelTransformer; +typedef struct _PixelTransformerClass PixelTransformerClass; + +#define TYPE_PIXEL_TRANSFORMATION_BUNDLE (pixel_transformation_bundle_get_type ()) +#define PIXEL_TRANSFORMATION_BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIXEL_TRANSFORMATION_BUNDLE, PixelTransformationBundle)) +#define PIXEL_TRANSFORMATION_BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIXEL_TRANSFORMATION_BUNDLE, PixelTransformationBundleClass)) +#define IS_PIXEL_TRANSFORMATION_BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIXEL_TRANSFORMATION_BUNDLE)) +#define IS_PIXEL_TRANSFORMATION_BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIXEL_TRANSFORMATION_BUNDLE)) +#define PIXEL_TRANSFORMATION_BUNDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIXEL_TRANSFORMATION_BUNDLE, PixelTransformationBundleClass)) + +typedef struct _PixelTransformationBundle PixelTransformationBundle; +typedef struct _PixelTransformationBundleClass PixelTransformationBundleClass; + +#define TYPE_ONE_SHOT_SCHEDULER (one_shot_scheduler_get_type ()) +#define ONE_SHOT_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ONE_SHOT_SCHEDULER, OneShotScheduler)) +#define ONE_SHOT_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ONE_SHOT_SCHEDULER, OneShotSchedulerClass)) +#define IS_ONE_SHOT_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ONE_SHOT_SCHEDULER)) +#define IS_ONE_SHOT_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ONE_SHOT_SCHEDULER)) +#define ONE_SHOT_SCHEDULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ONE_SHOT_SCHEDULER, OneShotSchedulerClass)) + +typedef struct _OneShotScheduler OneShotScheduler; +typedef struct _OneShotSchedulerClass OneShotSchedulerClass; +#define _pixel_transformer_unref0(var) ((var == NULL) ? NULL : (var = (pixel_transformer_unref (var), NULL))) +#define _pixel_transformation_bundle_unref0(var) ((var == NULL) ? NULL : (var = (pixel_transformation_bundle_unref (var), NULL))) +#define _one_shot_scheduler_unref0(var) ((var == NULL) ? NULL : (var = (one_shot_scheduler_unref (var), NULL))) + +#define TYPE_PIXEL_TRANSFORMATION (pixel_transformation_get_type ()) +#define PIXEL_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIXEL_TRANSFORMATION, PixelTransformation)) +#define PIXEL_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIXEL_TRANSFORMATION, PixelTransformationClass)) +#define IS_PIXEL_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIXEL_TRANSFORMATION)) +#define IS_PIXEL_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIXEL_TRANSFORMATION)) +#define PIXEL_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIXEL_TRANSFORMATION, PixelTransformationClass)) + +typedef struct _PixelTransformation PixelTransformation; +typedef struct _PixelTransformationClass PixelTransformationClass; + +#define TYPE_HSV_TRANSFORMATION (hsv_transformation_get_type ()) +#define HSV_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HSV_TRANSFORMATION, HSVTransformation)) +#define HSV_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HSV_TRANSFORMATION, HSVTransformationClass)) +#define IS_HSV_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HSV_TRANSFORMATION)) +#define IS_HSV_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HSV_TRANSFORMATION)) +#define HSV_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HSV_TRANSFORMATION, HSVTransformationClass)) + +typedef struct _HSVTransformation HSVTransformation; +typedef struct _HSVTransformationClass HSVTransformationClass; + +#define TYPE_EXPANSION_TRANSFORMATION (expansion_transformation_get_type ()) +#define EXPANSION_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPANSION_TRANSFORMATION, ExpansionTransformation)) +#define EXPANSION_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPANSION_TRANSFORMATION, ExpansionTransformationClass)) +#define IS_EXPANSION_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPANSION_TRANSFORMATION)) +#define IS_EXPANSION_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPANSION_TRANSFORMATION)) +#define EXPANSION_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPANSION_TRANSFORMATION, ExpansionTransformationClass)) + +typedef struct _ExpansionTransformation ExpansionTransformation; +typedef struct _ExpansionTransformationClass ExpansionTransformationClass; + +#define TYPE_PIXEL_TRANSFORMATION_TYPE (pixel_transformation_type_get_type ()) +typedef struct _EditingToolsAdjustToolAdjustToolWindowPrivate EditingToolsAdjustToolAdjustToolWindowPrivate; + +#define TYPE_RGB_HISTOGRAM_MANIPULATOR (rgb_histogram_manipulator_get_type ()) +#define RGB_HISTOGRAM_MANIPULATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RGB_HISTOGRAM_MANIPULATOR, RGBHistogramManipulator)) +#define RGB_HISTOGRAM_MANIPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RGB_HISTOGRAM_MANIPULATOR, RGBHistogramManipulatorClass)) +#define IS_RGB_HISTOGRAM_MANIPULATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RGB_HISTOGRAM_MANIPULATOR)) +#define IS_RGB_HISTOGRAM_MANIPULATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RGB_HISTOGRAM_MANIPULATOR)) +#define RGB_HISTOGRAM_MANIPULATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RGB_HISTOGRAM_MANIPULATOR, RGBHistogramManipulatorClass)) + +typedef struct _RGBHistogramManipulator RGBHistogramManipulator; +typedef struct _RGBHistogramManipulatorClass RGBHistogramManipulatorClass; + +#define TYPE_SHADOW_DETAIL_TRANSFORMATION (shadow_detail_transformation_get_type ()) +#define SHADOW_DETAIL_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHADOW_DETAIL_TRANSFORMATION, ShadowDetailTransformation)) +#define SHADOW_DETAIL_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHADOW_DETAIL_TRANSFORMATION, ShadowDetailTransformationClass)) +#define IS_SHADOW_DETAIL_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHADOW_DETAIL_TRANSFORMATION)) +#define IS_SHADOW_DETAIL_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHADOW_DETAIL_TRANSFORMATION)) +#define SHADOW_DETAIL_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHADOW_DETAIL_TRANSFORMATION, ShadowDetailTransformationClass)) + +typedef struct _ShadowDetailTransformation ShadowDetailTransformation; +typedef struct _ShadowDetailTransformationClass ShadowDetailTransformationClass; + +#define TYPE_HIGHLIGHT_DETAIL_TRANSFORMATION (highlight_detail_transformation_get_type ()) +#define HIGHLIGHT_DETAIL_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HIGHLIGHT_DETAIL_TRANSFORMATION, HighlightDetailTransformation)) +#define HIGHLIGHT_DETAIL_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HIGHLIGHT_DETAIL_TRANSFORMATION, HighlightDetailTransformationClass)) +#define IS_HIGHLIGHT_DETAIL_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HIGHLIGHT_DETAIL_TRANSFORMATION)) +#define IS_HIGHLIGHT_DETAIL_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HIGHLIGHT_DETAIL_TRANSFORMATION)) +#define HIGHLIGHT_DETAIL_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HIGHLIGHT_DETAIL_TRANSFORMATION, HighlightDetailTransformationClass)) + +typedef struct _HighlightDetailTransformation HighlightDetailTransformation; +typedef struct _HighlightDetailTransformationClass HighlightDetailTransformationClass; + +#define TYPE_RGB_TRANSFORMATION (rgb_transformation_get_type ()) +#define RGB_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RGB_TRANSFORMATION, RGBTransformation)) +#define RGB_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RGB_TRANSFORMATION, RGBTransformationClass)) +#define IS_RGB_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RGB_TRANSFORMATION)) +#define IS_RGB_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RGB_TRANSFORMATION)) +#define RGB_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RGB_TRANSFORMATION, RGBTransformationClass)) + +typedef struct _RGBTransformation RGBTransformation; +typedef struct _RGBTransformationClass RGBTransformationClass; + +#define TYPE_TEMPERATURE_TRANSFORMATION (temperature_transformation_get_type ()) +#define TEMPERATURE_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEMPERATURE_TRANSFORMATION, TemperatureTransformation)) +#define TEMPERATURE_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEMPERATURE_TRANSFORMATION, TemperatureTransformationClass)) +#define IS_TEMPERATURE_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEMPERATURE_TRANSFORMATION)) +#define IS_TEMPERATURE_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEMPERATURE_TRANSFORMATION)) +#define TEMPERATURE_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEMPERATURE_TRANSFORMATION, TemperatureTransformationClass)) + +typedef struct _TemperatureTransformation TemperatureTransformation; +typedef struct _TemperatureTransformationClass TemperatureTransformationClass; + +#define TYPE_TINT_TRANSFORMATION (tint_transformation_get_type ()) +#define TINT_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TINT_TRANSFORMATION, TintTransformation)) +#define TINT_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TINT_TRANSFORMATION, TintTransformationClass)) +#define IS_TINT_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TINT_TRANSFORMATION)) +#define IS_TINT_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TINT_TRANSFORMATION)) +#define TINT_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TINT_TRANSFORMATION, TintTransformationClass)) + +typedef struct _TintTransformation TintTransformation; +typedef struct _TintTransformationClass TintTransformationClass; + +#define TYPE_SATURATION_TRANSFORMATION (saturation_transformation_get_type ()) +#define SATURATION_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SATURATION_TRANSFORMATION, SaturationTransformation)) +#define SATURATION_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SATURATION_TRANSFORMATION, SaturationTransformationClass)) +#define IS_SATURATION_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SATURATION_TRANSFORMATION)) +#define IS_SATURATION_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SATURATION_TRANSFORMATION)) +#define SATURATION_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SATURATION_TRANSFORMATION, SaturationTransformationClass)) + +typedef struct _SaturationTransformation SaturationTransformation; +typedef struct _SaturationTransformationClass SaturationTransformationClass; + +#define TYPE_EXPOSURE_TRANSFORMATION (exposure_transformation_get_type ()) +#define EXPOSURE_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPOSURE_TRANSFORMATION, ExposureTransformation)) +#define EXPOSURE_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPOSURE_TRANSFORMATION, ExposureTransformationClass)) +#define IS_EXPOSURE_TRANSFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPOSURE_TRANSFORMATION)) +#define IS_EXPOSURE_TRANSFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPOSURE_TRANSFORMATION)) +#define EXPOSURE_TRANSFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPOSURE_TRANSFORMATION, ExposureTransformationClass)) + +typedef struct _ExposureTransformation ExposureTransformation; +typedef struct _ExposureTransformationClass ExposureTransformationClass; +#define _pixel_transformation_unref0(var) ((var == NULL) ? NULL : (var = (pixel_transformation_unref (var), NULL))) + +#define EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND (editing_tools_adjust_tool_adjust_tool_command_get_type ()) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_TOOL_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_TOOL_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommandClass)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_ADJUST_TOOL_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_ADJUST_TOOL_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND)) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_TOOL_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommandClass)) + +typedef struct _EditingToolsAdjustToolAdjustToolCommand EditingToolsAdjustToolAdjustToolCommand; +typedef struct _EditingToolsAdjustToolAdjustToolCommandClass EditingToolsAdjustToolAdjustToolCommandClass; + +#define EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND (editing_tools_adjust_tool_adjust_reset_command_get_type ()) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_RESET_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND, EditingToolsAdjustToolAdjustResetCommand)) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_RESET_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND, EditingToolsAdjustToolAdjustResetCommandClass)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_ADJUST_RESET_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_ADJUST_RESET_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND)) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_RESET_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND, EditingToolsAdjustToolAdjustResetCommandClass)) + +typedef struct _EditingToolsAdjustToolAdjustResetCommand EditingToolsAdjustToolAdjustResetCommand; +typedef struct _EditingToolsAdjustToolAdjustResetCommandClass EditingToolsAdjustToolAdjustResetCommandClass; + +#define TYPE_ADJUST_COLORS_SINGLE_COMMAND (adjust_colors_single_command_get_type ()) +#define ADJUST_COLORS_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommand)) +#define ADJUST_COLORS_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommandClass)) +#define IS_ADJUST_COLORS_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_COLORS_SINGLE_COMMAND)) +#define IS_ADJUST_COLORS_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_COLORS_SINGLE_COMMAND)) +#define ADJUST_COLORS_SINGLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommandClass)) + +typedef struct _AdjustColorsSingleCommand AdjustColorsSingleCommand; +typedef struct _AdjustColorsSingleCommandClass AdjustColorsSingleCommandClass; + +#define EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND (editing_tools_adjust_tool_slider_adjustment_command_get_type ()) +#define EDITING_TOOLS_ADJUST_TOOL_SLIDER_ADJUSTMENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, EditingToolsAdjustToolSliderAdjustmentCommand)) +#define EDITING_TOOLS_ADJUST_TOOL_SLIDER_ADJUSTMENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, EditingToolsAdjustToolSliderAdjustmentCommandClass)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_SLIDER_ADJUSTMENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_SLIDER_ADJUSTMENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND)) +#define EDITING_TOOLS_ADJUST_TOOL_SLIDER_ADJUSTMENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, EditingToolsAdjustToolSliderAdjustmentCommandClass)) + +typedef struct _EditingToolsAdjustToolSliderAdjustmentCommand EditingToolsAdjustToolSliderAdjustmentCommand; +typedef struct _EditingToolsAdjustToolSliderAdjustmentCommandClass EditingToolsAdjustToolSliderAdjustmentCommandClass; + +#define EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND (editing_tools_adjust_tool_adjust_enhance_command_get_type ()) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_ENHANCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND, EditingToolsAdjustToolAdjustEnhanceCommand)) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_ENHANCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND, EditingToolsAdjustToolAdjustEnhanceCommandClass)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_ADJUST_ENHANCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND)) +#define EDITING_TOOLS_ADJUST_TOOL_IS_ADJUST_ENHANCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND)) +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_ENHANCE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND, EditingToolsAdjustToolAdjustEnhanceCommandClass)) + +typedef struct _EditingToolsAdjustToolAdjustEnhanceCommand EditingToolsAdjustToolAdjustEnhanceCommand; +typedef struct _EditingToolsAdjustToolAdjustEnhanceCommandClass EditingToolsAdjustToolAdjustEnhanceCommandClass; + +#define TYPE_COMMAND_DESCRIPTION (command_description_get_type ()) +#define COMMAND_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND_DESCRIPTION, CommandDescription)) +#define IS_COMMAND_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND_DESCRIPTION)) +#define COMMAND_DESCRIPTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_COMMAND_DESCRIPTION, CommandDescriptionIface)) + +typedef struct _CommandDescription CommandDescription; +typedef struct _CommandDescriptionIface CommandDescriptionIface; +typedef struct _CommandPrivate CommandPrivate; +typedef struct _EditingToolsAdjustToolAdjustToolCommandPrivate EditingToolsAdjustToolAdjustToolCommandPrivate; +typedef struct _EditingToolsAdjustToolAdjustResetCommandPrivate EditingToolsAdjustToolAdjustResetCommandPrivate; +typedef struct _EditingToolsAdjustToolSliderAdjustmentCommandPrivate EditingToolsAdjustToolSliderAdjustmentCommandPrivate; +typedef struct _EditingToolsAdjustToolAdjustEnhanceCommandPrivate EditingToolsAdjustToolAdjustEnhanceCommandPrivate; + +#define TYPE_ENHANCE_SINGLE_COMMAND (enhance_single_command_get_type ()) +#define ENHANCE_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ENHANCE_SINGLE_COMMAND, EnhanceSingleCommand)) +#define ENHANCE_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ENHANCE_SINGLE_COMMAND, EnhanceSingleCommandClass)) +#define IS_ENHANCE_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ENHANCE_SINGLE_COMMAND)) +#define IS_ENHANCE_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ENHANCE_SINGLE_COMMAND)) +#define ENHANCE_SINGLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ENHANCE_SINGLE_COMMAND, EnhanceSingleCommandClass)) + +typedef struct _EnhanceSingleCommand EnhanceSingleCommand; +typedef struct _EnhanceSingleCommandClass EnhanceSingleCommandClass; +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +struct _EditingToolsEditingToolWindow { + GtkWindow parent_instance; + EditingToolsEditingToolWindowPrivate * priv; +}; + +struct _EditingToolsEditingToolWindowClass { + GtkWindowClass parent_class; +}; + +struct _EditingToolsEditingToolWindowPrivate { + GtkFrame* layout_frame; + gboolean user_moved; +}; + +struct _EditingToolsPhotoCanvas { + GTypeInstance parent_instance; + volatile int ref_count; + EditingToolsPhotoCanvasPrivate * priv; +}; + +struct _EditingToolsPhotoCanvasClass { + GTypeClass parent_class; + void (*finalize) (EditingToolsPhotoCanvas *self); + void (*repaint) (EditingToolsPhotoCanvas* self); +}; + +struct _Dimensions { + gint width; + gint height; +}; + +struct _EditingToolsPhotoCanvasPrivate { + GtkWindow* container; + GdkWindow* drawing_window; + Photo* photo; + cairo_t* default_ctx; + Dimensions surface_dim; + cairo_surface_t* scaled; + GdkPixbuf* scaled_pixbuf; + GdkRectangle scaled_position; +}; + +typedef enum { + PHOTO_EXCEPTION_NONE = 0, + PHOTO_EXCEPTION_ORIENTATION = 1 << 0, + PHOTO_EXCEPTION_CROP = 1 << 1, + PHOTO_EXCEPTION_REDEYE = 1 << 2, + PHOTO_EXCEPTION_ADJUST = 1 << 3, + PHOTO_EXCEPTION_STRAIGHTEN = 1 << 4, + PHOTO_EXCEPTION_ALL = 0xFFFFFFFFLL +} PhotoException; + +typedef enum { + SCALE_CONSTRAINT_ORIGINAL, + SCALE_CONSTRAINT_DIMENSIONS, + SCALE_CONSTRAINT_WIDTH, + SCALE_CONSTRAINT_HEIGHT, + SCALE_CONSTRAINT_FILL_VIEWPORT +} ScaleConstraint; + +struct _Scaling { + ScaleConstraint constraint; + gint scale; + Dimensions viewport; + gboolean scale_up; +}; + +struct _Box { + gint left; + gint top; + gint right; + gint bottom; +}; + +struct _EditingToolsParamSpecPhotoCanvas { + GParamSpec parent_instance; +}; + +struct _EditingToolsEditingTool { + GTypeInstance parent_instance; + volatile int ref_count; + EditingToolsEditingToolPrivate * priv; + EditingToolsPhotoCanvas* canvas; + cairo_surface_t* surface; + gchar* name; +}; + +struct _EditingToolsEditingToolClass { + GTypeClass parent_class; + void (*finalize) (EditingToolsEditingTool *self); + void (*activate) (EditingToolsEditingTool* self, EditingToolsPhotoCanvas* canvas); + void (*deactivate) (EditingToolsEditingTool* self); + EditingToolsEditingToolWindow* (*get_tool_window) (EditingToolsEditingTool* self); + GdkPixbuf* (*get_display_pixbuf) (EditingToolsEditingTool* self, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error); + void (*on_left_click) (EditingToolsEditingTool* self, gint x, gint y); + void (*on_left_released) (EditingToolsEditingTool* self, gint x, gint y); + void (*on_motion) (EditingToolsEditingTool* self, gint x, gint y, GdkModifierType mask); + gboolean (*on_leave_notify_event) (EditingToolsEditingTool* self); + gboolean (*on_keypress) (EditingToolsEditingTool* self, GdkEventKey* event); + void (*paint) (EditingToolsEditingTool* self, cairo_t* ctx); +}; + +struct _EditingToolsEditingToolPrivate { + EditingToolsEditingToolWindow* tool_window; +}; + +typedef EditingToolsEditingTool* (*EditingToolsEditingToolFactory) (); +struct _EditingToolsParamSpecEditingTool { + GParamSpec parent_instance; +}; + +struct _EditingToolsCropTool { + EditingToolsEditingTool parent_instance; + EditingToolsCropToolPrivate * priv; +}; + +struct _EditingToolsCropToolClass { + EditingToolsEditingToolClass parent_class; +}; + +typedef enum { + BOX_LOCATION_OUTSIDE, + BOX_LOCATION_INSIDE, + BOX_LOCATION_TOP_SIDE, + BOX_LOCATION_LEFT_SIDE, + BOX_LOCATION_RIGHT_SIDE, + BOX_LOCATION_BOTTOM_SIDE, + BOX_LOCATION_TOP_LEFT, + BOX_LOCATION_BOTTOM_LEFT, + BOX_LOCATION_TOP_RIGHT, + BOX_LOCATION_BOTTOM_RIGHT +} BoxLocation; + +typedef enum { + EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_LANDSCAPE, + EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_PORTRAIT +} EditingToolsCropToolReticleOrientation; + +typedef enum { + EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_NORMAL, + EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_CUSTOM +} EditingToolsCropToolConstraintMode; + +struct _EditingToolsCropToolPrivate { + EditingToolsCropToolCropToolWindow* crop_tool_window; + GdkCursorType current_cursor_type; + BoxLocation in_manipulation; + cairo_t* wide_black_ctx; + cairo_t* wide_white_ctx; + cairo_t* thin_white_ctx; + cairo_t* text_ctx; + cairo_surface_t* crop_surface; + Box scaled_crop; + gint last_grab_x; + gint last_grab_y; + EditingToolsCropToolConstraintDescription** constraints; + gint constraints_length1; + gint _constraints_size_; + GtkListStore* constraint_list; + EditingToolsCropToolReticleOrientation reticle_orientation; + EditingToolsCropToolConstraintMode constraint_mode; + gboolean entry_insert_in_progress; + gfloat custom_aspect_ratio; + gint custom_width; + gint custom_height; + gint custom_init_width; + gint custom_init_height; + gfloat pre_aspect_ratio; +}; + +struct _EditingToolsCropToolConstraintDescription { + GTypeInstance parent_instance; + volatile int ref_count; + EditingToolsCropToolConstraintDescriptionPrivate * priv; + gchar* name; + gint basis_width; + gint basis_height; + gboolean is_pivotable; + gfloat aspect_ratio; +}; + +struct _EditingToolsCropToolConstraintDescriptionClass { + GTypeClass parent_class; + void (*finalize) (EditingToolsCropToolConstraintDescription *self); +}; + +struct _EditingToolsCropToolCropToolWindow { + EditingToolsEditingToolWindow parent_instance; + EditingToolsCropToolCropToolWindowPrivate * priv; + GtkButton* ok_button; + GtkButton* cancel_button; + GtkComboBox* constraint_combo; + GtkButton* pivot_reticle_button; + GtkEntry* custom_width_entry; + GtkEntry* custom_height_entry; + GtkLabel* custom_mulsign_label; + GtkEntry* most_recently_edited; + GtkBox* response_layout; + GtkBox* layout; + gint normal_width; + gint normal_height; +}; + +struct _EditingToolsCropToolCropToolWindowClass { + EditingToolsEditingToolWindowClass parent_class; +}; + +typedef enum { + BACKING_FETCH_MODE_SOURCE, + BACKING_FETCH_MODE_BASELINE, + BACKING_FETCH_MODE_MASTER, + BACKING_FETCH_MODE_UNMODIFIED +} BackingFetchMode; + +typedef enum { + BOX_COMPLEMENTS_NONE, + BOX_COMPLEMENTS_VERTICAL, + BOX_COMPLEMENTS_HORIZONTAL, + BOX_COMPLEMENTS_BOTH +} BoxComplements; + +struct _EditingToolsCropToolParamSpecConstraintDescription { + GParamSpec parent_instance; +}; + +struct _EditingToolsRedeyeInstance { + GdkPoint center; + gint radius; +}; + +struct _EditingToolsRedeyeTool { + EditingToolsEditingTool parent_instance; + EditingToolsRedeyeToolPrivate * priv; +}; + +struct _EditingToolsRedeyeToolClass { + EditingToolsEditingToolClass parent_class; +}; + +struct _EditingToolsRedeyeToolPrivate { + cairo_t* thin_white_ctx; + cairo_t* wider_gray_ctx; + EditingToolsRedeyeToolRedeyeToolWindow* redeye_tool_window; + EditingToolsRedeyeInstance user_interaction_instance; + gboolean is_reticle_move_in_progress; + GdkPoint reticle_move_mouse_start_point; + GdkPoint reticle_move_anchor; + GdkCursor* cached_arrow_cursor; + GdkCursor* cached_grab_cursor; + GdkRectangle old_scaled_pixbuf_position; + GdkPixbuf* current_pixbuf; +}; + +struct _EditingToolsRedeyeToolRedeyeToolWindow { + EditingToolsEditingToolWindow parent_instance; + EditingToolsRedeyeToolRedeyeToolWindowPrivate * priv; + GtkButton* apply_button; + GtkButton* close_button; + GtkScale* slider; +}; + +struct _EditingToolsRedeyeToolRedeyeToolWindowClass { + EditingToolsEditingToolWindowClass parent_class; +}; + +struct _EditingToolsRedeyeToolRedeyeToolWindowPrivate { + GtkLabel* slider_label; +}; + +struct _EditingToolsAdjustTool { + EditingToolsEditingTool parent_instance; + EditingToolsAdjustToolPrivate * priv; +}; + +struct _EditingToolsAdjustToolClass { + EditingToolsEditingToolClass parent_class; +}; + +struct _EditingToolsAdjustToolPrivate { + EditingToolsAdjustToolAdjustToolWindow* adjust_tool_window; + gboolean suppress_effect_redraw; + GdkPixbuf* draw_to_pixbuf; + GdkPixbuf* histogram_pixbuf; + GdkPixbuf* virgin_histogram_pixbuf; + PixelTransformer* transformer; + PixelTransformer* histogram_transformer; + PixelTransformationBundle* transformations; + gfloat* fp_pixel_cache; + gint fp_pixel_cache_length1; + gint _fp_pixel_cache_size_; + gboolean disable_histogram_refresh; + OneShotScheduler* temperature_scheduler; + OneShotScheduler* tint_scheduler; + OneShotScheduler* saturation_scheduler; + OneShotScheduler* exposure_scheduler; + OneShotScheduler* shadows_scheduler; + OneShotScheduler* highlights_scheduler; +}; + +typedef enum { + PIXEL_TRANSFORMATION_TYPE_TONE_EXPANSION, + PIXEL_TRANSFORMATION_TYPE_SHADOWS, + PIXEL_TRANSFORMATION_TYPE_HIGHLIGHTS, + PIXEL_TRANSFORMATION_TYPE_TEMPERATURE, + PIXEL_TRANSFORMATION_TYPE_TINT, + PIXEL_TRANSFORMATION_TYPE_SATURATION, + PIXEL_TRANSFORMATION_TYPE_EXPOSURE +} PixelTransformationType; + +struct _EditingToolsAdjustToolAdjustToolWindow { + EditingToolsEditingToolWindow parent_instance; + EditingToolsAdjustToolAdjustToolWindowPrivate * priv; + GtkScale* exposure_slider; + GtkScale* saturation_slider; + GtkScale* tint_slider; + GtkScale* temperature_slider; + GtkScale* shadows_slider; + GtkScale* highlights_slider; + GtkButton* ok_button; + GtkButton* reset_button; + GtkButton* cancel_button; + RGBHistogramManipulator* histogram_manipulator; +}; + +struct _EditingToolsAdjustToolAdjustToolWindowClass { + EditingToolsEditingToolWindowClass parent_class; +}; + +typedef void (*OneShotCallback) (void* user_data); +struct _CommandDescriptionIface { + GTypeInterface parent_iface; + gchar* (*get_name) (CommandDescription* self); + gchar* (*get_explanation) (CommandDescription* self); +}; + +struct _Command { + GObject parent_instance; + CommandPrivate * priv; +}; + +struct _CommandClass { + GObjectClass parent_class; + void (*prepare) (Command* self); + void (*execute) (Command* self); + void (*undo) (Command* self); + void (*redo) (Command* self); + gboolean (*compress) (Command* self, Command* command); + gchar* (*get_name) (Command* self); + gchar* (*get_explanation) (Command* self); +}; + +struct _EditingToolsAdjustToolAdjustToolCommand { + Command parent_instance; + EditingToolsAdjustToolAdjustToolCommandPrivate * priv; + EditingToolsAdjustTool* owner; +}; + +struct _EditingToolsAdjustToolAdjustToolCommandClass { + CommandClass parent_class; +}; + +struct _EditingToolsAdjustToolAdjustResetCommand { + EditingToolsAdjustToolAdjustToolCommand parent_instance; + EditingToolsAdjustToolAdjustResetCommandPrivate * priv; +}; + +struct _EditingToolsAdjustToolAdjustResetCommandClass { + EditingToolsAdjustToolAdjustToolCommandClass parent_class; +}; + +struct _EditingToolsAdjustToolAdjustResetCommandPrivate { + PixelTransformationBundle* original; + PixelTransformationBundle* reset; +}; + +struct _EditingToolsAdjustToolSliderAdjustmentCommand { + EditingToolsAdjustToolAdjustToolCommand parent_instance; + EditingToolsAdjustToolSliderAdjustmentCommandPrivate * priv; +}; + +struct _EditingToolsAdjustToolSliderAdjustmentCommandClass { + EditingToolsAdjustToolAdjustToolCommandClass parent_class; +}; + +struct _EditingToolsAdjustToolSliderAdjustmentCommandPrivate { + PixelTransformationType transformation_type; + PixelTransformation* new_transformation; + PixelTransformation* old_transformation; +}; + +struct _EditingToolsAdjustToolAdjustEnhanceCommand { + EditingToolsAdjustToolAdjustToolCommand parent_instance; + EditingToolsAdjustToolAdjustEnhanceCommandPrivate * priv; +}; + +struct _EditingToolsAdjustToolAdjustEnhanceCommandClass { + EditingToolsAdjustToolAdjustToolCommandClass parent_class; +}; + +struct _EditingToolsAdjustToolAdjustEnhanceCommandPrivate { + Photo* photo; + PixelTransformationBundle* original; + PixelTransformationBundle* enhanced; +}; + + +static gpointer editing_tools_editing_tool_window_parent_class = NULL; +static gpointer editing_tools_photo_canvas_parent_class = NULL; +static gpointer editing_tools_editing_tool_parent_class = NULL; +static gpointer editing_tools_crop_tool_parent_class = NULL; +static gpointer editing_tools_crop_tool_constraint_description_parent_class = NULL; +static gpointer editing_tools_crop_tool_crop_tool_window_parent_class = NULL; +static gpointer editing_tools_redeye_tool_parent_class = NULL; +static gpointer editing_tools_redeye_tool_redeye_tool_window_parent_class = NULL; +static gpointer editing_tools_adjust_tool_parent_class = NULL; +static gpointer editing_tools_adjust_tool_adjust_tool_window_parent_class = NULL; +static gpointer editing_tools_adjust_tool_adjust_tool_command_parent_class = NULL; +static gpointer editing_tools_adjust_tool_adjust_reset_command_parent_class = NULL; +static gpointer editing_tools_adjust_tool_slider_adjustment_command_parent_class = NULL; +static gpointer editing_tools_adjust_tool_adjust_enhance_command_parent_class = NULL; + +void editing_tools_preconfigure (void); +void editing_tools_init (GError** error); +void editing_tools_terminate (void); +GType editing_tools_editing_tool_window_get_type (void) G_GNUC_CONST; +#define EDITING_TOOLS_EDITING_TOOL_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindowPrivate)) +enum { + EDITING_TOOLS_EDITING_TOOL_WINDOW_DUMMY_PROPERTY +}; +#define EDITING_TOOLS_EDITING_TOOL_WINDOW_FRAME_BORDER 6 +EditingToolsEditingToolWindow* editing_tools_editing_tool_window_construct (GType object_type, GtkWindow* container); +void suppress_warnings (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message); +static void _suppress_warnings_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self); +static void editing_tools_editing_tool_window_real_add (GtkContainer* base, GtkWidget* widget); +gboolean editing_tools_editing_tool_window_has_user_moved (EditingToolsEditingToolWindow* self); +static gboolean editing_tools_editing_tool_window_real_key_press_event (GtkWidget* base, GdkEventKey* event); +GType page_window_get_type (void) G_GNUC_CONST; +GType app_window_get_type (void) G_GNUC_CONST; +AppWindow* app_window_get_instance (void); +static gboolean editing_tools_editing_tool_window_real_button_press_event (GtkWidget* base, GdkEventButton* event); +static void editing_tools_editing_tool_window_real_realize (GtkWidget* base); +#define RESOURCES_TRANSIENT_WINDOW_OPACITY 0.90 +static void editing_tools_editing_tool_window_finalize (GObject* obj); +gpointer editing_tools_photo_canvas_ref (gpointer instance); +void editing_tools_photo_canvas_unref (gpointer instance); +GParamSpec* editing_tools_param_spec_photo_canvas (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void editing_tools_value_set_photo_canvas (GValue* value, gpointer v_object); +void editing_tools_value_take_photo_canvas (GValue* value, gpointer v_object); +gpointer editing_tools_value_get_photo_canvas (const GValue* value); +GType editing_tools_photo_canvas_get_type (void) G_GNUC_CONST; +GType data_object_get_type (void) G_GNUC_CONST; +GType data_source_get_type (void) G_GNUC_CONST; +GType thumbnail_source_get_type (void) G_GNUC_CONST; +GType media_source_get_type (void) G_GNUC_CONST; +GType photo_source_get_type (void) G_GNUC_CONST; +GType photo_get_type (void) G_GNUC_CONST; +GType dimensions_get_type (void) G_GNUC_CONST; +Dimensions* dimensions_dup (const Dimensions* self); +void dimensions_free (Dimensions* self); +#define EDITING_TOOLS_PHOTO_CANVAS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_TYPE_PHOTO_CANVAS, EditingToolsPhotoCanvasPrivate)) +enum { + EDITING_TOOLS_PHOTO_CANVAS_DUMMY_PROPERTY +}; +EditingToolsPhotoCanvas* editing_tools_photo_canvas_construct (GType object_type, GtkWindow* container, GdkWindow* drawing_window, Photo* photo, cairo_t* default_ctx, Dimensions* surface_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position); +static cairo_surface_t* editing_tools_photo_canvas_pixbuf_to_surface (EditingToolsPhotoCanvas* self, cairo_t* default_ctx, GdkPixbuf* pixbuf, GdkRectangle* pos); +void editing_tools_photo_canvas_unscaled_to_raw_rect (EditingToolsPhotoCanvas* self, GdkRectangle* rectangle, GdkRectangle* result); +void photo_unscaled_to_raw_rect (Photo* self, GdkRectangle* unscaled_rect, GdkRectangle* result); +void editing_tools_photo_canvas_active_to_unscaled_point (EditingToolsPhotoCanvas* self, GdkPoint* active_point, GdkPoint* result); +void editing_tools_photo_canvas_get_scaled_pixbuf_position (EditingToolsPhotoCanvas* self, GdkRectangle* result); +GType photo_exception_get_type (void) G_GNUC_CONST; +void media_source_get_dimensions (MediaSource* self, PhotoException disallowed_steps, Dimensions* result); +void editing_tools_photo_canvas_active_to_unscaled_rect (EditingToolsPhotoCanvas* self, GdkRectangle* active_rect, GdkRectangle* result); +void editing_tools_photo_canvas_user_to_active_point (EditingToolsPhotoCanvas* self, GdkPoint* user_point, GdkPoint* result); +void editing_tools_photo_canvas_user_to_active_rect (EditingToolsPhotoCanvas* self, GdkRectangle* user_rect, GdkRectangle* result); +Photo* editing_tools_photo_canvas_get_photo (EditingToolsPhotoCanvas* self); +GtkWindow* editing_tools_photo_canvas_get_container (EditingToolsPhotoCanvas* self); +GdkWindow* editing_tools_photo_canvas_get_drawing_window (EditingToolsPhotoCanvas* self); +cairo_t* editing_tools_photo_canvas_get_default_ctx (EditingToolsPhotoCanvas* self); +void editing_tools_photo_canvas_get_surface_dim (EditingToolsPhotoCanvas* self, Dimensions* result); +GType scaling_get_type (void) G_GNUC_CONST; +GType scale_constraint_get_type (void) G_GNUC_CONST; +Scaling* scaling_dup (const Scaling* self); +void scaling_free (Scaling* self); +void editing_tools_photo_canvas_get_scaling (EditingToolsPhotoCanvas* self, Scaling* result); +void scaling_for_viewport (Dimensions* viewport, gboolean scale_up, Scaling* result); +void editing_tools_photo_canvas_set_surface (EditingToolsPhotoCanvas* self, cairo_t* default_ctx, Dimensions* surface_dim); +cairo_surface_t* editing_tools_photo_canvas_get_scaled_surface (EditingToolsPhotoCanvas* self); +GdkPixbuf* editing_tools_photo_canvas_get_scaled_pixbuf (EditingToolsPhotoCanvas* self); +void editing_tools_photo_canvas_resized_pixbuf (EditingToolsPhotoCanvas* self, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position); +void editing_tools_photo_canvas_repaint (EditingToolsPhotoCanvas* self); +static void editing_tools_photo_canvas_real_repaint (EditingToolsPhotoCanvas* self); +void editing_tools_photo_canvas_paint_pixbuf (EditingToolsPhotoCanvas* self, GdkPixbuf* pixbuf); +void set_source_color_from_string (cairo_t* ctx, const gchar* spec); +GType box_get_type (void) G_GNUC_CONST; +Box* box_dup (const Box* self); +void box_free (Box* self); +void editing_tools_photo_canvas_paint_pixbuf_area (EditingToolsPhotoCanvas* self, GdkPixbuf* pixbuf, Box* source_area); +gint box_get_width (Box *self); +gint box_get_height (Box *self); +void editing_tools_photo_canvas_paint_surface (EditingToolsPhotoCanvas* self, cairo_surface_t* surface, gboolean over); +void editing_tools_photo_canvas_paint_surface_area (EditingToolsPhotoCanvas* self, cairo_surface_t* surface, Box* source_area, gboolean over); +void editing_tools_photo_canvas_draw_box (EditingToolsPhotoCanvas* self, cairo_t* ctx, Box* box); +void box_get_rectangle (Box *self, GdkRectangle* result); +void editing_tools_photo_canvas_draw_text (EditingToolsPhotoCanvas* self, cairo_t* ctx, const gchar* text, gint x, gint y, gboolean use_scaled_pos); +#define RESOURCES_ONIMAGE_FONT_BACKGROUND "rgba(255,255,255,0.5)" +#define RESOURCES_ONIMAGE_FONT_COLOR "#000000" +void editing_tools_photo_canvas_draw_horizontal_line (EditingToolsPhotoCanvas* self, cairo_t* ctx, gint x, gint y, gint width, gboolean use_scaled_pos); +void editing_tools_photo_canvas_draw_vertical_line (EditingToolsPhotoCanvas* self, cairo_t* ctx, gint x, gint y, gint height, gboolean use_scaled_pos); +void editing_tools_photo_canvas_erase_horizontal_line (EditingToolsPhotoCanvas* self, gint x, gint y, gint width); +void editing_tools_photo_canvas_draw_circle (EditingToolsPhotoCanvas* self, cairo_t* ctx, gint active_center_x, gint active_center_y, gint radius); +void editing_tools_photo_canvas_erase_vertical_line (EditingToolsPhotoCanvas* self, gint x, gint y, gint height); +void editing_tools_photo_canvas_erase_box (EditingToolsPhotoCanvas* self, Box* box); +void editing_tools_photo_canvas_invalidate_area (EditingToolsPhotoCanvas* self, Box* area); +static void g_cclosure_user_marshal_VOID__POINTER_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void g_cclosure_user_marshal_VOID__BOXED_OBJECT_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void editing_tools_photo_canvas_finalize (EditingToolsPhotoCanvas* obj); +gpointer editing_tools_editing_tool_ref (gpointer instance); +void editing_tools_editing_tool_unref (gpointer instance); +GParamSpec* editing_tools_param_spec_editing_tool (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void editing_tools_value_set_editing_tool (GValue* value, gpointer v_object); +void editing_tools_value_take_editing_tool (GValue* value, gpointer v_object); +gpointer editing_tools_value_get_editing_tool (const GValue* value); +GType editing_tools_editing_tool_get_type (void) G_GNUC_CONST; +#define EDITING_TOOLS_EDITING_TOOL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingToolPrivate)) +enum { + EDITING_TOOLS_EDITING_TOOL_DUMMY_PROPERTY +}; +EditingToolsEditingTool* editing_tools_editing_tool_construct (GType object_type, const gchar* name); +void editing_tools_editing_tool_activate (EditingToolsEditingTool* self, EditingToolsPhotoCanvas* canvas); +static void editing_tools_editing_tool_real_activate (EditingToolsEditingTool* self, EditingToolsPhotoCanvas* canvas); +EditingToolsEditingToolWindow* editing_tools_editing_tool_get_tool_window (EditingToolsEditingTool* self); +gboolean editing_tools_editing_tool_on_keypress (EditingToolsEditingTool* self, GdkEventKey* event); +static gboolean _editing_tools_editing_tool_on_keypress_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self); +void editing_tools_editing_tool_deactivate (EditingToolsEditingTool* self); +static void editing_tools_editing_tool_real_deactivate (EditingToolsEditingTool* self); +gboolean editing_tools_editing_tool_is_activated (EditingToolsEditingTool* self); +static EditingToolsEditingToolWindow* editing_tools_editing_tool_real_get_tool_window (EditingToolsEditingTool* self); +GdkPixbuf* editing_tools_editing_tool_get_display_pixbuf (EditingToolsEditingTool* self, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error); +static GdkPixbuf* editing_tools_editing_tool_real_get_display_pixbuf (EditingToolsEditingTool* self, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error); +void dimensions_init (Dimensions *self, gint width, gint height); +void editing_tools_editing_tool_on_left_click (EditingToolsEditingTool* self, gint x, gint y); +static void editing_tools_editing_tool_real_on_left_click (EditingToolsEditingTool* self, gint x, gint y); +void editing_tools_editing_tool_on_left_released (EditingToolsEditingTool* self, gint x, gint y); +static void editing_tools_editing_tool_real_on_left_released (EditingToolsEditingTool* self, gint x, gint y); +void editing_tools_editing_tool_on_motion (EditingToolsEditingTool* self, gint x, gint y, GdkModifierType mask); +static void editing_tools_editing_tool_real_on_motion (EditingToolsEditingTool* self, gint x, gint y, GdkModifierType mask); +gboolean editing_tools_editing_tool_on_leave_notify_event (EditingToolsEditingTool* self); +static gboolean editing_tools_editing_tool_real_on_leave_notify_event (EditingToolsEditingTool* self); +static gboolean editing_tools_editing_tool_real_on_keypress (EditingToolsEditingTool* self, GdkEventKey* event); +void editing_tools_editing_tool_notify_cancel (EditingToolsEditingTool* self); +void editing_tools_editing_tool_paint (EditingToolsEditingTool* self, cairo_t* ctx); +static void editing_tools_editing_tool_real_paint (EditingToolsEditingTool* self, cairo_t* ctx); +GType command_get_type (void) G_GNUC_CONST; +static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOXED_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); +static void editing_tools_editing_tool_finalize (EditingToolsEditingTool* obj); +GType editing_tools_crop_tool_get_type (void) G_GNUC_CONST; +static GType editing_tools_crop_tool_crop_tool_window_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +GType box_location_get_type (void) G_GNUC_CONST; +static gpointer editing_tools_crop_tool_constraint_description_ref (gpointer instance); +static void editing_tools_crop_tool_constraint_description_unref (gpointer instance); +static GParamSpec* editing_tools_crop_tool_param_spec_constraint_description (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED; +static void editing_tools_crop_tool_value_set_constraint_description (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static void editing_tools_crop_tool_value_take_constraint_description (GValue* value, gpointer v_object) G_GNUC_UNUSED; +static gpointer editing_tools_crop_tool_value_get_constraint_description (const GValue* value) G_GNUC_UNUSED; +static GType editing_tools_crop_tool_constraint_description_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static GType editing_tools_crop_tool_reticle_orientation_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static GType editing_tools_crop_tool_constraint_mode_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define EDITING_TOOLS_CROP_TOOL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropToolPrivate)) +enum { + EDITING_TOOLS_CROP_TOOL_DUMMY_PROPERTY +}; +static EditingToolsCropToolReticleOrientation editing_tools_crop_tool_reticle_orientation_toggle (EditingToolsCropToolReticleOrientation self); +static EditingToolsCropToolConstraintDescription** editing_tools_crop_tool_create_constraints (int* result_length1); +static GtkListStore* editing_tools_crop_tool_create_constraint_list (EditingToolsCropToolConstraintDescription** constraint_data, int constraint_data_length1); +#define EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO (-1.0f) +#define EDITING_TOOLS_CROP_TOOL_CROP_INIT_X_PCT 0.15 +#define EDITING_TOOLS_CROP_TOOL_CROP_INIT_Y_PCT 0.15 +#define EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE 8 +#define EDITING_TOOLS_CROP_TOOL_CROP_EXTERIOR_SATURATION 0.00f +#define EDITING_TOOLS_CROP_TOOL_CROP_EXTERIOR_RED_SHIFT -32 +#define EDITING_TOOLS_CROP_TOOL_CROP_EXTERIOR_GREEN_SHIFT -32 +#define EDITING_TOOLS_CROP_TOOL_CROP_EXTERIOR_BLUE_SHIFT -32 +#define EDITING_TOOLS_CROP_TOOL_CROP_EXTERIOR_ALPHA_SHIFT 0 +#define EDITING_TOOLS_CROP_TOOL_SCREEN_ASPECT_RATIO (-2.0f) +#define EDITING_TOOLS_CROP_TOOL_ORIGINAL_ASPECT_RATIO (-3.0f) +#define EDITING_TOOLS_CROP_TOOL_CUSTOM_ASPECT_RATIO (-4.0f) +#define EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS (-5.0f) +#define EDITING_TOOLS_CROP_TOOL_SEPARATOR (-6.0f) +#define EDITING_TOOLS_CROP_TOOL_MIN_ASPECT_RATIO (1.0f / 64.0f) +#define EDITING_TOOLS_CROP_TOOL_MAX_ASPECT_RATIO 64.0f +static EditingToolsCropTool* editing_tools_crop_tool_new (void); +static EditingToolsCropTool* editing_tools_crop_tool_construct (GType object_type); +EditingToolsCropTool* editing_tools_crop_tool_factory (void); +gboolean editing_tools_crop_tool_is_available (Photo* photo, Scaling* scaling); +void scaling_get_scaled_dimensions (Scaling *self, Dimensions* original, Dimensions* result); +void photo_get_original_dimensions (Photo* self, Dimensions* result); +static EditingToolsCropToolConstraintDescription* editing_tools_crop_tool_constraint_description_new (const gchar* new_name, gint new_basis_width, gint new_basis_height, gboolean new_pivotable, gfloat new_aspect_ratio); +static EditingToolsCropToolConstraintDescription* editing_tools_crop_tool_constraint_description_construct (GType object_type, const gchar* new_name, gint new_basis_width, gint new_basis_height, gboolean new_pivotable, gfloat new_aspect_ratio); +static void _vala_array_add4 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add5 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add6 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add7 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add8 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add9 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add10 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add11 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add12 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add13 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add14 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add15 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add16 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add17 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add18 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add19 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add20 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add21 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add22 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add23 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add24 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add25 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add26 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add27 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add28 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add29 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add30 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add31 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void _vala_array_add32 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value); +static void editing_tools_crop_tool_update_pivot_button_state (EditingToolsCropTool* self); +static EditingToolsCropToolConstraintDescription* editing_tools_crop_tool_get_selected_constraint (EditingToolsCropTool* self); +static gboolean editing_tools_crop_tool_on_width_entry_focus_out (EditingToolsCropTool* self, GdkEventFocus* event); +static gboolean editing_tools_crop_tool_on_custom_entry_focus_out (EditingToolsCropTool* self, GdkEventFocus* event); +static gboolean editing_tools_crop_tool_on_height_entry_focus_out (EditingToolsCropTool* self, GdkEventFocus* event); +static void editing_tools_crop_tool_constrain_crop (EditingToolsCropTool* self, Box* crop, Box* result); +static void editing_tools_crop_tool_crop_resized (EditingToolsCropTool* self, Box* new_crop); +static void editing_tools_crop_tool_on_width_insert_text (EditingToolsCropTool* self, const gchar* text, gint length, gint* position); +static void editing_tools_crop_tool_on_entry_insert_text (EditingToolsCropTool* self, GtkEntry* sender, const gchar* text, gint length, gint* position); +static void editing_tools_crop_tool_on_height_insert_text (EditingToolsCropTool* self, const gchar* text, gint length, gint* position); +static gfloat editing_tools_crop_tool_get_constraint_aspect_ratio (EditingToolsCropTool* self); +static gfloat editing_tools_crop_tool_get_constraint_aspect_ratio_for_constraint (EditingToolsCropTool* self, EditingToolsCropToolConstraintDescription* constraint, Photo* photo); +static void editing_tools_crop_tool_constraint_changed (EditingToolsCropTool* self); +static void editing_tools_crop_tool_set_custom_constraint_mode (EditingToolsCropTool* self); +static void editing_tools_crop_tool_set_normal_constraint_mode (EditingToolsCropTool* self); +GType configuration_facade_get_type (void) G_GNUC_CONST; +GType config_facade_get_type (void) G_GNUC_CONST; +ConfigFacade* config_facade_get_instance (void); +gint configuration_facade_get_last_crop_width (ConfigurationFacade* self); +gint configuration_facade_get_last_crop_height (ConfigurationFacade* self); +void box_adjust_height (Box *self, gint height); +void box_adjust_width (Box *self, gint width); +static void editing_tools_crop_tool_get_photo_dimensions (EditingToolsCropTool* self, Dimensions* result); +gboolean photo_get_straighten (Photo* self, gdouble* theta); +void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle_deg, gboolean preserve_geom, Box* result); +static EditingToolsCropToolConstraintDescription* editing_tools_crop_tool_get_last_constraint (EditingToolsCropTool* self, gint* index); +gint configuration_facade_get_last_crop_menu_choice (ConfigurationFacade* self); +static void editing_tools_crop_tool_real_activate (EditingToolsEditingTool* base, EditingToolsPhotoCanvas* canvas); +static void editing_tools_crop_tool_bind_canvas_handlers (EditingToolsCropTool* self, EditingToolsPhotoCanvas* canvas); +static void editing_tools_crop_tool_prepare_ctx (EditingToolsCropTool* self, cairo_t* ctx, Dimensions* dim); +static EditingToolsCropToolCropToolWindow* editing_tools_crop_tool_crop_tool_window_new (GtkWindow* container); +static EditingToolsCropToolCropToolWindow* editing_tools_crop_tool_crop_tool_window_construct (GType object_type, GtkWindow* container); +gboolean photo_has_crop (Photo* self); +static gboolean editing_tools_crop_tool_constraint_description_is_separator (EditingToolsCropToolConstraintDescription* self); +static void editing_tools_crop_tool_bind_window_handlers (EditingToolsCropTool* self); +gboolean photo_get_crop (Photo* self, Box* crop, PhotoException exceptions); +void box_init (Box *self, gint left, gint top, gint right, gint bottom); +void box_get_scaled_similar (Box *self, Dimensions* original, Dimensions* scaled, Box* result); +void dimensions_for_rectangle (GdkRectangle* rect, Dimensions* result); +static void _editing_tools_crop_tool_prepare_ctx_editing_tools_photo_canvas_new_surface (EditingToolsPhotoCanvas* _sender, cairo_t* ctx, Dimensions* dim, gpointer self); +static void editing_tools_crop_tool_on_resized_pixbuf (EditingToolsCropTool* self, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position); +static void _editing_tools_crop_tool_on_resized_pixbuf_editing_tools_photo_canvas_resized_scaled_pixbuf (EditingToolsPhotoCanvas* _sender, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position, gpointer self); +static void editing_tools_crop_tool_unbind_canvas_handlers (EditingToolsCropTool* self, EditingToolsPhotoCanvas* canvas); +static void editing_tools_crop_tool_on_crop_ok (EditingToolsCropTool* self); +static void _editing_tools_crop_tool_on_crop_ok_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void _editing_tools_editing_tool_notify_cancel_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void _editing_tools_crop_tool_constraint_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); +static void editing_tools_crop_tool_on_pivot_button_clicked (EditingToolsCropTool* self); +static void _editing_tools_crop_tool_on_pivot_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self); +static gboolean _editing_tools_crop_tool_on_width_entry_focus_out_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self); +static gboolean _editing_tools_crop_tool_on_height_entry_focus_out_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self); +static void _editing_tools_crop_tool_on_width_insert_text_gtk_editable_insert_text (GtkEditable* _sender, const gchar* new_text, gint new_text_length, gint* position, gpointer self); +static void _editing_tools_crop_tool_on_height_insert_text_gtk_editable_insert_text (GtkEditable* _sender, const gchar* new_text, gint new_text_length, gint* position, gpointer self); +static void editing_tools_crop_tool_unbind_window_handlers (EditingToolsCropTool* self); +static gboolean editing_tools_crop_tool_real_on_keypress (EditingToolsEditingTool* base, GdkEventKey* event); +static void editing_tools_crop_tool_real_deactivate (EditingToolsEditingTool* base); +static EditingToolsEditingToolWindow* editing_tools_crop_tool_real_get_tool_window (EditingToolsEditingTool* base); +static GdkPixbuf* editing_tools_crop_tool_real_get_display_pixbuf (EditingToolsEditingTool* base, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error); +GType backing_fetch_mode_get_type (void) G_GNUC_CONST; +GdkPixbuf* photo_get_pixbuf_with_options (Photo* self, Scaling* scaling, PhotoException exceptions, BackingFetchMode fetch_mode, GError** error); +void dimensions_for_pixbuf (GdkPixbuf* pixbuf, Dimensions* result); +static void editing_tools_crop_tool_real_on_left_click (EditingToolsEditingTool* base, gint x, gint y); +void box_get_offset (Box *self, gint xofs, gint yofs, Box* result); +BoxLocation box_approx_location (Box *self, gint x, gint y); +static void editing_tools_crop_tool_real_on_left_released (EditingToolsEditingTool* base, gint x, gint y); +static void editing_tools_crop_tool_update_cursor (EditingToolsCropTool* self, gint x, gint y); +static void editing_tools_crop_tool_real_on_motion (EditingToolsEditingTool* base, gint x, gint y, GdkModifierType mask); +static gboolean editing_tools_crop_tool_on_canvas_manipulation (EditingToolsCropTool* self, gint x, gint y); +static void editing_tools_crop_tool_real_paint (EditingToolsEditingTool* base, cairo_t* default_ctx); +static void editing_tools_crop_tool_paint_crop_tool (EditingToolsCropTool* self, Box* crop); +void configuration_facade_set_last_crop_menu_choice (ConfigurationFacade* self, gint choice); +void configuration_facade_set_last_crop_width (ConfigurationFacade* self, gint choice); +void configuration_facade_set_last_crop_height (ConfigurationFacade* self, gint choice); +#define RESOURCES_CROP_LABEL _ ("Crop") +#define RESOURCES_CROP_TOOLTIP _ ("Crop the photo's size") +CropCommand* crop_command_new (Photo* photo, Box* crop, const gchar* name, const gchar* explanation); +CropCommand* crop_command_construct (GType object_type, Photo* photo, Box* crop, const gchar* name, const gchar* explanation); +GType page_command_get_type (void) G_GNUC_CONST; +GType single_data_source_command_get_type (void) G_GNUC_CONST; +GType generic_photo_transformation_command_get_type (void) G_GNUC_CONST; +GType crop_command_get_type (void) G_GNUC_CONST; +void box_get_dimensions (Box *self, Dimensions* result); +static gint editing_tools_crop_tool_eval_radial_line (EditingToolsCropTool* self, gdouble center_x, gdouble center_y, gdouble bounds_x, gdouble bounds_y, gdouble user_x); +static gboolean _box_equal (const Box* s1, const Box* s2); +static void editing_tools_crop_tool_crop_moved (EditingToolsCropTool* self, Box* new_crop); +gboolean box_equals (Box *self, Box* box); +GType box_complements_get_type (void) G_GNUC_CONST; +BoxComplements box_resized_complements (Box *self, Box* resized, Box* horizontal, gboolean* horizontal_enlarged, Box* vertical, gboolean* vertical_enlarged); +static void editing_tools_crop_tool_set_area_alpha (EditingToolsCropTool* self, Box* area, gdouble alpha); +void box_get_reduced (Box *self, gint amount, Box* result); +enum { + EDITING_TOOLS_CROP_TOOL_CONSTRAINT_DESCRIPTION_DUMMY_PROPERTY +}; +static void editing_tools_crop_tool_constraint_description_finalize (EditingToolsCropToolConstraintDescription* obj); +enum { + EDITING_TOOLS_CROP_TOOL_CROP_TOOL_WINDOW_DUMMY_PROPERTY +}; +#define RESOURCES_CANCEL_LABEL _ ("_Cancel") +#define EDITING_TOOLS_CROP_TOOL_CROP_TOOL_WINDOW_CONTROL_SPACING 8 +static gboolean editing_tools_crop_tool_crop_tool_window_constraint_combo_separator_func (GtkTreeModel* model, GtkTreeIter* iter); +static gboolean _editing_tools_crop_tool_crop_tool_window_constraint_combo_separator_func_gtk_tree_view_row_separator_func (GtkTreeModel* model, GtkTreeIter* iter, gpointer self); +#define RESOURCES_CROP_PIVOT_RETICLE "shotwell-crop-pivot-reticle" +static void editing_tools_crop_tool_crop_tool_window_finalize (GObject* obj); +static void editing_tools_crop_tool_finalize (EditingToolsEditingTool* obj); +GType editing_tools_redeye_instance_get_type (void) G_GNUC_CONST; +EditingToolsRedeyeInstance* editing_tools_redeye_instance_dup (const EditingToolsRedeyeInstance* self); +void editing_tools_redeye_instance_free (EditingToolsRedeyeInstance* self); +#define EDITING_TOOLS_REDEYE_INSTANCE_MIN_RADIUS 4 +#define EDITING_TOOLS_REDEYE_INSTANCE_MAX_RADIUS 32 +#define EDITING_TOOLS_REDEYE_INSTANCE_DEFAULT_RADIUS 10 +static void editing_tools_redeye_instance_init (EditingToolsRedeyeInstance *self); +void editing_tools_redeye_instance_to_bounds_rect (EditingToolsRedeyeInstance* inst, GdkRectangle* result); +void editing_tools_redeye_instance_from_bounds_rect (GdkRectangle* rect, EditingToolsRedeyeInstance* result); +GType editing_tools_redeye_tool_get_type (void) G_GNUC_CONST; +static GType editing_tools_redeye_tool_redeye_tool_window_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define EDITING_TOOLS_REDEYE_TOOL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeToolPrivate)) +enum { + EDITING_TOOLS_REDEYE_TOOL_DUMMY_PROPERTY +}; +static EditingToolsRedeyeTool* editing_tools_redeye_tool_new (void); +static EditingToolsRedeyeTool* editing_tools_redeye_tool_construct (GType object_type); +EditingToolsRedeyeTool* editing_tools_redeye_tool_factory (void); +gboolean editing_tools_redeye_tool_is_available (Photo* photo, Scaling* scaling); +static void editing_tools_redeye_tool_new_interaction_instance (EditingToolsRedeyeTool* self, EditingToolsPhotoCanvas* canvas, EditingToolsRedeyeInstance* result); +static void editing_tools_redeye_tool_prepare_ctx (EditingToolsRedeyeTool* self, cairo_t* ctx, Dimensions* dim); +static void editing_tools_redeye_tool_draw_redeye_instance (EditingToolsRedeyeTool* self, EditingToolsRedeyeInstance* inst); +static gboolean editing_tools_redeye_tool_on_size_slider_adjust (EditingToolsRedeyeTool* self, GtkScrollType type); +static void editing_tools_redeye_tool_on_apply (EditingToolsRedeyeTool* self); +void derotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble angle, GdkPoint* result); +GType redeye_command_get_type (void) G_GNUC_CONST; +#define RESOURCES_RED_EYE_LABEL _ ("Red-eye") +#define RESOURCES_RED_EYE_TOOLTIP _ ("Reduce or eliminate any red-eye effects in the photo") +RedeyeCommand* redeye_command_new (Photo* photo, EditingToolsRedeyeInstance* redeye_instance, const gchar* name, const gchar* explanation); +RedeyeCommand* redeye_command_construct (GType object_type, Photo* photo, EditingToolsRedeyeInstance* redeye_instance, const gchar* name, const gchar* explanation); +gpointer command_manager_ref (gpointer instance); +void command_manager_unref (gpointer instance); +GParamSpec* param_spec_command_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_command_manager (GValue* value, gpointer v_object); +void value_take_command_manager (GValue* value, gpointer v_object); +gpointer value_get_command_manager (const GValue* value); +GType command_manager_get_type (void) G_GNUC_CONST; +CommandManager* app_window_get_command_manager (void); +void command_manager_execute (CommandManager* self, Command* command); +gpointer alteration_ref (gpointer instance); +void alteration_unref (gpointer instance); +GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_alteration (GValue* value, gpointer v_object); +void value_take_alteration (GValue* value, gpointer v_object); +gpointer value_get_alteration (const GValue* value); +GType alteration_get_type (void) G_GNUC_CONST; +static void editing_tools_redeye_tool_on_photos_altered (EditingToolsRedeyeTool* self, GeeMap* map); +GdkPixbuf* photo_source_get_pixbuf (PhotoSource* self, Scaling* scaling, GError** error); +static void editing_tools_redeye_tool_on_close (EditingToolsRedeyeTool* self); +static void editing_tools_redeye_tool_on_canvas_resize (EditingToolsRedeyeTool* self); +static void editing_tools_redeye_tool_real_activate (EditingToolsEditingTool* base, EditingToolsPhotoCanvas* canvas); +static void editing_tools_redeye_tool_bind_canvas_handlers (EditingToolsRedeyeTool* self, EditingToolsPhotoCanvas* canvas); +static EditingToolsRedeyeToolRedeyeToolWindow* editing_tools_redeye_tool_redeye_tool_window_new (GtkWindow* container); +static EditingToolsRedeyeToolRedeyeToolWindow* editing_tools_redeye_tool_redeye_tool_window_construct (GType object_type, GtkWindow* container); +static void editing_tools_redeye_tool_bind_window_handlers (EditingToolsRedeyeTool* self); +gpointer data_collection_ref (gpointer instance); +void data_collection_unref (gpointer instance); +GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_data_collection (GValue* value, gpointer v_object); +void value_take_data_collection (GValue* value, gpointer v_object); +gpointer value_get_data_collection (const GValue* value); +GType data_collection_get_type (void) G_GNUC_CONST; +DataCollection* data_object_get_membership (DataObject* self); +static void _editing_tools_redeye_tool_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self); +static void editing_tools_redeye_tool_real_deactivate (EditingToolsEditingTool* base); +static void editing_tools_redeye_tool_unbind_canvas_handlers (EditingToolsRedeyeTool* self, EditingToolsPhotoCanvas* canvas); +static void editing_tools_redeye_tool_unbind_window_handlers (EditingToolsRedeyeTool* self); +static void _editing_tools_redeye_tool_prepare_ctx_editing_tools_photo_canvas_new_surface (EditingToolsPhotoCanvas* _sender, cairo_t* ctx, Dimensions* dim, gpointer self); +static void _editing_tools_redeye_tool_on_canvas_resize_editing_tools_photo_canvas_resized_scaled_pixbuf (EditingToolsPhotoCanvas* _sender, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position, gpointer self); +static void _editing_tools_redeye_tool_on_apply_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void _editing_tools_redeye_tool_on_close_gtk_button_clicked (GtkButton* _sender, gpointer self); +static gboolean _editing_tools_redeye_tool_on_size_slider_adjust_gtk_range_change_value (GtkRange* _sender, GtkScrollType scroll, gdouble new_value, gpointer self); +static EditingToolsEditingToolWindow* editing_tools_redeye_tool_real_get_tool_window (EditingToolsEditingTool* base); +static void editing_tools_redeye_tool_real_paint (EditingToolsEditingTool* base, cairo_t* ctx); +static void editing_tools_redeye_tool_real_on_left_click (EditingToolsEditingTool* base, gint x, gint y); +gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect); +static void editing_tools_redeye_tool_real_on_left_released (EditingToolsEditingTool* base, gint x, gint y); +static void editing_tools_redeye_tool_real_on_motion (EditingToolsEditingTool* base, gint x, gint y, GdkModifierType mask); +static gboolean editing_tools_redeye_tool_real_on_keypress (EditingToolsEditingTool* base, GdkEventKey* event); +#define EDITING_TOOLS_REDEYE_TOOL_REDEYE_TOOL_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_REDEYE_TOOL_TYPE_REDEYE_TOOL_WINDOW, EditingToolsRedeyeToolRedeyeToolWindowPrivate)) +enum { + EDITING_TOOLS_REDEYE_TOOL_REDEYE_TOOL_WINDOW_DUMMY_PROPERTY +}; +#define RESOURCES_APPLY_LABEL _ ("_Apply") +#define EDITING_TOOLS_REDEYE_TOOL_REDEYE_TOOL_WINDOW_CONTROL_SPACING 8 +static void editing_tools_redeye_tool_redeye_tool_window_finalize (GObject* obj); +static void editing_tools_redeye_tool_finalize (EditingToolsEditingTool* obj); +GType editing_tools_adjust_tool_get_type (void) G_GNUC_CONST; +static GType editing_tools_adjust_tool_adjust_tool_window_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +gpointer pixel_transformer_ref (gpointer instance); +void pixel_transformer_unref (gpointer instance); +GParamSpec* param_spec_pixel_transformer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_pixel_transformer (GValue* value, gpointer v_object); +void value_take_pixel_transformer (GValue* value, gpointer v_object); +gpointer value_get_pixel_transformer (const GValue* value); +GType pixel_transformer_get_type (void) G_GNUC_CONST; +gpointer pixel_transformation_bundle_ref (gpointer instance); +void pixel_transformation_bundle_unref (gpointer instance); +GParamSpec* param_spec_pixel_transformation_bundle (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_pixel_transformation_bundle (GValue* value, gpointer v_object); +void value_take_pixel_transformation_bundle (GValue* value, gpointer v_object); +gpointer value_get_pixel_transformation_bundle (const GValue* value); +GType pixel_transformation_bundle_get_type (void) G_GNUC_CONST; +gpointer one_shot_scheduler_ref (gpointer instance); +void one_shot_scheduler_unref (gpointer instance); +GParamSpec* param_spec_one_shot_scheduler (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_one_shot_scheduler (GValue* value, gpointer v_object); +void value_take_one_shot_scheduler (GValue* value, gpointer v_object); +gpointer value_get_one_shot_scheduler (const GValue* value); +GType one_shot_scheduler_get_type (void) G_GNUC_CONST; +#define EDITING_TOOLS_ADJUST_TOOL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustToolPrivate)) +enum { + EDITING_TOOLS_ADJUST_TOOL_DUMMY_PROPERTY +}; +#define EDITING_TOOLS_ADJUST_TOOL_SLIDER_WIDTH 160 +#define EDITING_TOOLS_ADJUST_TOOL_SLIDER_DELAY_MSEC ((guint) 100) +static EditingToolsAdjustTool* editing_tools_adjust_tool_new (void); +static EditingToolsAdjustTool* editing_tools_adjust_tool_construct (GType object_type); +EditingToolsAdjustTool* editing_tools_adjust_tool_factory (void); +gboolean editing_tools_adjust_tool_is_available (Photo* photo, Scaling* scaling); +static void editing_tools_adjust_tool_real_activate (EditingToolsEditingTool* base, EditingToolsPhotoCanvas* canvas); +static EditingToolsAdjustToolAdjustToolWindow* editing_tools_adjust_tool_adjust_tool_window_new (GtkWindow* container); +static EditingToolsAdjustToolAdjustToolWindow* editing_tools_adjust_tool_adjust_tool_window_construct (GType object_type, GtkWindow* container); +PixelTransformationBundle* photo_get_color_adjustments (Photo* self); +PixelTransformer* pixel_transformation_bundle_generate_transformer (PixelTransformationBundle* self); +PixelTransformer* pixel_transformer_new (void); +PixelTransformer* pixel_transformer_construct (GType object_type); +gpointer pixel_transformation_ref (gpointer instance); +void pixel_transformation_unref (gpointer instance); +GParamSpec* param_spec_pixel_transformation (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_pixel_transformation (GValue* value, gpointer v_object); +void value_take_pixel_transformation (GValue* value, gpointer v_object); +gpointer value_get_pixel_transformation (const GValue* value); +GType pixel_transformation_get_type (void) G_GNUC_CONST; +GType hsv_transformation_get_type (void) G_GNUC_CONST; +GType expansion_transformation_get_type (void) G_GNUC_CONST; +GType pixel_transformation_type_get_type (void) G_GNUC_CONST; +PixelTransformation* pixel_transformation_bundle_get_transformation (PixelTransformationBundle* self, PixelTransformationType type); +GType rgb_histogram_manipulator_get_type (void) G_GNUC_CONST; +void rgb_histogram_manipulator_set_left_nub_position (RGBHistogramManipulator* self, gint user_nub_pos); +gint expansion_transformation_get_black_point (ExpansionTransformation* self); +void rgb_histogram_manipulator_set_right_nub_position (RGBHistogramManipulator* self, gint user_nub_pos); +gint expansion_transformation_get_white_point (ExpansionTransformation* self); +GType shadow_detail_transformation_get_type (void) G_GNUC_CONST; +void pixel_transformer_attach_transformation (PixelTransformer* self, PixelTransformation* trans); +gfloat shadow_detail_transformation_get_parameter (ShadowDetailTransformation* self); +GType highlight_detail_transformation_get_type (void) G_GNUC_CONST; +gfloat highlight_detail_transformation_get_parameter (HighlightDetailTransformation* self); +GType rgb_transformation_get_type (void) G_GNUC_CONST; +GType temperature_transformation_get_type (void) G_GNUC_CONST; +gfloat temperature_transformation_get_parameter (TemperatureTransformation* self); +GType tint_transformation_get_type (void) G_GNUC_CONST; +gfloat tint_transformation_get_parameter (TintTransformation* self); +GType saturation_transformation_get_type (void) G_GNUC_CONST; +gfloat saturation_transformation_get_parameter (SaturationTransformation* self); +GType exposure_transformation_get_type (void) G_GNUC_CONST; +gfloat exposure_transformation_get_parameter (ExposureTransformation* self); +static void editing_tools_adjust_tool_bind_canvas_handlers (EditingToolsAdjustTool* self, EditingToolsPhotoCanvas* canvas); +static void editing_tools_adjust_tool_bind_window_handlers (EditingToolsAdjustTool* self); +static void editing_tools_adjust_tool_init_fp_pixel_cache (EditingToolsAdjustTool* self, GdkPixbuf* source); +static void editing_tools_adjust_tool_on_photos_altered (EditingToolsAdjustTool* self, GeeMap* map); +static void _editing_tools_adjust_tool_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self); +static EditingToolsEditingToolWindow* editing_tools_adjust_tool_real_get_tool_window (EditingToolsEditingTool* base); +static void editing_tools_adjust_tool_real_deactivate (EditingToolsEditingTool* base); +static void editing_tools_adjust_tool_unbind_canvas_handlers (EditingToolsAdjustTool* self, EditingToolsPhotoCanvas* canvas); +static void editing_tools_adjust_tool_unbind_window_handlers (EditingToolsAdjustTool* self); +static void editing_tools_adjust_tool_real_paint (EditingToolsEditingTool* base, cairo_t* ctx); +void pixel_transformer_transform_from_fp (PixelTransformer* self, gfloat** fp_pixel_cache, int* fp_pixel_cache_length1, GdkPixbuf* dest); +void pixel_transformer_transform_to_other_pixbuf (PixelTransformer* self, GdkPixbuf* source, GdkPixbuf* dest, GCancellable* cancellable); +void rgb_histogram_manipulator_update_histogram (RGBHistogramManipulator* self, GdkPixbuf* source_pixbuf); +static GdkPixbuf* editing_tools_adjust_tool_real_get_display_pixbuf (EditingToolsEditingTool* base, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error); +gboolean photo_has_color_adjustments (Photo* self); +static void editing_tools_adjust_tool_on_reset (EditingToolsAdjustTool* self); +static GType editing_tools_adjust_tool_adjust_tool_command_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static GType editing_tools_adjust_tool_adjust_reset_command_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static EditingToolsAdjustToolAdjustResetCommand* editing_tools_adjust_tool_adjust_reset_command_new (EditingToolsAdjustTool* owner, PixelTransformationBundle* current); +static EditingToolsAdjustToolAdjustResetCommand* editing_tools_adjust_tool_adjust_reset_command_construct (GType object_type, EditingToolsAdjustTool* owner, PixelTransformationBundle* current); +static void editing_tools_adjust_tool_on_ok (EditingToolsAdjustTool* self); +#define RESOURCES_ADJUST_LABEL _ ("Adjust") +#define RESOURCES_ADJUST_TOOLTIP _ ("Adjust the photo's color and tone") +AdjustColorsSingleCommand* adjust_colors_single_command_new (Photo* photo, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation); +AdjustColorsSingleCommand* adjust_colors_single_command_construct (GType object_type, Photo* photo, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation); +GType adjust_colors_single_command_get_type (void) G_GNUC_CONST; +static void editing_tools_adjust_tool_update_transformations (EditingToolsAdjustTool* self, PixelTransformationBundle* new_transformations); +GeeIterable* pixel_transformation_bundle_get_transformations (PixelTransformationBundle* self); +static void editing_tools_adjust_tool_update_transformation (EditingToolsAdjustTool* self, PixelTransformation* new_transformation); +PixelTransformationType pixel_transformation_get_transformation_type (PixelTransformation* self); +void pixel_transformer_replace_transformation (PixelTransformer* self, PixelTransformation* old_trans, PixelTransformation* new_trans); +void pixel_transformation_bundle_set (PixelTransformationBundle* self, PixelTransformation* transformation); +static void editing_tools_adjust_tool_slider_updated (EditingToolsAdjustTool* self, PixelTransformation* new_transformation, const gchar* name); +static GType editing_tools_adjust_tool_slider_adjustment_command_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static EditingToolsAdjustToolSliderAdjustmentCommand* editing_tools_adjust_tool_slider_adjustment_command_new (EditingToolsAdjustTool* owner, PixelTransformation* old_transformation, PixelTransformation* new_transformation, const gchar* name); +static EditingToolsAdjustToolSliderAdjustmentCommand* editing_tools_adjust_tool_slider_adjustment_command_construct (GType object_type, EditingToolsAdjustTool* owner, PixelTransformation* old_transformation, PixelTransformation* new_transformation, const gchar* name); +static void editing_tools_adjust_tool_on_temperature_adjustment (EditingToolsAdjustTool* self); +static void editing_tools_adjust_tool_on_delayed_temperature_adjustment (EditingToolsAdjustTool* self); +static void _editing_tools_adjust_tool_on_delayed_temperature_adjustment_one_shot_callback (gpointer self); +OneShotScheduler* one_shot_scheduler_new (const gchar* name, OneShotCallback callback, void* callback_target); +OneShotScheduler* one_shot_scheduler_construct (GType object_type, const gchar* name, OneShotCallback callback, void* callback_target); +void one_shot_scheduler_after_timeout (OneShotScheduler* self, guint msec, gboolean reschedule); +TemperatureTransformation* temperature_transformation_new (gfloat client_parameter); +TemperatureTransformation* temperature_transformation_construct (GType object_type, gfloat client_parameter); +static void editing_tools_adjust_tool_on_tint_adjustment (EditingToolsAdjustTool* self); +static void editing_tools_adjust_tool_on_delayed_tint_adjustment (EditingToolsAdjustTool* self); +static void _editing_tools_adjust_tool_on_delayed_tint_adjustment_one_shot_callback (gpointer self); +TintTransformation* tint_transformation_new (gfloat client_param); +TintTransformation* tint_transformation_construct (GType object_type, gfloat client_param); +static void editing_tools_adjust_tool_on_saturation_adjustment (EditingToolsAdjustTool* self); +static void editing_tools_adjust_tool_on_delayed_saturation_adjustment (EditingToolsAdjustTool* self); +static void _editing_tools_adjust_tool_on_delayed_saturation_adjustment_one_shot_callback (gpointer self); +SaturationTransformation* saturation_transformation_new (gfloat client_parameter); +SaturationTransformation* saturation_transformation_construct (GType object_type, gfloat client_parameter); +static void editing_tools_adjust_tool_on_exposure_adjustment (EditingToolsAdjustTool* self); +static void editing_tools_adjust_tool_on_delayed_exposure_adjustment (EditingToolsAdjustTool* self); +static void _editing_tools_adjust_tool_on_delayed_exposure_adjustment_one_shot_callback (gpointer self); +ExposureTransformation* exposure_transformation_new (gfloat client_parameter); +ExposureTransformation* exposure_transformation_construct (GType object_type, gfloat client_parameter); +static void editing_tools_adjust_tool_on_shadows_adjustment (EditingToolsAdjustTool* self); +static void editing_tools_adjust_tool_on_delayed_shadows_adjustment (EditingToolsAdjustTool* self); +static void _editing_tools_adjust_tool_on_delayed_shadows_adjustment_one_shot_callback (gpointer self); +ShadowDetailTransformation* shadow_detail_transformation_new (gfloat user_intensity); +ShadowDetailTransformation* shadow_detail_transformation_construct (GType object_type, gfloat user_intensity); +static void editing_tools_adjust_tool_on_highlights_adjustment (EditingToolsAdjustTool* self); +static void editing_tools_adjust_tool_on_delayed_highlights_adjustment (EditingToolsAdjustTool* self); +static void _editing_tools_adjust_tool_on_delayed_highlights_adjustment_one_shot_callback (gpointer self); +HighlightDetailTransformation* highlight_detail_transformation_new (gfloat user_intensity); +HighlightDetailTransformation* highlight_detail_transformation_construct (GType object_type, gfloat user_intensity); +static void editing_tools_adjust_tool_on_histogram_constraint (EditingToolsAdjustTool* self); +gint rgb_histogram_manipulator_get_left_nub_position (RGBHistogramManipulator* self); +gint rgb_histogram_manipulator_get_right_nub_position (RGBHistogramManipulator* self); +ExpansionTransformation* expansion_transformation_new_from_extrema (gint black_point, gint white_point); +ExpansionTransformation* expansion_transformation_construct_from_extrema (GType object_type, gint black_point, gint white_point); +static void editing_tools_adjust_tool_on_canvas_resize (EditingToolsAdjustTool* self); +static gboolean editing_tools_adjust_tool_on_hscale_reset (EditingToolsAdjustTool* self, GtkWidget* widget, GdkEventButton* event); +gboolean has_only_key_modifier (GdkModifierType field, GdkModifierType mask); +static void _editing_tools_adjust_tool_on_canvas_resize_editing_tools_photo_canvas_resized_scaled_pixbuf (EditingToolsPhotoCanvas* _sender, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position, gpointer self); +static void _editing_tools_adjust_tool_on_ok_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void _editing_tools_adjust_tool_on_reset_gtk_button_clicked (GtkButton* _sender, gpointer self); +static void _editing_tools_adjust_tool_on_exposure_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self); +static void _editing_tools_adjust_tool_on_saturation_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self); +static void _editing_tools_adjust_tool_on_tint_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self); +static void _editing_tools_adjust_tool_on_temperature_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self); +static void _editing_tools_adjust_tool_on_shadows_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self); +static void _editing_tools_adjust_tool_on_highlights_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self); +static void _editing_tools_adjust_tool_on_histogram_constraint_rgb_histogram_manipulator_nub_position_changed (RGBHistogramManipulator* _sender, gpointer self); +static gboolean _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self); +gboolean editing_tools_adjust_tool_enhance (EditingToolsAdjustTool* self); +static GType editing_tools_adjust_tool_adjust_enhance_command_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +static EditingToolsAdjustToolAdjustEnhanceCommand* editing_tools_adjust_tool_adjust_enhance_command_new (EditingToolsAdjustTool* owner, Photo* photo); +static EditingToolsAdjustToolAdjustEnhanceCommand* editing_tools_adjust_tool_adjust_enhance_command_construct (GType object_type, EditingToolsAdjustTool* owner, Photo* photo); +static void editing_tools_adjust_tool_set_adjustments (EditingToolsAdjustTool* self, PixelTransformationBundle* new_adjustments); +static void editing_tools_adjust_tool_update_slider (EditingToolsAdjustTool* self, PixelTransformation* transformation); +static gboolean editing_tools_adjust_tool_real_on_keypress (EditingToolsEditingTool* base, GdkEventKey* event); +enum { + EDITING_TOOLS_ADJUST_TOOL_ADJUST_TOOL_WINDOW_DUMMY_PROPERTY +}; +#define EXPOSURE_TRANSFORMATION_MIN_PARAMETER (-16.0f) +#define EXPOSURE_TRANSFORMATION_MAX_PARAMETER 16.0f +#define SATURATION_TRANSFORMATION_MIN_PARAMETER (-16.0f) +#define SATURATION_TRANSFORMATION_MAX_PARAMETER 16.0f +#define TINT_TRANSFORMATION_MIN_PARAMETER (-16.0f) +#define TINT_TRANSFORMATION_MAX_PARAMETER 16.0f +#define TEMPERATURE_TRANSFORMATION_MIN_PARAMETER (-16.0f) +#define TEMPERATURE_TRANSFORMATION_MAX_PARAMETER 16.0f +#define SHADOW_DETAIL_TRANSFORMATION_MIN_PARAMETER 0.0f +#define SHADOW_DETAIL_TRANSFORMATION_MAX_PARAMETER 32.0f +#define HIGHLIGHT_DETAIL_TRANSFORMATION_MIN_PARAMETER (-32.0f) +#define HIGHLIGHT_DETAIL_TRANSFORMATION_MAX_PARAMETER 0.0f +#define RESOURCES_OK_LABEL _ ("_OK") +RGBHistogramManipulator* rgb_histogram_manipulator_new (void); +RGBHistogramManipulator* rgb_histogram_manipulator_construct (GType object_type); +static void editing_tools_adjust_tool_adjust_tool_window_finalize (GObject* obj); +GType command_description_get_type (void) G_GNUC_CONST; +enum { + EDITING_TOOLS_ADJUST_TOOL_ADJUST_TOOL_COMMAND_DUMMY_PROPERTY +}; +static void editing_tools_adjust_tool_adjust_tool_command_on_owner_deactivated (EditingToolsAdjustToolAdjustToolCommand* self); +static void _editing_tools_adjust_tool_adjust_tool_command_on_owner_deactivated_editing_tools_editing_tool_deactivated (EditingToolsEditingTool* _sender, gpointer self); +static EditingToolsAdjustToolAdjustToolCommand* editing_tools_adjust_tool_adjust_tool_command_construct (GType object_type, EditingToolsAdjustTool* owner, const gchar* name, const gchar* explanation); +Command* command_construct (GType object_type, const gchar* name, const gchar* explanation); +void command_manager_reset (CommandManager* self); +static void editing_tools_adjust_tool_adjust_tool_command_finalize (GObject* obj); +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_RESET_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND, EditingToolsAdjustToolAdjustResetCommandPrivate)) +enum { + EDITING_TOOLS_ADJUST_TOOL_ADJUST_RESET_COMMAND_DUMMY_PROPERTY +}; +PixelTransformationBundle* pixel_transformation_bundle_copy (PixelTransformationBundle* self); +PixelTransformationBundle* pixel_transformation_bundle_new (void); +PixelTransformationBundle* pixel_transformation_bundle_construct (GType object_type); +void pixel_transformation_bundle_set_to_identity (PixelTransformationBundle* self); +static void editing_tools_adjust_tool_adjust_reset_command_real_execute (Command* base); +static void editing_tools_adjust_tool_adjust_reset_command_real_undo (Command* base); +static gboolean editing_tools_adjust_tool_adjust_reset_command_real_compress (Command* base, Command* command); +static void editing_tools_adjust_tool_adjust_reset_command_finalize (GObject* obj); +#define EDITING_TOOLS_ADJUST_TOOL_SLIDER_ADJUSTMENT_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, EditingToolsAdjustToolSliderAdjustmentCommandPrivate)) +enum { + EDITING_TOOLS_ADJUST_TOOL_SLIDER_ADJUSTMENT_COMMAND_DUMMY_PROPERTY +}; +static void editing_tools_adjust_tool_slider_adjustment_command_real_execute (Command* base); +static void editing_tools_adjust_tool_slider_adjustment_command_real_undo (Command* base); +static void editing_tools_adjust_tool_slider_adjustment_command_real_redo (Command* base); +static gboolean editing_tools_adjust_tool_slider_adjustment_command_real_compress (Command* base, Command* command); +void command_execute (Command* self); +static void editing_tools_adjust_tool_slider_adjustment_command_finalize (GObject* obj); +#define EDITING_TOOLS_ADJUST_TOOL_ADJUST_ENHANCE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND, EditingToolsAdjustToolAdjustEnhanceCommandPrivate)) +enum { + EDITING_TOOLS_ADJUST_TOOL_ADJUST_ENHANCE_COMMAND_DUMMY_PROPERTY +}; +#define RESOURCES_ENHANCE_LABEL _ ("Enhance") +#define RESOURCES_ENHANCE_TOOLTIP _ ("Automatically improve the photo's appearance") +static void editing_tools_adjust_tool_adjust_enhance_command_real_execute (Command* base); +PixelTransformationBundle* photo_get_enhance_transformations (Photo* self); +static void editing_tools_adjust_tool_adjust_enhance_command_real_undo (Command* base); +static gboolean editing_tools_adjust_tool_adjust_enhance_command_real_compress (Command* base, Command* command); +GType enhance_single_command_get_type (void) G_GNUC_CONST; +DataSource* single_data_source_command_get_source (SingleDataSourceCommand* self); +gboolean data_source_equals (DataSource* self, DataSource* source); +static void editing_tools_adjust_tool_adjust_enhance_command_finalize (GObject* obj); +static void editing_tools_adjust_tool_finalize (EditingToolsEditingTool* obj); +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); + + +void editing_tools_preconfigure (void) { +} + + +void editing_tools_init (GError** error) { +} + + +void editing_tools_terminate (void) { +} + + +static void _suppress_warnings_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) { +#line 59 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + suppress_warnings (log_domain, log_levels, message); +#line 1664 "EditingTools.c" +} + + +EditingToolsEditingToolWindow* editing_tools_editing_tool_window_construct (GType object_type, GtkWindow* container) { + EditingToolsEditingToolWindow * self = NULL; + GtkWindow* _tmp0_ = NULL; + GtkFrame* outer_frame = NULL; + GtkFrame* _tmp1_ = NULL; + GtkFrame* _tmp2_ = NULL; + GtkFrame* _tmp3_ = NULL; + GtkFrame* _tmp4_ = NULL; +#line 34 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GTK_IS_WINDOW (container), NULL); +#line 34 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsEditingToolWindow*) g_object_new (object_type, NULL); +#line 36 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_set_type_hint (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GDK_WINDOW_TYPE_HINT_UTILITY); +#line 38 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_set_decorated (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE); +#line 39 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = container; +#line 39 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_set_transient_for (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _tmp0_); +#line 41 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = (GtkFrame*) gtk_frame_new (NULL); +#line 41 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp1_); +#line 41 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + outer_frame = _tmp1_; +#line 42 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_set_border_width (G_TYPE_CHECK_INSTANCE_CAST (outer_frame, gtk_container_get_type (), GtkContainer), (guint) 0); +#line 43 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_frame_set_shadow_type (outer_frame, GTK_SHADOW_OUT); +#line 45 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->layout_frame; +#line 45 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_set_border_width (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_container_get_type (), GtkContainer), (guint) EDITING_TOOLS_EDITING_TOOL_WINDOW_FRAME_BORDER); +#line 46 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->layout_frame; +#line 46 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_frame_set_shadow_type (_tmp3_, GTK_SHADOW_NONE); +#line 48 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->layout_frame; +#line 48 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (outer_frame, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget)); +#line 49 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + GTK_CONTAINER_CLASS (editing_tools_editing_tool_window_parent_class)->add (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (outer_frame, gtk_widget_get_type (), GtkWidget)); +#line 51 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_add_events (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), (gint) (GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK)); +#line 52 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_set_focus_on_map (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), TRUE); +#line 53 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_set_accept_focus (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), TRUE); +#line 54 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_can_focus (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), TRUE); +#line 55 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_set_has_resize_grip (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE); +#line 59 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_log_set_handler ("Gdk", G_LOG_LEVEL_WARNING, _suppress_warnings_glog_func, NULL); +#line 34 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (outer_frame); +#line 34 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 1728 "EditingTools.c" +} + + +static void editing_tools_editing_tool_window_real_add (GtkContainer* base, GtkWidget* widget) { + EditingToolsEditingToolWindow * self; + GtkFrame* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; +#line 66 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow); +#line 66 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (GTK_IS_WIDGET (widget)); +#line 67 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->layout_frame; +#line 67 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = widget; +#line 67 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_container_get_type (), GtkContainer), _tmp1_); +#line 1746 "EditingTools.c" +} + + +gboolean editing_tools_editing_tool_window_has_user_moved (EditingToolsEditingToolWindow* self) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 70 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_EDITING_TOOL_WINDOW (self), FALSE); +#line 71 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->user_moved; +#line 71 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp0_; +#line 71 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 1761 "EditingTools.c" +} + + +static gboolean editing_tools_editing_tool_window_real_key_press_event (GtkWidget* base, GdkEventKey* event) { + EditingToolsEditingToolWindow * self; + gboolean result = FALSE; + GdkEventKey* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + AppWindow* _tmp2_ = NULL; + AppWindow* _tmp3_ = NULL; + GdkEventKey* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + gboolean _tmp6_ = FALSE; +#line 74 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow); +#line 74 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 75 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = event; +#line 75 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = GTK_WIDGET_CLASS (editing_tools_editing_tool_window_parent_class)->key_press_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), gtk_widget_get_type (), GtkWidget), _tmp0_); +#line 75 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_) { +#line 76 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 76 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 1789 "EditingTools.c" + } +#line 78 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = app_window_get_instance (); +#line 78 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 78 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = event; +#line 78 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), "key-press-event", _tmp4_, &_tmp5_); +#line 78 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_; +#line 78 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp3_); +#line 78 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp6_; +#line 78 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 1807 "EditingTools.c" +} + + +static gboolean editing_tools_editing_tool_window_real_button_press_event (GtkWidget* base, GdkEventButton* event) { + EditingToolsEditingToolWindow * self; + gboolean result = FALSE; + GdkEventButton* _tmp0_ = NULL; + guint _tmp1_ = 0U; + GdkEventButton* _tmp5_ = NULL; + guint _tmp6_ = 0U; + GdkEventButton* _tmp7_ = NULL; + gdouble _tmp8_ = 0.0; + GdkEventButton* _tmp9_ = NULL; + gdouble _tmp10_ = 0.0; + GdkEventButton* _tmp11_ = NULL; + guint32 _tmp12_ = 0U; +#line 81 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow); +#line 81 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 83 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = event; +#line 83 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->button; +#line 83 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_ != ((guint) 1)) { +#line 1834 "EditingTools.c" + gboolean _tmp2_ = FALSE; +#line 84 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (GTK_WIDGET_CLASS (editing_tools_editing_tool_window_parent_class)->button_press_event != NULL) { +#line 1838 "EditingTools.c" + GdkEventButton* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#line 84 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = event; +#line 84 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = GTK_WIDGET_CLASS (editing_tools_editing_tool_window_parent_class)->button_press_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), gtk_widget_get_type (), GtkWidget), _tmp3_); +#line 84 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp4_; +#line 1847 "EditingTools.c" + } else { +#line 84 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = TRUE; +#line 1851 "EditingTools.c" + } +#line 84 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp2_; +#line 84 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 1857 "EditingTools.c" + } +#line 86 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = event; +#line 86 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_->button; +#line 86 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = event; +#line 86 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_->x_root; +#line 86 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = event; +#line 86 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_->y_root; +#line 86 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = event; +#line 86 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_->time; +#line 86 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_begin_move_drag (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), (gint) _tmp6_, (gint) _tmp8_, (gint) _tmp10_, _tmp12_); +#line 87 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_moved = TRUE; +#line 89 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 89 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 1883 "EditingTools.c" +} + + +static void editing_tools_editing_tool_window_real_realize (GtkWidget* base) { + EditingToolsEditingToolWindow * self; +#line 92 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow); +#line 93 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_set_opacity (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), RESOURCES_TRANSIENT_WINDOW_OPACITY); +#line 95 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + GTK_WIDGET_CLASS (editing_tools_editing_tool_window_parent_class)->realize (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), gtk_widget_get_type (), GtkWidget)); +#line 1895 "EditingTools.c" +} + + +static void editing_tools_editing_tool_window_class_init (EditingToolsEditingToolWindowClass * klass) { +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_editing_tool_window_parent_class = g_type_class_peek_parent (klass); +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsEditingToolWindowPrivate)); +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((GtkContainerClass *) klass)->add = editing_tools_editing_tool_window_real_add; +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((GtkWidgetClass *) klass)->key_press_event = editing_tools_editing_tool_window_real_key_press_event; +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((GtkWidgetClass *) klass)->button_press_event = editing_tools_editing_tool_window_real_button_press_event; +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((GtkWidgetClass *) klass)->realize = editing_tools_editing_tool_window_real_realize; +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (klass)->finalize = editing_tools_editing_tool_window_finalize; +#line 1914 "EditingTools.c" +} + + +static void editing_tools_editing_tool_window_instance_init (EditingToolsEditingToolWindow * self) { + GtkFrame* _tmp0_ = NULL; +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_EDITING_TOOL_WINDOW_GET_PRIVATE (self); +#line 31 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = (GtkFrame*) gtk_frame_new (NULL); +#line 31 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp0_); +#line 31 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->layout_frame = _tmp0_; +#line 32 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_moved = FALSE; +#line 1930 "EditingTools.c" +} + + +static void editing_tools_editing_tool_window_finalize (GObject* obj) { + EditingToolsEditingToolWindow * self; + GLogFunc _tmp0_ = NULL; + void* _tmp0__target = NULL; +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow); +#line 63 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = g_log_default_handler; +#line 63 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0__target = NULL; +#line 63 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_log_set_handler ("Gdk", G_LOG_LEVEL_WARNING, _tmp0_, _tmp0__target); +#line 31 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->layout_frame); +#line 28 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (editing_tools_editing_tool_window_parent_class)->finalize (obj); +#line 1950 "EditingTools.c" +} + + +GType editing_tools_editing_tool_window_get_type (void) { + static volatile gsize editing_tools_editing_tool_window_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_editing_tool_window_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsEditingToolWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_editing_tool_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsEditingToolWindow), 0, (GInstanceInitFunc) editing_tools_editing_tool_window_instance_init, NULL }; + GType editing_tools_editing_tool_window_type_id; + editing_tools_editing_tool_window_type_id = g_type_register_static (gtk_window_get_type (), "EditingToolsEditingToolWindow", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&editing_tools_editing_tool_window_type_id__volatile, editing_tools_editing_tool_window_type_id); + } + return editing_tools_editing_tool_window_type_id__volatile; +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 114 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self ? g_object_ref (self) : NULL; +#line 1969 "EditingTools.c" +} + + +static gpointer _cairo_reference0 (gpointer self) { +#line 117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self ? cairo_reference (self) : NULL; +#line 1976 "EditingTools.c" +} + + +EditingToolsPhotoCanvas* editing_tools_photo_canvas_construct (GType object_type, GtkWindow* container, GdkWindow* drawing_window, Photo* photo, cairo_t* default_ctx, Dimensions* surface_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position) { + EditingToolsPhotoCanvas* self = NULL; + GtkWindow* _tmp0_ = NULL; + GtkWindow* _tmp1_ = NULL; + GdkWindow* _tmp2_ = NULL; + GdkWindow* _tmp3_ = NULL; + Photo* _tmp4_ = NULL; + Photo* _tmp5_ = NULL; + cairo_t* _tmp6_ = NULL; + cairo_t* _tmp7_ = NULL; + Dimensions _tmp8_ = {0}; + GdkRectangle _tmp9_ = {0}; + GdkPixbuf* _tmp10_ = NULL; + GdkPixbuf* _tmp11_ = NULL; + cairo_t* _tmp12_ = NULL; + GdkPixbuf* _tmp13_ = NULL; + GdkRectangle _tmp14_ = {0}; + cairo_surface_t* _tmp15_ = NULL; +#line 112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GTK_IS_WINDOW (container), NULL); +#line 112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GDK_IS_WINDOW (drawing_window), NULL); +#line 112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PHOTO (photo), NULL); +#line 112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (default_ctx != NULL, NULL); +#line 112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (surface_dim != NULL, NULL); +#line 112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GDK_IS_PIXBUF (scaled), NULL); +#line 112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (scaled_position != NULL, NULL); +#line 112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsPhotoCanvas*) g_type_create_instance (object_type); +#line 114 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = container; +#line 114 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 114 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->container); +#line 114 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->container = _tmp1_; +#line 115 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = drawing_window; +#line 115 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 115 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->drawing_window); +#line 115 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->drawing_window = _tmp3_; +#line 116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = photo; +#line 116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _g_object_ref0 (_tmp4_); +#line 116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->photo); +#line 116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->photo = _tmp5_; +#line 117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = default_ctx; +#line 117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _cairo_reference0 (_tmp6_); +#line 117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->default_ctx); +#line 117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->default_ctx = _tmp7_; +#line 118 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = *surface_dim; +#line 118 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->surface_dim = _tmp8_; +#line 119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = *scaled_position; +#line 119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_position = _tmp9_; +#line 120 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = scaled; +#line 120 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _g_object_ref0 (_tmp10_); +#line 120 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->scaled_pixbuf); +#line 120 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_pixbuf = _tmp11_; +#line 121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = default_ctx; +#line 121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = scaled; +#line 121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = *scaled_position; +#line 121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = editing_tools_photo_canvas_pixbuf_to_surface (self, _tmp12_, _tmp13_, &_tmp14_); +#line 121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->priv->scaled); +#line 121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled = _tmp15_; +#line 112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 2076 "EditingTools.c" +} + + +void editing_tools_photo_canvas_unscaled_to_raw_rect (EditingToolsPhotoCanvas* self, GdkRectangle* rectangle, GdkRectangle* result) { + Photo* _tmp0_ = NULL; + GdkRectangle _tmp1_ = {0}; + GdkRectangle _tmp2_ = {0}; +#line 129 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 129 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (rectangle != NULL); +#line 130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->photo; +#line 130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = *rectangle; +#line 130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_unscaled_to_raw_rect (_tmp0_, &_tmp1_, &_tmp2_); +#line 130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _tmp2_; +#line 130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 2098 "EditingTools.c" +} + + +void editing_tools_photo_canvas_active_to_unscaled_point (EditingToolsPhotoCanvas* self, GdkPoint* active_point, GdkPoint* result) { + GdkRectangle scaled_position = {0}; + GdkRectangle _tmp0_ = {0}; + Dimensions unscaled_dims = {0}; + Photo* _tmp1_ = NULL; + Dimensions _tmp2_ = {0}; + gdouble scale_factor_x = 0.0; + Dimensions _tmp3_ = {0}; + gint _tmp4_ = 0; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; + gdouble scale_factor_y = 0.0; + Dimensions _tmp7_ = {0}; + gint _tmp8_ = 0; + GdkRectangle _tmp9_ = {0}; + gint _tmp10_ = 0; + GdkPoint _result_ = {0}; + GdkPoint _tmp11_ = {0}; + GdkPoint _tmp12_ = {0}; + gint _tmp13_ = 0; + GdkPoint _tmp14_ = {0}; + gint _tmp15_ = 0; +#line 133 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 133 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (active_point != NULL); +#line 134 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (self, &_tmp0_); +#line 134 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scaled_position = _tmp0_; +#line 135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->photo; +#line 135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp2_); +#line 135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + unscaled_dims = _tmp2_; +#line 137 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = unscaled_dims; +#line 137 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.width; +#line 137 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = scaled_position; +#line 137 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.width; +#line 137 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scale_factor_x = ((gdouble) _tmp4_) / ((gdouble) _tmp6_); +#line 139 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = unscaled_dims; +#line 139 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.height; +#line 139 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = scaled_position; +#line 139 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.height; +#line 139 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scale_factor_y = ((gdouble) _tmp8_) / ((gdouble) _tmp10_); +#line 142 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_.x = 0; +#line 142 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = _tmp11_; +#line 143 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = *active_point; +#line 143 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.x; +#line 143 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.x = (gint) ((((gdouble) _tmp13_) * scale_factor_x) + 0.5); +#line 144 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = *active_point; +#line 144 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = _tmp14_.y; +#line 144 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.y = (gint) ((((gdouble) _tmp15_) * scale_factor_y) + 0.5); +#line 146 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _result_; +#line 146 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 2178 "EditingTools.c" +} + + +void editing_tools_photo_canvas_active_to_unscaled_rect (EditingToolsPhotoCanvas* self, GdkRectangle* active_rect, GdkRectangle* result) { + GdkPoint upper_left = {0}; + GdkPoint _tmp0_ = {0}; + GdkPoint lower_right = {0}; + GdkPoint _tmp1_ = {0}; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + GdkRectangle _tmp4_ = {0}; + gint _tmp5_ = 0; + GdkPoint _tmp6_ = {0}; + gint _tmp7_ = 0; + GdkRectangle _tmp8_ = {0}; + gint _tmp9_ = 0; + GdkPoint _tmp10_ = {0}; + gint _tmp11_ = 0; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + GdkPoint _tmp14_ = {0}; + GdkPoint _tmp15_ = {0}; + GdkPoint _tmp16_ = {0}; + GdkPoint _tmp17_ = {0}; + GdkRectangle unscaled_rect = {0}; + GdkPoint _tmp18_ = {0}; + gint _tmp19_ = 0; + GdkPoint _tmp20_ = {0}; + gint _tmp21_ = 0; + GdkPoint _tmp22_ = {0}; + gint _tmp23_ = 0; + GdkPoint _tmp24_ = {0}; + gint _tmp25_ = 0; + GdkPoint _tmp26_ = {0}; + gint _tmp27_ = 0; + GdkPoint _tmp28_ = {0}; + gint _tmp29_ = 0; +#line 149 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 149 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (active_rect != NULL); +#line 150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_.x = 0; +#line 150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + upper_left = _tmp0_; +#line 151 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_.x = 0; +#line 151 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + lower_right = _tmp1_; +#line 152 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = *active_rect; +#line 152 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 152 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + upper_left.x = _tmp3_; +#line 153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = *active_rect; +#line 153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.y; +#line 153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + upper_left.y = _tmp5_; +#line 154 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = upper_left; +#line 154 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.x; +#line 154 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = *active_rect; +#line 154 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.width; +#line 154 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + lower_right.x = _tmp7_ + _tmp9_; +#line 155 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = upper_left; +#line 155 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_.y; +#line 155 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = *active_rect; +#line 155 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.height; +#line 155 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + lower_right.y = _tmp11_ + _tmp13_; +#line 157 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = upper_left; +#line 157 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_active_to_unscaled_point (self, &_tmp14_, &_tmp15_); +#line 157 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + upper_left = _tmp15_; +#line 158 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = lower_right; +#line 158 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_active_to_unscaled_point (self, &_tmp16_, &_tmp17_); +#line 158 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + lower_right = _tmp17_; +#line 160 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + memset (&unscaled_rect, 0, sizeof (GdkRectangle)); +#line 161 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = upper_left; +#line 161 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_.x; +#line 161 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + unscaled_rect.x = _tmp19_; +#line 162 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = upper_left; +#line 162 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = _tmp20_.y; +#line 162 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + unscaled_rect.y = _tmp21_; +#line 163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = lower_right; +#line 163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _tmp22_.x; +#line 163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = upper_left; +#line 163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _tmp24_.x; +#line 163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + unscaled_rect.width = _tmp23_ - _tmp25_; +#line 164 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = lower_right; +#line 164 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = _tmp26_.y; +#line 164 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = upper_left; +#line 164 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = _tmp28_.y; +#line 164 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + unscaled_rect.height = _tmp27_ - _tmp29_; +#line 166 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = unscaled_rect; +#line 166 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 2310 "EditingTools.c" +} + + +void editing_tools_photo_canvas_user_to_active_point (EditingToolsPhotoCanvas* self, GdkPoint* user_point, GdkPoint* result) { + GdkRectangle active_offsets = {0}; + GdkRectangle _tmp0_ = {0}; + GdkPoint _result_ = {0}; + GdkPoint _tmp1_ = {0}; + GdkPoint _tmp2_ = {0}; + gint _tmp3_ = 0; + GdkRectangle _tmp4_ = {0}; + gint _tmp5_ = 0; + GdkPoint _tmp6_ = {0}; + gint _tmp7_ = 0; + GdkRectangle _tmp8_ = {0}; + gint _tmp9_ = 0; +#line 169 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 169 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (user_point != NULL); +#line 170 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (self, &_tmp0_); +#line 170 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + active_offsets = _tmp0_; +#line 172 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_.x = 0; +#line 172 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = _tmp1_; +#line 173 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = *user_point; +#line 173 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 173 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = active_offsets; +#line 173 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.x; +#line 173 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.x = _tmp3_ - _tmp5_; +#line 174 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = *user_point; +#line 174 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.y; +#line 174 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = active_offsets; +#line 174 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.y; +#line 174 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.y = _tmp7_ - _tmp9_; +#line 176 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _result_; +#line 176 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 2363 "EditingTools.c" +} + + +void editing_tools_photo_canvas_user_to_active_rect (EditingToolsPhotoCanvas* self, GdkRectangle* user_rect, GdkRectangle* result) { + GdkPoint upper_left = {0}; + GdkPoint _tmp0_ = {0}; + GdkPoint lower_right = {0}; + GdkPoint _tmp1_ = {0}; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + GdkRectangle _tmp4_ = {0}; + gint _tmp5_ = 0; + GdkPoint _tmp6_ = {0}; + gint _tmp7_ = 0; + GdkRectangle _tmp8_ = {0}; + gint _tmp9_ = 0; + GdkPoint _tmp10_ = {0}; + gint _tmp11_ = 0; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + GdkPoint _tmp14_ = {0}; + GdkPoint _tmp15_ = {0}; + GdkPoint _tmp16_ = {0}; + GdkPoint _tmp17_ = {0}; + GdkRectangle active_rect = {0}; + GdkPoint _tmp18_ = {0}; + gint _tmp19_ = 0; + GdkPoint _tmp20_ = {0}; + gint _tmp21_ = 0; + GdkPoint _tmp22_ = {0}; + gint _tmp23_ = 0; + GdkPoint _tmp24_ = {0}; + gint _tmp25_ = 0; + GdkPoint _tmp26_ = {0}; + gint _tmp27_ = 0; + GdkPoint _tmp28_ = {0}; + gint _tmp29_ = 0; +#line 179 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 179 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (user_rect != NULL); +#line 180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_.x = 0; +#line 180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + upper_left = _tmp0_; +#line 181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_.x = 0; +#line 181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + lower_right = _tmp1_; +#line 182 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = *user_rect; +#line 182 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 182 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + upper_left.x = _tmp3_; +#line 183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = *user_rect; +#line 183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.y; +#line 183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + upper_left.y = _tmp5_; +#line 184 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = upper_left; +#line 184 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.x; +#line 184 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = *user_rect; +#line 184 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.width; +#line 184 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + lower_right.x = _tmp7_ + _tmp9_; +#line 185 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = upper_left; +#line 185 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_.y; +#line 185 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = *user_rect; +#line 185 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.height; +#line 185 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + lower_right.y = _tmp11_ + _tmp13_; +#line 187 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = upper_left; +#line 187 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_user_to_active_point (self, &_tmp14_, &_tmp15_); +#line 187 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + upper_left = _tmp15_; +#line 188 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = lower_right; +#line 188 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_user_to_active_point (self, &_tmp16_, &_tmp17_); +#line 188 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + lower_right = _tmp17_; +#line 190 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + memset (&active_rect, 0, sizeof (GdkRectangle)); +#line 191 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = upper_left; +#line 191 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_.x; +#line 191 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + active_rect.x = _tmp19_; +#line 192 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = upper_left; +#line 192 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = _tmp20_.y; +#line 192 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + active_rect.y = _tmp21_; +#line 193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = lower_right; +#line 193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _tmp22_.x; +#line 193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = upper_left; +#line 193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _tmp24_.x; +#line 193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + active_rect.width = _tmp23_ - _tmp25_; +#line 194 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = lower_right; +#line 194 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = _tmp26_.y; +#line 194 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = upper_left; +#line 194 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = _tmp28_.y; +#line 194 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + active_rect.height = _tmp27_ - _tmp29_; +#line 196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = active_rect; +#line 196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 2495 "EditingTools.c" +} + + +Photo* editing_tools_photo_canvas_get_photo (EditingToolsPhotoCanvas* self) { + Photo* result = NULL; + Photo* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; +#line 199 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self), NULL); +#line 200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->photo; +#line 200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp1_; +#line 200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 2513 "EditingTools.c" +} + + +GtkWindow* editing_tools_photo_canvas_get_container (EditingToolsPhotoCanvas* self) { + GtkWindow* result = NULL; + GtkWindow* _tmp0_ = NULL; + GtkWindow* _tmp1_ = NULL; +#line 203 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self), NULL); +#line 204 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->container; +#line 204 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 204 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp1_; +#line 204 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 2531 "EditingTools.c" +} + + +GdkWindow* editing_tools_photo_canvas_get_drawing_window (EditingToolsPhotoCanvas* self) { + GdkWindow* result = NULL; + GdkWindow* _tmp0_ = NULL; + GdkWindow* _tmp1_ = NULL; +#line 207 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self), NULL); +#line 208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->drawing_window; +#line 208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp1_; +#line 208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 2549 "EditingTools.c" +} + + +cairo_t* editing_tools_photo_canvas_get_default_ctx (EditingToolsPhotoCanvas* self) { + cairo_t* result = NULL; + cairo_t* _tmp0_ = NULL; + cairo_t* _tmp1_ = NULL; +#line 211 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self), NULL); +#line 212 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->default_ctx; +#line 212 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _cairo_reference0 (_tmp0_); +#line 212 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp1_; +#line 212 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 2567 "EditingTools.c" +} + + +void editing_tools_photo_canvas_get_surface_dim (EditingToolsPhotoCanvas* self, Dimensions* result) { + Dimensions _tmp0_ = {0}; +#line 215 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 216 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->surface_dim; +#line 216 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _tmp0_; +#line 216 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 2581 "EditingTools.c" +} + + +void editing_tools_photo_canvas_get_scaling (EditingToolsPhotoCanvas* self, Scaling* result) { + Dimensions _tmp0_ = {0}; + Scaling _tmp1_ = {0}; +#line 219 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 220 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->surface_dim; +#line 220 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scaling_for_viewport (&_tmp0_, FALSE, &_tmp1_); +#line 220 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _tmp1_; +#line 220 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 2598 "EditingTools.c" +} + + +void editing_tools_photo_canvas_set_surface (EditingToolsPhotoCanvas* self, cairo_t* default_ctx, Dimensions* surface_dim) { + cairo_t* _tmp0_ = NULL; + cairo_t* _tmp1_ = NULL; + Dimensions _tmp2_ = {0}; + cairo_t* _tmp3_ = NULL; + Dimensions _tmp4_ = {0}; +#line 223 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 223 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (default_ctx != NULL); +#line 223 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (surface_dim != NULL); +#line 224 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = default_ctx; +#line 224 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _cairo_reference0 (_tmp0_); +#line 224 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->default_ctx); +#line 224 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->default_ctx = _tmp1_; +#line 225 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = *surface_dim; +#line 225 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->surface_dim = _tmp2_; +#line 227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = default_ctx; +#line 227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = *surface_dim; +#line 227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (self, "new-surface", _tmp3_, &_tmp4_); +#line 2632 "EditingTools.c" +} + + +static gpointer _cairo_surface_reference0 (gpointer self) { +#line 231 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self ? cairo_surface_reference (self) : NULL; +#line 2639 "EditingTools.c" +} + + +cairo_surface_t* editing_tools_photo_canvas_get_scaled_surface (EditingToolsPhotoCanvas* self) { + cairo_surface_t* result = NULL; + cairo_surface_t* _tmp0_ = NULL; + cairo_surface_t* _tmp1_ = NULL; +#line 230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self), NULL); +#line 231 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->scaled; +#line 231 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _cairo_surface_reference0 (_tmp0_); +#line 231 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp1_; +#line 231 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 2657 "EditingTools.c" +} + + +GdkPixbuf* editing_tools_photo_canvas_get_scaled_pixbuf (EditingToolsPhotoCanvas* self) { + GdkPixbuf* result = NULL; + GdkPixbuf* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; +#line 234 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self), NULL); +#line 235 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->scaled_pixbuf; +#line 235 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 235 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp1_; +#line 235 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 2675 "EditingTools.c" +} + + +void editing_tools_photo_canvas_get_scaled_pixbuf_position (EditingToolsPhotoCanvas* self, GdkRectangle* result) { + GdkRectangle _tmp0_ = {0}; +#line 238 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 239 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->scaled_position; +#line 239 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _tmp0_; +#line 239 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 2689 "EditingTools.c" +} + + +void editing_tools_photo_canvas_resized_pixbuf (EditingToolsPhotoCanvas* self, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position) { + cairo_t* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; + GdkRectangle _tmp2_ = {0}; + cairo_surface_t* _tmp3_ = NULL; + GdkPixbuf* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + GdkRectangle _tmp6_ = {0}; + Dimensions _tmp7_ = {0}; + GdkPixbuf* _tmp8_ = NULL; + GdkRectangle _tmp9_ = {0}; +#line 242 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 242 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (old_dim != NULL); +#line 242 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (GDK_IS_PIXBUF (scaled)); +#line 242 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (scaled_position != NULL); +#line 243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->default_ctx; +#line 243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = scaled; +#line 243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = *scaled_position; +#line 243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = editing_tools_photo_canvas_pixbuf_to_surface (self, _tmp0_, _tmp1_, &_tmp2_); +#line 243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->priv->scaled); +#line 243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled = _tmp3_; +#line 244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = scaled; +#line 244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _g_object_ref0 (_tmp4_); +#line 244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->scaled_pixbuf); +#line 244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_pixbuf = _tmp5_; +#line 245 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = *scaled_position; +#line 245 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_position = _tmp6_; +#line 247 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = *old_dim; +#line 247 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = scaled; +#line 247 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = *scaled_position; +#line 247 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (self, "resized-scaled-pixbuf", &_tmp7_, _tmp8_, &_tmp9_); +#line 2744 "EditingTools.c" +} + + +static void editing_tools_photo_canvas_real_repaint (EditingToolsPhotoCanvas* self) { +#line 250 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_critical ("Type `%s' does not implement abstract method `editing_tools_photo_canvas_repaint'", g_type_name (G_TYPE_FROM_INSTANCE (self))); +#line 250 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 2753 "EditingTools.c" +} + + +void editing_tools_photo_canvas_repaint (EditingToolsPhotoCanvas* self) { +#line 250 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 250 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_PHOTO_CANVAS_GET_CLASS (self)->repaint (self); +#line 2762 "EditingTools.c" +} + + +void editing_tools_photo_canvas_paint_pixbuf (EditingToolsPhotoCanvas* self, GdkPixbuf* pixbuf) { + cairo_t* _tmp0_ = NULL; + cairo_t* _tmp1_ = NULL; + cairo_t* _tmp2_ = NULL; + Dimensions _tmp3_ = {0}; + gint _tmp4_ = 0; + Dimensions _tmp5_ = {0}; + gint _tmp6_ = 0; + cairo_t* _tmp7_ = NULL; + cairo_t* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + GdkRectangle _tmp10_ = {0}; + gint _tmp11_ = 0; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + cairo_t* _tmp14_ = NULL; + GdkRectangle _tmp15_ = {0}; + gint _tmp16_ = 0; + GdkRectangle _tmp17_ = {0}; + gint _tmp18_ = 0; + GdkPixbuf* _tmp19_ = NULL; + gint _tmp20_ = 0; + GdkPixbuf* _tmp21_ = NULL; + gint _tmp22_ = 0; + cairo_t* _tmp23_ = NULL; + cairo_t* _tmp24_ = NULL; +#line 258 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 258 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (GDK_IS_PIXBUF (pixbuf)); +#line 259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->default_ctx; +#line 259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_save (_tmp0_); +#line 262 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->default_ctx; +#line 262 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + set_source_color_from_string (_tmp1_, "#000"); +#line 263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->default_ctx; +#line 263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->surface_dim; +#line 263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.width; +#line 263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->surface_dim; +#line 263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.height; +#line 263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp2_, (gdouble) 0, (gdouble) 0, (gdouble) _tmp4_, (gdouble) _tmp6_); +#line 264 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = self->priv->default_ctx; +#line 264 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp7_); +#line 267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->default_ctx; +#line 267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = pixbuf; +#line 267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->scaled_position; +#line 267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_.x; +#line 267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->scaled_position; +#line 267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.y; +#line 267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gdk_cairo_set_source_pixbuf (_tmp8_, _tmp9_, (gdouble) _tmp11_, (gdouble) _tmp13_); +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = self->priv->default_ctx; +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->scaled_position; +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_.x; +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->scaled_position; +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_.y; +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = pixbuf; +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = gdk_pixbuf_get_width (_tmp19_); +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = pixbuf; +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = gdk_pixbuf_get_height (_tmp21_); +#line 268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp14_, (gdouble) _tmp16_, (gdouble) _tmp18_, (gdouble) _tmp20_, (gdouble) _tmp22_); +#line 270 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = self->priv->default_ctx; +#line 270 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp23_); +#line 271 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->priv->default_ctx; +#line 271 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_restore (_tmp24_); +#line 2862 "EditingTools.c" +} + + +void editing_tools_photo_canvas_paint_pixbuf_area (EditingToolsPhotoCanvas* self, GdkPixbuf* pixbuf, Box* source_area) { + cairo_t* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + cairo_t* _tmp16_ = NULL; + GdkPixbuf* _tmp17_ = NULL; + GdkRectangle _tmp18_ = {0}; + gint _tmp19_ = 0; + GdkRectangle _tmp20_ = {0}; + gint _tmp21_ = 0; + cairo_t* _tmp22_ = NULL; + GdkRectangle _tmp23_ = {0}; + gint _tmp24_ = 0; + Box _tmp25_ = {0}; + gint _tmp26_ = 0; + GdkRectangle _tmp27_ = {0}; + gint _tmp28_ = 0; + Box _tmp29_ = {0}; + gint _tmp30_ = 0; + gint _tmp31_ = 0; + gint _tmp32_ = 0; + cairo_t* _tmp33_ = NULL; + cairo_t* _tmp34_ = NULL; +#line 274 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 274 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (GDK_IS_PIXBUF (pixbuf)); +#line 274 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (source_area != NULL); +#line 275 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->default_ctx; +#line 275 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_save (_tmp0_); +#line 276 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = pixbuf; +#line 276 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gdk_pixbuf_get_has_alpha (_tmp1_); +#line 276 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp2_) { +#line 2905 "EditingTools.c" + cairo_t* _tmp3_ = NULL; + cairo_t* _tmp4_ = NULL; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; + Box _tmp7_ = {0}; + gint _tmp8_ = 0; + GdkRectangle _tmp9_ = {0}; + gint _tmp10_ = 0; + Box _tmp11_ = {0}; + gint _tmp12_ = 0; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + cairo_t* _tmp15_ = NULL; +#line 277 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->default_ctx; +#line 277 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + set_source_color_from_string (_tmp3_, "#000"); +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->default_ctx; +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->scaled_position; +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.x; +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = *source_area; +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.left; +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->scaled_position; +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.y; +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = *source_area; +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_.top; +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = box_get_width (source_area); +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = box_get_height (source_area); +#line 278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp4_, (gdouble) (_tmp6_ + _tmp8_), (gdouble) (_tmp10_ + _tmp12_), (gdouble) _tmp13_, (gdouble) _tmp14_); +#line 281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->default_ctx; +#line 281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp15_); +#line 2951 "EditingTools.c" + } +#line 284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = self->priv->default_ctx; +#line 284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = pixbuf; +#line 284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->scaled_position; +#line 284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_.x; +#line 284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = self->priv->scaled_position; +#line 284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = _tmp20_.y; +#line 284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gdk_cairo_set_source_pixbuf (_tmp16_, _tmp17_, (gdouble) _tmp19_, (gdouble) _tmp21_); +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = self->priv->default_ctx; +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = self->priv->scaled_position; +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = _tmp23_.x; +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = *source_area; +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _tmp25_.left; +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = self->priv->scaled_position; +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = _tmp27_.y; +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = *source_area; +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = _tmp29_.top; +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = box_get_width (source_area); +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = box_get_height (source_area); +#line 286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp22_, (gdouble) (_tmp24_ + _tmp26_), (gdouble) (_tmp28_ + _tmp30_), (gdouble) _tmp31_, (gdouble) _tmp32_); +#line 289 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = self->priv->default_ctx; +#line 289 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp33_); +#line 290 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = self->priv->default_ctx; +#line 290 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_restore (_tmp34_); +#line 2999 "EditingTools.c" +} + + +void editing_tools_photo_canvas_paint_surface (EditingToolsPhotoCanvas* self, cairo_surface_t* surface, gboolean over) { + cairo_t* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + cairo_t* _tmp4_ = NULL; + cairo_surface_t* _tmp5_ = NULL; + GdkRectangle _tmp6_ = {0}; + gint _tmp7_ = 0; + GdkRectangle _tmp8_ = {0}; + gint _tmp9_ = 0; + cairo_t* _tmp10_ = NULL; + cairo_t* _tmp11_ = NULL; + cairo_surface_t* _tmp12_ = NULL; + GdkRectangle _tmp13_ = {0}; + gint _tmp14_ = 0; + GdkRectangle _tmp15_ = {0}; + gint _tmp16_ = 0; + cairo_t* _tmp17_ = NULL; + cairo_t* _tmp18_ = NULL; +#line 294 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 294 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (surface != NULL); +#line 295 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->default_ctx; +#line 295 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_save (_tmp0_); +#line 296 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = over; +#line 296 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_ == FALSE) { +#line 3033 "EditingTools.c" + cairo_t* _tmp2_ = NULL; +#line 297 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->default_ctx; +#line 297 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_operator (_tmp2_, CAIRO_OPERATOR_SOURCE); +#line 3039 "EditingTools.c" + } else { + cairo_t* _tmp3_ = NULL; +#line 299 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->default_ctx; +#line 299 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_operator (_tmp3_, CAIRO_OPERATOR_OVER); +#line 3046 "EditingTools.c" + } +#line 301 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->default_ctx; +#line 301 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->scaled; +#line 301 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->scaled_position; +#line 301 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.x; +#line 301 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->scaled_position; +#line 301 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.y; +#line 301 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_surface (_tmp4_, _tmp5_, (gdouble) _tmp7_, (gdouble) _tmp9_); +#line 302 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->default_ctx; +#line 302 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_paint (_tmp10_); +#line 303 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->default_ctx; +#line 303 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = surface; +#line 303 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->priv->scaled_position; +#line 303 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_.x; +#line 303 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->scaled_position; +#line 303 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_.y; +#line 303 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_surface (_tmp11_, _tmp12_, (gdouble) _tmp14_, (gdouble) _tmp16_); +#line 304 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->default_ctx; +#line 304 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_paint (_tmp17_); +#line 305 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->default_ctx; +#line 305 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_restore (_tmp18_); +#line 3088 "EditingTools.c" +} + + +void editing_tools_photo_canvas_paint_surface_area (EditingToolsPhotoCanvas* self, cairo_surface_t* surface, Box* source_area, gboolean over) { + cairo_t* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + cairo_t* _tmp4_ = NULL; + cairo_surface_t* _tmp5_ = NULL; + GdkRectangle _tmp6_ = {0}; + gint _tmp7_ = 0; + GdkRectangle _tmp8_ = {0}; + gint _tmp9_ = 0; + cairo_t* _tmp10_ = NULL; + GdkRectangle _tmp11_ = {0}; + gint _tmp12_ = 0; + Box _tmp13_ = {0}; + gint _tmp14_ = 0; + GdkRectangle _tmp15_ = {0}; + gint _tmp16_ = 0; + Box _tmp17_ = {0}; + gint _tmp18_ = 0; + gint _tmp19_ = 0; + gint _tmp20_ = 0; + cairo_t* _tmp21_ = NULL; + cairo_t* _tmp22_ = NULL; + cairo_surface_t* _tmp23_ = NULL; + GdkRectangle _tmp24_ = {0}; + gint _tmp25_ = 0; + GdkRectangle _tmp26_ = {0}; + gint _tmp27_ = 0; + cairo_t* _tmp28_ = NULL; + GdkRectangle _tmp29_ = {0}; + gint _tmp30_ = 0; + Box _tmp31_ = {0}; + gint _tmp32_ = 0; + GdkRectangle _tmp33_ = {0}; + gint _tmp34_ = 0; + Box _tmp35_ = {0}; + gint _tmp36_ = 0; + gint _tmp37_ = 0; + gint _tmp38_ = 0; + cairo_t* _tmp39_ = NULL; + cairo_t* _tmp40_ = NULL; +#line 308 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 308 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (surface != NULL); +#line 308 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (source_area != NULL); +#line 309 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->default_ctx; +#line 309 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_save (_tmp0_); +#line 310 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = over; +#line 310 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_ == FALSE) { +#line 3146 "EditingTools.c" + cairo_t* _tmp2_ = NULL; +#line 311 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->default_ctx; +#line 311 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_operator (_tmp2_, CAIRO_OPERATOR_SOURCE); +#line 3152 "EditingTools.c" + } else { + cairo_t* _tmp3_ = NULL; +#line 313 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->default_ctx; +#line 313 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_operator (_tmp3_, CAIRO_OPERATOR_OVER); +#line 3159 "EditingTools.c" + } +#line 315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->default_ctx; +#line 315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->scaled; +#line 315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->scaled_position; +#line 315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.x; +#line 315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->scaled_position; +#line 315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.y; +#line 315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_surface (_tmp4_, _tmp5_, (gdouble) _tmp7_, (gdouble) _tmp9_); +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->default_ctx; +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->scaled_position; +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_.x; +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = *source_area; +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_.left; +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->scaled_position; +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_.y; +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = *source_area; +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_.top; +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = box_get_width (source_area); +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = box_get_height (source_area); +#line 316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp10_, (gdouble) (_tmp12_ + _tmp14_), (gdouble) (_tmp16_ + _tmp18_), (gdouble) _tmp19_, (gdouble) _tmp20_); +#line 319 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->default_ctx; +#line 319 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp21_); +#line 321 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = self->priv->default_ctx; +#line 321 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = surface; +#line 321 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->priv->scaled_position; +#line 321 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _tmp24_.x; +#line 321 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = self->priv->scaled_position; +#line 321 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = _tmp26_.y; +#line 321 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_surface (_tmp22_, _tmp23_, (gdouble) _tmp25_, (gdouble) _tmp27_); +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = self->priv->default_ctx; +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = self->priv->scaled_position; +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = _tmp29_.x; +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = *source_area; +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = _tmp31_.left; +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = self->priv->scaled_position; +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = _tmp33_.y; +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = *source_area; +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = _tmp35_.top; +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = box_get_width (source_area); +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = box_get_height (source_area); +#line 322 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp28_, (gdouble) (_tmp30_ + _tmp32_), (gdouble) (_tmp34_ + _tmp36_), (gdouble) _tmp37_, (gdouble) _tmp38_); +#line 325 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = self->priv->default_ctx; +#line 325 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp39_); +#line 326 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = self->priv->default_ctx; +#line 326 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_restore (_tmp40_); +#line 3249 "EditingTools.c" +} + + +void editing_tools_photo_canvas_draw_box (EditingToolsPhotoCanvas* self, cairo_t* ctx, Box* box) { + GdkRectangle rect = {0}; + GdkRectangle _tmp0_ = {0}; + gint _tmp1_ = 0; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; + cairo_t* _tmp7_ = NULL; + GdkRectangle _tmp8_ = {0}; + gint _tmp9_ = 0; + GdkRectangle _tmp10_ = {0}; + gint _tmp11_ = 0; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + GdkRectangle _tmp14_ = {0}; + gint _tmp15_ = 0; + cairo_t* _tmp16_ = NULL; +#line 329 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 329 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 329 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (box != NULL); +#line 330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_rectangle (box, &_tmp0_); +#line 330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rect = _tmp0_; +#line 331 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = rect.x; +#line 331 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->scaled_position; +#line 331 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 331 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rect.x = _tmp1_ + _tmp3_; +#line 332 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = rect.y; +#line 332 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->scaled_position; +#line 332 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.y; +#line 332 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rect.y = _tmp4_ + _tmp6_; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = ctx; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = rect; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.x; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = rect; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_.y; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = rect; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.width; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = rect; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = _tmp14_.height; +#line 334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp7_, _tmp9_ + 0.5, _tmp11_ + 0.5, (gdouble) (_tmp13_ - 1), (gdouble) (_tmp15_ - 1)); +#line 335 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = ctx; +#line 335 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_stroke (_tmp16_); +#line 3322 "EditingTools.c" +} + + +void editing_tools_photo_canvas_draw_text (EditingToolsPhotoCanvas* self, cairo_t* ctx, const gchar* text, gint x, gint y, gboolean use_scaled_pos) { + gboolean _tmp0_ = FALSE; + cairo_text_extents_t extents = {0}; + cairo_t* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + cairo_text_extents_t _tmp9_ = {0}; + gint _tmp10_ = 0; + cairo_text_extents_t _tmp11_ = {0}; + gdouble _tmp12_ = 0.0; + cairo_t* _tmp13_ = NULL; + gint pane_border = 0; + cairo_t* _tmp14_ = NULL; + gint _tmp15_ = 0; + gint _tmp16_ = 0; + cairo_text_extents_t _tmp17_ = {0}; + gdouble _tmp18_ = 0.0; + cairo_text_extents_t _tmp19_ = {0}; + gdouble _tmp20_ = 0.0; + cairo_text_extents_t _tmp21_ = {0}; + gdouble _tmp22_ = 0.0; + cairo_t* _tmp23_ = NULL; + cairo_t* _tmp24_ = NULL; + gint _tmp25_ = 0; + gint _tmp26_ = 0; + cairo_t* _tmp27_ = NULL; + cairo_t* _tmp28_ = NULL; + const gchar* _tmp29_ = NULL; +#line 338 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 338 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 338 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (text != NULL); +#line 339 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = use_scaled_pos; +#line 339 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_) { +#line 3363 "EditingTools.c" + gint _tmp1_ = 0; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; +#line 340 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = x; +#line 340 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->scaled_position; +#line 340 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 340 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x = _tmp1_ + _tmp3_; +#line 341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = y; +#line 341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->scaled_position; +#line 341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.y; +#line 341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y = _tmp4_ + _tmp6_; +#line 3386 "EditingTools.c" + } +#line 344 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = ctx; +#line 344 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = text; +#line 344 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_text_extents (_tmp7_, _tmp8_, &_tmp9_); +#line 344 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + extents = _tmp9_; +#line 345 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = x; +#line 345 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = extents; +#line 345 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_.width; +#line 345 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x = _tmp10_ - (((gint) _tmp12_) / 2); +#line 347 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = ctx; +#line 347 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + set_source_color_from_string (_tmp13_, RESOURCES_ONIMAGE_FONT_BACKGROUND); +#line 349 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pane_border = 5; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = ctx; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = x; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = y; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = extents; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_.height; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = extents; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _tmp19_.width; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = extents; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _tmp21_.height; +#line 350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp14_, (gdouble) (_tmp15_ - pane_border), (_tmp16_ - pane_border) - _tmp18_, _tmp20_ + (2 * pane_border), _tmp22_ + (2 * pane_border)); +#line 353 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = ctx; +#line 353 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp23_); +#line 355 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = ctx; +#line 355 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = x; +#line 355 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = y; +#line 355 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_move_to (_tmp24_, (gdouble) _tmp25_, (gdouble) _tmp26_); +#line 356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = ctx; +#line 356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + set_source_color_from_string (_tmp27_, RESOURCES_ONIMAGE_FONT_COLOR); +#line 357 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = ctx; +#line 357 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = text; +#line 357 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_show_text (_tmp28_, _tmp29_); +#line 3452 "EditingTools.c" +} + + +/** + * Draw a horizontal line into the specified Cairo context at the specified position, taking + * into account the scaled position of the image unless directed otherwise. + * + * @param ctx The drawing context of the surface we're drawing to. + * @param x The horizontal position to place the line at. + * @param y The vertical position to place the line at. + * @param width The length of the line. + * @param use_scaled_pos Whether to use absolute window positioning or take into account the + * position of the scaled image. + */ +void editing_tools_photo_canvas_draw_horizontal_line (EditingToolsPhotoCanvas* self, cairo_t* ctx, gint x, gint y, gint width, gboolean use_scaled_pos) { + gboolean _tmp0_ = FALSE; + cairo_t* _tmp7_ = NULL; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + cairo_t* _tmp10_ = NULL; + gint _tmp11_ = 0; + gint _tmp12_ = 0; + gint _tmp13_ = 0; + cairo_t* _tmp14_ = NULL; +#line 371 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 371 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = use_scaled_pos; +#line 372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_) { +#line 3485 "EditingTools.c" + gint _tmp1_ = 0; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; +#line 373 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = x; +#line 373 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->scaled_position; +#line 373 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 373 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x = _tmp1_ + _tmp3_; +#line 374 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = y; +#line 374 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->scaled_position; +#line 374 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.y; +#line 374 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y = _tmp4_ + _tmp6_; +#line 3508 "EditingTools.c" + } +#line 377 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = ctx; +#line 377 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = x; +#line 377 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = y; +#line 377 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_move_to (_tmp7_, _tmp8_ + 0.5, _tmp9_ + 0.5); +#line 378 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = ctx; +#line 378 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = x; +#line 378 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = width; +#line 378 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = y; +#line 378 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_line_to (_tmp10_, (gdouble) ((_tmp11_ + _tmp12_) - 1), _tmp13_ + 0.5); +#line 379 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = ctx; +#line 379 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_stroke (_tmp14_); +#line 3532 "EditingTools.c" +} + + +/** + * Draw a vertical line into the specified Cairo context at the specified position, taking + * into account the scaled position of the image unless directed otherwise. + * + * @param ctx The drawing context of the surface we're drawing to. + * @param x The horizontal position to place the line at. + * @param y The vertical position to place the line at. + * @param width The length of the line. + * @param use_scaled_pos Whether to use absolute window positioning or take into account the + * position of the scaled image. + */ +void editing_tools_photo_canvas_draw_vertical_line (EditingToolsPhotoCanvas* self, cairo_t* ctx, gint x, gint y, gint height, gboolean use_scaled_pos) { + gboolean _tmp0_ = FALSE; + cairo_t* _tmp7_ = NULL; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + cairo_t* _tmp10_ = NULL; + gint _tmp11_ = 0; + gint _tmp12_ = 0; + gint _tmp13_ = 0; + cairo_t* _tmp14_ = NULL; +#line 393 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 393 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 394 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = use_scaled_pos; +#line 394 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_) { +#line 3565 "EditingTools.c" + gint _tmp1_ = 0; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; +#line 395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = x; +#line 395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->scaled_position; +#line 395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x = _tmp1_ + _tmp3_; +#line 396 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = y; +#line 396 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->scaled_position; +#line 396 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.y; +#line 396 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y = _tmp4_ + _tmp6_; +#line 3588 "EditingTools.c" + } +#line 399 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = ctx; +#line 399 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = x; +#line 399 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = y; +#line 399 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_move_to (_tmp7_, _tmp8_ + 0.5, _tmp9_ + 0.5); +#line 400 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = ctx; +#line 400 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = x; +#line 400 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = y; +#line 400 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = height; +#line 400 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_line_to (_tmp10_, _tmp11_ + 0.5, (gdouble) ((_tmp12_ + _tmp13_) - 1)); +#line 401 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = ctx; +#line 401 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_stroke (_tmp14_); +#line 3612 "EditingTools.c" +} + + +void editing_tools_photo_canvas_erase_horizontal_line (EditingToolsPhotoCanvas* self, gint x, gint y, gint width) { + cairo_t* _tmp0_ = NULL; + cairo_t* _tmp1_ = NULL; + cairo_t* _tmp2_ = NULL; + cairo_surface_t* _tmp3_ = NULL; + GdkRectangle _tmp4_ = {0}; + gint _tmp5_ = 0; + GdkRectangle _tmp6_ = {0}; + gint _tmp7_ = 0; + cairo_t* _tmp8_ = NULL; + GdkRectangle _tmp9_ = {0}; + gint _tmp10_ = 0; + gint _tmp11_ = 0; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + gint _tmp15_ = 0; + cairo_t* _tmp16_ = NULL; + cairo_t* _tmp17_ = NULL; +#line 404 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 405 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->default_ctx; +#line 405 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_save (_tmp0_); +#line 407 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->default_ctx; +#line 407 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_operator (_tmp1_, CAIRO_OPERATOR_SOURCE); +#line 408 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->default_ctx; +#line 408 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->scaled; +#line 408 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->scaled_position; +#line 408 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.x; +#line 408 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->scaled_position; +#line 408 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.y; +#line 408 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_surface (_tmp2_, _tmp3_, (gdouble) _tmp5_, (gdouble) _tmp7_); +#line 409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->default_ctx; +#line 409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->scaled_position; +#line 409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.x; +#line 409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = x; +#line 409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->scaled_position; +#line 409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.y; +#line 409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = y; +#line 409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = width; +#line 409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp8_, (gdouble) (_tmp10_ + _tmp11_), (gdouble) (_tmp13_ + _tmp14_), (gdouble) (_tmp15_ - 1), (gdouble) 1); +#line 411 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = self->priv->default_ctx; +#line 411 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp16_); +#line 413 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->default_ctx; +#line 413 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_restore (_tmp17_); +#line 3685 "EditingTools.c" +} + + +void editing_tools_photo_canvas_draw_circle (EditingToolsPhotoCanvas* self, cairo_t* ctx, gint active_center_x, gint active_center_y, gint radius) { + gint center_x = 0; + gint _tmp0_ = 0; + GdkRectangle _tmp1_ = {0}; + gint _tmp2_ = 0; + gint center_y = 0; + gint _tmp3_ = 0; + GdkRectangle _tmp4_ = {0}; + gint _tmp5_ = 0; + cairo_t* _tmp6_ = NULL; + gint _tmp7_ = 0; + cairo_t* _tmp8_ = NULL; +#line 416 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 416 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 418 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = active_center_x; +#line 418 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->scaled_position; +#line 418 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_.x; +#line 418 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + center_x = _tmp0_ + _tmp2_; +#line 419 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = active_center_y; +#line 419 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->scaled_position; +#line 419 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.y; +#line 419 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + center_y = _tmp3_ + _tmp5_; +#line 421 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = ctx; +#line 421 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = radius; +#line 421 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_arc (_tmp6_, (gdouble) center_x, (gdouble) center_y, (gdouble) _tmp7_, (gdouble) 0, 2 * G_PI); +#line 422 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = ctx; +#line 422 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_stroke (_tmp8_); +#line 3731 "EditingTools.c" +} + + +void editing_tools_photo_canvas_erase_vertical_line (EditingToolsPhotoCanvas* self, gint x, gint y, gint height) { + cairo_t* _tmp0_ = NULL; + cairo_t* _tmp1_ = NULL; + cairo_t* _tmp2_ = NULL; + cairo_surface_t* _tmp3_ = NULL; + GdkRectangle _tmp4_ = {0}; + gint _tmp5_ = 0; + GdkRectangle _tmp6_ = {0}; + gint _tmp7_ = 0; + cairo_t* _tmp8_ = NULL; + GdkRectangle _tmp9_ = {0}; + gint _tmp10_ = 0; + gint _tmp11_ = 0; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + gint _tmp15_ = 0; + cairo_t* _tmp16_ = NULL; + cairo_t* _tmp17_ = NULL; +#line 425 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 426 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->default_ctx; +#line 426 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_save (_tmp0_); +#line 432 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->default_ctx; +#line 432 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_operator (_tmp1_, CAIRO_OPERATOR_SOURCE); +#line 433 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->default_ctx; +#line 433 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->scaled; +#line 433 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->scaled_position; +#line 433 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.x; +#line 433 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->scaled_position; +#line 433 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.y; +#line 433 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_surface (_tmp2_, _tmp3_, (gdouble) _tmp5_, (gdouble) _tmp7_); +#line 434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->default_ctx; +#line 434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->scaled_position; +#line 434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.x; +#line 434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = x; +#line 434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->scaled_position; +#line 434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.y; +#line 434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = y; +#line 434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = height; +#line 434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp8_, (gdouble) (_tmp10_ + _tmp11_), (gdouble) (_tmp13_ + _tmp14_), (gdouble) 1, (gdouble) _tmp15_); +#line 436 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = self->priv->default_ctx; +#line 436 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp16_); +#line 438 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->default_ctx; +#line 438 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_restore (_tmp17_); +#line 3804 "EditingTools.c" +} + + +void editing_tools_photo_canvas_erase_box (EditingToolsPhotoCanvas* self, Box* box) { + Box _tmp0_ = {0}; + gint _tmp1_ = 0; + Box _tmp2_ = {0}; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + Box _tmp5_ = {0}; + gint _tmp6_ = 0; + Box _tmp7_ = {0}; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + Box _tmp10_ = {0}; + gint _tmp11_ = 0; + Box _tmp12_ = {0}; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + Box _tmp15_ = {0}; + gint _tmp16_ = 0; + Box _tmp17_ = {0}; + gint _tmp18_ = 0; + gint _tmp19_ = 0; +#line 441 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 441 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (box != NULL); +#line 442 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = *box; +#line 442 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_.left; +#line 442 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = *box; +#line 442 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.top; +#line 442 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = box_get_width (box); +#line 442 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_erase_horizontal_line (self, _tmp1_, _tmp3_, _tmp4_); +#line 443 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = *box; +#line 443 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.left; +#line 443 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = *box; +#line 443 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.bottom; +#line 443 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = box_get_width (box); +#line 443 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_erase_horizontal_line (self, _tmp6_, _tmp8_, _tmp9_); +#line 445 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = *box; +#line 445 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_.left; +#line 445 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = *box; +#line 445 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.top; +#line 445 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = box_get_height (box); +#line 445 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_erase_vertical_line (self, _tmp11_, _tmp13_, _tmp14_); +#line 446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = *box; +#line 446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_.right; +#line 446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = *box; +#line 446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_.top; +#line 446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = box_get_height (box); +#line 446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_erase_vertical_line (self, _tmp16_, _tmp18_, _tmp19_); +#line 3881 "EditingTools.c" +} + + +void editing_tools_photo_canvas_invalidate_area (EditingToolsPhotoCanvas* self, Box* area) { + GdkRectangle rect = {0}; + GdkRectangle _tmp0_ = {0}; + gint _tmp1_ = 0; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; + GdkWindow* _tmp7_ = NULL; + GdkRectangle _tmp8_ = {0}; +#line 449 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self)); +#line 449 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (area != NULL); +#line 450 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_rectangle (area, &_tmp0_); +#line 450 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rect = _tmp0_; +#line 451 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = rect.x; +#line 451 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->scaled_position; +#line 451 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 451 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rect.x = _tmp1_ + _tmp3_; +#line 452 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = rect.y; +#line 452 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->scaled_position; +#line 452 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.y; +#line 452 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rect.y = _tmp4_ + _tmp6_; +#line 454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = self->priv->drawing_window; +#line 454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = rect; +#line 454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gdk_window_invalidate_rect (_tmp7_, &_tmp8_, FALSE); +#line 3926 "EditingTools.c" +} + + +static cairo_surface_t* editing_tools_photo_canvas_pixbuf_to_surface (EditingToolsPhotoCanvas* self, cairo_t* default_ctx, GdkPixbuf* pixbuf, GdkRectangle* pos) { + cairo_surface_t* result = NULL; + cairo_surface_t* surface = NULL; + cairo_t* _tmp0_ = NULL; + cairo_surface_t* _tmp1_ = NULL; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + GdkRectangle _tmp4_ = {0}; + gint _tmp5_ = 0; + cairo_surface_t* _tmp6_ = NULL; + cairo_t* ctx = NULL; + cairo_t* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; +#line 457 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (self), NULL); +#line 457 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (default_ctx != NULL, NULL); +#line 457 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL); +#line 457 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (pos != NULL, NULL); +#line 459 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = default_ctx; +#line 459 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = cairo_get_target (_tmp0_); +#line 459 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = *pos; +#line 459 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.width; +#line 459 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = *pos; +#line 459 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.height; +#line 459 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = cairo_surface_create_similar (_tmp1_, CAIRO_CONTENT_COLOR_ALPHA, _tmp3_, _tmp5_); +#line 459 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + surface = _tmp6_; +#line 461 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = cairo_create (surface); +#line 461 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ctx = _tmp7_; +#line 462 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = pixbuf; +#line 462 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gdk_cairo_set_source_pixbuf (ctx, _tmp8_, (gdouble) 0, (gdouble) 0); +#line 463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_paint (ctx); +#line 464 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = surface; +#line 464 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (ctx); +#line 464 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 3983 "EditingTools.c" +} + + +static void g_cclosure_user_marshal_VOID__POINTER_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__POINTER_BOXED) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2); + register GMarshalFunc_VOID__POINTER_BOXED callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (n_param_values == 3); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data1 = closure->data; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data2 = param_values->data[0].v_pointer; +#line 4002 "EditingTools.c" + } else { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data1 = param_values->data[0].v_pointer; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data2 = closure->data; +#line 4008 "EditingTools.c" + } +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + callback = (GMarshalFunc_VOID__POINTER_BOXED) (marshal_data ? marshal_data : cc->callback); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + callback (data1, g_value_get_pointer (param_values + 1), g_value_get_boxed (param_values + 2), data2); +#line 4014 "EditingTools.c" +} + + +static void g_cclosure_user_marshal_VOID__BOXED_OBJECT_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__BOXED_OBJECT_BOXED) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer arg_3, gpointer data2); + register GMarshalFunc_VOID__BOXED_OBJECT_BOXED callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (n_param_values == 4); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data1 = closure->data; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data2 = param_values->data[0].v_pointer; +#line 4033 "EditingTools.c" + } else { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data1 = param_values->data[0].v_pointer; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data2 = closure->data; +#line 4039 "EditingTools.c" + } +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + callback = (GMarshalFunc_VOID__BOXED_OBJECT_BOXED) (marshal_data ? marshal_data : cc->callback); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + callback (data1, g_value_get_boxed (param_values + 1), g_value_get_object (param_values + 2), g_value_get_boxed (param_values + 3), data2); +#line 4045 "EditingTools.c" +} + + +static void editing_tools_value_photo_canvas_init (GValue* value) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 4052 "EditingTools.c" +} + + +static void editing_tools_value_photo_canvas_free_value (GValue* value) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (value->data[0].v_pointer) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_unref (value->data[0].v_pointer); +#line 4061 "EditingTools.c" + } +} + + +static void editing_tools_value_photo_canvas_copy_value (const GValue* src_value, GValue* dest_value) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (src_value->data[0].v_pointer) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dest_value->data[0].v_pointer = editing_tools_photo_canvas_ref (src_value->data[0].v_pointer); +#line 4071 "EditingTools.c" + } else { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dest_value->data[0].v_pointer = NULL; +#line 4075 "EditingTools.c" + } +} + + +static gpointer editing_tools_value_photo_canvas_peek_pointer (const GValue* value) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return value->data[0].v_pointer; +#line 4083 "EditingTools.c" +} + + +static gchar* editing_tools_value_photo_canvas_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (collect_values[0].v_pointer) { +#line 4090 "EditingTools.c" + EditingToolsPhotoCanvas* object; + object = collect_values[0].v_pointer; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (object->parent_instance.g_class == NULL) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 4097 "EditingTools.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 4101 "EditingTools.c" + } +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = editing_tools_photo_canvas_ref (object); +#line 4105 "EditingTools.c" + } else { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 4109 "EditingTools.c" + } +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return NULL; +#line 4113 "EditingTools.c" +} + + +static gchar* editing_tools_value_photo_canvas_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + EditingToolsPhotoCanvas** object_p; + object_p = collect_values[0].v_pointer; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!object_p) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 4124 "EditingTools.c" + } +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!value->data[0].v_pointer) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *object_p = NULL; +#line 4130 "EditingTools.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *object_p = value->data[0].v_pointer; +#line 4134 "EditingTools.c" + } else { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *object_p = editing_tools_photo_canvas_ref (value->data[0].v_pointer); +#line 4138 "EditingTools.c" + } +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return NULL; +#line 4142 "EditingTools.c" +} + + +GParamSpec* editing_tools_param_spec_photo_canvas (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + EditingToolsParamSpecPhotoCanvas* spec; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (g_type_is_a (object_type, EDITING_TOOLS_TYPE_PHOTO_CANVAS), NULL); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return G_PARAM_SPEC (spec); +#line 4156 "EditingTools.c" +} + + +gpointer editing_tools_value_get_photo_canvas (const GValue* value) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, EDITING_TOOLS_TYPE_PHOTO_CANVAS), NULL); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return value->data[0].v_pointer; +#line 4165 "EditingTools.c" +} + + +void editing_tools_value_set_photo_canvas (GValue* value, gpointer v_object) { + EditingToolsPhotoCanvas* old; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, EDITING_TOOLS_TYPE_PHOTO_CANVAS)); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + old = value->data[0].v_pointer; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (v_object) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, EDITING_TOOLS_TYPE_PHOTO_CANVAS)); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = v_object; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_ref (value->data[0].v_pointer); +#line 4185 "EditingTools.c" + } else { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 4189 "EditingTools.c" + } +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (old) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_unref (old); +#line 4195 "EditingTools.c" + } +} + + +void editing_tools_value_take_photo_canvas (GValue* value, gpointer v_object) { + EditingToolsPhotoCanvas* old; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, EDITING_TOOLS_TYPE_PHOTO_CANVAS)); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + old = value->data[0].v_pointer; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (v_object) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, EDITING_TOOLS_TYPE_PHOTO_CANVAS)); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = v_object; +#line 4214 "EditingTools.c" + } else { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 4218 "EditingTools.c" + } +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (old) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_unref (old); +#line 4224 "EditingTools.c" + } +} + + +static void editing_tools_photo_canvas_class_init (EditingToolsPhotoCanvasClass * klass) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_parent_class = g_type_class_peek_parent (klass); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsPhotoCanvasClass *) klass)->finalize = editing_tools_photo_canvas_finalize; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsPhotoCanvasPrivate)); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsPhotoCanvasClass *) klass)->repaint = editing_tools_photo_canvas_real_repaint; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_new ("new_surface", EDITING_TOOLS_TYPE_PHOTO_CANVAS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_BOXED, G_TYPE_NONE, 2, G_TYPE_POINTER, TYPE_DIMENSIONS); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_new ("resized_scaled_pixbuf", EDITING_TOOLS_TYPE_PHOTO_CANVAS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOXED_OBJECT_BOXED, G_TYPE_NONE, 3, TYPE_DIMENSIONS, GDK_TYPE_PIXBUF, GDK_TYPE_RECTANGLE); +#line 4242 "EditingTools.c" +} + + +static void editing_tools_photo_canvas_instance_init (EditingToolsPhotoCanvas * self) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_PHOTO_CANVAS_GET_PRIVATE (self); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->ref_count = 1; +#line 4251 "EditingTools.c" +} + + +static void editing_tools_photo_canvas_finalize (EditingToolsPhotoCanvas* obj) { + EditingToolsPhotoCanvas * self; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_TYPE_PHOTO_CANVAS, EditingToolsPhotoCanvas); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_destroy (self); +#line 103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->container); +#line 104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->drawing_window); +#line 105 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->photo); +#line 106 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->default_ctx); +#line 108 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->priv->scaled); +#line 109 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->scaled_pixbuf); +#line 4273 "EditingTools.c" +} + + +GType editing_tools_photo_canvas_get_type (void) { + static volatile gsize editing_tools_photo_canvas_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_photo_canvas_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { editing_tools_value_photo_canvas_init, editing_tools_value_photo_canvas_free_value, editing_tools_value_photo_canvas_copy_value, editing_tools_value_photo_canvas_peek_pointer, "p", editing_tools_value_photo_canvas_collect_value, "p", editing_tools_value_photo_canvas_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsPhotoCanvasClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_photo_canvas_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsPhotoCanvas), 0, (GInstanceInitFunc) editing_tools_photo_canvas_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType editing_tools_photo_canvas_type_id; + editing_tools_photo_canvas_type_id = g_type_register_fundamental (g_type_fundamental_next (), "EditingToolsPhotoCanvas", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&editing_tools_photo_canvas_type_id__volatile, editing_tools_photo_canvas_type_id); + } + return editing_tools_photo_canvas_type_id__volatile; +} + + +gpointer editing_tools_photo_canvas_ref (gpointer instance) { + EditingToolsPhotoCanvas* self; + self = instance; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_atomic_int_inc (&self->ref_count); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return instance; +#line 4298 "EditingTools.c" +} + + +void editing_tools_photo_canvas_unref (gpointer instance) { + EditingToolsPhotoCanvas* self; + self = instance; +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_PHOTO_CANVAS_GET_CLASS (self)->finalize (self); +#line 102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 4311 "EditingTools.c" + } +} + + +EditingToolsEditingTool* editing_tools_editing_tool_construct (GType object_type, const gchar* name) { + EditingToolsEditingTool* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; +#line 489 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 489 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsEditingTool*) g_type_create_instance (object_type); +#line 490 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = name; +#line 490 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 490 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (self->name); +#line 490 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->name = _tmp1_; +#line 489 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 4334 "EditingTools.c" +} + + +static gpointer _editing_tools_photo_canvas_ref0 (gpointer self) { +#line 502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self ? editing_tools_photo_canvas_ref (self) : NULL; +#line 4341 "EditingTools.c" +} + + +static gboolean _editing_tools_editing_tool_on_keypress_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) { + gboolean result; + result = editing_tools_editing_tool_on_keypress ((EditingToolsEditingTool*) self, event); +#line 506 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 4350 "EditingTools.c" +} + + +static void editing_tools_editing_tool_real_activate (EditingToolsEditingTool* self, EditingToolsPhotoCanvas* canvas) { + EditingToolsPhotoCanvas* _tmp0_ = NULL; + EditingToolsEditingToolWindow* _tmp1_ = NULL; + EditingToolsPhotoCanvas* _tmp2_ = NULL; + EditingToolsPhotoCanvas* _tmp3_ = NULL; + EditingToolsEditingToolWindow* _tmp4_ = NULL; + EditingToolsEditingToolWindow* _tmp5_ = NULL; +#line 497 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 499 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->canvas; +#line 499 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_assert (_tmp0_ == NULL, "this.canvas == null"); +#line 500 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->tool_window; +#line 500 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_assert (_tmp1_ == NULL, "tool_window == null"); +#line 502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = canvas; +#line 502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _editing_tools_photo_canvas_ref0 (_tmp2_); +#line 502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_photo_canvas_unref0 (self->canvas); +#line 502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->canvas = _tmp3_; +#line 504 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = editing_tools_editing_tool_get_tool_window (self); +#line 504 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->tool_window); +#line 504 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->tool_window = _tmp4_; +#line 505 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->tool_window; +#line 505 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp5_ != NULL) { +#line 4389 "EditingTools.c" + EditingToolsEditingToolWindow* _tmp6_ = NULL; +#line 506 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->tool_window; +#line 506 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), "key-press-event", (GCallback) _editing_tools_editing_tool_on_keypress_gtk_widget_key_press_event, self); +#line 4395 "EditingTools.c" + } +#line 508 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (self, "activated"); +#line 4399 "EditingTools.c" +} + + +void editing_tools_editing_tool_activate (EditingToolsEditingTool* self, EditingToolsPhotoCanvas* canvas) { +#line 497 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self)); +#line 497 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->activate (self, canvas); +#line 4408 "EditingTools.c" +} + + +static void editing_tools_editing_tool_real_deactivate (EditingToolsEditingTool* self) { + gboolean _tmp0_ = FALSE; + EditingToolsPhotoCanvas* _tmp1_ = NULL; + EditingToolsEditingToolWindow* _tmp3_ = NULL; +#line 514 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->canvas; +#line 514 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_ == NULL) { +#line 4420 "EditingTools.c" + EditingToolsEditingToolWindow* _tmp2_ = NULL; +#line 514 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->tool_window; +#line 514 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = _tmp2_ == NULL; +#line 4426 "EditingTools.c" + } else { +#line 514 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = FALSE; +#line 4430 "EditingTools.c" + } +#line 514 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_) { +#line 515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 4436 "EditingTools.c" + } +#line 517 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_photo_canvas_unref0 (self->canvas); +#line 517 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->canvas = NULL; +#line 519 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->tool_window; +#line 519 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp3_ != NULL) { +#line 4446 "EditingTools.c" + EditingToolsEditingToolWindow* _tmp4_ = NULL; + guint _tmp5_ = 0U; +#line 520 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->tool_window; +#line 520 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("key-press-event", gtk_widget_get_type (), &_tmp5_, NULL, FALSE); +#line 520 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _editing_tools_editing_tool_on_keypress_gtk_widget_key_press_event, self); +#line 521 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->tool_window); +#line 521 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->tool_window = NULL; +#line 4459 "EditingTools.c" + } +#line 524 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (self, "deactivated"); +#line 4463 "EditingTools.c" +} + + +void editing_tools_editing_tool_deactivate (EditingToolsEditingTool* self) { +#line 512 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self)); +#line 512 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->deactivate (self); +#line 4472 "EditingTools.c" +} + + +gboolean editing_tools_editing_tool_is_activated (EditingToolsEditingTool* self) { + gboolean result = FALSE; + EditingToolsPhotoCanvas* _tmp0_ = NULL; +#line 527 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self), FALSE); +#line 528 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->canvas; +#line 528 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp0_ != NULL; +#line 528 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 4487 "EditingTools.c" +} + + +static EditingToolsEditingToolWindow* editing_tools_editing_tool_real_get_tool_window (EditingToolsEditingTool* self) { + EditingToolsEditingToolWindow* result = NULL; +#line 532 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = NULL; +#line 532 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 4497 "EditingTools.c" +} + + +EditingToolsEditingToolWindow* editing_tools_editing_tool_get_tool_window (EditingToolsEditingTool* self) { +#line 531 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self), NULL); +#line 531 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->get_tool_window (self); +#line 4506 "EditingTools.c" +} + + +static GdkPixbuf* editing_tools_editing_tool_real_get_display_pixbuf (EditingToolsEditingTool* self, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error) { + Dimensions _vala_max_dim = {0}; + GdkPixbuf* result = NULL; +#line 546 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (scaling != NULL, NULL); +#line 546 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PHOTO (photo), NULL); +#line 548 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dimensions_init (&_vala_max_dim, 0, 0); +#line 550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = NULL; +#line 550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (max_dim) { +#line 550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *max_dim = _vala_max_dim; +#line 4525 "EditingTools.c" + } +#line 550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 4529 "EditingTools.c" +} + + +GdkPixbuf* editing_tools_editing_tool_get_display_pixbuf (EditingToolsEditingTool* self, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error) { +#line 546 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self), NULL); +#line 546 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->get_display_pixbuf (self, scaling, photo, max_dim, error); +#line 4538 "EditingTools.c" +} + + +static void editing_tools_editing_tool_real_on_left_click (EditingToolsEditingTool* self, gint x, gint y) { +} + + +void editing_tools_editing_tool_on_left_click (EditingToolsEditingTool* self, gint x, gint y) { +#line 553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self)); +#line 553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->on_left_click (self, x, y); +#line 4551 "EditingTools.c" +} + + +static void editing_tools_editing_tool_real_on_left_released (EditingToolsEditingTool* self, gint x, gint y) { +} + + +void editing_tools_editing_tool_on_left_released (EditingToolsEditingTool* self, gint x, gint y) { +#line 556 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self)); +#line 556 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->on_left_released (self, x, y); +#line 4564 "EditingTools.c" +} + + +static void editing_tools_editing_tool_real_on_motion (EditingToolsEditingTool* self, gint x, gint y, GdkModifierType mask) { +} + + +void editing_tools_editing_tool_on_motion (EditingToolsEditingTool* self, gint x, gint y, GdkModifierType mask) { +#line 559 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self)); +#line 559 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->on_motion (self, x, y, mask); +#line 4577 "EditingTools.c" +} + + +static gboolean editing_tools_editing_tool_real_on_leave_notify_event (EditingToolsEditingTool* self) { + gboolean result = FALSE; +#line 563 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 563 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 4587 "EditingTools.c" +} + + +gboolean editing_tools_editing_tool_on_leave_notify_event (EditingToolsEditingTool* self) { +#line 562 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self), FALSE); +#line 562 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->on_leave_notify_event (self); +#line 4596 "EditingTools.c" +} + + +static gboolean editing_tools_editing_tool_real_on_keypress (EditingToolsEditingTool* self, GdkEventKey* event) { + gboolean result = FALSE; + GdkEventKey* _tmp0_ = NULL; + guint _tmp1_ = 0U; + const gchar* _tmp2_ = NULL; +#line 566 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 568 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = event; +#line 568 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->keyval; +#line 568 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gdk_keyval_name (_tmp1_); +#line 568 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (g_strcmp0 (_tmp2_, "Escape") == 0) { +#line 569 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_editing_tool_notify_cancel (self); +#line 571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 4621 "EditingTools.c" + } +#line 574 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 574 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 4627 "EditingTools.c" +} + + +gboolean editing_tools_editing_tool_on_keypress (EditingToolsEditingTool* self, GdkEventKey* event) { +#line 566 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self), FALSE); +#line 566 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->on_keypress (self, event); +#line 4636 "EditingTools.c" +} + + +static void editing_tools_editing_tool_real_paint (EditingToolsEditingTool* self, cairo_t* ctx) { +#line 577 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 4643 "EditingTools.c" +} + + +void editing_tools_editing_tool_paint (EditingToolsEditingTool* self, cairo_t* ctx) { +#line 577 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self)); +#line 577 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->paint (self, ctx); +#line 4652 "EditingTools.c" +} + + +void editing_tools_editing_tool_notify_cancel (EditingToolsEditingTool* self) { +#line 581 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (self)); +#line 582 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (self, "cancelled"); +#line 4661 "EditingTools.c" +} + + +static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOXED_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { + typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_BOXED_BOOLEAN) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer arg_3, gboolean arg_4, gpointer data2); + register GMarshalFunc_VOID__OBJECT_OBJECT_BOXED_BOOLEAN callback; + register GCClosure * cc; + register gpointer data1; + register gpointer data2; + cc = (GCClosure *) closure; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (n_param_values == 5); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (G_CCLOSURE_SWAP_DATA (closure)) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data1 = closure->data; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data2 = param_values->data[0].v_pointer; +#line 4680 "EditingTools.c" + } else { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data1 = param_values->data[0].v_pointer; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + data2 = closure->data; +#line 4686 "EditingTools.c" + } +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + callback = (GMarshalFunc_VOID__OBJECT_OBJECT_BOXED_BOOLEAN) (marshal_data ? marshal_data : cc->callback); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), g_value_get_boxed (param_values + 3), g_value_get_boolean (param_values + 4), data2); +#line 4692 "EditingTools.c" +} + + +static void editing_tools_value_editing_tool_init (GValue* value) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 4699 "EditingTools.c" +} + + +static void editing_tools_value_editing_tool_free_value (GValue* value) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (value->data[0].v_pointer) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_editing_tool_unref (value->data[0].v_pointer); +#line 4708 "EditingTools.c" + } +} + + +static void editing_tools_value_editing_tool_copy_value (const GValue* src_value, GValue* dest_value) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (src_value->data[0].v_pointer) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dest_value->data[0].v_pointer = editing_tools_editing_tool_ref (src_value->data[0].v_pointer); +#line 4718 "EditingTools.c" + } else { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dest_value->data[0].v_pointer = NULL; +#line 4722 "EditingTools.c" + } +} + + +static gpointer editing_tools_value_editing_tool_peek_pointer (const GValue* value) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return value->data[0].v_pointer; +#line 4730 "EditingTools.c" +} + + +static gchar* editing_tools_value_editing_tool_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (collect_values[0].v_pointer) { +#line 4737 "EditingTools.c" + EditingToolsEditingTool* object; + object = collect_values[0].v_pointer; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (object->parent_instance.g_class == NULL) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 4744 "EditingTools.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 4748 "EditingTools.c" + } +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = editing_tools_editing_tool_ref (object); +#line 4752 "EditingTools.c" + } else { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 4756 "EditingTools.c" + } +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return NULL; +#line 4760 "EditingTools.c" +} + + +static gchar* editing_tools_value_editing_tool_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + EditingToolsEditingTool** object_p; + object_p = collect_values[0].v_pointer; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!object_p) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 4771 "EditingTools.c" + } +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!value->data[0].v_pointer) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *object_p = NULL; +#line 4777 "EditingTools.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *object_p = value->data[0].v_pointer; +#line 4781 "EditingTools.c" + } else { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *object_p = editing_tools_editing_tool_ref (value->data[0].v_pointer); +#line 4785 "EditingTools.c" + } +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return NULL; +#line 4789 "EditingTools.c" +} + + +GParamSpec* editing_tools_param_spec_editing_tool (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + EditingToolsParamSpecEditingTool* spec; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (g_type_is_a (object_type, EDITING_TOOLS_TYPE_EDITING_TOOL), NULL); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return G_PARAM_SPEC (spec); +#line 4803 "EditingTools.c" +} + + +gpointer editing_tools_value_get_editing_tool (const GValue* value) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, EDITING_TOOLS_TYPE_EDITING_TOOL), NULL); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return value->data[0].v_pointer; +#line 4812 "EditingTools.c" +} + + +void editing_tools_value_set_editing_tool (GValue* value, gpointer v_object) { + EditingToolsEditingTool* old; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, EDITING_TOOLS_TYPE_EDITING_TOOL)); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + old = value->data[0].v_pointer; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (v_object) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, EDITING_TOOLS_TYPE_EDITING_TOOL)); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = v_object; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_editing_tool_ref (value->data[0].v_pointer); +#line 4832 "EditingTools.c" + } else { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 4836 "EditingTools.c" + } +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (old) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_editing_tool_unref (old); +#line 4842 "EditingTools.c" + } +} + + +void editing_tools_value_take_editing_tool (GValue* value, gpointer v_object) { + EditingToolsEditingTool* old; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, EDITING_TOOLS_TYPE_EDITING_TOOL)); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + old = value->data[0].v_pointer; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (v_object) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, EDITING_TOOLS_TYPE_EDITING_TOOL)); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = v_object; +#line 4861 "EditingTools.c" + } else { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 4865 "EditingTools.c" + } +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (old) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_editing_tool_unref (old); +#line 4871 "EditingTools.c" + } +} + + +static void editing_tools_editing_tool_class_init (EditingToolsEditingToolClass * klass) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_editing_tool_parent_class = g_type_class_peek_parent (klass); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->finalize = editing_tools_editing_tool_finalize; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsEditingToolPrivate)); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->activate = editing_tools_editing_tool_real_activate; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->deactivate = editing_tools_editing_tool_real_deactivate; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->get_tool_window = editing_tools_editing_tool_real_get_tool_window; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->get_display_pixbuf = editing_tools_editing_tool_real_get_display_pixbuf; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_left_click = editing_tools_editing_tool_real_on_left_click; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_left_released = editing_tools_editing_tool_real_on_left_released; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_motion = editing_tools_editing_tool_real_on_motion; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_leave_notify_event = editing_tools_editing_tool_real_on_leave_notify_event; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_keypress = editing_tools_editing_tool_real_on_keypress; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->paint = editing_tools_editing_tool_real_paint; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_new ("activated", EDITING_TOOLS_TYPE_EDITING_TOOL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_new ("deactivated", EDITING_TOOLS_TYPE_EDITING_TOOL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_new ("applied", EDITING_TOOLS_TYPE_EDITING_TOOL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOXED_BOOLEAN, G_TYPE_NONE, 4, TYPE_COMMAND, GDK_TYPE_PIXBUF, TYPE_DIMENSIONS, G_TYPE_BOOLEAN); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_new ("cancelled", EDITING_TOOLS_TYPE_EDITING_TOOL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_new ("aborted", EDITING_TOOLS_TYPE_EDITING_TOOL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +#line 4913 "EditingTools.c" +} + + +static void editing_tools_editing_tool_instance_init (EditingToolsEditingTool * self) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_EDITING_TOOL_GET_PRIVATE (self); +#line 469 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->canvas = NULL; +#line 471 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->tool_window = NULL; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->ref_count = 1; +#line 4926 "EditingTools.c" +} + + +static void editing_tools_editing_tool_finalize (EditingToolsEditingTool* obj) { + EditingToolsEditingTool * self; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_destroy (self); +#line 469 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_photo_canvas_unref0 (self->canvas); +#line 471 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->tool_window); +#line 472 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->surface); +#line 473 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (self->name); +#line 4944 "EditingTools.c" +} + + +GType editing_tools_editing_tool_get_type (void) { + static volatile gsize editing_tools_editing_tool_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_editing_tool_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { editing_tools_value_editing_tool_init, editing_tools_value_editing_tool_free_value, editing_tools_value_editing_tool_copy_value, editing_tools_value_editing_tool_peek_pointer, "p", editing_tools_value_editing_tool_collect_value, "p", editing_tools_value_editing_tool_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsEditingToolClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_editing_tool_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsEditingTool), 0, (GInstanceInitFunc) editing_tools_editing_tool_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType editing_tools_editing_tool_type_id; + editing_tools_editing_tool_type_id = g_type_register_fundamental (g_type_fundamental_next (), "EditingToolsEditingTool", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&editing_tools_editing_tool_type_id__volatile, editing_tools_editing_tool_type_id); + } + return editing_tools_editing_tool_type_id__volatile; +} + + +gpointer editing_tools_editing_tool_ref (gpointer instance) { + EditingToolsEditingTool* self; + self = instance; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_atomic_int_inc (&self->ref_count); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return instance; +#line 4969 "EditingTools.c" +} + + +void editing_tools_editing_tool_unref (gpointer instance) { + EditingToolsEditingTool* self; + self = instance; +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_GET_CLASS (self)->finalize (self); +#line 468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 4982 "EditingTools.c" + } +} + + +static EditingToolsCropToolReticleOrientation editing_tools_crop_tool_reticle_orientation_toggle (EditingToolsCropToolReticleOrientation self) { + EditingToolsCropToolReticleOrientation result = 0; + EditingToolsCropToolReticleOrientation _tmp0_ = 0; +#line 636 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (self == EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_LANDSCAPE) { +#line 636 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_PORTRAIT; +#line 4994 "EditingTools.c" + } else { +#line 637 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_LANDSCAPE; +#line 4998 "EditingTools.c" + } +#line 636 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp0_; +#line 636 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 5004 "EditingTools.c" +} + + +static GType editing_tools_crop_tool_reticle_orientation_get_type (void) { + static volatile gsize editing_tools_crop_tool_reticle_orientation_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_crop_tool_reticle_orientation_type_id__volatile)) { + static const GEnumValue values[] = {{EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_LANDSCAPE, "EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_LANDSCAPE", "landscape"}, {EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_PORTRAIT, "EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_PORTRAIT", "portrait"}, {0, NULL, NULL}}; + GType editing_tools_crop_tool_reticle_orientation_type_id; + editing_tools_crop_tool_reticle_orientation_type_id = g_enum_register_static ("EditingToolsCropToolReticleOrientation", values); + g_once_init_leave (&editing_tools_crop_tool_reticle_orientation_type_id__volatile, editing_tools_crop_tool_reticle_orientation_type_id); + } + return editing_tools_crop_tool_reticle_orientation_type_id__volatile; +} + + +static GType editing_tools_crop_tool_constraint_mode_get_type (void) { + static volatile gsize editing_tools_crop_tool_constraint_mode_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_crop_tool_constraint_mode_type_id__volatile)) { + static const GEnumValue values[] = {{EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_NORMAL, "EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_NORMAL", "normal"}, {EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_CUSTOM, "EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_CUSTOM", "custom"}, {0, NULL, NULL}}; + GType editing_tools_crop_tool_constraint_mode_type_id; + editing_tools_crop_tool_constraint_mode_type_id = g_enum_register_static ("EditingToolsCropToolConstraintMode", values); + g_once_init_leave (&editing_tools_crop_tool_constraint_mode_type_id__volatile, editing_tools_crop_tool_constraint_mode_type_id); + } + return editing_tools_crop_tool_constraint_mode_type_id__volatile; +} + + +static EditingToolsCropTool* editing_tools_crop_tool_construct (GType object_type) { + EditingToolsCropTool* self = NULL; +#line 737 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsCropTool*) editing_tools_editing_tool_construct (object_type, "CropTool"); +#line 736 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 5038 "EditingTools.c" +} + + +static EditingToolsCropTool* editing_tools_crop_tool_new (void) { +#line 736 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_crop_tool_construct (EDITING_TOOLS_TYPE_CROP_TOOL); +#line 5045 "EditingTools.c" +} + + +EditingToolsCropTool* editing_tools_crop_tool_factory (void) { + EditingToolsCropTool* result = NULL; + EditingToolsCropTool* _tmp0_ = NULL; +#line 741 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = editing_tools_crop_tool_new (); +#line 741 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp0_; +#line 741 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 5058 "EditingTools.c" +} + + +gboolean editing_tools_crop_tool_is_available (Photo* photo, Scaling* scaling) { + gboolean result = FALSE; + Dimensions dim = {0}; + Photo* _tmp0_ = NULL; + Dimensions _tmp1_ = {0}; + Dimensions _tmp2_ = {0}; + gboolean _tmp3_ = FALSE; + Dimensions _tmp4_ = {0}; + gint _tmp5_ = 0; +#line 744 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PHOTO (photo), FALSE); +#line 744 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (scaling != NULL, FALSE); +#line 745 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = photo; +#line 745 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_get_original_dimensions (_tmp0_, &_tmp1_); +#line 745 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scaling_get_scaled_dimensions (scaling, &_tmp1_, &_tmp2_); +#line 745 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dim = _tmp2_; +#line 747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = dim; +#line 747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.width; +#line 747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp5_ > EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE) { +#line 5089 "EditingTools.c" + Dimensions _tmp6_ = {0}; + gint _tmp7_ = 0; +#line 747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = dim; +#line 747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.height; +#line 747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp7_ > EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE; +#line 5098 "EditingTools.c" + } else { +#line 747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = FALSE; +#line 5102 "EditingTools.c" + } +#line 747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp3_; +#line 747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 5108 "EditingTools.c" +} + + +static void _vala_array_add4 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5119 "EditingTools.c" + } +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5125 "EditingTools.c" +} + + +static void _vala_array_add5 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5136 "EditingTools.c" + } +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5142 "EditingTools.c" +} + + +static void _vala_array_add6 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5153 "EditingTools.c" + } +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5159 "EditingTools.c" +} + + +static void _vala_array_add7 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5170 "EditingTools.c" + } +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5176 "EditingTools.c" +} + + +static void _vala_array_add8 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5187 "EditingTools.c" + } +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5193 "EditingTools.c" +} + + +static void _vala_array_add9 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5204 "EditingTools.c" + } +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5210 "EditingTools.c" +} + + +static void _vala_array_add10 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5221 "EditingTools.c" + } +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5227 "EditingTools.c" +} + + +static void _vala_array_add11 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5238 "EditingTools.c" + } +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5244 "EditingTools.c" +} + + +static void _vala_array_add12 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5255 "EditingTools.c" + } +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5261 "EditingTools.c" +} + + +static void _vala_array_add13 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5272 "EditingTools.c" + } +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5278 "EditingTools.c" +} + + +static void _vala_array_add14 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5289 "EditingTools.c" + } +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5295 "EditingTools.c" +} + + +static void _vala_array_add15 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5306 "EditingTools.c" + } +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5312 "EditingTools.c" +} + + +static void _vala_array_add16 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5323 "EditingTools.c" + } +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5329 "EditingTools.c" +} + + +static void _vala_array_add17 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5340 "EditingTools.c" + } +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5346 "EditingTools.c" +} + + +static void _vala_array_add18 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5357 "EditingTools.c" + } +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5363 "EditingTools.c" +} + + +static void _vala_array_add19 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5374 "EditingTools.c" + } +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5380 "EditingTools.c" +} + + +static void _vala_array_add20 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5391 "EditingTools.c" + } +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5397 "EditingTools.c" +} + + +static void _vala_array_add21 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5408 "EditingTools.c" + } +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5414 "EditingTools.c" +} + + +static void _vala_array_add22 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5425 "EditingTools.c" + } +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5431 "EditingTools.c" +} + + +static void _vala_array_add23 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5442 "EditingTools.c" + } +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5448 "EditingTools.c" +} + + +static void _vala_array_add24 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5459 "EditingTools.c" + } +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5465 "EditingTools.c" +} + + +static void _vala_array_add25 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5476 "EditingTools.c" + } +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5482 "EditingTools.c" +} + + +static void _vala_array_add26 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5493 "EditingTools.c" + } +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5499 "EditingTools.c" +} + + +static void _vala_array_add27 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5510 "EditingTools.c" + } +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5516 "EditingTools.c" +} + + +static void _vala_array_add28 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5527 "EditingTools.c" + } +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5533 "EditingTools.c" +} + + +static void _vala_array_add29 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5544 "EditingTools.c" + } +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5550 "EditingTools.c" +} + + +static void _vala_array_add30 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5561 "EditingTools.c" + } +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5567 "EditingTools.c" +} + + +static void _vala_array_add31 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5578 "EditingTools.c" + } +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5584 "EditingTools.c" +} + + +static void _vala_array_add32 (EditingToolsCropToolConstraintDescription*** array, int* length, int* size, EditingToolsCropToolConstraintDescription* value) { +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((*length) == (*size)) { +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *array = g_renew (EditingToolsCropToolConstraintDescription*, *array, (*size) + 1); +#line 5595 "EditingTools.c" + } +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[(*length)++] = value; +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*array)[*length] = NULL; +#line 5601 "EditingTools.c" +} + + +static EditingToolsCropToolConstraintDescription** editing_tools_crop_tool_create_constraints (int* result_length1) { + EditingToolsCropToolConstraintDescription** result = NULL; + EditingToolsCropToolConstraintDescription** _result_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp0_ = NULL; + gint _result__length1 = 0; + gint __result__size_ = 0; + EditingToolsCropToolConstraintDescription** _tmp1_ = NULL; + gint _tmp1__length1 = 0; + const gchar* _tmp2_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp3_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + const gchar* _tmp5_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp6_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp7_ = NULL; + gint _tmp7__length1 = 0; + const gchar* _tmp8_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp9_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp10_ = NULL; + gint _tmp10__length1 = 0; + const gchar* _tmp11_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp12_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp13_ = NULL; + gint _tmp13__length1 = 0; + const gchar* _tmp14_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp15_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp16_ = NULL; + gint _tmp16__length1 = 0; + const gchar* _tmp17_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp18_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp19_ = NULL; + gint _tmp19__length1 = 0; + const gchar* _tmp20_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp21_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp22_ = NULL; + gint _tmp22__length1 = 0; + const gchar* _tmp23_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp24_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp25_ = NULL; + gint _tmp25__length1 = 0; + const gchar* _tmp26_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp27_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp28_ = NULL; + gint _tmp28__length1 = 0; + const gchar* _tmp29_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp30_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp31_ = NULL; + gint _tmp31__length1 = 0; + const gchar* _tmp32_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp33_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp34_ = NULL; + gint _tmp34__length1 = 0; + const gchar* _tmp35_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp36_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp37_ = NULL; + gint _tmp37__length1 = 0; + const gchar* _tmp38_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp39_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp40_ = NULL; + gint _tmp40__length1 = 0; + const gchar* _tmp41_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp42_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp43_ = NULL; + gint _tmp43__length1 = 0; + const gchar* _tmp44_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp45_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp46_ = NULL; + gint _tmp46__length1 = 0; + const gchar* _tmp47_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp48_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp49_ = NULL; + gint _tmp49__length1 = 0; + const gchar* _tmp50_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp51_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp52_ = NULL; + gint _tmp52__length1 = 0; + const gchar* _tmp53_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp54_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp55_ = NULL; + gint _tmp55__length1 = 0; + const gchar* _tmp56_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp57_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp58_ = NULL; + gint _tmp58__length1 = 0; + const gchar* _tmp59_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp60_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp61_ = NULL; + gint _tmp61__length1 = 0; + const gchar* _tmp62_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp63_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp64_ = NULL; + gint _tmp64__length1 = 0; + const gchar* _tmp65_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp66_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp67_ = NULL; + gint _tmp67__length1 = 0; + const gchar* _tmp68_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp69_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp70_ = NULL; + gint _tmp70__length1 = 0; + const gchar* _tmp71_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp72_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp73_ = NULL; + gint _tmp73__length1 = 0; + const gchar* _tmp74_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp75_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp76_ = NULL; + gint _tmp76__length1 = 0; + const gchar* _tmp77_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp78_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp79_ = NULL; + gint _tmp79__length1 = 0; + const gchar* _tmp80_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp81_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp82_ = NULL; + gint _tmp82__length1 = 0; + const gchar* _tmp83_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp84_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp85_ = NULL; + gint _tmp85__length1 = 0; + const gchar* _tmp86_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp87_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp88_ = NULL; + gint _tmp88__length1 = 0; +#line 751 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = g_new0 (EditingToolsCropToolConstraintDescription*, 0 + 1); +#line 751 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = _tmp0_; +#line 751 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result__length1 = 0; +#line 751 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + __result__size_ = _result__length1; +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _result_; +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1__length1 = _result__length1; +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _ ("Unconstrained"); +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = editing_tools_crop_tool_constraint_description_new (_tmp2_, 0, 0, FALSE, EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO); +#line 753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add4 (&_result_, &_result__length1, &__result__size_, _tmp3_); +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _result_; +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4__length1 = _result__length1; +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _ ("Square"); +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = editing_tools_crop_tool_constraint_description_new (_tmp5_, 1, 1, FALSE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 754 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add5 (&_result_, &_result__length1, &__result__size_, _tmp6_); +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _result_; +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7__length1 = _result__length1; +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _ ("Screen"); +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = editing_tools_crop_tool_constraint_description_new (_tmp8_, 0, 0, TRUE, EDITING_TOOLS_CROP_TOOL_SCREEN_ASPECT_RATIO); +#line 755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add6 (&_result_, &_result__length1, &__result__size_, _tmp9_); +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _result_; +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10__length1 = _result__length1; +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _ ("Original Size"); +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = editing_tools_crop_tool_constraint_description_new (_tmp11_, 0, 0, TRUE, EDITING_TOOLS_CROP_TOOL_ORIGINAL_ASPECT_RATIO); +#line 756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add7 (&_result_, &_result__length1, &__result__size_, _tmp12_); +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _result_; +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13__length1 = _result__length1; +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _ ("-"); +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = editing_tools_crop_tool_constraint_description_new (_tmp14_, 0, 0, FALSE, EDITING_TOOLS_CROP_TOOL_SEPARATOR); +#line 757 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add8 (&_result_, &_result__length1, &__result__size_, _tmp15_); +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _result_; +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16__length1 = _result__length1; +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _ ("SD Video (4 : 3)"); +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = editing_tools_crop_tool_constraint_description_new (_tmp17_, 4, 3, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add9 (&_result_, &_result__length1, &__result__size_, _tmp18_); +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _result_; +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19__length1 = _result__length1; +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _ ("HD Video (16 : 9)"); +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = editing_tools_crop_tool_constraint_description_new (_tmp20_, 16, 9, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add10 (&_result_, &_result__length1, &__result__size_, _tmp21_); +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _result_; +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22__length1 = _result__length1; +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _ ("-"); +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = editing_tools_crop_tool_constraint_description_new (_tmp23_, 0, 0, FALSE, EDITING_TOOLS_CROP_TOOL_SEPARATOR); +#line 760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add11 (&_result_, &_result__length1, &__result__size_, _tmp24_); +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _result_; +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25__length1 = _result__length1; +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _ ("Wallet (2 x 3 in.)"); +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = editing_tools_crop_tool_constraint_description_new (_tmp26_, 3, 2, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 761 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add12 (&_result_, &_result__length1, &__result__size_, _tmp27_); +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = _result_; +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28__length1 = _result__length1; +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = _ ("Notecard (3 x 5 in.)"); +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = editing_tools_crop_tool_constraint_description_new (_tmp29_, 5, 3, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add13 (&_result_, &_result__length1, &__result__size_, _tmp30_); +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = _result_; +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31__length1 = _result__length1; +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = _ ("4 x 6 in."); +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = editing_tools_crop_tool_constraint_description_new (_tmp32_, 6, 4, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add14 (&_result_, &_result__length1, &__result__size_, _tmp33_); +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = _result_; +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34__length1 = _result__length1; +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = _ ("5 x 7 in."); +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = editing_tools_crop_tool_constraint_description_new (_tmp35_, 7, 5, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 764 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add15 (&_result_, &_result__length1, &__result__size_, _tmp36_); +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = _result_; +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37__length1 = _result__length1; +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = _ ("8 x 10 in."); +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = editing_tools_crop_tool_constraint_description_new (_tmp38_, 10, 8, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add16 (&_result_, &_result__length1, &__result__size_, _tmp39_); +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = _result_; +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40__length1 = _result__length1; +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = _ ("Letter (8.5 x 11 in.)"); +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = editing_tools_crop_tool_constraint_description_new (_tmp41_, 85, 110, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add17 (&_result_, &_result__length1, &__result__size_, _tmp42_); +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = _result_; +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43__length1 = _result__length1; +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44_ = _ ("11 x 14 in."); +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = editing_tools_crop_tool_constraint_description_new (_tmp44_, 14, 11, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add18 (&_result_, &_result__length1, &__result__size_, _tmp45_); +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = _result_; +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46__length1 = _result__length1; +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = _ ("Tabloid (11 x 17 in.)"); +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp48_ = editing_tools_crop_tool_constraint_description_new (_tmp47_, 17, 11, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add19 (&_result_, &_result__length1, &__result__size_, _tmp48_); +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp49_ = _result_; +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp49__length1 = _result__length1; +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp50_ = _ ("16 x 20 in."); +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp51_ = editing_tools_crop_tool_constraint_description_new (_tmp50_, 20, 16, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add20 (&_result_, &_result__length1, &__result__size_, _tmp51_); +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52_ = _result_; +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52__length1 = _result__length1; +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp53_ = _ ("-"); +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp54_ = editing_tools_crop_tool_constraint_description_new (_tmp53_, 0, 0, FALSE, EDITING_TOOLS_CROP_TOOL_SEPARATOR); +#line 770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add21 (&_result_, &_result__length1, &__result__size_, _tmp54_); +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp55_ = _result_; +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp55__length1 = _result__length1; +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp56_ = _ ("Metric Wallet (9 x 13 cm)"); +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp57_ = editing_tools_crop_tool_constraint_description_new (_tmp56_, 13, 9, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add22 (&_result_, &_result__length1, &__result__size_, _tmp57_); +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp58_ = _result_; +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp58__length1 = _result__length1; +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp59_ = _ ("Postcard (10 x 15 cm)"); +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp60_ = editing_tools_crop_tool_constraint_description_new (_tmp59_, 15, 10, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add23 (&_result_, &_result__length1, &__result__size_, _tmp60_); +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp61_ = _result_; +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp61__length1 = _result__length1; +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp62_ = _ ("13 x 18 cm"); +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp63_ = editing_tools_crop_tool_constraint_description_new (_tmp62_, 18, 13, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add24 (&_result_, &_result__length1, &__result__size_, _tmp63_); +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp64_ = _result_; +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp64__length1 = _result__length1; +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp65_ = _ ("18 x 24 cm"); +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp66_ = editing_tools_crop_tool_constraint_description_new (_tmp65_, 24, 18, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add25 (&_result_, &_result__length1, &__result__size_, _tmp66_); +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp67_ = _result_; +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp67__length1 = _result__length1; +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp68_ = _ ("A4 (210 x 297 mm)"); +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp69_ = editing_tools_crop_tool_constraint_description_new (_tmp68_, 210, 297, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add26 (&_result_, &_result__length1, &__result__size_, _tmp69_); +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp70_ = _result_; +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp70__length1 = _result__length1; +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp71_ = _ ("20 x 30 cm"); +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp72_ = editing_tools_crop_tool_constraint_description_new (_tmp71_, 30, 20, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add27 (&_result_, &_result__length1, &__result__size_, _tmp72_); +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp73_ = _result_; +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp73__length1 = _result__length1; +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp74_ = _ ("24 x 40 cm"); +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp75_ = editing_tools_crop_tool_constraint_description_new (_tmp74_, 40, 24, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 777 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add28 (&_result_, &_result__length1, &__result__size_, _tmp75_); +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp76_ = _result_; +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp76__length1 = _result__length1; +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp77_ = _ ("30 x 40 cm"); +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp78_ = editing_tools_crop_tool_constraint_description_new (_tmp77_, 40, 30, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add29 (&_result_, &_result__length1, &__result__size_, _tmp78_); +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp79_ = _result_; +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp79__length1 = _result__length1; +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp80_ = _ ("A3 (297 x 420 mm)"); +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp81_ = editing_tools_crop_tool_constraint_description_new (_tmp80_, 420, 297, TRUE, EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS); +#line 779 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add30 (&_result_, &_result__length1, &__result__size_, _tmp81_); +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp82_ = _result_; +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp82__length1 = _result__length1; +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp83_ = _ ("-"); +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp84_ = editing_tools_crop_tool_constraint_description_new (_tmp83_, 0, 0, FALSE, EDITING_TOOLS_CROP_TOOL_SEPARATOR); +#line 780 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add31 (&_result_, &_result__length1, &__result__size_, _tmp84_); +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp85_ = _result_; +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp85__length1 = _result__length1; +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp86_ = _ ("Custom"); +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp87_ = editing_tools_crop_tool_constraint_description_new (_tmp86_, 0, 0, TRUE, EDITING_TOOLS_CROP_TOOL_CUSTOM_ASPECT_RATIO); +#line 781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_array_add32 (&_result_, &_result__length1, &__result__size_, _tmp87_); +#line 783 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp88_ = _result_; +#line 783 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp88__length1 = _result__length1; +#line 783 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (result_length1) { +#line 783 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result_length1 = _tmp88__length1; +#line 6035 "EditingTools.c" + } +#line 783 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp88_; +#line 783 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 6041 "EditingTools.c" +} + + +static gpointer _editing_tools_crop_tool_constraint_description_ref0 (gpointer self) { +#line 790 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self ? editing_tools_crop_tool_constraint_description_ref (self) : NULL; +#line 6048 "EditingTools.c" +} + + +static GtkListStore* editing_tools_crop_tool_create_constraint_list (EditingToolsCropToolConstraintDescription** constraint_data, int constraint_data_length1) { + GtkListStore* result = NULL; + GtkListStore* _result_ = NULL; + GtkListStore* _tmp0_ = NULL; + GtkTreeIter iter = {0}; + EditingToolsCropToolConstraintDescription** _tmp1_ = NULL; + gint _tmp1__length1 = 0; +#line 787 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = gtk_list_store_new (1, G_TYPE_STRING, G_TYPE_STRING, -1); +#line 787 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = _tmp0_; +#line 790 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = constraint_data; +#line 790 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1__length1 = constraint_data_length1; +#line 6067 "EditingTools.c" + { + EditingToolsCropToolConstraintDescription** constraint_collection = NULL; + gint constraint_collection_length1 = 0; + gint _constraint_collection_size_ = 0; + gint constraint_it = 0; +#line 790 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + constraint_collection = _tmp1_; +#line 790 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + constraint_collection_length1 = _tmp1__length1; +#line 790 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + for (constraint_it = 0; constraint_it < _tmp1__length1; constraint_it = constraint_it + 1) { +#line 6079 "EditingTools.c" + EditingToolsCropToolConstraintDescription* _tmp2_ = NULL; + EditingToolsCropToolConstraintDescription* constraint = NULL; +#line 790 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _editing_tools_crop_tool_constraint_description_ref0 (constraint_collection[constraint_it]); +#line 790 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + constraint = _tmp2_; +#line 6086 "EditingTools.c" + { + GtkListStore* _tmp3_ = NULL; + GtkTreeIter _tmp4_ = {0}; + GtkListStore* _tmp5_ = NULL; + GtkTreeIter _tmp6_ = {0}; + EditingToolsCropToolConstraintDescription* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + GValue _tmp9_ = {0}; +#line 791 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _result_; +#line 791 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_list_store_append (_tmp3_, &_tmp4_); +#line 791 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + iter = _tmp4_; +#line 792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _result_; +#line 792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = iter; +#line 792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = constraint; +#line 792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_->name; +#line 792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_value_init (&_tmp9_, G_TYPE_STRING); +#line 792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_value_set_string (&_tmp9_, _tmp8_); +#line 792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_list_store_set_value (_tmp5_, &_tmp6_, 0, &_tmp9_); +#line 792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_IS_VALUE (&_tmp9_) ? (g_value_unset (&_tmp9_), NULL) : NULL; +#line 790 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_crop_tool_constraint_description_unref0 (constraint); +#line 6119 "EditingTools.c" + } + } + } +#line 795 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _result_; +#line 795 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 6127 "EditingTools.c" +} + + +static void editing_tools_crop_tool_update_pivot_button_state (EditingToolsCropTool* self) { + EditingToolsCropToolCropToolWindow* _tmp0_ = NULL; + GtkButton* _tmp1_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp2_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#line 798 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_tool_window; +#line 799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->pivot_reticle_button; +#line 799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = editing_tools_crop_tool_get_selected_constraint (self); +#line 799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_->is_pivotable; +#line 799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), _tmp4_); +#line 799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_crop_tool_constraint_description_unref0 (_tmp3_); +#line 6153 "EditingTools.c" +} + + +static EditingToolsCropToolConstraintDescription* editing_tools_crop_tool_get_selected_constraint (EditingToolsCropTool* self) { + EditingToolsCropToolConstraintDescription* result = NULL; + EditingToolsCropToolConstraintDescription* _result_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + EditingToolsCropToolCropToolWindow* _tmp1_ = NULL; + GtkComboBox* _tmp2_ = NULL; + gint _tmp3_ = 0; + EditingToolsCropToolConstraintDescription* _tmp4_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp5_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp6_ = NULL; + gfloat _tmp7_ = 0.0F; +#line 803 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self), NULL); +#line 804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->constraints; +#line 804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0__length1 = self->priv->constraints_length1; +#line 804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->crop_tool_window; +#line 804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_->constraint_combo; +#line 804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = gtk_combo_box_get_active (_tmp2_); +#line 804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp0_[_tmp3_]; +#line 804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _editing_tools_crop_tool_constraint_description_ref0 (_tmp4_); +#line 804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = _tmp5_; +#line 806 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _result_; +#line 806 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_->aspect_ratio; +#line 806 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp7_ == EDITING_TOOLS_CROP_TOOL_ORIGINAL_ASPECT_RATIO) { +#line 6193 "EditingTools.c" + EditingToolsCropToolConstraintDescription* _tmp8_ = NULL; + EditingToolsPhotoCanvas* _tmp9_ = NULL; + GdkRectangle _tmp10_ = {0}; + gint _tmp11_ = 0; + EditingToolsCropToolConstraintDescription* _tmp12_ = NULL; + EditingToolsPhotoCanvas* _tmp13_ = NULL; + GdkRectangle _tmp14_ = {0}; + gint _tmp15_ = 0; +#line 807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _result_; +#line 807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp9_, &_tmp10_); +#line 807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_.width; +#line 807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_->basis_width = _tmp11_; +#line 808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _result_; +#line 808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp13_, &_tmp14_); +#line 808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = _tmp14_.height; +#line 808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_->basis_height = _tmp15_; +#line 6222 "EditingTools.c" + } else { + EditingToolsCropToolConstraintDescription* _tmp16_ = NULL; + gfloat _tmp17_ = 0.0F; +#line 809 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _result_; +#line 809 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _tmp16_->aspect_ratio; +#line 809 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp17_ == EDITING_TOOLS_CROP_TOOL_SCREEN_ASPECT_RATIO) { +#line 6232 "EditingTools.c" + GdkScreen* screen = NULL; + GdkScreen* _tmp18_ = NULL; + GdkScreen* _tmp19_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp20_ = NULL; + GdkScreen* _tmp21_ = NULL; + gint _tmp22_ = 0; + EditingToolsCropToolConstraintDescription* _tmp23_ = NULL; + GdkScreen* _tmp24_ = NULL; + gint _tmp25_ = 0; +#line 810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = gdk_screen_get_default (); +#line 810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _g_object_ref0 (_tmp18_); +#line 810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + screen = _tmp19_; +#line 811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _result_; +#line 811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = screen; +#line 811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = gdk_screen_get_width (_tmp21_); +#line 811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_->basis_width = _tmp22_; +#line 812 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _result_; +#line 812 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = screen; +#line 812 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = gdk_screen_get_height (_tmp24_); +#line 812 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_->basis_height = _tmp25_; +#line 809 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (screen); +#line 6266 "EditingTools.c" + } + } +#line 815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _result_; +#line 815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 6273 "EditingTools.c" +} + + +static gboolean editing_tools_crop_tool_on_width_entry_focus_out (EditingToolsCropTool* self, GdkEventFocus* event) { + gboolean result = FALSE; + EditingToolsCropToolCropToolWindow* _tmp0_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp1_ = NULL; + GtkEntry* _tmp2_ = NULL; + GtkEntry* _tmp3_ = NULL; + GdkEventFocus* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self), FALSE); +#line 818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_tool_window; +#line 819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->crop_tool_window; +#line 819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_->custom_width_entry; +#line 819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp0_->most_recently_edited); +#line 819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_->most_recently_edited = _tmp3_; +#line 820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = event; +#line 820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = editing_tools_crop_tool_on_custom_entry_focus_out (self, _tmp4_); +#line 820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp5_; +#line 820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 6309 "EditingTools.c" +} + + +static gboolean editing_tools_crop_tool_on_height_entry_focus_out (EditingToolsCropTool* self, GdkEventFocus* event) { + gboolean result = FALSE; + EditingToolsCropToolCropToolWindow* _tmp0_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp1_ = NULL; + GtkEntry* _tmp2_ = NULL; + GtkEntry* _tmp3_ = NULL; + GdkEventFocus* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 823 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self), FALSE); +#line 823 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_tool_window; +#line 824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->crop_tool_window; +#line 824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_->custom_height_entry; +#line 824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp0_->most_recently_edited); +#line 824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_->most_recently_edited = _tmp3_; +#line 825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = event; +#line 825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = editing_tools_crop_tool_on_custom_entry_focus_out (self, _tmp4_); +#line 825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp5_; +#line 825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 6345 "EditingTools.c" +} + + +static gboolean editing_tools_crop_tool_on_custom_entry_focus_out (EditingToolsCropTool* self, GdkEventFocus* event) { + gboolean result = FALSE; + gint width = 0; + EditingToolsCropToolCropToolWindow* _tmp0_ = NULL; + GtkEntry* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gint _tmp4_ = 0; + gint height = 0; + EditingToolsCropToolCropToolWindow* _tmp5_ = NULL; + GtkEntry* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + gint _tmp9_ = 0; + gint _tmp10_ = 0; + gint _tmp16_ = 0; + gboolean _tmp22_ = FALSE; + gint _tmp23_ = 0; + gint _tmp24_ = 0; + gint _tmp27_ = 0; + gint _tmp28_ = 0; + gfloat _tmp29_ = 0.0F; + gint _tmp63_ = 0; + gint _tmp64_ = 0; + Box new_crop = {0}; + Box _tmp65_ = {0}; + Box _tmp66_ = {0}; + Box _tmp67_ = {0}; + Box _tmp68_ = {0}; + EditingToolsPhotoCanvas* _tmp69_ = NULL; + Box _tmp70_ = {0}; + EditingToolsPhotoCanvas* _tmp71_ = NULL; + gint _tmp72_ = 0; + gint _tmp73_ = 0; +#line 828 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self), FALSE); +#line 828 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_tool_window; +#line 829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->custom_width_entry; +#line 829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gtk_entry_get_text (_tmp1_); +#line 829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = atoi (_tmp3_); +#line 829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + width = _tmp4_; +#line 830 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->crop_tool_window; +#line 830 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_->custom_height_entry; +#line 830 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = gtk_entry_get_text (_tmp6_); +#line 830 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_; +#line 830 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = atoi (_tmp8_); +#line 830 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + height = _tmp9_; +#line 832 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = width; +#line 832 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp10_ < 1) { +#line 6415 "EditingTools.c" + EditingToolsCropToolCropToolWindow* _tmp11_ = NULL; + GtkEntry* _tmp12_ = NULL; + gint _tmp13_ = 0; + gchar* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; +#line 833 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + width = 1; +#line 834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->crop_tool_window; +#line 834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_->custom_width_entry; +#line 834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = width; +#line 834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = g_strdup_printf ("%d", _tmp13_); +#line 834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = _tmp14_; +#line 834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp12_, _tmp15_); +#line 834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp15_); +#line 6437 "EditingTools.c" + } +#line 837 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = height; +#line 837 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp16_ < 1) { +#line 6443 "EditingTools.c" + EditingToolsCropToolCropToolWindow* _tmp17_ = NULL; + GtkEntry* _tmp18_ = NULL; + gint _tmp19_ = 0; + gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; +#line 838 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + height = 1; +#line 839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->crop_tool_window; +#line 839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_->custom_height_entry; +#line 839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = height; +#line 839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = g_strdup_printf ("%d", _tmp19_); +#line 839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = _tmp20_; +#line 839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp18_, _tmp21_); +#line 839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp21_); +#line 6465 "EditingTools.c" + } +#line 842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = width; +#line 842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->priv->custom_width; +#line 842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp23_ == _tmp24_) { +#line 6473 "EditingTools.c" + gint _tmp25_ = 0; + gint _tmp26_ = 0; +#line 842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = height; +#line 842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = self->priv->custom_height; +#line 842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _tmp25_ == _tmp26_; +#line 6482 "EditingTools.c" + } else { +#line 842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = FALSE; +#line 6486 "EditingTools.c" + } +#line 842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp22_) { +#line 843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 6494 "EditingTools.c" + } +#line 845 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = width; +#line 845 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = height; +#line 845 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_aspect_ratio = ((gfloat) _tmp27_) / ((gfloat) _tmp28_); +#line 847 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = self->priv->custom_aspect_ratio; +#line 847 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp29_ < EDITING_TOOLS_CROP_TOOL_MIN_ASPECT_RATIO) { +#line 6506 "EditingTools.c" + EditingToolsCropToolCropToolWindow* _tmp30_ = NULL; + GtkEntry* _tmp31_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp32_ = NULL; + GtkEntry* _tmp33_ = NULL; +#line 848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = self->priv->crop_tool_window; +#line 848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = _tmp30_->most_recently_edited; +#line 848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = self->priv->crop_tool_window; +#line 848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = _tmp32_->custom_height_entry; +#line 848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp31_ == _tmp33_) { +#line 6521 "EditingTools.c" + gint _tmp34_ = 0; + EditingToolsCropToolCropToolWindow* _tmp35_ = NULL; + GtkEntry* _tmp36_ = NULL; + gint _tmp37_ = 0; + gchar* _tmp38_ = NULL; + gchar* _tmp39_ = NULL; +#line 849 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = width; +#line 849 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + height = (gint) (_tmp34_ / EDITING_TOOLS_CROP_TOOL_MIN_ASPECT_RATIO); +#line 850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = self->priv->crop_tool_window; +#line 850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = _tmp35_->custom_height_entry; +#line 850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = height; +#line 850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = g_strdup_printf ("%d", _tmp37_); +#line 850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = _tmp38_; +#line 850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp36_, _tmp39_); +#line 850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp39_); +#line 6546 "EditingTools.c" + } else { + gint _tmp40_ = 0; + EditingToolsCropToolCropToolWindow* _tmp41_ = NULL; + GtkEntry* _tmp42_ = NULL; + gint _tmp43_ = 0; + gchar* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; +#line 852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = height; +#line 852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + width = (gint) (_tmp40_ * EDITING_TOOLS_CROP_TOOL_MIN_ASPECT_RATIO); +#line 853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = self->priv->crop_tool_window; +#line 853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = _tmp41_->custom_width_entry; +#line 853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = width; +#line 853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44_ = g_strdup_printf ("%d", _tmp43_); +#line 853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = _tmp44_; +#line 853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp42_, _tmp45_); +#line 853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp45_); +#line 6572 "EditingTools.c" + } + } else { + gfloat _tmp46_ = 0.0F; +#line 855 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = self->priv->custom_aspect_ratio; +#line 855 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp46_ > EDITING_TOOLS_CROP_TOOL_MAX_ASPECT_RATIO) { +#line 6580 "EditingTools.c" + EditingToolsCropToolCropToolWindow* _tmp47_ = NULL; + GtkEntry* _tmp48_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp49_ = NULL; + GtkEntry* _tmp50_ = NULL; +#line 856 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = self->priv->crop_tool_window; +#line 856 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp48_ = _tmp47_->most_recently_edited; +#line 856 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp49_ = self->priv->crop_tool_window; +#line 856 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp50_ = _tmp49_->custom_height_entry; +#line 856 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp48_ == _tmp50_) { +#line 6595 "EditingTools.c" + gint _tmp51_ = 0; + EditingToolsCropToolCropToolWindow* _tmp52_ = NULL; + GtkEntry* _tmp53_ = NULL; + gint _tmp54_ = 0; + gchar* _tmp55_ = NULL; + gchar* _tmp56_ = NULL; +#line 857 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp51_ = width; +#line 857 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + height = (gint) (_tmp51_ / EDITING_TOOLS_CROP_TOOL_MAX_ASPECT_RATIO); +#line 858 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52_ = self->priv->crop_tool_window; +#line 858 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp53_ = _tmp52_->custom_height_entry; +#line 858 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp54_ = height; +#line 858 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp55_ = g_strdup_printf ("%d", _tmp54_); +#line 858 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp56_ = _tmp55_; +#line 858 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp53_, _tmp56_); +#line 858 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp56_); +#line 6620 "EditingTools.c" + } else { + gint _tmp57_ = 0; + EditingToolsCropToolCropToolWindow* _tmp58_ = NULL; + GtkEntry* _tmp59_ = NULL; + gint _tmp60_ = 0; + gchar* _tmp61_ = NULL; + gchar* _tmp62_ = NULL; +#line 860 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp57_ = height; +#line 860 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + width = (gint) (_tmp57_ * EDITING_TOOLS_CROP_TOOL_MAX_ASPECT_RATIO); +#line 861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp58_ = self->priv->crop_tool_window; +#line 861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp59_ = _tmp58_->custom_width_entry; +#line 861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp60_ = width; +#line 861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp61_ = g_strdup_printf ("%d", _tmp60_); +#line 861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp62_ = _tmp61_; +#line 861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp59_, _tmp62_); +#line 861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp62_); +#line 6646 "EditingTools.c" + } + } + } +#line 865 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp63_ = width; +#line 865 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp64_ = height; +#line 865 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_aspect_ratio = ((gfloat) _tmp63_) / ((gfloat) _tmp64_); +#line 867 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp65_ = self->priv->scaled_crop; +#line 867 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constrain_crop (self, &_tmp65_, &_tmp66_); +#line 867 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_crop = _tmp66_; +#line 869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp67_ = new_crop; +#line 869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_crop_resized (self, &_tmp67_); +#line 870 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp68_ = new_crop; +#line 870 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_crop = _tmp68_; +#line 871 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp69_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 871 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp70_ = new_crop; +#line 871 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_invalidate_area (_tmp69_, &_tmp70_); +#line 872 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp71_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 872 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp71_); +#line 874 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp72_ = width; +#line 874 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_width = _tmp72_; +#line 875 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp73_ = height; +#line 875 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_height = _tmp73_; +#line 877 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 877 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 6692 "EditingTools.c" +} + + +static void editing_tools_crop_tool_on_width_insert_text (EditingToolsCropTool* self, const gchar* text, gint length, gint* position) { + EditingToolsCropToolCropToolWindow* _tmp0_ = NULL; + GtkEntry* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gint _tmp3_ = 0; +#line 880 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 880 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (text != NULL); +#line 881 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_tool_window; +#line 881 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->custom_width_entry; +#line 881 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = text; +#line 881 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = length; +#line 881 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_on_entry_insert_text (self, _tmp1_, _tmp2_, _tmp3_, position); +#line 6715 "EditingTools.c" +} + + +static void editing_tools_crop_tool_on_height_insert_text (EditingToolsCropTool* self, const gchar* text, gint length, gint* position) { + EditingToolsCropToolCropToolWindow* _tmp0_ = NULL; + GtkEntry* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gint _tmp3_ = 0; +#line 884 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 884 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (text != NULL); +#line 885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_tool_window; +#line 885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->custom_height_entry; +#line 885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = text; +#line 885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = length; +#line 885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_on_entry_insert_text (self, _tmp1_, _tmp2_, _tmp3_, position); +#line 6738 "EditingTools.c" +} + + +static gchar string_get (const gchar* self, glong index) { + gchar result = '\0'; + glong _tmp0_ = 0L; + gchar _tmp1_ = '\0'; +#line 1086 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, '\0'); +#line 1087 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = index; +#line 1087 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = ((gchar*) self)[_tmp0_]; +#line 1087 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp1_; +#line 1087 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 6756 "EditingTools.c" +} + + +static void editing_tools_crop_tool_on_entry_insert_text (EditingToolsCropTool* self, GtkEntry* sender, const gchar* text, gint length, gint* position) { + gboolean _tmp0_ = FALSE; + gint _tmp1_ = 0; + gchar* new_text = NULL; + gchar* _tmp5_ = NULL; + const gchar* _tmp21_ = NULL; + gint _tmp22_ = 0; + gint _tmp23_ = 0; + GtkEntry* _tmp29_ = NULL; +#line 888 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 888 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (GTK_IS_ENTRY (sender)); +#line 888 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (text != NULL); +#line 889 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->entry_insert_in_progress; +#line 889 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_) { +#line 890 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 6781 "EditingTools.c" + } +#line 892 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->entry_insert_in_progress = TRUE; +#line 894 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = length; +#line 894 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_ == -1) { +#line 6789 "EditingTools.c" + const gchar* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; +#line 895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = text; +#line 895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = strlen (_tmp2_); +#line 895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + length = (gint) _tmp4_; +#line 6801 "EditingTools.c" + } +#line 898 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = g_strdup (""); +#line 898 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_text = _tmp5_; +#line 6807 "EditingTools.c" + { + gint ctr = 0; +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ctr = 0; +#line 6812 "EditingTools.c" + { + gboolean _tmp6_ = FALSE; +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = TRUE; +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + while (TRUE) { +#line 6819 "EditingTools.c" + gint _tmp8_ = 0; + gint _tmp9_ = 0; + const gchar* _tmp10_ = NULL; + gint _tmp11_ = 0; + gchar _tmp12_ = '\0'; + gboolean _tmp13_ = FALSE; +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp6_) { +#line 6828 "EditingTools.c" + gint _tmp7_ = 0; +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = ctr; +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ctr = _tmp7_ + 1; +#line 6834 "EditingTools.c" + } +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = FALSE; +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = ctr; +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = length; +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!(_tmp8_ < _tmp9_)) { +#line 899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 6846 "EditingTools.c" + } +#line 900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = text; +#line 900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = ctr; +#line 900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = string_get (_tmp10_, (glong) _tmp11_); +#line 900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = g_ascii_isdigit (_tmp12_); +#line 900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp13_) { +#line 6858 "EditingTools.c" + const gchar* _tmp14_ = NULL; + const gchar* _tmp15_ = NULL; + gint _tmp16_ = 0; + gchar _tmp17_ = '\0'; + gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = new_text; +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = text; +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = ctr; +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = string_get (_tmp15_, (glong) _tmp16_); +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = g_strdup_printf ("%c", (gchar) _tmp17_); +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_; +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = g_strconcat (_tmp14_, _tmp19_, NULL); +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (new_text); +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_text = _tmp20_; +#line 901 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp19_); +#line 6886 "EditingTools.c" + } + } + } + } +#line 905 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = new_text; +#line 905 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = strlen (_tmp21_); +#line 905 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _tmp22_; +#line 905 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp23_ > 0) { +#line 6899 "EditingTools.c" + GtkEntry* _tmp24_ = NULL; + const gchar* _tmp25_ = NULL; + const gchar* _tmp26_ = NULL; + gint _tmp27_ = 0; + gint _tmp28_ = 0; +#line 906 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = sender; +#line 906 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = new_text; +#line 906 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = new_text; +#line 906 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = strlen (_tmp26_); +#line 906 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = _tmp27_; +#line 906 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_editable_insert_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GTK_TYPE_EDITABLE, GtkEditable), _tmp25_, (gint) _tmp28_, position); +#line 6917 "EditingTools.c" + } +#line 908 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = sender; +#line 908 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_stop_emission_by_name (_tmp29_, "insert-text"); +#line 910 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->entry_insert_in_progress = FALSE; +#line 888 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (new_text); +#line 6927 "EditingTools.c" +} + + +static gfloat editing_tools_crop_tool_get_constraint_aspect_ratio (EditingToolsCropTool* self) { + gfloat result = 0.0F; + gfloat _result_ = 0.0F; + EditingToolsCropToolConstraintDescription* _tmp0_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp1_ = NULL; + gfloat _tmp2_ = 0.0F; + gfloat _tmp3_ = 0.0F; + gfloat _tmp4_ = 0.0F; + EditingToolsCropToolReticleOrientation _tmp20_ = 0; +#line 913 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self), 0.0F); +#line 914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = editing_tools_crop_tool_get_selected_constraint (self); +#line 914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_; +#line 914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_->aspect_ratio; +#line 914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_crop_tool_constraint_description_unref0 (_tmp1_); +#line 914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = _tmp3_; +#line 916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _result_; +#line 916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp4_ == EDITING_TOOLS_CROP_TOOL_ORIGINAL_ASPECT_RATIO) { +#line 6958 "EditingTools.c" + EditingToolsPhotoCanvas* _tmp5_ = NULL; + GdkRectangle _tmp6_ = {0}; + gint _tmp7_ = 0; + EditingToolsPhotoCanvas* _tmp8_ = NULL; + GdkRectangle _tmp9_ = {0}; + gint _tmp10_ = 0; +#line 917 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 917 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp5_, &_tmp6_); +#line 917 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.width; +#line 917 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 917 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp8_, &_tmp9_); +#line 917 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.height; +#line 917 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = ((gfloat) _tmp7_) / ((gfloat) _tmp10_); +#line 6979 "EditingTools.c" + } else { + gfloat _tmp11_ = 0.0F; +#line 919 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _result_; +#line 919 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp11_ == EDITING_TOOLS_CROP_TOOL_SCREEN_ASPECT_RATIO) { +#line 6986 "EditingTools.c" + GdkScreen* screen = NULL; + GdkScreen* _tmp12_ = NULL; + GdkScreen* _tmp13_ = NULL; + GdkScreen* _tmp14_ = NULL; + gint _tmp15_ = 0; + GdkScreen* _tmp16_ = NULL; + gint _tmp17_ = 0; +#line 920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = gdk_screen_get_default (); +#line 920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _g_object_ref0 (_tmp12_); +#line 920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + screen = _tmp13_; +#line 921 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = screen; +#line 921 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = gdk_screen_get_width (_tmp14_); +#line 921 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = screen; +#line 921 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = gdk_screen_get_height (_tmp16_); +#line 921 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = ((gfloat) _tmp15_) / ((gfloat) _tmp17_); +#line 919 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (screen); +#line 7012 "EditingTools.c" + } else { + gfloat _tmp18_ = 0.0F; +#line 922 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _result_; +#line 922 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp18_ == EDITING_TOOLS_CROP_TOOL_CUSTOM_ASPECT_RATIO) { +#line 7019 "EditingTools.c" + gfloat _tmp19_ = 0.0F; +#line 923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = self->priv->custom_aspect_ratio; +#line 923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = _tmp19_; +#line 7025 "EditingTools.c" + } + } + } +#line 925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = self->priv->reticle_orientation; +#line 925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp20_ == EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_PORTRAIT) { +#line 7033 "EditingTools.c" + gfloat _tmp21_ = 0.0F; +#line 926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = _result_; +#line 926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = 1.0f / _tmp21_; +#line 7039 "EditingTools.c" + } +#line 928 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _result_; +#line 928 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 7045 "EditingTools.c" +} + + +static gfloat editing_tools_crop_tool_get_constraint_aspect_ratio_for_constraint (EditingToolsCropTool* self, EditingToolsCropToolConstraintDescription* constraint, Photo* photo) { + gfloat result = 0.0F; + gfloat _result_ = 0.0F; + EditingToolsCropToolConstraintDescription* _tmp0_ = NULL; + gfloat _tmp1_ = 0.0F; + gfloat _tmp2_ = 0.0F; + EditingToolsCropToolReticleOrientation _tmp18_ = 0; +#line 931 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self), 0.0F); +#line 931 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_CROP_TOOL_IS_CONSTRAINT_DESCRIPTION (constraint), 0.0F); +#line 931 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PHOTO (photo), 0.0F); +#line 932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = constraint; +#line 932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->aspect_ratio; +#line 932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = _tmp1_; +#line 934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _result_; +#line 934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp2_ == EDITING_TOOLS_CROP_TOOL_ORIGINAL_ASPECT_RATIO) { +#line 7072 "EditingTools.c" + Dimensions orig_dim = {0}; + Photo* _tmp3_ = NULL; + Dimensions _tmp4_ = {0}; + Dimensions _tmp5_ = {0}; + gint _tmp6_ = 0; + Dimensions _tmp7_ = {0}; + gint _tmp8_ = 0; +#line 935 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = photo; +#line 935 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_get_original_dimensions (_tmp3_, &_tmp4_); +#line 935 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + orig_dim = _tmp4_; +#line 936 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = orig_dim; +#line 936 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.width; +#line 936 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = orig_dim; +#line 936 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.height; +#line 936 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = ((gfloat) _tmp6_) / ((gfloat) _tmp8_); +#line 7096 "EditingTools.c" + } else { + gfloat _tmp9_ = 0.0F; +#line 937 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _result_; +#line 937 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp9_ == EDITING_TOOLS_CROP_TOOL_SCREEN_ASPECT_RATIO) { +#line 7103 "EditingTools.c" + GdkScreen* screen = NULL; + GdkScreen* _tmp10_ = NULL; + GdkScreen* _tmp11_ = NULL; + GdkScreen* _tmp12_ = NULL; + gint _tmp13_ = 0; + GdkScreen* _tmp14_ = NULL; + gint _tmp15_ = 0; +#line 938 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = gdk_screen_get_default (); +#line 938 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _g_object_ref0 (_tmp10_); +#line 938 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + screen = _tmp11_; +#line 939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = screen; +#line 939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = gdk_screen_get_width (_tmp12_); +#line 939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = screen; +#line 939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = gdk_screen_get_height (_tmp14_); +#line 939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = ((gfloat) _tmp13_) / ((gfloat) _tmp15_); +#line 937 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (screen); +#line 7129 "EditingTools.c" + } else { + gfloat _tmp16_ = 0.0F; +#line 940 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _result_; +#line 940 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp16_ == EDITING_TOOLS_CROP_TOOL_CUSTOM_ASPECT_RATIO) { +#line 7136 "EditingTools.c" + gfloat _tmp17_ = 0.0F; +#line 941 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->custom_aspect_ratio; +#line 941 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = _tmp17_; +#line 7142 "EditingTools.c" + } + } + } +#line 943 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->reticle_orientation; +#line 943 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp18_ == EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_PORTRAIT) { +#line 7150 "EditingTools.c" + gfloat _tmp19_ = 0.0F; +#line 944 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _result_; +#line 944 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_ = 1.0f / _tmp19_; +#line 7156 "EditingTools.c" + } +#line 946 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _result_; +#line 946 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 7162 "EditingTools.c" +} + + +static void editing_tools_crop_tool_constraint_changed (EditingToolsCropTool* self) { + EditingToolsCropToolConstraintDescription* selected_constraint = NULL; + EditingToolsCropToolConstraintDescription* _tmp0_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp1_ = NULL; + gfloat _tmp2_ = 0.0F; + EditingToolsCropToolConstraintDescription* _tmp13_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; + gboolean _tmp16_ = FALSE; + gfloat _tmp17_ = 0.0F; + gfloat _tmp18_ = 0.0F; +#line 950 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 951 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = editing_tools_crop_tool_get_selected_constraint (self); +#line 951 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + selected_constraint = _tmp0_; +#line 952 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = selected_constraint; +#line 952 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_->aspect_ratio; +#line 952 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp2_ == EDITING_TOOLS_CROP_TOOL_CUSTOM_ASPECT_RATIO) { +#line 953 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_set_custom_constraint_mode (self); +#line 7191 "EditingTools.c" + } else { + EditingToolsCropToolConstraintDescription* _tmp3_ = NULL; + gfloat _tmp4_ = 0.0F; +#line 955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_set_normal_constraint_mode (self); +#line 957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = selected_constraint; +#line 957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_->aspect_ratio; +#line 957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp4_ != EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 7203 "EditingTools.c" + ConfigFacade* _tmp5_ = NULL; + ConfigFacade* _tmp6_ = NULL; + gint _tmp7_ = 0; + ConfigFacade* _tmp8_ = NULL; + ConfigFacade* _tmp9_ = NULL; + gint _tmp10_ = 0; + gint _tmp11_ = 0; + gint _tmp12_ = 0; +#line 961 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = config_facade_get_instance (); +#line 961 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_; +#line 961 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = configuration_facade_get_last_crop_width (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 961 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_init_width = _tmp7_; +#line 961 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp6_); +#line 962 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = config_facade_get_instance (); +#line 962 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_; +#line 962 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = configuration_facade_get_last_crop_height (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 962 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_init_height = _tmp10_; +#line 962 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp9_); +#line 963 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->custom_init_width; +#line 963 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->custom_init_height; +#line 963 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_aspect_ratio = ((gfloat) _tmp11_) / ((gfloat) _tmp12_); +#line 7238 "EditingTools.c" + } + } +#line 967 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_update_pivot_button_state (self); +#line 969 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = editing_tools_crop_tool_get_selected_constraint (self); +#line 969 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_; +#line 969 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = _tmp14_->is_pivotable; +#line 969 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = !_tmp15_; +#line 969 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_crop_tool_constraint_description_unref0 (_tmp14_); +#line 969 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp16_) { +#line 970 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->reticle_orientation = EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_LANDSCAPE; +#line 7257 "EditingTools.c" + } +#line 972 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 972 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->pre_aspect_ratio; +#line 972 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp17_ != _tmp18_) { +#line 7265 "EditingTools.c" + Box new_crop = {0}; + Box _tmp19_ = {0}; + Box _tmp20_ = {0}; + Box _tmp21_ = {0}; + Box _tmp22_ = {0}; + EditingToolsPhotoCanvas* _tmp23_ = NULL; + Box _tmp24_ = {0}; + EditingToolsPhotoCanvas* _tmp25_ = NULL; + gfloat _tmp26_ = 0.0F; +#line 973 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = self->priv->scaled_crop; +#line 973 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constrain_crop (self, &_tmp19_, &_tmp20_); +#line 973 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_crop = _tmp20_; +#line 975 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = new_crop; +#line 975 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_crop_resized (self, &_tmp21_); +#line 976 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = new_crop; +#line 976 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_crop = _tmp22_; +#line 977 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 977 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = new_crop; +#line 977 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_invalidate_area (_tmp23_, &_tmp24_); +#line 978 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 978 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp25_); +#line 980 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 980 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->pre_aspect_ratio = _tmp26_; +#line 7303 "EditingTools.c" + } +#line 950 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_crop_tool_constraint_description_unref0 (selected_constraint); +#line 7307 "EditingTools.c" +} + + +static void editing_tools_crop_tool_set_custom_constraint_mode (EditingToolsCropTool* self) { + EditingToolsCropToolConstraintMode _tmp0_ = 0; + gboolean _tmp1_ = FALSE; + EditingToolsCropToolCropToolWindow* _tmp2_ = NULL; + gint _tmp3_ = 0; + EditingToolsCropToolCropToolWindow* _tmp11_ = NULL; + GtkBox* _tmp12_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp13_ = NULL; + GtkComboBox* _tmp14_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp15_ = NULL; + GtkBox* _tmp16_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp17_ = NULL; + GtkButton* _tmp18_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp19_ = NULL; + GtkBox* _tmp20_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp21_ = NULL; + GtkBox* _tmp22_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp23_ = NULL; + GtkBox* _tmp24_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp25_ = NULL; + GtkComboBox* _tmp26_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp27_ = NULL; + GtkBox* _tmp28_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp29_ = NULL; + GtkEntry* _tmp30_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp31_ = NULL; + GtkBox* _tmp32_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp33_ = NULL; + GtkLabel* _tmp34_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp35_ = NULL; + GtkBox* _tmp36_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp37_ = NULL; + GtkEntry* _tmp38_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp39_ = NULL; + GtkBox* _tmp40_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp41_ = NULL; + GtkButton* _tmp42_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp43_ = NULL; + GtkBox* _tmp44_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp45_ = NULL; + GtkBox* _tmp46_ = NULL; + EditingToolsCropToolReticleOrientation _tmp47_ = 0; + gint _tmp68_ = 0; + gint _tmp69_ = 0; + EditingToolsCropToolCropToolWindow* _tmp70_ = NULL; +#line 984 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 985 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->constraint_mode; +#line 985 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_CUSTOM) { +#line 986 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 7364 "EditingTools.c" + } +#line 988 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->crop_tool_window; +#line 988 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_->normal_width; +#line 988 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp3_ == -1) { +#line 988 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = TRUE; +#line 7374 "EditingTools.c" + } else { + EditingToolsCropToolCropToolWindow* _tmp4_ = NULL; + gint _tmp5_ = 0; +#line 988 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->crop_tool_window; +#line 988 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_->normal_height; +#line 988 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp5_ == -1; +#line 7384 "EditingTools.c" + } +#line 988 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_) { +#line 7388 "EditingTools.c" + EditingToolsCropToolCropToolWindow* _tmp6_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp7_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp8_ = NULL; + gint _tmp9_ = 0; + gint _tmp10_ = 0; +#line 989 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->crop_tool_window; +#line 989 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = self->priv->crop_tool_window; +#line 989 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->crop_tool_window; +#line 989 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_window_get_type (), GtkWindow), &_tmp9_, &_tmp10_); +#line 989 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_->normal_width = _tmp9_; +#line 989 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_->normal_height = _tmp10_; +#line 7406 "EditingTools.c" + } +#line 992 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->crop_tool_window; +#line 992 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_->layout; +#line 992 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->priv->crop_tool_window; +#line 992 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_->constraint_combo; +#line 992 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget)); +#line 993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->crop_tool_window; +#line 993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_->layout; +#line 993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->crop_tool_window; +#line 993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_->pivot_reticle_button; +#line 993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget)); +#line 994 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = self->priv->crop_tool_window; +#line 994 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _tmp19_->layout; +#line 994 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->crop_tool_window; +#line 994 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _tmp21_->response_layout; +#line 994 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget)); +#line 996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = self->priv->crop_tool_window; +#line 996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = _tmp23_->layout; +#line 996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = self->priv->crop_tool_window; +#line 996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _tmp25_->constraint_combo; +#line 996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_widget_get_type (), GtkWidget)); +#line 997 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = self->priv->crop_tool_window; +#line 997 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = _tmp27_->layout; +#line 997 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = self->priv->crop_tool_window; +#line 997 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = _tmp29_->custom_width_entry; +#line 997 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_widget_get_type (), GtkWidget)); +#line 998 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = self->priv->crop_tool_window; +#line 998 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = _tmp31_->layout; +#line 998 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = self->priv->crop_tool_window; +#line 998 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = _tmp33_->custom_mulsign_label; +#line 998 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_widget_get_type (), GtkWidget)); +#line 999 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = self->priv->crop_tool_window; +#line 999 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = _tmp35_->layout; +#line 999 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = self->priv->crop_tool_window; +#line 999 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = _tmp37_->custom_height_entry; +#line 999 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_widget_get_type (), GtkWidget)); +#line 1000 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = self->priv->crop_tool_window; +#line 1000 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = _tmp39_->layout; +#line 1000 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = self->priv->crop_tool_window; +#line 1000 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = _tmp41_->pivot_reticle_button; +#line 1000 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_widget_get_type (), GtkWidget)); +#line 1001 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = self->priv->crop_tool_window; +#line 1001 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44_ = _tmp43_->layout; +#line 1001 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = self->priv->crop_tool_window; +#line 1001 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = _tmp45_->response_layout; +#line 1001 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, gtk_widget_get_type (), GtkWidget)); +#line 1003 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = self->priv->reticle_orientation; +#line 1003 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp47_ == EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_LANDSCAPE) { +#line 7502 "EditingTools.c" + EditingToolsCropToolCropToolWindow* _tmp48_ = NULL; + GtkEntry* _tmp49_ = NULL; + gint _tmp50_ = 0; + gchar* _tmp51_ = NULL; + gchar* _tmp52_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp53_ = NULL; + GtkEntry* _tmp54_ = NULL; + gint _tmp55_ = 0; + gchar* _tmp56_ = NULL; + gchar* _tmp57_ = NULL; +#line 1004 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp48_ = self->priv->crop_tool_window; +#line 1004 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp49_ = _tmp48_->custom_width_entry; +#line 1004 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp50_ = self->priv->custom_init_width; +#line 1004 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp51_ = g_strdup_printf ("%d", _tmp50_); +#line 1004 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52_ = _tmp51_; +#line 1004 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp49_, _tmp52_); +#line 1004 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp52_); +#line 1005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp53_ = self->priv->crop_tool_window; +#line 1005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp54_ = _tmp53_->custom_height_entry; +#line 1005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp55_ = self->priv->custom_init_height; +#line 1005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp56_ = g_strdup_printf ("%d", _tmp55_); +#line 1005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp57_ = _tmp56_; +#line 1005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp54_, _tmp57_); +#line 1005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp57_); +#line 7541 "EditingTools.c" + } else { + EditingToolsCropToolCropToolWindow* _tmp58_ = NULL; + GtkEntry* _tmp59_ = NULL; + gint _tmp60_ = 0; + gchar* _tmp61_ = NULL; + gchar* _tmp62_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp63_ = NULL; + GtkEntry* _tmp64_ = NULL; + gint _tmp65_ = 0; + gchar* _tmp66_ = NULL; + gchar* _tmp67_ = NULL; +#line 1007 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp58_ = self->priv->crop_tool_window; +#line 1007 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp59_ = _tmp58_->custom_width_entry; +#line 1007 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp60_ = self->priv->custom_init_height; +#line 1007 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp61_ = g_strdup_printf ("%d", _tmp60_); +#line 1007 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp62_ = _tmp61_; +#line 1007 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp59_, _tmp62_); +#line 1007 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp62_); +#line 1008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp63_ = self->priv->crop_tool_window; +#line 1008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp64_ = _tmp63_->custom_height_entry; +#line 1008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp65_ = self->priv->custom_init_width; +#line 1008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp66_ = g_strdup_printf ("%d", _tmp65_); +#line 1008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp67_ = _tmp66_; +#line 1008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp64_, _tmp67_); +#line 1008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp67_); +#line 7581 "EditingTools.c" + } +#line 1010 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp68_ = self->priv->custom_init_width; +#line 1010 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp69_ = self->priv->custom_init_height; +#line 1010 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_aspect_ratio = ((gfloat) _tmp68_) / ((gfloat) _tmp69_); +#line 1012 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp70_ = self->priv->crop_tool_window; +#line 1012 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, gtk_widget_get_type (), GtkWidget)); +#line 1014 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->constraint_mode = EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_CUSTOM; +#line 7595 "EditingTools.c" +} + + +static void editing_tools_crop_tool_set_normal_constraint_mode (EditingToolsCropTool* self) { + EditingToolsCropToolConstraintMode _tmp0_ = 0; + EditingToolsCropToolCropToolWindow* _tmp1_ = NULL; + GtkBox* _tmp2_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp3_ = NULL; + GtkComboBox* _tmp4_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp5_ = NULL; + GtkBox* _tmp6_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp7_ = NULL; + GtkEntry* _tmp8_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp9_ = NULL; + GtkBox* _tmp10_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp11_ = NULL; + GtkLabel* _tmp12_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp13_ = NULL; + GtkBox* _tmp14_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp15_ = NULL; + GtkEntry* _tmp16_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp17_ = NULL; + GtkBox* _tmp18_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp19_ = NULL; + GtkButton* _tmp20_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp21_ = NULL; + GtkBox* _tmp22_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp23_ = NULL; + GtkBox* _tmp24_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp25_ = NULL; + GtkBox* _tmp26_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp27_ = NULL; + GtkComboBox* _tmp28_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp29_ = NULL; + GtkBox* _tmp30_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp31_ = NULL; + GtkButton* _tmp32_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp33_ = NULL; + GtkBox* _tmp34_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp35_ = NULL; + GtkBox* _tmp36_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp37_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp38_ = NULL; + gint _tmp39_ = 0; + EditingToolsCropToolCropToolWindow* _tmp40_ = NULL; + gint _tmp41_ = 0; + EditingToolsCropToolCropToolWindow* _tmp42_ = NULL; +#line 1017 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1018 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->constraint_mode; +#line 1018 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_NORMAL) { +#line 1019 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 7651 "EditingTools.c" + } +#line 1021 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->crop_tool_window; +#line 1021 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_->layout; +#line 1021 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->crop_tool_window; +#line 1021 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_->constraint_combo; +#line 1021 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget)); +#line 1022 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->crop_tool_window; +#line 1022 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_->layout; +#line 1022 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = self->priv->crop_tool_window; +#line 1022 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_->custom_width_entry; +#line 1022 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget)); +#line 1023 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->crop_tool_window; +#line 1023 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_->layout; +#line 1023 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->crop_tool_window; +#line 1023 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_->custom_mulsign_label; +#line 1023 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget)); +#line 1024 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->priv->crop_tool_window; +#line 1024 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_->layout; +#line 1024 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->crop_tool_window; +#line 1024 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_->custom_height_entry; +#line 1024 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget)); +#line 1025 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->crop_tool_window; +#line 1025 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_->layout; +#line 1025 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = self->priv->crop_tool_window; +#line 1025 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _tmp19_->pivot_reticle_button; +#line 1025 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget)); +#line 1026 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->crop_tool_window; +#line 1026 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _tmp21_->layout; +#line 1026 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = self->priv->crop_tool_window; +#line 1026 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = _tmp23_->response_layout; +#line 1026 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_widget_get_type (), GtkWidget)); +#line 1028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = self->priv->crop_tool_window; +#line 1028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _tmp25_->layout; +#line 1028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = self->priv->crop_tool_window; +#line 1028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = _tmp27_->constraint_combo; +#line 1028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget)); +#line 1029 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = self->priv->crop_tool_window; +#line 1029 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = _tmp29_->layout; +#line 1029 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = self->priv->crop_tool_window; +#line 1029 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = _tmp31_->pivot_reticle_button; +#line 1029 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_widget_get_type (), GtkWidget)); +#line 1030 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = self->priv->crop_tool_window; +#line 1030 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = _tmp33_->layout; +#line 1030 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = self->priv->crop_tool_window; +#line 1030 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = _tmp35_->response_layout; +#line 1030 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_widget_get_type (), GtkWidget)); +#line 1032 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = self->priv->crop_tool_window; +#line 1032 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = self->priv->crop_tool_window; +#line 1032 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = _tmp38_->normal_width; +#line 1032 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = self->priv->crop_tool_window; +#line 1032 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = _tmp40_->normal_height; +#line 1032 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_window_resize (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_window_get_type (), GtkWindow), _tmp39_, _tmp41_); +#line 1035 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = self->priv->crop_tool_window; +#line 1035 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_widget_get_type (), GtkWidget)); +#line 1037 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->constraint_mode = EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_NORMAL; +#line 7761 "EditingTools.c" +} + + +static void editing_tools_crop_tool_constrain_crop (EditingToolsCropTool* self, Box* crop, Box* result) { + gfloat user_aspect_ratio = 0.0F; + gfloat _tmp0_ = 0.0F; + gfloat _tmp1_ = 0.0F; + gfloat old_area = 0.0F; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + gfloat _tmp5_ = 0.0F; + gfloat _tmp6_ = 0.0F; + gdouble _tmp7_ = 0.0; + gfloat _tmp8_ = 0.0F; + gfloat _tmp9_ = 0.0F; + gdouble _tmp10_ = 0.0; + Dimensions image_size = {0}; + Dimensions _tmp11_ = {0}; + gdouble angle = 0.0; + EditingToolsPhotoCanvas* _tmp12_ = NULL; + Photo* _tmp13_ = NULL; + Photo* _tmp14_ = NULL; + gdouble _tmp15_ = 0.0; + Box _tmp16_ = {0}; + Dimensions _tmp17_ = {0}; + gint _tmp18_ = 0; + Dimensions _tmp19_ = {0}; + gint _tmp20_ = 0; + gdouble _tmp21_ = 0.0; + Box _tmp22_ = {0}; + gint _tmp23_ = 0; + gint _tmp24_ = 0; + gfloat _tmp25_ = 0.0F; + Box _tmp30_ = {0}; +#line 1040 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1040 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (crop != NULL); +#line 1041 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1041 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + user_aspect_ratio = _tmp0_; +#line 1042 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = user_aspect_ratio; +#line 1042 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_ == EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 7808 "EditingTools.c" + Box _tmp2_ = {0}; +#line 1043 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = *crop; +#line 1043 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _tmp2_; +#line 1043 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 7816 "EditingTools.c" + } +#line 1046 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = box_get_width (crop); +#line 1046 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = box_get_height (crop); +#line 1046 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + old_area = (gfloat) (_tmp3_ * _tmp4_); +#line 1047 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = old_area; +#line 1047 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = user_aspect_ratio; +#line 1047 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = sqrt ((gdouble) (_tmp5_ / _tmp6_)); +#line 1047 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_adjust_height (crop, (gint) _tmp7_); +#line 1048 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = old_area; +#line 1048 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = user_aspect_ratio; +#line 1048 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = sqrt ((gdouble) (_tmp8_ * _tmp9_)); +#line 1048 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_adjust_width (crop, (gint) _tmp10_); +#line 1051 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_get_photo_dimensions (self, &_tmp11_); +#line 1051 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + image_size = _tmp11_; +#line 1053 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1053 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = editing_tools_photo_canvas_get_photo (_tmp12_); +#line 1053 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_; +#line 1053 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_get_straighten (_tmp14_, &_tmp15_); +#line 1053 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + angle = _tmp15_; +#line 1053 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp14_); +#line 1054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = *crop; +#line 1054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = image_size; +#line 1054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_.width; +#line 1054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = image_size; +#line 1054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _tmp19_.height; +#line 1054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = angle; +#line 1054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + clamp_inside_rotated_image (&_tmp16_, _tmp18_, _tmp20_, _tmp21_, FALSE, &_tmp22_); +#line 1054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *crop = _tmp22_; +#line 1057 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = box_get_width (crop); +#line 1057 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = box_get_height (crop); +#line 1057 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = user_aspect_ratio; +#line 1057 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (((gfloat) _tmp23_) >= (_tmp24_ * _tmp25_)) { +#line 7880 "EditingTools.c" + gint _tmp26_ = 0; + gfloat _tmp27_ = 0.0F; +#line 1058 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = box_get_height (crop); +#line 1058 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = user_aspect_ratio; +#line 1058 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_adjust_width (crop, (gint) (_tmp26_ * _tmp27_)); +#line 7889 "EditingTools.c" + } else { + gint _tmp28_ = 0; + gfloat _tmp29_ = 0.0F; +#line 1060 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = box_get_width (crop); +#line 1060 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = user_aspect_ratio; +#line 1060 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_adjust_height (crop, (gint) (_tmp28_ / _tmp29_)); +#line 7899 "EditingTools.c" + } +#line 1062 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = *crop; +#line 1062 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _tmp30_; +#line 1062 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 7907 "EditingTools.c" +} + + +static EditingToolsCropToolConstraintDescription* editing_tools_crop_tool_get_last_constraint (EditingToolsCropTool* self, gint* index) { + gint _vala_index = 0; + EditingToolsCropToolConstraintDescription* result = NULL; + ConfigFacade* _tmp0_ = NULL; + ConfigFacade* _tmp1_ = NULL; + gint _tmp2_ = 0; + EditingToolsCropToolConstraintDescription* _tmp3_ = NULL; + gint _tmp4_ = 0; + EditingToolsCropToolConstraintDescription** _tmp5_ = NULL; + gint _tmp5__length1 = 0; + EditingToolsCropToolConstraintDescription* _tmp9_ = NULL; +#line 1065 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self), NULL); +#line 1066 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = config_facade_get_instance (); +#line 1066 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_; +#line 1066 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = configuration_facade_get_last_crop_menu_choice (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 1066 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_index = _tmp2_; +#line 1066 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp1_); +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _vala_index; +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->constraints; +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5__length1 = self->priv->constraints_length1; +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp4_ < _tmp5__length1) { +#line 7942 "EditingTools.c" + EditingToolsCropToolConstraintDescription** _tmp6_ = NULL; + gint _tmp6__length1 = 0; + gint _tmp7_ = 0; + EditingToolsCropToolConstraintDescription* _tmp8_ = NULL; +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->constraints; +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6__length1 = self->priv->constraints_length1; +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _vala_index; +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp6_[_tmp7_]; +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp8_; +#line 7957 "EditingTools.c" + } else { +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = NULL; +#line 7961 "EditingTools.c" + } +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _editing_tools_crop_tool_constraint_description_ref0 (_tmp3_); +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp9_; +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (index) { +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *index = _vala_index; +#line 7971 "EditingTools.c" + } +#line 1068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 7975 "EditingTools.c" +} + + +static void editing_tools_crop_tool_real_activate (EditingToolsEditingTool* base, EditingToolsPhotoCanvas* canvas) { + EditingToolsCropTool * self; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + EditingToolsPhotoCanvas* _tmp1_ = NULL; + cairo_t* _tmp2_ = NULL; + cairo_t* _tmp3_ = NULL; + EditingToolsPhotoCanvas* _tmp4_ = NULL; + Dimensions _tmp5_ = {0}; + cairo_surface_t* _tmp6_ = NULL; + EditingToolsPhotoCanvas* _tmp7_ = NULL; + GdkRectangle _tmp8_ = {0}; + gint _tmp9_ = 0; + EditingToolsPhotoCanvas* _tmp10_ = NULL; + GdkRectangle _tmp11_ = {0}; + gint _tmp12_ = 0; + cairo_surface_t* _tmp13_ = NULL; + cairo_t* ctx = NULL; + cairo_surface_t* _tmp14_ = NULL; + cairo_t* _tmp15_ = NULL; + cairo_t* _tmp16_ = NULL; + cairo_t* _tmp17_ = NULL; + EditingToolsPhotoCanvas* _tmp18_ = NULL; + GtkWindow* _tmp19_ = NULL; + GtkWindow* _tmp20_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp21_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp22_ = NULL; + GtkComboBox* _tmp23_ = NULL; + GtkListStore* _tmp24_ = NULL; + EditingToolsPhotoCanvas* _tmp25_ = NULL; + Photo* _tmp26_ = NULL; + Photo* _tmp27_ = NULL; + gboolean _tmp28_ = FALSE; + gboolean _tmp29_ = FALSE; + Dimensions uncropped_dim = {0}; + EditingToolsPhotoCanvas* _tmp61_ = NULL; + Photo* _tmp62_ = NULL; + Photo* _tmp63_ = NULL; + Dimensions _tmp64_ = {0}; + Dimensions _tmp65_ = {0}; + Box crop = {0}; + EditingToolsPhotoCanvas* _tmp66_ = NULL; + Photo* _tmp67_ = NULL; + Photo* _tmp68_ = NULL; + Box _tmp69_ = {0}; + gboolean _tmp70_ = FALSE; + gboolean _tmp71_ = FALSE; + Dimensions _tmp84_ = {0}; + EditingToolsPhotoCanvas* _tmp85_ = NULL; + GdkRectangle _tmp86_ = {0}; + Dimensions _tmp87_ = {0}; + Box _tmp88_ = {0}; + ConfigFacade* _tmp89_ = NULL; + ConfigFacade* _tmp90_ = NULL; + gint _tmp91_ = 0; + ConfigFacade* _tmp92_ = NULL; + ConfigFacade* _tmp93_ = NULL; + gint _tmp94_ = 0; + gint _tmp95_ = 0; + gint _tmp96_ = 0; + gint _tmp97_ = 0; + gint _tmp98_ = 0; + EditingToolsPhotoCanvas* _tmp99_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp100_ = NULL; + EditingToolsPhotoCanvas* _tmp101_ = NULL; + Photo* _tmp102_ = NULL; + Photo* _tmp103_ = NULL; + gboolean _tmp104_ = FALSE; + gboolean _tmp105_ = FALSE; + Box new_crop = {0}; + Box _tmp114_ = {0}; + Box _tmp115_ = {0}; + Box _tmp116_ = {0}; + Box _tmp117_ = {0}; + EditingToolsPhotoCanvas* _tmp118_ = NULL; + Box _tmp119_ = {0}; + EditingToolsPhotoCanvas* _tmp120_ = NULL; + gfloat _tmp121_ = 0.0F; +#line 1071 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 1071 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 1072 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 1072 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_bind_canvas_handlers (self, _tmp0_); +#line 1074 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = canvas; +#line 1074 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = editing_tools_photo_canvas_get_default_ctx (_tmp1_); +#line 1074 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 1074 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = canvas; +#line 1074 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_surface_dim (_tmp4_, &_tmp5_); +#line 1074 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_prepare_ctx (self, _tmp3_, &_tmp5_); +#line 1074 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (_tmp3_); +#line 1076 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->crop_surface; +#line 1076 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp6_ != NULL) { +#line 1077 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->priv->crop_surface); +#line 1077 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->crop_surface = NULL; +#line 8086 "EditingTools.c" + } +#line 1079 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = canvas; +#line 1079 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp7_, &_tmp8_); +#line 1079 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.width; +#line 1079 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = canvas; +#line 1079 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp10_, &_tmp11_); +#line 1079 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_.height; +#line 1079 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp9_, _tmp12_); +#line 1079 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->priv->crop_surface); +#line 1079 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->crop_surface = _tmp13_; +#line 1083 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = self->priv->crop_surface; +#line 1083 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = cairo_create (_tmp14_); +#line 1083 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ctx = _tmp15_; +#line 1084 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = ctx; +#line 1084 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_rgba (_tmp16_, 0.0, 0.0, 0.0, 1.0); +#line 1085 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = ctx; +#line 1085 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_paint (_tmp17_); +#line 1088 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = canvas; +#line 1088 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = editing_tools_photo_canvas_get_container (_tmp18_); +#line 1088 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _tmp19_; +#line 1088 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = editing_tools_crop_tool_crop_tool_window_new (_tmp20_); +#line 1088 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp21_); +#line 1088 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->crop_tool_window); +#line 1088 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->crop_tool_window = _tmp21_; +#line 1088 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp20_); +#line 1091 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = self->priv->crop_tool_window; +#line 1091 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _tmp22_->constraint_combo; +#line 1091 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->priv->constraint_list; +#line 1091 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_combo_box_set_model (_tmp23_, G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GTK_TYPE_TREE_MODEL, GtkTreeModel)); +#line 1092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = canvas; +#line 1092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = editing_tools_photo_canvas_get_photo (_tmp25_); +#line 1092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = _tmp26_; +#line 1092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = photo_has_crop (_tmp27_); +#line 1092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = !_tmp28_; +#line 1092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp27_); +#line 1092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp29_) { +#line 8158 "EditingTools.c" + gint index = 0; + EditingToolsCropToolConstraintDescription* desc = NULL; + gint _tmp30_ = 0; + EditingToolsCropToolConstraintDescription* _tmp31_ = NULL; + gboolean _tmp32_ = FALSE; + EditingToolsCropToolConstraintDescription* _tmp33_ = NULL; +#line 1094 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = editing_tools_crop_tool_get_last_constraint (self, &_tmp30_); +#line 1094 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + index = _tmp30_; +#line 1094 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + desc = _tmp31_; +#line 1095 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = desc; +#line 1095 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp33_ != NULL) { +#line 8175 "EditingTools.c" + EditingToolsCropToolConstraintDescription* _tmp34_ = NULL; + gboolean _tmp35_ = FALSE; +#line 1095 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = desc; +#line 1095 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = editing_tools_crop_tool_constraint_description_is_separator (_tmp34_); +#line 1095 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = !_tmp35_; +#line 8184 "EditingTools.c" + } else { +#line 1095 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = FALSE; +#line 8188 "EditingTools.c" + } +#line 1095 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp32_) { +#line 8192 "EditingTools.c" + EditingToolsCropToolCropToolWindow* _tmp36_ = NULL; + GtkComboBox* _tmp37_ = NULL; + gint _tmp38_ = 0; +#line 1096 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = self->priv->crop_tool_window; +#line 1096 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = _tmp36_->constraint_combo; +#line 1096 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = index; +#line 1096 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_combo_box_set_active (_tmp37_, _tmp38_); +#line 8204 "EditingTools.c" + } +#line 1092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_crop_tool_constraint_description_unref0 (desc); +#line 8208 "EditingTools.c" + } else { + Photo* photo = NULL; + EditingToolsPhotoCanvas* _tmp39_ = NULL; + Photo* _tmp40_ = NULL; + Dimensions cropped_dim = {0}; + Photo* _tmp41_ = NULL; + Dimensions _tmp42_ = {0}; + gfloat ratio = 0.0F; + Dimensions _tmp43_ = {0}; + gint _tmp44_ = 0; + Dimensions _tmp45_ = {0}; + gint _tmp46_ = 0; +#line 1100 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = canvas; +#line 1100 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = editing_tools_photo_canvas_get_photo (_tmp39_); +#line 1100 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo = _tmp40_; +#line 1101 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = photo; +#line 1101 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp42_); +#line 1101 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cropped_dim = _tmp42_; +#line 1102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = cropped_dim; +#line 1102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44_ = _tmp43_.width; +#line 1102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = cropped_dim; +#line 1102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = _tmp45_.height; +#line 1102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ratio = ((gfloat) _tmp44_) / ((gfloat) _tmp46_); +#line 8243 "EditingTools.c" + { + gint index = 0; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + index = 1; +#line 8248 "EditingTools.c" + { + gboolean _tmp47_ = FALSE; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = TRUE; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + while (TRUE) { +#line 8255 "EditingTools.c" + gint _tmp49_ = 0; + EditingToolsCropToolConstraintDescription** _tmp50_ = NULL; + gint _tmp50__length1 = 0; + gfloat _tmp51_ = 0.0F; + EditingToolsCropToolConstraintDescription** _tmp52_ = NULL; + gint _tmp52__length1 = 0; + gint _tmp53_ = 0; + EditingToolsCropToolConstraintDescription* _tmp54_ = NULL; + Photo* _tmp55_ = NULL; + gfloat _tmp56_ = 0.0F; + gdouble _tmp57_ = 0.0; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp47_) { +#line 8269 "EditingTools.c" + gint _tmp48_ = 0; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp48_ = index; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + index = _tmp48_ + 1; +#line 8275 "EditingTools.c" + } +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = FALSE; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp49_ = index; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp50_ = self->priv->constraints; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp50__length1 = self->priv->constraints_length1; +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!(_tmp49_ < _tmp50__length1)) { +#line 1103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 8289 "EditingTools.c" + } +#line 1104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp51_ = ratio; +#line 1104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52_ = self->priv->constraints; +#line 1104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52__length1 = self->priv->constraints_length1; +#line 1104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp53_ = index; +#line 1104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp54_ = _tmp52_[_tmp53_]; +#line 1104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp55_ = photo; +#line 1104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp56_ = editing_tools_crop_tool_get_constraint_aspect_ratio_for_constraint (self, _tmp54_, _tmp55_); +#line 1104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp57_ = fabs ((gdouble) (_tmp51_ - _tmp56_)); +#line 1104 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp57_ < 0.005) { +#line 8309 "EditingTools.c" + EditingToolsCropToolCropToolWindow* _tmp58_ = NULL; + GtkComboBox* _tmp59_ = NULL; + gint _tmp60_ = 0; +#line 1105 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp58_ = self->priv->crop_tool_window; +#line 1105 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp59_ = _tmp58_->constraint_combo; +#line 1105 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp60_ = index; +#line 1105 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_combo_box_set_active (_tmp59_, _tmp60_); +#line 8321 "EditingTools.c" + } + } + } + } +#line 1092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (photo); +#line 8328 "EditingTools.c" + } +#line 1110 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_update_pivot_button_state (self); +#line 1111 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->reticle_orientation = EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_LANDSCAPE; +#line 1113 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_bind_window_handlers (self); +#line 1116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp61_ = canvas; +#line 1116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp62_ = editing_tools_photo_canvas_get_photo (_tmp61_); +#line 1116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp63_ = _tmp62_; +#line 1116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_CROP, &_tmp64_); +#line 1116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp65_ = _tmp64_; +#line 1116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp63_); +#line 1116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + uncropped_dim = _tmp65_; +#line 1119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp66_ = canvas; +#line 1119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp67_ = editing_tools_photo_canvas_get_photo (_tmp66_); +#line 1119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp68_ = _tmp67_; +#line 1119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp70_ = photo_get_crop (_tmp68_, &_tmp69_, PHOTO_EXCEPTION_NONE); +#line 1119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + crop = _tmp69_; +#line 1119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp71_ = !_tmp70_; +#line 1119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp68_); +#line 1119 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp71_) { +#line 8366 "EditingTools.c" + gint xofs = 0; + Dimensions _tmp72_ = {0}; + gint _tmp73_ = 0; + gint yofs = 0; + Dimensions _tmp74_ = {0}; + gint _tmp75_ = 0; + gint _tmp76_ = 0; + gint _tmp77_ = 0; + Dimensions _tmp78_ = {0}; + gint _tmp79_ = 0; + gint _tmp80_ = 0; + Dimensions _tmp81_ = {0}; + gint _tmp82_ = 0; + gint _tmp83_ = 0; +#line 1120 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp72_ = uncropped_dim; +#line 1120 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp73_ = _tmp72_.width; +#line 1120 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + xofs = (gint) (_tmp73_ * EDITING_TOOLS_CROP_TOOL_CROP_INIT_X_PCT); +#line 1121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp74_ = uncropped_dim; +#line 1121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp75_ = _tmp74_.height; +#line 1121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + yofs = (gint) (_tmp75_ * EDITING_TOOLS_CROP_TOOL_CROP_INIT_Y_PCT); +#line 1125 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp76_ = xofs; +#line 1125 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp77_ = yofs; +#line 1125 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp78_ = uncropped_dim; +#line 1125 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp79_ = _tmp78_.width; +#line 1125 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp80_ = xofs; +#line 1125 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp81_ = uncropped_dim; +#line 1125 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp82_ = _tmp81_.height; +#line 1125 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp83_ = yofs; +#line 1125 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_init (&crop, _tmp76_, _tmp77_, _tmp79_ - _tmp80_, _tmp82_ - _tmp83_); +#line 8411 "EditingTools.c" + } +#line 1130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp84_ = uncropped_dim; +#line 1130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp85_ = canvas; +#line 1130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp85_, &_tmp86_); +#line 1130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dimensions_for_rectangle (&_tmp86_, &_tmp87_); +#line 1130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_scaled_similar (&crop, &_tmp84_, &_tmp87_, &_tmp88_); +#line 1130 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_crop = _tmp88_; +#line 1135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp89_ = config_facade_get_instance (); +#line 1135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp90_ = _tmp89_; +#line 1135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp91_ = configuration_facade_get_last_crop_width (G_TYPE_CHECK_INSTANCE_CAST (_tmp90_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 1135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_width = _tmp91_; +#line 1135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp90_); +#line 1136 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp92_ = config_facade_get_instance (); +#line 1136 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp93_ = _tmp92_; +#line 1136 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp94_ = configuration_facade_get_last_crop_height (G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 1136 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_height = _tmp94_; +#line 1136 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp93_); +#line 1137 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp95_ = self->priv->custom_width; +#line 1137 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_init_width = _tmp95_; +#line 1138 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp96_ = self->priv->custom_height; +#line 1138 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_init_height = _tmp96_; +#line 1139 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp97_ = self->priv->custom_init_width; +#line 1139 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp98_ = self->priv->custom_init_height; +#line 1139 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->pre_aspect_ratio = ((gfloat) _tmp97_) / ((gfloat) _tmp98_); +#line 1141 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->constraint_mode = EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_NORMAL; +#line 1143 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp99_ = canvas; +#line 1143 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_crop_tool_parent_class)->activate (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), _tmp99_); +#line 1145 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp100_ = self->priv->crop_tool_window; +#line 1145 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp100_, gtk_widget_get_type (), GtkWidget)); +#line 1148 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp101_ = canvas; +#line 1148 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp102_ = editing_tools_photo_canvas_get_photo (_tmp101_); +#line 1148 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp103_ = _tmp102_; +#line 1148 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp104_ = photo_has_crop (_tmp103_); +#line 1148 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp105_ = !_tmp104_; +#line 1148 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp103_); +#line 1148 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp105_) { +#line 8483 "EditingTools.c" + EditingToolsCropToolConstraintDescription* desc = NULL; + EditingToolsCropToolConstraintDescription* _tmp106_ = NULL; + gboolean _tmp107_ = FALSE; + gboolean _tmp108_ = FALSE; + EditingToolsCropToolConstraintDescription* _tmp109_ = NULL; +#line 1149 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp106_ = editing_tools_crop_tool_get_last_constraint (self, NULL); +#line 1149 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + desc = _tmp106_; +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp109_ = desc; +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp109_ != NULL) { +#line 8497 "EditingTools.c" + EditingToolsCropToolConstraintDescription* _tmp110_ = NULL; + gboolean _tmp111_ = FALSE; +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp110_ = desc; +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp111_ = editing_tools_crop_tool_constraint_description_is_separator (_tmp110_); +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp108_ = !_tmp111_; +#line 8506 "EditingTools.c" + } else { +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp108_ = FALSE; +#line 8510 "EditingTools.c" + } +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp108_) { +#line 8514 "EditingTools.c" + EditingToolsCropToolConstraintDescription* _tmp112_ = NULL; + gfloat _tmp113_ = 0.0F; +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp112_ = desc; +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp113_ = _tmp112_->aspect_ratio; +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp107_ = _tmp113_ == EDITING_TOOLS_CROP_TOOL_CUSTOM_ASPECT_RATIO; +#line 8523 "EditingTools.c" + } else { +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp107_ = FALSE; +#line 8527 "EditingTools.c" + } +#line 1150 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp107_) { +#line 1151 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_set_custom_constraint_mode (self); +#line 8533 "EditingTools.c" + } +#line 1148 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_crop_tool_constraint_description_unref0 (desc); +#line 8537 "EditingTools.c" + } +#line 1158 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp114_ = self->priv->scaled_crop; +#line 1158 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constrain_crop (self, &_tmp114_, &_tmp115_); +#line 1158 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_crop = _tmp115_; +#line 1160 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp116_ = new_crop; +#line 1160 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_crop_resized (self, &_tmp116_); +#line 1161 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp117_ = new_crop; +#line 1161 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_crop = _tmp117_; +#line 1162 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp118_ = canvas; +#line 1162 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp119_ = new_crop; +#line 1162 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_invalidate_area (_tmp118_, &_tmp119_); +#line 1163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp120_ = canvas; +#line 1163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp120_); +#line 1165 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp121_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1165 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->pre_aspect_ratio = _tmp121_; +#line 1071 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (ctx); +#line 8569 "EditingTools.c" +} + + +static void _editing_tools_crop_tool_prepare_ctx_editing_tools_photo_canvas_new_surface (EditingToolsPhotoCanvas* _sender, cairo_t* ctx, Dimensions* dim, gpointer self) { +#line 1169 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_prepare_ctx ((EditingToolsCropTool*) self, ctx, dim); +#line 8576 "EditingTools.c" +} + + +static void _editing_tools_crop_tool_on_resized_pixbuf_editing_tools_photo_canvas_resized_scaled_pixbuf (EditingToolsPhotoCanvas* _sender, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position, gpointer self) { +#line 1170 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_on_resized_pixbuf ((EditingToolsCropTool*) self, old_dim, scaled, scaled_position); +#line 8583 "EditingTools.c" +} + + +static void editing_tools_crop_tool_bind_canvas_handlers (EditingToolsCropTool* self, EditingToolsPhotoCanvas* canvas) { + EditingToolsPhotoCanvas* _tmp0_ = NULL; + EditingToolsPhotoCanvas* _tmp1_ = NULL; +#line 1168 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1168 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 1169 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 1169 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp0_, "new-surface", (GCallback) _editing_tools_crop_tool_prepare_ctx_editing_tools_photo_canvas_new_surface, self); +#line 1170 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = canvas; +#line 1170 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp1_, "resized-scaled-pixbuf", (GCallback) _editing_tools_crop_tool_on_resized_pixbuf_editing_tools_photo_canvas_resized_scaled_pixbuf, self); +#line 8602 "EditingTools.c" +} + + +static void editing_tools_crop_tool_unbind_canvas_handlers (EditingToolsCropTool* self, EditingToolsPhotoCanvas* canvas) { + EditingToolsPhotoCanvas* _tmp0_ = NULL; + guint _tmp1_ = 0U; + EditingToolsPhotoCanvas* _tmp2_ = NULL; + guint _tmp3_ = 0U; +#line 1173 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1173 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 1174 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 1174 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("new-surface", EDITING_TOOLS_TYPE_PHOTO_CANVAS, &_tmp1_, NULL, FALSE); +#line 1174 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _editing_tools_crop_tool_prepare_ctx_editing_tools_photo_canvas_new_surface, self); +#line 1175 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = canvas; +#line 1175 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("resized-scaled-pixbuf", EDITING_TOOLS_TYPE_PHOTO_CANVAS, &_tmp3_, NULL, FALSE); +#line 1175 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _editing_tools_crop_tool_on_resized_pixbuf_editing_tools_photo_canvas_resized_scaled_pixbuf, self); +#line 8627 "EditingTools.c" +} + + +static void _editing_tools_crop_tool_on_crop_ok_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_on_crop_ok ((EditingToolsCropTool*) self); +#line 8634 "EditingTools.c" +} + + +static void _editing_tools_editing_tool_notify_cancel_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_editing_tool_notify_cancel ((EditingToolsEditingTool*) self); +#line 8641 "EditingTools.c" +} + + +static void _editing_tools_crop_tool_constraint_changed_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { +#line 1182 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constraint_changed ((EditingToolsCropTool*) self); +#line 8648 "EditingTools.c" +} + + +static void _editing_tools_crop_tool_on_pivot_button_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 1183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_on_pivot_button_clicked ((EditingToolsCropTool*) self); +#line 8655 "EditingTools.c" +} + + +static gboolean _editing_tools_crop_tool_on_width_entry_focus_out_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self) { + gboolean result; + result = editing_tools_crop_tool_on_width_entry_focus_out ((EditingToolsCropTool*) self, event); +#line 1186 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 8664 "EditingTools.c" +} + + +static gboolean _editing_tools_crop_tool_on_height_entry_focus_out_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self) { + gboolean result; + result = editing_tools_crop_tool_on_height_entry_focus_out ((EditingToolsCropTool*) self, event); +#line 1187 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 8673 "EditingTools.c" +} + + +static void _editing_tools_crop_tool_on_width_insert_text_gtk_editable_insert_text (GtkEditable* _sender, const gchar* new_text, gint new_text_length, gint* position, gpointer self) { +#line 1188 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_on_width_insert_text ((EditingToolsCropTool*) self, new_text, new_text_length, position); +#line 8680 "EditingTools.c" +} + + +static void _editing_tools_crop_tool_on_height_insert_text_gtk_editable_insert_text (GtkEditable* _sender, const gchar* new_text, gint new_text_length, gint* position, gpointer self) { +#line 1189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_on_height_insert_text ((EditingToolsCropTool*) self, new_text, new_text_length, position); +#line 8687 "EditingTools.c" +} + + +static void editing_tools_crop_tool_bind_window_handlers (EditingToolsCropTool* self) { + EditingToolsCropToolCropToolWindow* _tmp0_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp1_ = NULL; + GtkButton* _tmp2_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp3_ = NULL; + GtkButton* _tmp4_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp5_ = NULL; + GtkComboBox* _tmp6_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp7_ = NULL; + GtkButton* _tmp8_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp9_ = NULL; + GtkEntry* _tmp10_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp11_ = NULL; + GtkEntry* _tmp12_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp13_ = NULL; + GtkEntry* _tmp14_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp15_ = NULL; + GtkEntry* _tmp16_ = NULL; +#line 1178 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1179 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_tool_window; +#line 1179 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), "key-press-event", (GCallback) _editing_tools_editing_tool_on_keypress_gtk_widget_key_press_event, G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 1180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->crop_tool_window; +#line 1180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_->ok_button; +#line 1180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp2_, "clicked", (GCallback) _editing_tools_crop_tool_on_crop_ok_gtk_button_clicked, self); +#line 1181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->crop_tool_window; +#line 1181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_->cancel_button; +#line 1181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp4_, "clicked", (GCallback) _editing_tools_editing_tool_notify_cancel_gtk_button_clicked, G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 1182 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->crop_tool_window; +#line 1182 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_->constraint_combo; +#line 1182 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp6_, "changed", (GCallback) _editing_tools_crop_tool_constraint_changed_gtk_combo_box_changed, self); +#line 1183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = self->priv->crop_tool_window; +#line 1183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_->pivot_reticle_button; +#line 1183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp8_, "clicked", (GCallback) _editing_tools_crop_tool_on_pivot_button_clicked_gtk_button_clicked, self); +#line 1186 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->crop_tool_window; +#line 1186 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_->custom_width_entry; +#line 1186 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget), "focus-out-event", (GCallback) _editing_tools_crop_tool_on_width_entry_focus_out_gtk_widget_focus_out_event, self); +#line 1187 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->crop_tool_window; +#line 1187 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_->custom_height_entry; +#line 1187 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget), "focus-out-event", (GCallback) _editing_tools_crop_tool_on_height_entry_focus_out_gtk_widget_focus_out_event, self); +#line 1188 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->priv->crop_tool_window; +#line 1188 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_->custom_width_entry; +#line 1188 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GTK_TYPE_EDITABLE, GtkEditable), "insert-text", (GCallback) _editing_tools_crop_tool_on_width_insert_text_gtk_editable_insert_text, self); +#line 1189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->crop_tool_window; +#line 1189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_->custom_height_entry; +#line 1189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GTK_TYPE_EDITABLE, GtkEditable), "insert-text", (GCallback) _editing_tools_crop_tool_on_height_insert_text_gtk_editable_insert_text, self); +#line 8763 "EditingTools.c" +} + + +static void editing_tools_crop_tool_unbind_window_handlers (EditingToolsCropTool* self) { + EditingToolsCropToolCropToolWindow* _tmp0_ = NULL; + guint _tmp1_ = 0U; + EditingToolsCropToolCropToolWindow* _tmp2_ = NULL; + GtkButton* _tmp3_ = NULL; + guint _tmp4_ = 0U; + EditingToolsCropToolCropToolWindow* _tmp5_ = NULL; + GtkButton* _tmp6_ = NULL; + guint _tmp7_ = 0U; + EditingToolsCropToolCropToolWindow* _tmp8_ = NULL; + GtkComboBox* _tmp9_ = NULL; + guint _tmp10_ = 0U; + EditingToolsCropToolCropToolWindow* _tmp11_ = NULL; + GtkButton* _tmp12_ = NULL; + guint _tmp13_ = 0U; + EditingToolsCropToolCropToolWindow* _tmp14_ = NULL; + GtkEntry* _tmp15_ = NULL; + guint _tmp16_ = 0U; + EditingToolsCropToolCropToolWindow* _tmp17_ = NULL; + GtkEntry* _tmp18_ = NULL; + guint _tmp19_ = 0U; + EditingToolsCropToolCropToolWindow* _tmp20_ = NULL; + GtkEntry* _tmp21_ = NULL; + guint _tmp22_ = 0U; +#line 1192 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_tool_window; +#line 1193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("key-press-event", gtk_widget_get_type (), &_tmp1_, NULL, FALSE); +#line 1193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _editing_tools_editing_tool_on_keypress_gtk_widget_key_press_event, G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 1194 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->crop_tool_window; +#line 1194 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_->ok_button; +#line 1194 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp4_, NULL, FALSE); +#line 1194 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _editing_tools_crop_tool_on_crop_ok_gtk_button_clicked, self); +#line 1195 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->crop_tool_window; +#line 1195 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_->cancel_button; +#line 1195 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp7_, NULL, FALSE); +#line 1195 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _editing_tools_editing_tool_notify_cancel_gtk_button_clicked, G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 1196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->crop_tool_window; +#line 1196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_->constraint_combo; +#line 1196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("changed", gtk_combo_box_get_type (), &_tmp10_, NULL, FALSE); +#line 1196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp9_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 0, NULL, (GCallback) _editing_tools_crop_tool_constraint_changed_gtk_combo_box_changed, self); +#line 1197 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->crop_tool_window; +#line 1197 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_->pivot_reticle_button; +#line 1197 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp13_, NULL, FALSE); +#line 1197 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp12_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp13_, 0, NULL, (GCallback) _editing_tools_crop_tool_on_pivot_button_clicked_gtk_button_clicked, self); +#line 1200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = self->priv->crop_tool_window; +#line 1200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = _tmp14_->custom_width_entry; +#line 1200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("focus-out-event", gtk_widget_get_type (), &_tmp16_, NULL, FALSE); +#line 1200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _editing_tools_crop_tool_on_width_entry_focus_out_gtk_widget_focus_out_event, self); +#line 1201 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->crop_tool_window; +#line 1201 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_->custom_height_entry; +#line 1201 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("focus-out-event", gtk_widget_get_type (), &_tmp19_, NULL, FALSE); +#line 1201 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp19_, 0, NULL, (GCallback) _editing_tools_crop_tool_on_height_entry_focus_out_gtk_widget_focus_out_event, self); +#line 1202 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = self->priv->crop_tool_window; +#line 1202 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = _tmp20_->custom_width_entry; +#line 1202 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("insert-text", GTK_TYPE_EDITABLE, &_tmp22_, NULL, FALSE); +#line 1202 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GTK_TYPE_EDITABLE, GtkEditable), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp22_, 0, NULL, (GCallback) _editing_tools_crop_tool_on_width_insert_text_gtk_editable_insert_text, self); +#line 8855 "EditingTools.c" +} + + +static gboolean editing_tools_crop_tool_real_on_keypress (EditingToolsEditingTool* base, GdkEventKey* event) { + EditingToolsCropTool * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + GdkEventKey* _tmp2_ = NULL; + guint _tmp3_ = 0U; + const gchar* _tmp4_ = NULL; + GdkEventKey* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; +#line 1205 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 1205 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 1206 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = event; +#line 1206 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_->keyval; +#line 1206 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = gdk_keyval_name (_tmp3_); +#line 1206 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (g_strcmp0 (_tmp4_, "KP_Enter") == 0) { +#line 1206 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = TRUE; +#line 8883 "EditingTools.c" + } else { + GdkEventKey* _tmp5_ = NULL; + guint _tmp6_ = 0U; + const gchar* _tmp7_ = NULL; +#line 1207 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = event; +#line 1207 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_->keyval; +#line 1207 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = gdk_keyval_name (_tmp6_); +#line 1207 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = g_strcmp0 (_tmp7_, "Enter") == 0; +#line 8896 "EditingTools.c" + } +#line 1206 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_) { +#line 1206 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = TRUE; +#line 8902 "EditingTools.c" + } else { + GdkEventKey* _tmp8_ = NULL; + guint _tmp9_ = 0U; + const gchar* _tmp10_ = NULL; +#line 1208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = event; +#line 1208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_->keyval; +#line 1208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = gdk_keyval_name (_tmp9_); +#line 1208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = g_strcmp0 (_tmp10_, "Return") == 0; +#line 8915 "EditingTools.c" + } +#line 1206 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_) { +#line 1209 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_on_crop_ok (self); +#line 1210 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 1210 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 8925 "EditingTools.c" + } +#line 1213 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = event; +#line 1213 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_crop_tool_parent_class)->on_keypress (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), _tmp11_); +#line 1213 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp12_; +#line 1213 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 8935 "EditingTools.c" +} + + +static void editing_tools_crop_tool_on_pivot_button_clicked (EditingToolsCropTool* self) { + EditingToolsCropToolConstraintDescription* _tmp0_ = NULL; + EditingToolsCropToolConstraintDescription* _tmp1_ = NULL; + gfloat _tmp2_ = 0.0F; + gboolean _tmp3_ = FALSE; + EditingToolsCropToolReticleOrientation _tmp21_ = 0; + EditingToolsCropToolReticleOrientation _tmp22_ = 0; +#line 1216 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = editing_tools_crop_tool_get_selected_constraint (self); +#line 1217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_; +#line 1217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_->aspect_ratio; +#line 1217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_ == EDITING_TOOLS_CROP_TOOL_CUSTOM_ASPECT_RATIO; +#line 1217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _editing_tools_crop_tool_constraint_description_unref0 (_tmp1_); +#line 1217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp3_) { +#line 8960 "EditingTools.c" + gchar* width_text = NULL; + EditingToolsCropToolCropToolWindow* _tmp4_ = NULL; + GtkEntry* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* height_text = NULL; + EditingToolsCropToolCropToolWindow* _tmp8_ = NULL; + GtkEntry* _tmp9_ = NULL; + const gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp12_ = NULL; + GtkEntry* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp15_ = NULL; + GtkEntry* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + gint temp = 0; + gint _tmp18_ = 0; + gint _tmp19_ = 0; + gint _tmp20_ = 0; +#line 1218 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->crop_tool_window; +#line 1218 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_->custom_width_entry; +#line 1218 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = gtk_entry_get_text (_tmp5_); +#line 1218 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = g_strdup (_tmp6_); +#line 1218 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + width_text = _tmp7_; +#line 1219 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->crop_tool_window; +#line 1219 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_->custom_height_entry; +#line 1219 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = gtk_entry_get_text (_tmp9_); +#line 1219 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = g_strdup (_tmp10_); +#line 1219 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + height_text = _tmp11_; +#line 1220 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->crop_tool_window; +#line 1220 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_->custom_width_entry; +#line 1220 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = height_text; +#line 1220 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp13_, _tmp14_); +#line 1221 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->crop_tool_window; +#line 1221 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_->custom_height_entry; +#line 1221 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = width_text; +#line 1221 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_text (_tmp16_, _tmp17_); +#line 1223 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->custom_width; +#line 1223 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + temp = _tmp18_; +#line 1224 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = self->priv->custom_height; +#line 1224 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_width = _tmp19_; +#line 1225 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = temp; +#line 1225 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_height = _tmp20_; +#line 1217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (height_text); +#line 1217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (width_text); +#line 9033 "EditingTools.c" + } +#line 1227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->reticle_orientation; +#line 1227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = editing_tools_crop_tool_reticle_orientation_toggle (_tmp21_); +#line 1227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->reticle_orientation = _tmp22_; +#line 1228 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constraint_changed (self); +#line 9043 "EditingTools.c" +} + + +static void editing_tools_crop_tool_real_deactivate (EditingToolsEditingTool* base) { + EditingToolsCropTool * self; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp2_ = NULL; + EditingToolsPhotoCanvas* _tmp5_ = NULL; +#line 1231 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 1232 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1232 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ != NULL) { +#line 9058 "EditingTools.c" + EditingToolsPhotoCanvas* _tmp1_ = NULL; +#line 1233 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1233 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_unbind_canvas_handlers (self, _tmp1_); +#line 9064 "EditingTools.c" + } +#line 1235 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->crop_tool_window; +#line 1235 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp2_ != NULL) { +#line 9070 "EditingTools.c" + EditingToolsCropToolCropToolWindow* _tmp3_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp4_ = NULL; +#line 1236 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_unbind_window_handlers (self); +#line 1237 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->crop_tool_window; +#line 1237 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget)); +#line 1238 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->crop_tool_window; +#line 1238 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget)); +#line 1239 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->crop_tool_window); +#line 1239 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->crop_tool_window = NULL; +#line 9087 "EditingTools.c" + } +#line 1243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp5_ != NULL) { +#line 9093 "EditingTools.c" + EditingToolsPhotoCanvas* _tmp6_ = NULL; + GdkWindow* _tmp7_ = NULL; + GdkWindow* _tmp8_ = NULL; + GdkCursor* _tmp9_ = NULL; + GdkCursor* _tmp10_ = NULL; +#line 1244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = editing_tools_photo_canvas_get_drawing_window (_tmp6_); +#line 1244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_; +#line 1244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = gdk_cursor_new (GDK_LEFT_PTR); +#line 1244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_; +#line 1244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gdk_window_set_cursor (_tmp8_, _tmp10_); +#line 1244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp10_); +#line 1244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp8_); +#line 9115 "EditingTools.c" + } +#line 1246 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->priv->crop_surface); +#line 1246 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->crop_surface = NULL; +#line 1248 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_crop_tool_parent_class)->deactivate (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 9123 "EditingTools.c" +} + + +static EditingToolsEditingToolWindow* editing_tools_crop_tool_real_get_tool_window (EditingToolsEditingTool* base) { + EditingToolsCropTool * self; + EditingToolsEditingToolWindow* result = NULL; + EditingToolsCropToolCropToolWindow* _tmp0_ = NULL; + EditingToolsEditingToolWindow* _tmp1_ = NULL; +#line 1251 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 1252 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_tool_window; +#line 1252 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow)); +#line 1252 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp1_; +#line 1252 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 9142 "EditingTools.c" +} + + +static GdkPixbuf* editing_tools_crop_tool_real_get_display_pixbuf (EditingToolsEditingTool* base, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error) { + EditingToolsCropTool * self; + Dimensions _vala_max_dim = {0}; + GdkPixbuf* result = NULL; + Photo* _tmp0_ = NULL; + Dimensions _tmp1_ = {0}; + GdkPixbuf* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + Scaling _tmp4_ = {0}; + GdkPixbuf* _tmp5_ = NULL; + GdkPixbuf* _tmp6_ = NULL; + GError * _inner_error_ = NULL; +#line 1255 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 1255 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (scaling != NULL, NULL); +#line 1255 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PHOTO (photo), NULL); +#line 1257 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = photo; +#line 1257 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_CROP, &_tmp1_); +#line 1257 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_max_dim = _tmp1_; +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = photo; +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = *scaling; +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = photo_get_pixbuf_with_options (_tmp3_, &_tmp4_, PHOTO_EXCEPTION_CROP, BACKING_FETCH_MODE_BASELINE, &_inner_error_); +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp5_; +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_propagate_error (error, _inner_error_); +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return NULL; +#line 9184 "EditingTools.c" + } +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp2_; +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = NULL; +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp6_; +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp2_); +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (max_dim) { +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *max_dim = _vala_max_dim; +#line 9198 "EditingTools.c" + } +#line 1259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 9202 "EditingTools.c" +} + + +static void editing_tools_crop_tool_prepare_ctx (EditingToolsCropTool* self, cairo_t* ctx, Dimensions* dim) { + cairo_t* _tmp0_ = NULL; + cairo_surface_t* _tmp1_ = NULL; + cairo_t* _tmp2_ = NULL; + cairo_t* _tmp3_ = NULL; + cairo_t* _tmp4_ = NULL; + cairo_t* _tmp5_ = NULL; + cairo_surface_t* _tmp6_ = NULL; + cairo_t* _tmp7_ = NULL; + cairo_t* _tmp8_ = NULL; + cairo_t* _tmp9_ = NULL; + cairo_t* _tmp10_ = NULL; + cairo_surface_t* _tmp11_ = NULL; + cairo_t* _tmp12_ = NULL; + cairo_t* _tmp13_ = NULL; + cairo_t* _tmp14_ = NULL; + cairo_t* _tmp15_ = NULL; + cairo_surface_t* _tmp16_ = NULL; + cairo_t* _tmp17_ = NULL; + cairo_t* _tmp18_ = NULL; +#line 1262 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1262 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 1262 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (dim != NULL); +#line 1263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = ctx; +#line 1263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = cairo_get_target (_tmp0_); +#line 1263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = cairo_create (_tmp1_); +#line 1263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->wide_black_ctx); +#line 1263 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->wide_black_ctx = _tmp2_; +#line 1264 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->wide_black_ctx; +#line 1264 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + set_source_color_from_string (_tmp3_, "#000"); +#line 1265 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->wide_black_ctx; +#line 1265 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_line_width (_tmp4_, (gdouble) 1); +#line 1267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = ctx; +#line 1267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = cairo_get_target (_tmp5_); +#line 1267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = cairo_create (_tmp6_); +#line 1267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->wide_white_ctx); +#line 1267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->wide_white_ctx = _tmp7_; +#line 1268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->wide_white_ctx; +#line 1268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + set_source_color_from_string (_tmp8_, "#FFF"); +#line 1269 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->wide_white_ctx; +#line 1269 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_line_width (_tmp9_, (gdouble) 1); +#line 1271 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = ctx; +#line 1271 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = cairo_get_target (_tmp10_); +#line 1271 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = cairo_create (_tmp11_); +#line 1271 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->thin_white_ctx); +#line 1271 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->thin_white_ctx = _tmp12_; +#line 1272 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->priv->thin_white_ctx; +#line 1272 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + set_source_color_from_string (_tmp13_, "#FFF"); +#line 1273 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = self->priv->thin_white_ctx; +#line 1273 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_line_width (_tmp14_, 0.5); +#line 1275 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = ctx; +#line 1275 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = cairo_get_target (_tmp15_); +#line 1275 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = cairo_create (_tmp16_); +#line 1275 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->text_ctx); +#line 1275 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->text_ctx = _tmp17_; +#line 1276 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->text_ctx; +#line 1276 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_select_font_face (_tmp18_, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); +#line 9300 "EditingTools.c" +} + + +static void editing_tools_crop_tool_on_resized_pixbuf (EditingToolsCropTool* self, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position) { + Dimensions new_dim = {0}; + GdkPixbuf* _tmp0_ = NULL; + Dimensions _tmp1_ = {0}; + Dimensions uncropped_dim = {0}; + EditingToolsPhotoCanvas* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + Photo* _tmp4_ = NULL; + Dimensions _tmp5_ = {0}; + Dimensions _tmp6_ = {0}; + Box crop = {0}; + Dimensions _tmp7_ = {0}; + Dimensions _tmp8_ = {0}; + Box _tmp9_ = {0}; + Dimensions _tmp10_ = {0}; + Dimensions _tmp11_ = {0}; + Box _tmp12_ = {0}; + cairo_surface_t* _tmp13_ = NULL; + GdkPixbuf* _tmp14_ = NULL; + gint _tmp15_ = 0; + gint _tmp16_ = 0; + GdkPixbuf* _tmp17_ = NULL; + gint _tmp18_ = 0; + gint _tmp19_ = 0; + cairo_surface_t* _tmp20_ = NULL; + cairo_t* ctx = NULL; + cairo_surface_t* _tmp21_ = NULL; + cairo_t* _tmp22_ = NULL; +#line 1279 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1279 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (old_dim != NULL); +#line 1279 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (GDK_IS_PIXBUF (scaled)); +#line 1279 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (scaled_position != NULL); +#line 1280 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = scaled; +#line 1280 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dimensions_for_pixbuf (_tmp0_, &_tmp1_); +#line 1280 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_dim = _tmp1_; +#line 1281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = editing_tools_photo_canvas_get_photo (_tmp2_); +#line 1281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 1281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_CROP, &_tmp5_); +#line 1281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_; +#line 1281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp4_); +#line 1281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + uncropped_dim = _tmp6_; +#line 1284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = *old_dim; +#line 1284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = uncropped_dim; +#line 1284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_scaled_similar (&self->priv->scaled_crop, &_tmp7_, &_tmp8_, &_tmp9_); +#line 1284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + crop = _tmp9_; +#line 1287 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = uncropped_dim; +#line 1287 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = new_dim; +#line 1287 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_scaled_similar (&crop, &_tmp10_, &_tmp11_, &_tmp12_); +#line 1287 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_crop = _tmp12_; +#line 1288 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->priv->crop_surface; +#line 1288 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp13_ != NULL) { +#line 1289 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->priv->crop_surface); +#line 1289 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->crop_surface = NULL; +#line 9384 "EditingTools.c" + } +#line 1291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = scaled; +#line 1291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = gdk_pixbuf_get_width (_tmp14_); +#line 1291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_; +#line 1291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = scaled; +#line 1291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = gdk_pixbuf_get_height (_tmp17_); +#line 1291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_; +#line 1291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp16_, _tmp19_); +#line 1291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->priv->crop_surface); +#line 1291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->crop_surface = _tmp20_; +#line 1292 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->crop_surface; +#line 1292 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = cairo_create (_tmp21_); +#line 1292 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ctx = _tmp22_; +#line 1293 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_rgba (ctx, 0.0, 0.0, 0.0, 1.0); +#line 1294 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_paint (ctx); +#line 1279 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (ctx); +#line 9416 "EditingTools.c" +} + + +static void editing_tools_crop_tool_real_on_left_click (EditingToolsEditingTool* base, gint x, gint y) { + EditingToolsCropTool * self; + GdkRectangle scaled_pixbuf_pos = {0}; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + GdkRectangle _tmp1_ = {0}; + Box offset_scaled_crop = {0}; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + GdkRectangle _tmp4_ = {0}; + gint _tmp5_ = 0; + Box _tmp6_ = {0}; + gint _tmp7_ = 0; + gint _tmp8_ = 0; + BoxLocation _tmp9_ = 0; + gint _tmp10_ = 0; + GdkRectangle _tmp11_ = {0}; + gint _tmp12_ = 0; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + GdkRectangle _tmp15_ = {0}; + gint _tmp16_ = 0; + gint _tmp17_ = 0; + EditingToolsPhotoCanvas* _tmp18_ = NULL; +#line 1298 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 1299 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1299 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp0_, &_tmp1_); +#line 1299 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scaled_pixbuf_pos = _tmp1_; +#line 1302 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = scaled_pixbuf_pos; +#line 1302 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 1302 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = scaled_pixbuf_pos; +#line 1302 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.y; +#line 1302 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_offset (&self->priv->scaled_crop, _tmp3_, _tmp5_, &_tmp6_); +#line 1302 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + offset_scaled_crop = _tmp6_; +#line 1305 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = x; +#line 1305 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = y; +#line 1305 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = box_approx_location (&offset_scaled_crop, _tmp7_, _tmp8_); +#line 1305 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->in_manipulation = _tmp9_; +#line 1306 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = x; +#line 1306 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = scaled_pixbuf_pos; +#line 1306 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_.x; +#line 1306 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x = _tmp10_ - _tmp12_; +#line 1306 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = x; +#line 1306 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->last_grab_x = _tmp13_; +#line 1307 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = y; +#line 1307 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = scaled_pixbuf_pos; +#line 1307 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_.y; +#line 1307 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y = _tmp14_ - _tmp16_; +#line 1307 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = y; +#line 1307 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->last_grab_y = _tmp17_; +#line 1310 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1310 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp18_); +#line 9499 "EditingTools.c" +} + + +static void editing_tools_crop_tool_real_on_left_released (EditingToolsEditingTool* base, gint x, gint y) { + EditingToolsCropTool * self; + BoxLocation _tmp0_ = 0; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + EditingToolsPhotoCanvas* _tmp3_ = NULL; +#line 1313 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 1315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->in_manipulation; +#line 1315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == BOX_LOCATION_OUTSIDE) { +#line 1316 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 9517 "EditingTools.c" + } +#line 1319 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->in_manipulation = BOX_LOCATION_OUTSIDE; +#line 1320 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->last_grab_x = -1; +#line 1321 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->last_grab_y = -1; +#line 1323 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = x; +#line 1323 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = y; +#line 1323 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_update_cursor (self, _tmp1_, _tmp2_); +#line 1326 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1326 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp3_); +#line 9535 "EditingTools.c" +} + + +static void editing_tools_crop_tool_real_on_motion (EditingToolsEditingTool* base, gint x, gint y, GdkModifierType mask) { + EditingToolsCropTool * self; + BoxLocation _tmp0_ = 0; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + EditingToolsPhotoCanvas* _tmp5_ = NULL; +#line 1329 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 1332 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->in_manipulation; +#line 1332 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ != BOX_LOCATION_OUTSIDE) { +#line 9551 "EditingTools.c" + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#line 1333 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = x; +#line 1333 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = y; +#line 1333 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_on_canvas_manipulation (self, _tmp1_, _tmp2_); +#line 9560 "EditingTools.c" + } +#line 1335 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = x; +#line 1335 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = y; +#line 1335 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_update_cursor (self, _tmp3_, _tmp4_); +#line 1336 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1336 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp5_); +#line 9572 "EditingTools.c" +} + + +static void editing_tools_crop_tool_real_paint (EditingToolsEditingTool* base, cairo_t* default_ctx) { + EditingToolsCropTool * self; + gint w = 0; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + GdkWindow* _tmp1_ = NULL; + GdkWindow* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + gint h = 0; + EditingToolsPhotoCanvas* _tmp5_ = NULL; + GdkWindow* _tmp6_ = NULL; + GdkWindow* _tmp7_ = NULL; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + cairo_t* _tmp10_ = NULL; + cairo_t* _tmp11_ = NULL; + cairo_t* _tmp12_ = NULL; + cairo_t* _tmp13_ = NULL; + cairo_t* ctx = NULL; + cairo_surface_t* _tmp14_ = NULL; + cairo_t* _tmp15_ = NULL; + Box _tmp16_ = {0}; + gint _tmp17_ = 0; + Box _tmp18_ = {0}; + gint _tmp19_ = 0; + gint _tmp20_ = 0; + gint _tmp21_ = 0; + EditingToolsPhotoCanvas* _tmp22_ = NULL; + cairo_surface_t* _tmp23_ = NULL; + Box _tmp24_ = {0}; +#line 1339 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 1339 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (default_ctx != NULL); +#line 1341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = editing_tools_photo_canvas_get_drawing_window (_tmp0_); +#line 1341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_; +#line 1341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = gdk_window_get_width (_tmp2_); +#line 1341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 1341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp2_); +#line 1341 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + w = _tmp4_; +#line 1342 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1342 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = editing_tools_photo_canvas_get_drawing_window (_tmp5_); +#line 1342 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_; +#line 1342 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = gdk_window_get_height (_tmp7_); +#line 1342 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_; +#line 1342 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp7_); +#line 1342 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + h = _tmp9_; +#line 1344 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = default_ctx; +#line 1344 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_rgba (_tmp10_, 0.0, 0.0, 0.0, 1.0); +#line 1345 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = default_ctx; +#line 1345 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (_tmp11_, (gdouble) 0, (gdouble) 0, (gdouble) w, (gdouble) h); +#line 1346 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = default_ctx; +#line 1346 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (_tmp12_); +#line 1347 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = default_ctx; +#line 1347 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_paint (_tmp13_); +#line 1349 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = self->priv->crop_surface; +#line 1349 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = cairo_create (_tmp14_); +#line 1349 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ctx = _tmp15_; +#line 1350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_operator (ctx, CAIRO_OPERATOR_SOURCE); +#line 1351 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_rgba (ctx, 0.0, 0.0, 0.0, 0.5); +#line 1352 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_paint (ctx); +#line 1355 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_rgba (ctx, 0.0, 0.0, 0.0, 0.0); +#line 1356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = self->priv->scaled_crop; +#line 1356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _tmp16_.left; +#line 1356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->scaled_crop; +#line 1356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_.top; +#line 1356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = box_get_width (&self->priv->scaled_crop); +#line 1356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = box_get_height (&self->priv->scaled_crop); +#line 1356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (ctx, (gdouble) _tmp17_, (gdouble) _tmp19_, (gdouble) _tmp20_, (gdouble) _tmp21_); +#line 1358 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (ctx); +#line 1359 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1359 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = self->priv->crop_surface; +#line 1359 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_paint_surface (_tmp22_, _tmp23_, TRUE); +#line 1362 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->priv->scaled_crop; +#line 1362 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_paint_crop_tool (self, &_tmp24_); +#line 1339 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (ctx); +#line 9696 "EditingTools.c" +} + + +static void editing_tools_crop_tool_on_crop_ok (EditingToolsCropTool* self) { + ConfigFacade* _tmp0_ = NULL; + ConfigFacade* _tmp1_ = NULL; + EditingToolsCropToolCropToolWindow* _tmp2_ = NULL; + GtkComboBox* _tmp3_ = NULL; + gint _tmp4_ = 0; + ConfigFacade* _tmp5_ = NULL; + ConfigFacade* _tmp6_ = NULL; + gint _tmp7_ = 0; + ConfigFacade* _tmp8_ = NULL; + ConfigFacade* _tmp9_ = NULL; + gint _tmp10_ = 0; + Box crop = {0}; + EditingToolsPhotoCanvas* _tmp11_ = NULL; + GdkRectangle _tmp12_ = {0}; + Dimensions _tmp13_ = {0}; + EditingToolsPhotoCanvas* _tmp14_ = NULL; + Photo* _tmp15_ = NULL; + Photo* _tmp16_ = NULL; + Dimensions _tmp17_ = {0}; + Box _tmp18_ = {0}; + Box _tmp19_ = {0}; + GdkPixbuf* cropped = NULL; + EditingToolsPhotoCanvas* _tmp20_ = NULL; + GdkPixbuf* _tmp21_ = NULL; + GdkPixbuf* _tmp22_ = NULL; + Box _tmp23_ = {0}; + gint _tmp24_ = 0; + Box _tmp25_ = {0}; + gint _tmp26_ = 0; + gint _tmp27_ = 0; + gint _tmp28_ = 0; + GdkPixbuf* _tmp29_ = NULL; + GdkPixbuf* _tmp30_ = NULL; + EditingToolsPhotoCanvas* _tmp31_ = NULL; + Photo* _tmp32_ = NULL; + Photo* _tmp33_ = NULL; + Box _tmp34_ = {0}; + CropCommand* _tmp35_ = NULL; + CropCommand* _tmp36_ = NULL; + Dimensions _tmp37_ = {0}; +#line 1365 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1369 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = config_facade_get_instance (); +#line 1369 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_; +#line 1369 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->crop_tool_window; +#line 1369 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_->constraint_combo; +#line 1369 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = gtk_combo_box_get_active (_tmp3_); +#line 1369 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + configuration_facade_set_last_crop_menu_choice (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp4_); +#line 1369 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp1_); +#line 1371 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = config_facade_get_instance (); +#line 1371 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_; +#line 1371 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = self->priv->custom_width; +#line 1371 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + configuration_facade_set_last_crop_width (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp7_); +#line 1371 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp6_); +#line 1372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = config_facade_get_instance (); +#line 1372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_; +#line 1372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->custom_height; +#line 1372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + configuration_facade_set_last_crop_height (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp10_); +#line 1372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp9_); +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp11_, &_tmp12_); +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dimensions_for_rectangle (&_tmp12_, &_tmp13_); +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = editing_tools_photo_canvas_get_photo (_tmp14_); +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_; +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_CROP, &_tmp17_); +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_scaled_similar (&self->priv->scaled_crop, &_tmp13_, &_tmp17_, &_tmp18_); +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_; +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp16_); +#line 1375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + crop = _tmp19_; +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = editing_tools_photo_canvas_get_scaled_pixbuf (_tmp20_); +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _tmp21_; +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = self->priv->scaled_crop; +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = _tmp23_.left; +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = self->priv->scaled_crop; +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _tmp25_.top; +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = box_get_width (&self->priv->scaled_crop); +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = box_get_height (&self->priv->scaled_crop); +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = gdk_pixbuf_new_subpixbuf (_tmp22_, _tmp24_, _tmp26_, _tmp27_, _tmp28_); +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = _tmp29_; +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp22_); +#line 1380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cropped = _tmp30_; +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = editing_tools_photo_canvas_get_photo (_tmp31_); +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = _tmp32_; +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = crop; +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = crop_command_new (_tmp33_, &_tmp34_, RESOURCES_CROP_LABEL, RESOURCES_CROP_TOOLTIP); +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = _tmp35_; +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_dimensions (&crop, &_tmp37_); +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), "applied", G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, TYPE_COMMAND, Command), cropped, &_tmp37_, TRUE); +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp36_); +#line 1385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp33_); +#line 1365 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (cropped); +#line 9847 "EditingTools.c" +} + + +static void editing_tools_crop_tool_update_cursor (EditingToolsCropTool* self, gint x, gint y) { + GdkRectangle scaled_pos = {0}; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + GdkRectangle _tmp1_ = {0}; + Box offset_scaled_crop = {0}; + GdkRectangle _tmp2_ = {0}; + gint _tmp3_ = 0; + GdkRectangle _tmp4_ = {0}; + gint _tmp5_ = 0; + Box _tmp6_ = {0}; + GdkCursorType cursor_type = 0; + gint _tmp7_ = 0; + gint _tmp8_ = 0; + BoxLocation _tmp9_ = 0; + GdkCursorType _tmp10_ = 0; + GdkCursorType _tmp11_ = 0; +#line 1389 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1391 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1391 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp0_, &_tmp1_); +#line 1391 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scaled_pos = _tmp1_; +#line 1392 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = scaled_pos; +#line 1392 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.x; +#line 1392 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = scaled_pos; +#line 1392 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.y; +#line 1392 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_offset (&self->priv->scaled_crop, _tmp3_, _tmp5_, &_tmp6_); +#line 1392 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + offset_scaled_crop = _tmp6_; +#line 1394 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_LEFT_PTR; +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = x; +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = y; +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = box_approx_location (&offset_scaled_crop, _tmp7_, _tmp8_); +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + switch (_tmp9_) { +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_LEFT_SIDE: +#line 9899 "EditingTools.c" + { +#line 1397 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_LEFT_SIDE; +#line 1398 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9905 "EditingTools.c" + } +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_SIDE: +#line 9909 "EditingTools.c" + { +#line 1401 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_TOP_SIDE; +#line 1402 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9915 "EditingTools.c" + } +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_RIGHT_SIDE: +#line 9919 "EditingTools.c" + { +#line 1405 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_RIGHT_SIDE; +#line 1406 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9925 "EditingTools.c" + } +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_SIDE: +#line 9929 "EditingTools.c" + { +#line 1409 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_BOTTOM_SIDE; +#line 1410 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9935 "EditingTools.c" + } +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_LEFT: +#line 9939 "EditingTools.c" + { +#line 1413 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_TOP_LEFT_CORNER; +#line 1414 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9945 "EditingTools.c" + } +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_LEFT: +#line 9949 "EditingTools.c" + { +#line 1417 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_BOTTOM_LEFT_CORNER; +#line 1418 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9955 "EditingTools.c" + } +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_RIGHT: +#line 9959 "EditingTools.c" + { +#line 1421 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_TOP_RIGHT_CORNER; +#line 1422 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9965 "EditingTools.c" + } +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_RIGHT: +#line 9969 "EditingTools.c" + { +#line 1425 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_BOTTOM_RIGHT_CORNER; +#line 1426 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9975 "EditingTools.c" + } +#line 1395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_INSIDE: +#line 9979 "EditingTools.c" + { +#line 1429 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor_type = GDK_FLEUR; +#line 1430 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9985 "EditingTools.c" + } + default: + { +#line 1434 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 9991 "EditingTools.c" + } + } +#line 1437 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = cursor_type; +#line 1437 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->current_cursor_type; +#line 1437 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp10_ != _tmp11_) { +#line 10000 "EditingTools.c" + GdkCursor* cursor = NULL; + GdkCursorType _tmp12_ = 0; + GdkCursor* _tmp13_ = NULL; + EditingToolsPhotoCanvas* _tmp14_ = NULL; + GdkWindow* _tmp15_ = NULL; + GdkWindow* _tmp16_ = NULL; + GdkCursor* _tmp17_ = NULL; + GdkCursorType _tmp18_ = 0; +#line 1438 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = cursor_type; +#line 1438 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = gdk_cursor_new (_tmp12_); +#line 1438 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cursor = _tmp13_; +#line 1439 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1439 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = editing_tools_photo_canvas_get_drawing_window (_tmp14_); +#line 1439 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_; +#line 1439 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = cursor; +#line 1439 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gdk_window_set_cursor (_tmp16_, _tmp17_); +#line 1439 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp16_); +#line 1440 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = cursor_type; +#line 1440 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->current_cursor_type = _tmp18_; +#line 1437 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (cursor); +#line 10033 "EditingTools.c" + } +} + + +static gint editing_tools_crop_tool_eval_radial_line (EditingToolsCropTool* self, gdouble center_x, gdouble center_y, gdouble bounds_x, gdouble bounds_y, gdouble user_x) { + gint result = 0; + gdouble decision_slope = 0.0; + gdouble _tmp0_ = 0.0; + gdouble _tmp1_ = 0.0; + gdouble _tmp2_ = 0.0; + gdouble _tmp3_ = 0.0; + gdouble decision_intercept = 0.0; + gdouble _tmp4_ = 0.0; + gdouble _tmp5_ = 0.0; + gdouble _tmp6_ = 0.0; +#line 1444 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self), 0); +#line 1446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = bounds_y; +#line 1446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = center_y; +#line 1446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = bounds_x; +#line 1446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = center_x; +#line 1446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + decision_slope = (_tmp0_ - _tmp1_) / (_tmp2_ - _tmp3_); +#line 1447 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = bounds_y; +#line 1447 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = bounds_x; +#line 1447 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + decision_intercept = _tmp4_ - (decision_slope * _tmp5_); +#line 1449 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = user_x; +#line 1449 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = (gint) ((decision_slope * _tmp6_) + decision_intercept); +#line 1449 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 10073 "EditingTools.c" +} + + +static void editing_tools_crop_tool_get_photo_dimensions (EditingToolsCropTool* self, Dimensions* result) { + Dimensions photo_dims = {0}; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + Dimensions _tmp3_ = {0}; + Dimensions _tmp4_ = {0}; + Dimensions surface_dims = {0}; + EditingToolsPhotoCanvas* _tmp5_ = NULL; + Dimensions _tmp6_ = {0}; + gdouble scale_factor = 0.0; + Dimensions _tmp7_ = {0}; + gint _tmp8_ = 0; + Dimensions _tmp9_ = {0}; + gint _tmp10_ = 0; + Dimensions _tmp11_ = {0}; + gint _tmp12_ = 0; + Dimensions _tmp13_ = {0}; + gint _tmp14_ = 0; + gdouble _tmp15_ = 0.0; + gdouble _tmp16_ = 0.0; + gdouble _tmp17_ = 0.0; + EditingToolsPhotoCanvas* _tmp18_ = NULL; + Photo* _tmp19_ = NULL; + Photo* _tmp20_ = NULL; + Dimensions _tmp21_ = {0}; + Dimensions _tmp22_ = {0}; + gint _tmp23_ = 0; + gdouble _tmp24_ = 0.0; + Dimensions _tmp25_ = {0}; + gint _tmp26_ = 0; + gdouble _tmp27_ = 0.0; + Dimensions _tmp28_ = {0}; +#line 1453 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = editing_tools_photo_canvas_get_photo (_tmp0_); +#line 1454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_; +#line 1454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_CROP, &_tmp3_); +#line 1454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 1454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp2_); +#line 1454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_dims = _tmp4_; +#line 1455 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1455 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_surface_dim (_tmp5_, &_tmp6_); +#line 1455 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + surface_dims = _tmp6_; +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = surface_dims; +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.width; +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = photo_dims; +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.width; +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = surface_dims; +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_.height; +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = photo_dims; +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_.height; +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = MIN (((gdouble) _tmp8_) / _tmp10_, ((gdouble) _tmp12_) / _tmp14_); +#line 1456 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scale_factor = _tmp15_; +#line 1458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = scale_factor; +#line 1458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = MIN (_tmp16_, 1.0); +#line 1458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scale_factor = _tmp17_; +#line 1460 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1460 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = editing_tools_photo_canvas_get_photo (_tmp18_); +#line 1460 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _tmp19_; +#line 1460 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_CROP | PHOTO_EXCEPTION_STRAIGHTEN, &_tmp21_); +#line 1460 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_dims = _tmp21_; +#line 1460 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp20_); +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = photo_dims; +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _tmp22_.width; +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = scale_factor; +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = photo_dims; +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _tmp25_.height; +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = scale_factor; +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_.width = (gint) (_tmp23_ * _tmp24_); +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_.height = (gint) (_tmp26_ * _tmp27_); +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _tmp28_; +#line 1463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 10190 "EditingTools.c" +} + + +static gboolean _box_equal (const Box* s1, const Box* s2) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (s1 == s2) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return TRUE; +#line 10199 "EditingTools.c" + } +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (s1 == NULL) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return FALSE; +#line 10205 "EditingTools.c" + } +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (s2 == NULL) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return FALSE; +#line 10211 "EditingTools.c" + } +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (s1->left != s2->left) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return FALSE; +#line 10217 "EditingTools.c" + } +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (s1->top != s2->top) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return FALSE; +#line 10223 "EditingTools.c" + } +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (s1->right != s2->right) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return FALSE; +#line 10229 "EditingTools.c" + } +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (s1->bottom != s2->bottom) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return FALSE; +#line 10235 "EditingTools.c" + } +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return TRUE; +#line 10239 "EditingTools.c" +} + + +static gboolean editing_tools_crop_tool_on_canvas_manipulation (EditingToolsCropTool* self, gint x, gint y) { + gboolean result = FALSE; + GdkRectangle scaled_pos = {0}; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + GdkRectangle _tmp1_ = {0}; + gint _tmp2_ = 0; + GdkRectangle _tmp3_ = {0}; + gint _tmp4_ = 0; + gint _tmp5_ = 0; + gint _tmp11_ = 0; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + gint left = 0; + Box _tmp20_ = {0}; + gint _tmp21_ = 0; + gint top = 0; + Box _tmp22_ = {0}; + gint _tmp23_ = 0; + gint right = 0; + Box _tmp24_ = {0}; + gint _tmp25_ = 0; + gint bottom = 0; + Box _tmp26_ = {0}; + gint _tmp27_ = 0; + gint center_x = 0; + gint _tmp28_ = 0; + gint _tmp29_ = 0; + gint center_y = 0; + gint _tmp30_ = 0; + gint _tmp31_ = 0; + BoxLocation _tmp32_ = 0; + gint width = 0; + gint _tmp199_ = 0; + gint _tmp200_ = 0; + gint height = 0; + gint _tmp201_ = 0; + gint _tmp202_ = 0; + Dimensions photo_dims = {0}; + Dimensions _tmp203_ = {0}; + gdouble angle = 0.0; + EditingToolsPhotoCanvas* _tmp204_ = NULL; + Photo* _tmp205_ = NULL; + Photo* _tmp206_ = NULL; + gdouble _tmp207_ = 0.0; + Box new_crop = {0}; + gfloat _tmp208_ = 0.0F; + BoxLocation _tmp254_ = 0; + Box _tmp257_ = {0}; + gfloat _tmp258_ = 0.0F; +#line 1467 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self), FALSE); +#line 1468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp0_, &_tmp1_); +#line 1468 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scaled_pos = _tmp1_; +#line 1472 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = x; +#line 1472 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = scaled_pos; +#line 1472 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.x; +#line 1472 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x = _tmp2_ - _tmp4_; +#line 1473 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = x; +#line 1473 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp5_ < 0) { +#line 1474 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x = 0; +#line 10315 "EditingTools.c" + } else { + gint _tmp6_ = 0; + GdkRectangle _tmp7_ = {0}; + gint _tmp8_ = 0; +#line 1475 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = x; +#line 1475 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = scaled_pos; +#line 1475 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.width; +#line 1475 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp6_ >= _tmp8_) { +#line 10328 "EditingTools.c" + GdkRectangle _tmp9_ = {0}; + gint _tmp10_ = 0; +#line 1476 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = scaled_pos; +#line 1476 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.width; +#line 1476 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x = _tmp10_ - 1; +#line 10337 "EditingTools.c" + } + } +#line 1478 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = y; +#line 1478 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = scaled_pos; +#line 1478 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.y; +#line 1478 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y = _tmp11_ - _tmp13_; +#line 1479 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = y; +#line 1479 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp14_ < 0) { +#line 1480 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y = 0; +#line 10354 "EditingTools.c" + } else { + gint _tmp15_ = 0; + GdkRectangle _tmp16_ = {0}; + gint _tmp17_ = 0; +#line 1481 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = y; +#line 1481 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = scaled_pos; +#line 1481 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _tmp16_.height; +#line 1481 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp15_ >= _tmp17_) { +#line 10367 "EditingTools.c" + GdkRectangle _tmp18_ = {0}; + gint _tmp19_ = 0; +#line 1482 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = scaled_pos; +#line 1482 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_.height; +#line 1482 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y = _tmp19_ - 1; +#line 10376 "EditingTools.c" + } + } +#line 1486 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = self->priv->scaled_crop; +#line 1486 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = _tmp20_.left; +#line 1486 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp21_; +#line 1487 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = self->priv->scaled_crop; +#line 1487 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _tmp22_.top; +#line 1487 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp23_; +#line 1488 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->priv->scaled_crop; +#line 1488 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _tmp24_.right; +#line 1488 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp25_; +#line 1489 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = self->priv->scaled_crop; +#line 1489 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = _tmp26_.bottom; +#line 1489 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp27_; +#line 1492 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = left; +#line 1492 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = right; +#line 1492 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + center_x = (_tmp28_ + _tmp29_) / 2; +#line 1493 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = top; +#line 1493 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = bottom; +#line 1493 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + center_y = (_tmp30_ + _tmp31_) / 2; +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = self->priv->in_manipulation; +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + switch (_tmp32_) { +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_LEFT_SIDE: +#line 10421 "EditingTools.c" + { + gint _tmp33_ = 0; + gfloat _tmp34_ = 0.0F; +#line 1497 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = x; +#line 1497 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp33_; +#line 1498 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1498 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp34_ != EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 10433 "EditingTools.c" + gfloat new_height = 0.0F; + gint _tmp35_ = 0; + gint _tmp36_ = 0; + gfloat _tmp37_ = 0.0F; + gint _tmp38_ = 0; + gfloat _tmp39_ = 0.0F; +#line 1499 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = right; +#line 1499 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = left; +#line 1499 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1499 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_height = ((gfloat) (_tmp35_ - _tmp36_)) / _tmp37_; +#line 1500 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = top; +#line 1500 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = new_height; +#line 1500 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp38_ + ((gint) _tmp39_); +#line 10454 "EditingTools.c" + } +#line 1502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 10458 "EditingTools.c" + } +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_SIDE: +#line 10462 "EditingTools.c" + { + gint _tmp40_ = 0; + gfloat _tmp41_ = 0.0F; +#line 1505 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = y; +#line 1505 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp40_; +#line 1506 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1506 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp41_ != EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 10474 "EditingTools.c" + gfloat new_width = 0.0F; + gint _tmp42_ = 0; + gint _tmp43_ = 0; + gfloat _tmp44_ = 0.0F; + gint _tmp45_ = 0; + gfloat _tmp46_ = 0.0F; +#line 1507 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = bottom; +#line 1507 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = top; +#line 1507 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1507 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_width = ((gfloat) (_tmp42_ - _tmp43_)) * _tmp44_; +#line 1508 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = left; +#line 1508 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = new_width; +#line 1508 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp45_ + ((gint) _tmp46_); +#line 10495 "EditingTools.c" + } +#line 1510 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 10499 "EditingTools.c" + } +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_RIGHT_SIDE: +#line 10503 "EditingTools.c" + { + gint _tmp47_ = 0; + gfloat _tmp48_ = 0.0F; +#line 1513 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = x; +#line 1513 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp47_; +#line 1514 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp48_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1514 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp48_ != EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 10515 "EditingTools.c" + gfloat new_height = 0.0F; + gint _tmp49_ = 0; + gint _tmp50_ = 0; + gfloat _tmp51_ = 0.0F; + gint _tmp52_ = 0; + gfloat _tmp53_ = 0.0F; +#line 1515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp49_ = right; +#line 1515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp50_ = left; +#line 1515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp51_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_height = ((gfloat) (_tmp49_ - _tmp50_)) / _tmp51_; +#line 1516 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52_ = top; +#line 1516 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp53_ = new_height; +#line 1516 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp52_ + ((gint) _tmp53_); +#line 10536 "EditingTools.c" + } +#line 1518 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 10540 "EditingTools.c" + } +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_SIDE: +#line 10544 "EditingTools.c" + { + gint _tmp54_ = 0; + gfloat _tmp55_ = 0.0F; +#line 1521 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp54_ = y; +#line 1521 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp54_; +#line 1522 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp55_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1522 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp55_ != EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 10556 "EditingTools.c" + gfloat new_width = 0.0F; + gint _tmp56_ = 0; + gint _tmp57_ = 0; + gfloat _tmp58_ = 0.0F; + gint _tmp59_ = 0; + gfloat _tmp60_ = 0.0F; +#line 1523 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp56_ = bottom; +#line 1523 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp57_ = top; +#line 1523 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp58_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1523 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_width = ((gfloat) (_tmp56_ - _tmp57_)) * _tmp58_; +#line 1524 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp59_ = left; +#line 1524 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp60_ = new_width; +#line 1524 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp59_ + ((gint) _tmp60_); +#line 10577 "EditingTools.c" + } +#line 1526 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 10581 "EditingTools.c" + } +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_LEFT: +#line 10585 "EditingTools.c" + { + gfloat _tmp61_ = 0.0F; +#line 1529 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp61_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1529 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp61_ == EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 10592 "EditingTools.c" + gint _tmp62_ = 0; + gint _tmp63_ = 0; +#line 1530 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp62_ = y; +#line 1530 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp62_; +#line 1531 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp63_ = x; +#line 1531 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp63_; +#line 10603 "EditingTools.c" + } else { + gint _tmp64_ = 0; + gint _tmp65_ = 0; + gint _tmp66_ = 0; + gint _tmp67_ = 0; + gint _tmp68_ = 0; + gint _tmp69_ = 0; + gint _tmp70_ = 0; +#line 1533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp64_ = y; +#line 1533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp65_ = center_x; +#line 1533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp66_ = center_y; +#line 1533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp67_ = left; +#line 1533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp68_ = top; +#line 1533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp69_ = x; +#line 1533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp70_ = editing_tools_crop_tool_eval_radial_line (self, (gdouble) _tmp65_, (gdouble) _tmp66_, (gdouble) _tmp67_, (gdouble) _tmp68_, (gdouble) _tmp69_); +#line 1533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp64_ < _tmp70_) { +#line 10628 "EditingTools.c" + gint _tmp71_ = 0; + gfloat new_width = 0.0F; + gint _tmp72_ = 0; + gint _tmp73_ = 0; + gfloat _tmp74_ = 0.0F; + gint _tmp75_ = 0; + gfloat _tmp76_ = 0.0F; +#line 1534 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp71_ = y; +#line 1534 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp71_; +#line 1535 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp72_ = bottom; +#line 1535 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp73_ = top; +#line 1535 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp74_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1535 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_width = ((gfloat) (_tmp72_ - _tmp73_)) * _tmp74_; +#line 1536 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp75_ = right; +#line 1536 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp76_ = new_width; +#line 1536 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp75_ - ((gint) _tmp76_); +#line 10654 "EditingTools.c" + } else { + gint _tmp77_ = 0; + gfloat new_height = 0.0F; + gint _tmp78_ = 0; + gint _tmp79_ = 0; + gfloat _tmp80_ = 0.0F; + gint _tmp81_ = 0; + gfloat _tmp82_ = 0.0F; +#line 1538 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp77_ = x; +#line 1538 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp77_; +#line 1539 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp78_ = right; +#line 1539 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp79_ = left; +#line 1539 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp80_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1539 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_height = ((gfloat) (_tmp78_ - _tmp79_)) / _tmp80_; +#line 1540 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp81_ = bottom; +#line 1540 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp82_ = new_height; +#line 1540 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp81_ - ((gint) _tmp82_); +#line 10681 "EditingTools.c" + } + } +#line 1543 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 10686 "EditingTools.c" + } +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_LEFT: +#line 10690 "EditingTools.c" + { + gfloat _tmp83_ = 0.0F; +#line 1546 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp83_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1546 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp83_ == EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 10697 "EditingTools.c" + gint _tmp84_ = 0; + gint _tmp85_ = 0; +#line 1547 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp84_ = y; +#line 1547 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp84_; +#line 1548 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp85_ = x; +#line 1548 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp85_; +#line 10708 "EditingTools.c" + } else { + gint _tmp86_ = 0; + gint _tmp87_ = 0; + gint _tmp88_ = 0; + gint _tmp89_ = 0; + gint _tmp90_ = 0; + gint _tmp91_ = 0; + gint _tmp92_ = 0; +#line 1550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp86_ = y; +#line 1550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp87_ = center_x; +#line 1550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp88_ = center_y; +#line 1550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp89_ = left; +#line 1550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp90_ = bottom; +#line 1550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp91_ = x; +#line 1550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp92_ = editing_tools_crop_tool_eval_radial_line (self, (gdouble) _tmp87_, (gdouble) _tmp88_, (gdouble) _tmp89_, (gdouble) _tmp90_, (gdouble) _tmp91_); +#line 1550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp86_ < _tmp92_) { +#line 10733 "EditingTools.c" + gint _tmp93_ = 0; + gfloat new_height = 0.0F; + gint _tmp94_ = 0; + gint _tmp95_ = 0; + gfloat _tmp96_ = 0.0F; + gint _tmp97_ = 0; + gfloat _tmp98_ = 0.0F; +#line 1551 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp93_ = x; +#line 1551 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp93_; +#line 1552 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp94_ = right; +#line 1552 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp95_ = left; +#line 1552 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp96_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1552 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_height = ((gfloat) (_tmp94_ - _tmp95_)) / _tmp96_; +#line 1553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp97_ = top; +#line 1553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp98_ = new_height; +#line 1553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp97_ + ((gint) _tmp98_); +#line 10759 "EditingTools.c" + } else { + gint _tmp99_ = 0; + gfloat new_width = 0.0F; + gint _tmp100_ = 0; + gint _tmp101_ = 0; + gfloat _tmp102_ = 0.0F; + gint _tmp103_ = 0; + gfloat _tmp104_ = 0.0F; +#line 1555 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp99_ = y; +#line 1555 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp99_; +#line 1556 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp100_ = bottom; +#line 1556 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp101_ = top; +#line 1556 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp102_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1556 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_width = ((gfloat) (_tmp100_ - _tmp101_)) * _tmp102_; +#line 1557 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp103_ = right; +#line 1557 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp104_ = new_width; +#line 1557 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp103_ - ((gint) _tmp104_); +#line 10786 "EditingTools.c" + } + } +#line 1560 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 10791 "EditingTools.c" + } +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_RIGHT: +#line 10795 "EditingTools.c" + { + gfloat _tmp105_ = 0.0F; +#line 1563 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp105_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1563 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp105_ == EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 10802 "EditingTools.c" + gint _tmp106_ = 0; + gint _tmp107_ = 0; +#line 1564 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp106_ = y; +#line 1564 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp106_; +#line 1565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp107_ = x; +#line 1565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp107_; +#line 10813 "EditingTools.c" + } else { + gint _tmp108_ = 0; + gint _tmp109_ = 0; + gint _tmp110_ = 0; + gint _tmp111_ = 0; + gint _tmp112_ = 0; + gint _tmp113_ = 0; + gint _tmp114_ = 0; +#line 1567 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp108_ = y; +#line 1567 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp109_ = center_x; +#line 1567 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp110_ = center_y; +#line 1567 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp111_ = right; +#line 1567 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp112_ = top; +#line 1567 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp113_ = x; +#line 1567 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp114_ = editing_tools_crop_tool_eval_radial_line (self, (gdouble) _tmp109_, (gdouble) _tmp110_, (gdouble) _tmp111_, (gdouble) _tmp112_, (gdouble) _tmp113_); +#line 1567 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp108_ < _tmp114_) { +#line 10838 "EditingTools.c" + gint _tmp115_ = 0; + gfloat new_width = 0.0F; + gint _tmp116_ = 0; + gint _tmp117_ = 0; + gfloat _tmp118_ = 0.0F; + gint _tmp119_ = 0; + gfloat _tmp120_ = 0.0F; +#line 1568 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp115_ = y; +#line 1568 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp115_; +#line 1569 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp116_ = bottom; +#line 1569 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp117_ = top; +#line 1569 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp118_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1569 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_width = ((gfloat) (_tmp116_ - _tmp117_)) * _tmp118_; +#line 1570 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp119_ = left; +#line 1570 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp120_ = new_width; +#line 1570 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp119_ + ((gint) _tmp120_); +#line 10864 "EditingTools.c" + } else { + gint _tmp121_ = 0; + gfloat new_height = 0.0F; + gint _tmp122_ = 0; + gint _tmp123_ = 0; + gfloat _tmp124_ = 0.0F; + gint _tmp125_ = 0; + gfloat _tmp126_ = 0.0F; +#line 1572 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp121_ = x; +#line 1572 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp121_; +#line 1573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp122_ = right; +#line 1573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp123_ = left; +#line 1573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp124_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_height = ((gfloat) (_tmp122_ - _tmp123_)) / _tmp124_; +#line 1574 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp125_ = bottom; +#line 1574 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp126_ = new_height; +#line 1574 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp125_ - ((gint) _tmp126_); +#line 10891 "EditingTools.c" + } + } +#line 1577 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 10896 "EditingTools.c" + } +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_RIGHT: +#line 10900 "EditingTools.c" + { + gfloat _tmp127_ = 0.0F; +#line 1580 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp127_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1580 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp127_ == EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 10907 "EditingTools.c" + gint _tmp128_ = 0; + gint _tmp129_ = 0; +#line 1581 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp128_ = y; +#line 1581 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp128_; +#line 1582 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp129_ = x; +#line 1582 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp129_; +#line 10918 "EditingTools.c" + } else { + gint _tmp130_ = 0; + gint _tmp131_ = 0; + gint _tmp132_ = 0; + gint _tmp133_ = 0; + gint _tmp134_ = 0; + gint _tmp135_ = 0; + gint _tmp136_ = 0; +#line 1584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp130_ = y; +#line 1584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp131_ = center_x; +#line 1584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp132_ = center_y; +#line 1584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp133_ = right; +#line 1584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp134_ = bottom; +#line 1584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp135_ = x; +#line 1584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp136_ = editing_tools_crop_tool_eval_radial_line (self, (gdouble) _tmp131_, (gdouble) _tmp132_, (gdouble) _tmp133_, (gdouble) _tmp134_, (gdouble) _tmp135_); +#line 1584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp130_ < _tmp136_) { +#line 10943 "EditingTools.c" + gint _tmp137_ = 0; + gfloat new_height = 0.0F; + gint _tmp138_ = 0; + gint _tmp139_ = 0; + gfloat _tmp140_ = 0.0F; + gint _tmp141_ = 0; + gfloat _tmp142_ = 0.0F; +#line 1585 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp137_ = x; +#line 1585 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp137_; +#line 1586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp138_ = right; +#line 1586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp139_ = left; +#line 1586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp140_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_height = ((gfloat) (_tmp138_ - _tmp139_)) / _tmp140_; +#line 1587 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp141_ = top; +#line 1587 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp142_ = new_height; +#line 1587 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp141_ + ((gint) _tmp142_); +#line 10969 "EditingTools.c" + } else { + gint _tmp143_ = 0; + gfloat new_width = 0.0F; + gint _tmp144_ = 0; + gint _tmp145_ = 0; + gfloat _tmp146_ = 0.0F; + gint _tmp147_ = 0; + gfloat _tmp148_ = 0.0F; +#line 1589 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp143_ = y; +#line 1589 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp143_; +#line 1590 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp144_ = bottom; +#line 1590 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp145_ = top; +#line 1590 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp146_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1590 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_width = ((gfloat) (_tmp144_ - _tmp145_)) * _tmp146_; +#line 1591 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp147_ = left; +#line 1591 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp148_ = new_width; +#line 1591 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp147_ + ((gint) _tmp148_); +#line 10996 "EditingTools.c" + } + } +#line 1594 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 11001 "EditingTools.c" + } +#line 1495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_INSIDE: +#line 11005 "EditingTools.c" + { + gint _tmp149_ = 0; + gint _tmp150_ = 0; + gint delta_x = 0; + gint _tmp151_ = 0; + gint _tmp152_ = 0; + gint delta_y = 0; + gint _tmp153_ = 0; + gint _tmp154_ = 0; + gint _tmp155_ = 0; + gint _tmp156_ = 0; + gint width = 0; + gint _tmp157_ = 0; + gint _tmp158_ = 0; + gint height = 0; + gint _tmp159_ = 0; + gint _tmp160_ = 0; + gint _tmp161_ = 0; + gint _tmp162_ = 0; + gint _tmp163_ = 0; + gint _tmp164_ = 0; + gint _tmp165_ = 0; + gint _tmp166_ = 0; + gint _tmp167_ = 0; + gint _tmp168_ = 0; + gint _tmp169_ = 0; + gint _tmp170_ = 0; + gint _tmp171_ = 0; + GdkRectangle _tmp172_ = {0}; + gint _tmp173_ = 0; + gint _tmp176_ = 0; + GdkRectangle _tmp177_ = {0}; + gint _tmp178_ = 0; + gint adj_width = 0; + gint _tmp181_ = 0; + gint _tmp182_ = 0; + gint adj_height = 0; + gint _tmp183_ = 0; + gint _tmp184_ = 0; + gint _tmp185_ = 0; + gint _tmp186_ = 0; + gint _tmp192_ = 0; + gint _tmp193_ = 0; +#line 1597 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp149_ = self->priv->last_grab_x; +#line 1597 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_assert (_tmp149_ >= 0, "last_grab_x >= 0"); +#line 1598 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp150_ = self->priv->last_grab_y; +#line 1598 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_assert (_tmp150_ >= 0, "last_grab_y >= 0"); +#line 1600 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp151_ = x; +#line 1600 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp152_ = self->priv->last_grab_x; +#line 1600 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + delta_x = _tmp151_ - _tmp152_; +#line 1601 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp153_ = y; +#line 1601 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp154_ = self->priv->last_grab_y; +#line 1601 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + delta_y = _tmp153_ - _tmp154_; +#line 1603 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp155_ = x; +#line 1603 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->last_grab_x = _tmp155_; +#line 1604 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp156_ = y; +#line 1604 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->last_grab_y = _tmp156_; +#line 1606 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp157_ = right; +#line 1606 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp158_ = left; +#line 1606 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + width = (_tmp157_ - _tmp158_) + 1; +#line 1607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp159_ = bottom; +#line 1607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp160_ = top; +#line 1607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + height = (_tmp159_ - _tmp160_) + 1; +#line 1609 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp161_ = left; +#line 1609 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp162_ = delta_x; +#line 1609 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp161_ + _tmp162_; +#line 1610 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp163_ = top; +#line 1610 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp164_ = delta_y; +#line 1610 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp163_ + _tmp164_; +#line 1611 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp165_ = right; +#line 1611 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp166_ = delta_x; +#line 1611 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp165_ + _tmp166_; +#line 1612 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp167_ = bottom; +#line 1612 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp168_ = delta_y; +#line 1612 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp167_ + _tmp168_; +#line 1615 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp169_ = left; +#line 1615 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp169_ < 0) { +#line 1616 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = 0; +#line 11119 "EditingTools.c" + } +#line 1618 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp170_ = top; +#line 1618 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp170_ < 0) { +#line 1619 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = 0; +#line 11127 "EditingTools.c" + } +#line 1621 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp171_ = right; +#line 1621 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp172_ = scaled_pos; +#line 1621 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp173_ = _tmp172_.width; +#line 1621 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp171_ >= _tmp173_) { +#line 11137 "EditingTools.c" + GdkRectangle _tmp174_ = {0}; + gint _tmp175_ = 0; +#line 1622 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp174_ = scaled_pos; +#line 1622 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp175_ = _tmp174_.width; +#line 1622 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp175_ - 1; +#line 11146 "EditingTools.c" + } +#line 1624 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp176_ = bottom; +#line 1624 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp177_ = scaled_pos; +#line 1624 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp178_ = _tmp177_.height; +#line 1624 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp176_ >= _tmp178_) { +#line 11156 "EditingTools.c" + GdkRectangle _tmp179_ = {0}; + gint _tmp180_ = 0; +#line 1625 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp179_ = scaled_pos; +#line 1625 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp180_ = _tmp179_.height; +#line 1625 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp180_ - 1; +#line 11165 "EditingTools.c" + } +#line 1627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp181_ = right; +#line 1627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp182_ = left; +#line 1627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + adj_width = (_tmp181_ - _tmp182_) + 1; +#line 1628 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp183_ = bottom; +#line 1628 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp184_ = top; +#line 1628 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + adj_height = (_tmp183_ - _tmp184_) + 1; +#line 1631 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp185_ = adj_width; +#line 1631 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp186_ = width; +#line 1631 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp185_ != _tmp186_) { +#line 11185 "EditingTools.c" + gint _tmp187_ = 0; +#line 1632 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp187_ = delta_x; +#line 1632 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp187_ < 0) { +#line 11191 "EditingTools.c" + gint _tmp188_ = 0; + gint _tmp189_ = 0; +#line 1633 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp188_ = left; +#line 1633 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp189_ = width; +#line 1633 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = (_tmp188_ + _tmp189_) - 1; +#line 11200 "EditingTools.c" + } else { + gint _tmp190_ = 0; + gint _tmp191_ = 0; +#line 1635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp190_ = right; +#line 1635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp191_ = width; +#line 1635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = (_tmp190_ - _tmp191_) + 1; +#line 11210 "EditingTools.c" + } + } +#line 1638 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp192_ = adj_height; +#line 1638 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp193_ = height; +#line 1638 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp192_ != _tmp193_) { +#line 11219 "EditingTools.c" + gint _tmp194_ = 0; +#line 1639 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp194_ = delta_y; +#line 1639 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp194_ < 0) { +#line 11225 "EditingTools.c" + gint _tmp195_ = 0; + gint _tmp196_ = 0; +#line 1640 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp195_ = top; +#line 1640 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp196_ = height; +#line 1640 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = (_tmp195_ + _tmp196_) - 1; +#line 11234 "EditingTools.c" + } else { + gint _tmp197_ = 0; + gint _tmp198_ = 0; +#line 1642 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp197_ = bottom; +#line 1642 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp198_ = height; +#line 1642 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = (_tmp197_ - _tmp198_) + 1; +#line 11244 "EditingTools.c" + } + } +#line 1644 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 11249 "EditingTools.c" + } + default: + { +#line 1648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 1648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 11257 "EditingTools.c" + } + } +#line 1658 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp199_ = right; +#line 1658 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp200_ = left; +#line 1658 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + width = (_tmp199_ - _tmp200_) + 1; +#line 1659 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp201_ = bottom; +#line 1659 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp202_ = top; +#line 1659 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + height = (_tmp201_ - _tmp202_) + 1; +#line 1661 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_get_photo_dimensions (self, &_tmp203_); +#line 1661 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_dims = _tmp203_; +#line 1663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp204_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp205_ = editing_tools_photo_canvas_get_photo (_tmp204_); +#line 1663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp206_ = _tmp205_; +#line 1663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_get_straighten (_tmp206_, &_tmp207_); +#line 1663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + angle = _tmp207_; +#line 1663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp206_); +#line 1666 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp208_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1666 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp208_ == EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 11292 "EditingTools.c" + gint _tmp209_ = 0; + gint _tmp210_ = 0; + gint _tmp211_ = 0; + gint _tmp212_ = 0; + BoxLocation _tmp213_ = 0; + BoxLocation _tmp218_ = 0; + gint _tmp223_ = 0; + gint _tmp224_ = 0; + gint _tmp225_ = 0; + gint _tmp226_ = 0; + Box _tmp227_ = {0}; + Dimensions _tmp228_ = {0}; + gint _tmp229_ = 0; + Dimensions _tmp230_ = {0}; + gint _tmp231_ = 0; + gdouble _tmp232_ = 0.0; + BoxLocation _tmp233_ = 0; + Box _tmp234_ = {0}; +#line 1667 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp209_ = right; +#line 1667 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp210_ = left; +#line 1667 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + width = (_tmp209_ - _tmp210_) + 1; +#line 1668 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp211_ = bottom; +#line 1668 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp212_ = top; +#line 1668 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + height = (_tmp211_ - _tmp212_) + 1; +#line 1670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp213_ = self->priv->in_manipulation; +#line 1670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + switch (_tmp213_) { +#line 1670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_LEFT_SIDE: +#line 1670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_LEFT: +#line 1670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_LEFT: +#line 11333 "EditingTools.c" + { + gint _tmp214_ = 0; +#line 1674 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp214_ = width; +#line 1674 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp214_ < EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE) { +#line 11340 "EditingTools.c" + gint _tmp215_ = 0; +#line 1675 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp215_ = right; +#line 1675 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + left = _tmp215_ - EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE; +#line 11346 "EditingTools.c" + } +#line 1676 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 11350 "EditingTools.c" + } +#line 1670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_RIGHT_SIDE: +#line 1670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_RIGHT: +#line 1670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_RIGHT: +#line 11358 "EditingTools.c" + { + gint _tmp216_ = 0; +#line 1681 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp216_ = width; +#line 1681 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp216_ < EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE) { +#line 11365 "EditingTools.c" + gint _tmp217_ = 0; +#line 1682 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp217_ = left; +#line 1682 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + right = _tmp217_ + EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE; +#line 11371 "EditingTools.c" + } +#line 1683 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 11375 "EditingTools.c" + } + default: + { +#line 1686 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 11381 "EditingTools.c" + } + } +#line 1689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp218_ = self->priv->in_manipulation; +#line 1689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + switch (_tmp218_) { +#line 1689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_SIDE: +#line 1689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_LEFT: +#line 1689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_TOP_RIGHT: +#line 11394 "EditingTools.c" + { + gint _tmp219_ = 0; +#line 1693 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp219_ = height; +#line 1693 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp219_ < EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE) { +#line 11401 "EditingTools.c" + gint _tmp220_ = 0; +#line 1694 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp220_ = bottom; +#line 1694 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + top = _tmp220_ - EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE; +#line 11407 "EditingTools.c" + } +#line 1695 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 11411 "EditingTools.c" + } +#line 1689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_SIDE: +#line 1689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_LEFT: +#line 1689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case BOX_LOCATION_BOTTOM_RIGHT: +#line 11419 "EditingTools.c" + { + gint _tmp221_ = 0; +#line 1700 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp221_ = height; +#line 1700 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp221_ < EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE) { +#line 11426 "EditingTools.c" + gint _tmp222_ = 0; +#line 1701 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp222_ = top; +#line 1701 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bottom = _tmp222_ + EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE; +#line 11432 "EditingTools.c" + } +#line 1702 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 11436 "EditingTools.c" + } + default: + { +#line 1705 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 11442 "EditingTools.c" + } + } +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp223_ = left; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp224_ = top; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp225_ = right; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp226_ = bottom; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_init (&_tmp227_, _tmp223_, _tmp224_, _tmp225_, _tmp226_); +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp228_ = photo_dims; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp229_ = _tmp228_.width; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp230_ = photo_dims; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp231_ = _tmp230_.height; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp232_ = angle; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp233_ = self->priv->in_manipulation; +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + clamp_inside_rotated_image (&_tmp227_, _tmp229_, _tmp231_, _tmp232_, _tmp233_ == BOX_LOCATION_INSIDE, &_tmp234_); +#line 1711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_crop = _tmp234_; +#line 11471 "EditingTools.c" + } else { + gint _tmp235_ = 0; + gint _tmp236_ = 0; + gint _tmp237_ = 0; + gint _tmp238_ = 0; + Box adjusted = {0}; + Box _tmp239_ = {0}; + Dimensions _tmp240_ = {0}; + gint _tmp241_ = 0; + Dimensions _tmp242_ = {0}; + gint _tmp243_ = 0; + gdouble _tmp244_ = 0.0; + BoxLocation _tmp245_ = 0; + Box _tmp246_ = {0}; + gboolean _tmp247_ = FALSE; + gboolean _tmp248_ = FALSE; + Box _tmp249_ = {0}; + Box _tmp250_ = {0}; +#line 1720 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp235_ = left; +#line 1720 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp236_ = top; +#line 1720 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp237_ = right; +#line 1720 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp238_ = bottom; +#line 1720 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_init (&new_crop, _tmp235_, _tmp236_, _tmp237_, _tmp238_); +#line 1721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp239_ = new_crop; +#line 1721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp240_ = photo_dims; +#line 1721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp241_ = _tmp240_.width; +#line 1721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp242_ = photo_dims; +#line 1721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp243_ = _tmp242_.height; +#line 1721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp244_ = angle; +#line 1721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp245_ = self->priv->in_manipulation; +#line 1721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + clamp_inside_rotated_image (&_tmp239_, _tmp241_, _tmp243_, _tmp244_, _tmp245_ == BOX_LOCATION_INSIDE, &_tmp246_); +#line 1721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + adjusted = _tmp246_; +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp249_ = adjusted; +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp250_ = new_crop; +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_box_equal (&_tmp249_, &_tmp250_) != TRUE) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp248_ = TRUE; +#line 11526 "EditingTools.c" + } else { + gint _tmp251_ = 0; +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp251_ = width; +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp248_ = _tmp251_ < EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE; +#line 11533 "EditingTools.c" + } +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp248_) { +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp247_ = TRUE; +#line 11539 "EditingTools.c" + } else { + gint _tmp252_ = 0; +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp252_ = height; +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp247_ = _tmp252_ < EDITING_TOOLS_CROP_TOOL_CROP_MIN_SIZE; +#line 11546 "EditingTools.c" + } +#line 1725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp247_) { +#line 11550 "EditingTools.c" + Box _tmp253_ = {0}; +#line 1726 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp253_ = self->priv->scaled_crop; +#line 1726 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_crop = _tmp253_; +#line 11556 "EditingTools.c" + } + } +#line 1730 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp254_ = self->priv->in_manipulation; +#line 1730 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp254_ != BOX_LOCATION_INSIDE) { +#line 11563 "EditingTools.c" + Box _tmp255_ = {0}; +#line 1731 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp255_ = new_crop; +#line 1731 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_crop_resized (self, &_tmp255_); +#line 11569 "EditingTools.c" + } else { + Box _tmp256_ = {0}; +#line 1733 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp256_ = new_crop; +#line 1733 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_crop_moved (self, &_tmp256_); +#line 11576 "EditingTools.c" + } +#line 1736 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp257_ = new_crop; +#line 1736 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->scaled_crop = _tmp257_; +#line 1738 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp258_ = editing_tools_crop_tool_get_constraint_aspect_ratio (self); +#line 1738 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp258_ == EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO) { +#line 11586 "EditingTools.c" + gint _tmp259_ = 0; + gint _tmp260_ = 0; + gint _tmp261_ = 0; + gint _tmp262_ = 0; +#line 1739 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp259_ = box_get_width (&self->priv->scaled_crop); +#line 1739 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_init_width = _tmp259_; +#line 1740 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp260_ = box_get_height (&self->priv->scaled_crop); +#line 1740 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_init_height = _tmp260_; +#line 1741 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp261_ = self->priv->custom_init_width; +#line 1741 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp262_ = self->priv->custom_init_height; +#line 1741 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_aspect_ratio = ((gfloat) _tmp261_) / ((gfloat) _tmp262_); +#line 11605 "EditingTools.c" + } +#line 1744 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 1744 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 11611 "EditingTools.c" +} + + +static void editing_tools_crop_tool_crop_resized (EditingToolsCropTool* self, Box* new_crop) { + Box _tmp0_ = {0}; + gboolean _tmp1_ = FALSE; + EditingToolsPhotoCanvas* _tmp2_ = NULL; + Box _tmp3_ = {0}; + Box horizontal = {0}; + gboolean horizontal_enlarged = FALSE; + Box vertical = {0}; + gboolean vertical_enlarged = FALSE; + BoxComplements complements = 0; + Box _tmp4_ = {0}; + Box _tmp5_ = {0}; + gboolean _tmp6_ = FALSE; + Box _tmp7_ = {0}; + gboolean _tmp8_ = FALSE; + BoxComplements _tmp9_ = 0; + BoxComplements _tmp10_ = 0; + gboolean _tmp11_ = FALSE; + BoxComplements _tmp12_ = 0; + gboolean _tmp17_ = FALSE; + BoxComplements _tmp18_ = 0; + Box _tmp23_ = {0}; + EditingToolsPhotoCanvas* _tmp24_ = NULL; + Box _tmp25_ = {0}; +#line 1747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1747 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (new_crop != NULL); +#line 1748 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = *new_crop; +#line 1748 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = box_equals (&self->priv->scaled_crop, &_tmp0_); +#line 1748 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_) { +#line 1750 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 11651 "EditingTools.c" + } +#line 1753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->scaled_crop; +#line 1753 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_invalidate_area (_tmp2_, &_tmp3_); +#line 1759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = *new_crop; +#line 1759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = box_resized_complements (&self->priv->scaled_crop, &_tmp4_, &_tmp5_, &_tmp6_, &_tmp7_, &_tmp8_); +#line 1759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + horizontal = _tmp5_; +#line 1759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + horizontal_enlarged = _tmp6_; +#line 1759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + vertical = _tmp7_; +#line 1759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + vertical_enlarged = _tmp8_; +#line 1759 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + complements = _tmp9_; +#line 1763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = complements; +#line 1763 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_assert (_tmp10_ != BOX_COMPLEMENTS_NONE, "complements != BoxComplements.NONE"); +#line 1765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = complements; +#line 1765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp12_ == BOX_COMPLEMENTS_HORIZONTAL) { +#line 1765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = TRUE; +#line 11683 "EditingTools.c" + } else { + BoxComplements _tmp13_ = 0; +#line 1765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = complements; +#line 1765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp13_ == BOX_COMPLEMENTS_BOTH; +#line 11690 "EditingTools.c" + } +#line 1765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp11_) { +#line 11694 "EditingTools.c" + gdouble _tmp14_ = 0.0; + gboolean _tmp15_ = FALSE; + Box _tmp16_ = {0}; +#line 1766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = horizontal_enlarged; +#line 1766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp15_) { +#line 1766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = 0.0; +#line 11704 "EditingTools.c" + } else { +#line 1766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = 0.5; +#line 11708 "EditingTools.c" + } +#line 1766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = horizontal; +#line 1766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_set_area_alpha (self, &_tmp16_, _tmp14_); +#line 11714 "EditingTools.c" + } +#line 1768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = complements; +#line 1768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp18_ == BOX_COMPLEMENTS_VERTICAL) { +#line 1768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = TRUE; +#line 11722 "EditingTools.c" + } else { + BoxComplements _tmp19_ = 0; +#line 1768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = complements; +#line 1768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _tmp19_ == BOX_COMPLEMENTS_BOTH; +#line 11729 "EditingTools.c" + } +#line 1768 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp17_) { +#line 11733 "EditingTools.c" + gdouble _tmp20_ = 0.0; + gboolean _tmp21_ = FALSE; + Box _tmp22_ = {0}; +#line 1769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = vertical_enlarged; +#line 1769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp21_) { +#line 1769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = 0.0; +#line 11743 "EditingTools.c" + } else { +#line 1769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = 0.5; +#line 11747 "EditingTools.c" + } +#line 1769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = vertical; +#line 1769 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_set_area_alpha (self, &_tmp22_, _tmp20_); +#line 11753 "EditingTools.c" + } +#line 1771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = *new_crop; +#line 1771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_paint_crop_tool (self, &_tmp23_); +#line 1772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = *new_crop; +#line 1772 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_invalidate_area (_tmp24_, &_tmp25_); +#line 11765 "EditingTools.c" +} + + +static void editing_tools_crop_tool_crop_moved (EditingToolsCropTool* self, Box* new_crop) { + Box _tmp0_ = {0}; + gboolean _tmp1_ = FALSE; + EditingToolsPhotoCanvas* _tmp2_ = NULL; + Box _tmp3_ = {0}; + Box _tmp4_ = {0}; + Box _tmp5_ = {0}; + Box _tmp6_ = {0}; + EditingToolsPhotoCanvas* _tmp7_ = NULL; + Box _tmp8_ = {0}; +#line 1775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1775 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (new_crop != NULL); +#line 1776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = *new_crop; +#line 1776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = box_equals (&self->priv->scaled_crop, &_tmp0_); +#line 1776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_) { +#line 1778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 11791 "EditingTools.c" + } +#line 1781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->scaled_crop; +#line 1781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_invalidate_area (_tmp2_, &_tmp3_); +#line 1783 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->scaled_crop; +#line 1783 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_set_area_alpha (self, &_tmp4_, 0.5); +#line 1784 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = *new_crop; +#line 1784 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_set_area_alpha (self, &_tmp5_, 0.0); +#line 1788 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = *new_crop; +#line 1788 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_paint_crop_tool (self, &_tmp6_); +#line 1789 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1789 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = *new_crop; +#line 1789 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_invalidate_area (_tmp7_, &_tmp8_); +#line 11817 "EditingTools.c" +} + + +static void editing_tools_crop_tool_set_area_alpha (EditingToolsCropTool* self, Box* area, gdouble alpha) { + cairo_t* ctx = NULL; + cairo_surface_t* _tmp0_ = NULL; + cairo_t* _tmp1_ = NULL; + gdouble _tmp2_ = 0.0; + Box _tmp3_ = {0}; + gint _tmp4_ = 0; + Box _tmp5_ = {0}; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + gint _tmp8_ = 0; + EditingToolsPhotoCanvas* _tmp9_ = NULL; + cairo_surface_t* _tmp10_ = NULL; + Box _tmp11_ = {0}; +#line 1792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (area != NULL); +#line 1793 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->crop_surface; +#line 1793 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = cairo_create (_tmp0_); +#line 1793 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ctx = _tmp1_; +#line 1794 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_operator (ctx, CAIRO_OPERATOR_SOURCE); +#line 1795 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = alpha; +#line 1795 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_source_rgba (ctx, 0.0, 0.0, 0.0, _tmp2_); +#line 1796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = *area; +#line 1796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.left; +#line 1796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = *area; +#line 1796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.top; +#line 1796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = box_get_width (area); +#line 1796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = box_get_height (area); +#line 1796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_rectangle (ctx, (gdouble) _tmp4_, (gdouble) _tmp6_, (gdouble) _tmp7_, (gdouble) _tmp8_); +#line 1797 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_fill (ctx); +#line 1798 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1798 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->crop_surface; +#line 1798 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = *area; +#line 1798 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_paint_surface_area (_tmp9_, _tmp10_, &_tmp11_, TRUE); +#line 1792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (ctx); +#line 11877 "EditingTools.c" +} + + +static void editing_tools_crop_tool_paint_crop_tool (EditingToolsCropTool* self, Box* crop) { + BoxLocation _tmp0_ = 0; + EditingToolsPhotoCanvas* _tmp65_ = NULL; + cairo_t* _tmp66_ = NULL; + Box _tmp67_ = {0}; + EditingToolsPhotoCanvas* _tmp68_ = NULL; + cairo_t* _tmp69_ = NULL; + Box _tmp70_ = {0}; + EditingToolsPhotoCanvas* _tmp71_ = NULL; + cairo_t* _tmp72_ = NULL; + Box _tmp73_ = {0}; +#line 1801 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_CROP_TOOL (self)); +#line 1801 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (crop != NULL); +#line 1803 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->in_manipulation; +#line 1803 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ != BOX_LOCATION_OUTSIDE) { +#line 11900 "EditingTools.c" + gint one_third_x = 0; + gint _tmp1_ = 0; + gint one_third_y = 0; + gint _tmp2_ = 0; + EditingToolsPhotoCanvas* _tmp3_ = NULL; + cairo_t* _tmp4_ = NULL; + Box _tmp5_ = {0}; + gint _tmp6_ = 0; + Box _tmp7_ = {0}; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + gint _tmp10_ = 0; + EditingToolsPhotoCanvas* _tmp11_ = NULL; + cairo_t* _tmp12_ = NULL; + Box _tmp13_ = {0}; + gint _tmp14_ = 0; + Box _tmp15_ = {0}; + gint _tmp16_ = 0; + gint _tmp17_ = 0; + gint _tmp18_ = 0; + EditingToolsPhotoCanvas* _tmp19_ = NULL; + cairo_t* _tmp20_ = NULL; + Box _tmp21_ = {0}; + gint _tmp22_ = 0; + gint _tmp23_ = 0; + Box _tmp24_ = {0}; + gint _tmp25_ = 0; + gint _tmp26_ = 0; + EditingToolsPhotoCanvas* _tmp27_ = NULL; + cairo_t* _tmp28_ = NULL; + Box _tmp29_ = {0}; + gint _tmp30_ = 0; + gint _tmp31_ = 0; + Box _tmp32_ = {0}; + gint _tmp33_ = 0; + gint _tmp34_ = 0; + Box adj_crop = {0}; + EditingToolsPhotoCanvas* _tmp35_ = NULL; + GdkRectangle _tmp36_ = {0}; + Dimensions _tmp37_ = {0}; + EditingToolsPhotoCanvas* _tmp38_ = NULL; + Photo* _tmp39_ = NULL; + Photo* _tmp40_ = NULL; + Dimensions _tmp41_ = {0}; + Box _tmp42_ = {0}; + Box _tmp43_ = {0}; + gchar* text = NULL; + gint _tmp44_ = 0; + gchar* _tmp45_ = NULL; + gchar* _tmp46_ = NULL; + gchar* _tmp47_ = NULL; + gchar* _tmp48_ = NULL; + gint _tmp49_ = 0; + gchar* _tmp50_ = NULL; + gchar* _tmp51_ = NULL; + gchar* _tmp52_ = NULL; + gchar* _tmp53_ = NULL; + gint x = 0; + Box _tmp54_ = {0}; + gint _tmp55_ = 0; + gint _tmp56_ = 0; + gint y = 0; + Box _tmp57_ = {0}; + gint _tmp58_ = 0; + gint _tmp59_ = 0; + EditingToolsPhotoCanvas* _tmp60_ = NULL; + cairo_t* _tmp61_ = NULL; + const gchar* _tmp62_ = NULL; + gint _tmp63_ = 0; + gint _tmp64_ = 0; +#line 1804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = box_get_width (crop); +#line 1804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + one_third_x = _tmp1_ / 3; +#line 1805 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = box_get_height (crop); +#line 1805 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + one_third_y = _tmp2_ / 3; +#line 1807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->thin_white_ctx; +#line 1807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = *crop; +#line 1807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.left; +#line 1807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = *crop; +#line 1807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.top; +#line 1807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = one_third_y; +#line 1807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = box_get_width (crop); +#line 1807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_horizontal_line (_tmp3_, _tmp4_, _tmp6_, _tmp8_ + _tmp9_, _tmp10_, TRUE); +#line 1808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->thin_white_ctx; +#line 1808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = *crop; +#line 1808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_.left; +#line 1808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = *crop; +#line 1808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_.top; +#line 1808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = one_third_y; +#line 1808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = box_get_width (crop); +#line 1808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_horizontal_line (_tmp11_, _tmp12_, _tmp14_, _tmp16_ + (_tmp17_ * 2), _tmp18_, TRUE); +#line 1810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = self->priv->thin_white_ctx; +#line 1810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = *crop; +#line 1810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _tmp21_.left; +#line 1810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = one_third_x; +#line 1810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = *crop; +#line 1810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _tmp24_.top; +#line 1810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = box_get_height (crop); +#line 1810 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_vertical_line (_tmp19_, _tmp20_, _tmp22_ + _tmp23_, _tmp25_, _tmp26_, TRUE); +#line 1811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = self->priv->thin_white_ctx; +#line 1811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = *crop; +#line 1811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = _tmp29_.left; +#line 1811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = one_third_x; +#line 1811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = *crop; +#line 1811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = _tmp32_.top; +#line 1811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = box_get_height (crop); +#line 1811 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_vertical_line (_tmp27_, _tmp28_, _tmp30_ + (_tmp31_ * 2), _tmp33_, _tmp34_, TRUE); +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp35_, &_tmp36_); +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dimensions_for_rectangle (&_tmp36_, &_tmp37_); +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = editing_tools_photo_canvas_get_photo (_tmp38_); +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = _tmp39_; +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_CROP, &_tmp41_); +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_scaled_similar (&self->priv->scaled_crop, &_tmp37_, &_tmp41_, &_tmp42_); +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = _tmp42_; +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp40_); +#line 1815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + adj_crop = _tmp43_; +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44_ = box_get_width (&adj_crop); +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = g_strdup_printf ("%i", _tmp44_); +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = _tmp45_; +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = g_strconcat (_tmp46_, "x", NULL); +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp48_ = _tmp47_; +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp49_ = box_get_height (&adj_crop); +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp50_ = g_strdup_printf ("%i", _tmp49_); +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp51_ = _tmp50_; +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52_ = g_strconcat (_tmp48_, _tmp51_, NULL); +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp53_ = _tmp52_; +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp51_); +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp48_); +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp46_); +#line 1818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + text = _tmp53_; +#line 1819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp54_ = *crop; +#line 1819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp55_ = _tmp54_.left; +#line 1819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp56_ = box_get_width (crop); +#line 1819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x = _tmp55_ + (_tmp56_ / 2); +#line 1820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp57_ = *crop; +#line 1820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp58_ = _tmp57_.top; +#line 1820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp59_ = box_get_height (crop); +#line 1820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y = _tmp58_ + (_tmp59_ / 2); +#line 1821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp60_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp61_ = self->priv->text_ctx; +#line 1821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp62_ = text; +#line 1821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp63_ = x; +#line 1821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp64_ = y; +#line 1821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_text (_tmp60_, _tmp61_, _tmp62_, _tmp63_, _tmp64_, TRUE); +#line 1803 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (text); +#line 12131 "EditingTools.c" + } +#line 1825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp65_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp66_ = self->priv->wide_black_ctx; +#line 1825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp67_ = *crop; +#line 1825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_box (_tmp65_, _tmp66_, &_tmp67_); +#line 1826 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp68_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1826 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp69_ = self->priv->wide_white_ctx; +#line 1826 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_reduced (crop, 1, &_tmp70_); +#line 1826 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_box (_tmp68_, _tmp69_, &_tmp70_); +#line 1827 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp71_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1827 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp72_ = self->priv->wide_white_ctx; +#line 1827 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + box_get_reduced (crop, 2, &_tmp73_); +#line 1827 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_box (_tmp71_, _tmp72_, &_tmp73_); +#line 12157 "EditingTools.c" +} + + +static EditingToolsCropToolConstraintDescription* editing_tools_crop_tool_constraint_description_construct (GType object_type, const gchar* new_name, gint new_basis_width, gint new_basis_height, gboolean new_pivotable, gfloat new_aspect_ratio) { + EditingToolsCropToolConstraintDescription* self = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gint _tmp2_ = 0; + gint _tmp3_ = 0; + gfloat _tmp4_ = 0.0F; + gboolean _tmp8_ = FALSE; +#line 614 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (new_name != NULL, NULL); +#line 614 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsCropToolConstraintDescription*) g_type_create_instance (object_type); +#line 616 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = new_name; +#line 616 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 616 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (self->name); +#line 616 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->name = _tmp1_; +#line 617 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = new_basis_width; +#line 617 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->basis_width = _tmp2_; +#line 618 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = new_basis_height; +#line 618 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->basis_height = _tmp3_; +#line 619 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = new_aspect_ratio; +#line 619 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp4_ == EDITING_TOOLS_CROP_TOOL_COMPUTE_FROM_BASIS) { +#line 12193 "EditingTools.c" + gint _tmp5_ = 0; + gint _tmp6_ = 0; +#line 620 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->basis_width; +#line 620 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->basis_height; +#line 620 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->aspect_ratio = ((gfloat) _tmp5_) / ((gfloat) _tmp6_); +#line 12202 "EditingTools.c" + } else { + gfloat _tmp7_ = 0.0F; +#line 622 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = new_aspect_ratio; +#line 622 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->aspect_ratio = _tmp7_; +#line 12209 "EditingTools.c" + } +#line 623 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = new_pivotable; +#line 623 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->is_pivotable = _tmp8_; +#line 614 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 12217 "EditingTools.c" +} + + +static EditingToolsCropToolConstraintDescription* editing_tools_crop_tool_constraint_description_new (const gchar* new_name, gint new_basis_width, gint new_basis_height, gboolean new_pivotable, gfloat new_aspect_ratio) { +#line 614 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_crop_tool_constraint_description_construct (EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION, new_name, new_basis_width, new_basis_height, new_pivotable, new_aspect_ratio); +#line 12224 "EditingTools.c" +} + + +static gboolean editing_tools_crop_tool_constraint_description_is_separator (EditingToolsCropToolConstraintDescription* self) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; +#line 626 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_CROP_TOOL_IS_CONSTRAINT_DESCRIPTION (self), FALSE); +#line 627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->is_pivotable; +#line 627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp1_) { +#line 12238 "EditingTools.c" + gfloat _tmp2_ = 0.0F; +#line 627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->aspect_ratio; +#line 627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = _tmp2_ == EDITING_TOOLS_CROP_TOOL_SEPARATOR; +#line 12244 "EditingTools.c" + } else { +#line 627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = FALSE; +#line 12248 "EditingTools.c" + } +#line 627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp0_; +#line 627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 12254 "EditingTools.c" +} + + +static void editing_tools_crop_tool_value_constraint_description_init (GValue* value) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 12261 "EditingTools.c" +} + + +static void editing_tools_crop_tool_value_constraint_description_free_value (GValue* value) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (value->data[0].v_pointer) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constraint_description_unref (value->data[0].v_pointer); +#line 12270 "EditingTools.c" + } +} + + +static void editing_tools_crop_tool_value_constraint_description_copy_value (const GValue* src_value, GValue* dest_value) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (src_value->data[0].v_pointer) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dest_value->data[0].v_pointer = editing_tools_crop_tool_constraint_description_ref (src_value->data[0].v_pointer); +#line 12280 "EditingTools.c" + } else { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dest_value->data[0].v_pointer = NULL; +#line 12284 "EditingTools.c" + } +} + + +static gpointer editing_tools_crop_tool_value_constraint_description_peek_pointer (const GValue* value) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return value->data[0].v_pointer; +#line 12292 "EditingTools.c" +} + + +static gchar* editing_tools_crop_tool_value_constraint_description_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (collect_values[0].v_pointer) { +#line 12299 "EditingTools.c" + EditingToolsCropToolConstraintDescription* object; + object = collect_values[0].v_pointer; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (object->parent_instance.g_class == NULL) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 12306 "EditingTools.c" + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); +#line 12310 "EditingTools.c" + } +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = editing_tools_crop_tool_constraint_description_ref (object); +#line 12314 "EditingTools.c" + } else { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 12318 "EditingTools.c" + } +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return NULL; +#line 12322 "EditingTools.c" +} + + +static gchar* editing_tools_crop_tool_value_constraint_description_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + EditingToolsCropToolConstraintDescription** object_p; + object_p = collect_values[0].v_pointer; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!object_p) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); +#line 12333 "EditingTools.c" + } +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!value->data[0].v_pointer) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *object_p = NULL; +#line 12339 "EditingTools.c" + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *object_p = value->data[0].v_pointer; +#line 12343 "EditingTools.c" + } else { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *object_p = editing_tools_crop_tool_constraint_description_ref (value->data[0].v_pointer); +#line 12347 "EditingTools.c" + } +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return NULL; +#line 12351 "EditingTools.c" +} + + +static GParamSpec* editing_tools_crop_tool_param_spec_constraint_description (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + EditingToolsCropToolParamSpecConstraintDescription* spec; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (g_type_is_a (object_type, EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION), NULL); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_PARAM_SPEC (spec)->value_type = object_type; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return G_PARAM_SPEC (spec); +#line 12365 "EditingTools.c" +} + + +static gpointer editing_tools_crop_tool_value_get_constraint_description (const GValue* value) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION), NULL); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return value->data[0].v_pointer; +#line 12374 "EditingTools.c" +} + + +static void editing_tools_crop_tool_value_set_constraint_description (GValue* value, gpointer v_object) { + EditingToolsCropToolConstraintDescription* old; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION)); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + old = value->data[0].v_pointer; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (v_object) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION)); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = v_object; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constraint_description_ref (value->data[0].v_pointer); +#line 12394 "EditingTools.c" + } else { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 12398 "EditingTools.c" + } +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (old) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constraint_description_unref (old); +#line 12404 "EditingTools.c" + } +} + + +static void editing_tools_crop_tool_value_take_constraint_description (GValue* value, gpointer v_object) { + EditingToolsCropToolConstraintDescription* old; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION)); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + old = value->data[0].v_pointer; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (v_object) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION)); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = v_object; +#line 12423 "EditingTools.c" + } else { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + value->data[0].v_pointer = NULL; +#line 12427 "EditingTools.c" + } +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (old) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constraint_description_unref (old); +#line 12433 "EditingTools.c" + } +} + + +static void editing_tools_crop_tool_constraint_description_class_init (EditingToolsCropToolConstraintDescriptionClass * klass) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_constraint_description_parent_class = g_type_class_peek_parent (klass); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsCropToolConstraintDescriptionClass *) klass)->finalize = editing_tools_crop_tool_constraint_description_finalize; +#line 12443 "EditingTools.c" +} + + +static void editing_tools_crop_tool_constraint_description_instance_init (EditingToolsCropToolConstraintDescription * self) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->ref_count = 1; +#line 12450 "EditingTools.c" +} + + +static void editing_tools_crop_tool_constraint_description_finalize (EditingToolsCropToolConstraintDescription* obj) { + EditingToolsCropToolConstraintDescription * self; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_CROP_TOOL_TYPE_CONSTRAINT_DESCRIPTION, EditingToolsCropToolConstraintDescription); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_destroy (self); +#line 608 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (self->name); +#line 12462 "EditingTools.c" +} + + +static GType editing_tools_crop_tool_constraint_description_get_type (void) { + static volatile gsize editing_tools_crop_tool_constraint_description_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_crop_tool_constraint_description_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { editing_tools_crop_tool_value_constraint_description_init, editing_tools_crop_tool_value_constraint_description_free_value, editing_tools_crop_tool_value_constraint_description_copy_value, editing_tools_crop_tool_value_constraint_description_peek_pointer, "p", editing_tools_crop_tool_value_constraint_description_collect_value, "p", editing_tools_crop_tool_value_constraint_description_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsCropToolConstraintDescriptionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_crop_tool_constraint_description_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsCropToolConstraintDescription), 0, (GInstanceInitFunc) editing_tools_crop_tool_constraint_description_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType editing_tools_crop_tool_constraint_description_type_id; + editing_tools_crop_tool_constraint_description_type_id = g_type_register_fundamental (g_type_fundamental_next (), "EditingToolsCropToolConstraintDescription", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&editing_tools_crop_tool_constraint_description_type_id__volatile, editing_tools_crop_tool_constraint_description_type_id); + } + return editing_tools_crop_tool_constraint_description_type_id__volatile; +} + + +static gpointer editing_tools_crop_tool_constraint_description_ref (gpointer instance) { + EditingToolsCropToolConstraintDescription* self; + self = instance; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_atomic_int_inc (&self->ref_count); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return instance; +#line 12487 "EditingTools.c" +} + + +static void editing_tools_crop_tool_constraint_description_unref (gpointer instance) { + EditingToolsCropToolConstraintDescription* self; + self = instance; +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (g_atomic_int_dec_and_test (&self->ref_count)) { +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_CROP_TOOL_CONSTRAINT_DESCRIPTION_GET_CLASS (self)->finalize (self); +#line 607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_free_instance ((GTypeInstance *) self); +#line 12500 "EditingTools.c" + } +} + + +static gboolean _editing_tools_crop_tool_crop_tool_window_constraint_combo_separator_func_gtk_tree_view_row_separator_func (GtkTreeModel* model, GtkTreeIter* iter, gpointer self) { + gboolean result; + result = editing_tools_crop_tool_crop_tool_window_constraint_combo_separator_func (model, iter); +#line 675 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 12510 "EditingTools.c" +} + + +static EditingToolsCropToolCropToolWindow* editing_tools_crop_tool_crop_tool_window_construct (GType object_type, GtkWindow* container) { + EditingToolsCropToolCropToolWindow * self = NULL; + GtkWindow* _tmp0_ = NULL; + GtkButton* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + GtkButton* _tmp3_ = NULL; + GtkButton* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + GtkButton* _tmp6_ = NULL; + GtkComboBox* _tmp7_ = NULL; + GtkCellRendererText* combo_text_renderer = NULL; + GtkCellRendererText* _tmp8_ = NULL; + GtkComboBox* _tmp9_ = NULL; + GtkComboBox* _tmp10_ = NULL; + GtkComboBox* _tmp11_ = NULL; + GtkComboBox* _tmp12_ = NULL; + GtkButton* _tmp13_ = NULL; + GtkImage* _tmp14_ = NULL; + GtkImage* _tmp15_ = NULL; + GtkButton* _tmp16_ = NULL; + const gchar* _tmp17_ = NULL; + GtkEntry* _tmp18_ = NULL; + GtkEntry* _tmp19_ = NULL; + GtkEntry* _tmp20_ = NULL; + GtkEntry* _tmp21_ = NULL; + GtkBox* _tmp22_ = NULL; + GtkBox* _tmp23_ = NULL; + GtkBox* _tmp24_ = NULL; + GtkButton* _tmp25_ = NULL; + GtkBox* _tmp26_ = NULL; + GtkButton* _tmp27_ = NULL; + GtkBox* _tmp28_ = NULL; + GtkBox* _tmp29_ = NULL; + GtkComboBox* _tmp30_ = NULL; + GtkBox* _tmp31_ = NULL; + GtkButton* _tmp32_ = NULL; + GtkBox* _tmp33_ = NULL; + GtkBox* _tmp34_ = NULL; + GtkBox* _tmp35_ = NULL; +#line 662 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GTK_IS_WINDOW (container), NULL); +#line 663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = container; +#line 663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsCropToolCropToolWindow*) editing_tools_editing_tool_window_construct (object_type, _tmp0_); +#line 665 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->cancel_button; +#line 665 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _ ("Return to current photo dimensions"); +#line 665 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), _tmp2_); +#line 666 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->cancel_button; +#line 666 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_button_set_image_position (_tmp3_, GTK_POS_LEFT); +#line 668 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->ok_button; +#line 668 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _ ("Set the crop for this photo"); +#line 668 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), _tmp5_); +#line 669 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->ok_button; +#line 669 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_button_set_image_position (_tmp6_, GTK_POS_LEFT); +#line 671 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = (GtkComboBox*) gtk_combo_box_new (); +#line 671 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp7_); +#line 671 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->constraint_combo); +#line 671 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->constraint_combo = _tmp7_; +#line 672 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = (GtkCellRendererText*) gtk_cell_renderer_text_new (); +#line 672 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp8_); +#line 672 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + combo_text_renderer = _tmp8_; +#line 673 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->constraint_combo; +#line 673 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_cell_layout_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GTK_TYPE_CELL_LAYOUT, GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (combo_text_renderer, gtk_cell_renderer_get_type (), GtkCellRenderer), TRUE); +#line 674 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->constraint_combo; +#line 674 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_cell_layout_add_attribute (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GTK_TYPE_CELL_LAYOUT, GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (combo_text_renderer, gtk_cell_renderer_get_type (), GtkCellRenderer), "text", 0); +#line 675 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->constraint_combo; +#line 675 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_combo_box_set_row_separator_func (_tmp11_, _editing_tools_crop_tool_crop_tool_window_constraint_combo_separator_func_gtk_tree_view_row_separator_func, NULL, NULL); +#line 676 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->constraint_combo; +#line 676 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_combo_box_set_active (_tmp12_, 0); +#line 678 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->pivot_reticle_button; +#line 678 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = (GtkImage*) gtk_image_new_from_stock (RESOURCES_CROP_PIVOT_RETICLE, GTK_ICON_SIZE_SMALL_TOOLBAR); +#line 678 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp14_); +#line 678 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = _tmp14_; +#line 678 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_button_set_image (_tmp13_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget)); +#line 678 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp15_); +#line 680 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = self->pivot_reticle_button; +#line 680 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _ ("Pivot the crop rectangle between portrait and landscape orientations"); +#line 680 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget), _tmp17_); +#line 682 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->custom_width_entry; +#line 682 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_width_chars (_tmp18_, 4); +#line 683 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = self->custom_width_entry; +#line 683 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_set (_tmp19_, "editable", TRUE, NULL); +#line 684 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = self->custom_height_entry; +#line 684 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_entry_set_width_chars (_tmp20_, 4); +#line 685 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->custom_height_entry; +#line 685 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_set (_tmp21_, "editable", TRUE, NULL); +#line 687 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, EDITING_TOOLS_CROP_TOOL_CROP_TOOL_WINDOW_CONTROL_SPACING); +#line 687 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp22_); +#line 687 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->response_layout); +#line 687 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->response_layout = _tmp22_; +#line 688 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = self->response_layout; +#line 688 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_box_set_homogeneous (_tmp23_, TRUE); +#line 689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->response_layout; +#line 689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = self->cancel_button; +#line 689 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget)); +#line 690 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = self->response_layout; +#line 690 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = self->ok_button; +#line 690 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_widget_get_type (), GtkWidget)); +#line 692 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, EDITING_TOOLS_CROP_TOOL_CROP_TOOL_WINDOW_CONTROL_SPACING); +#line 692 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp28_); +#line 692 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->layout); +#line 692 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->layout = _tmp28_; +#line 693 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = self->layout; +#line 693 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = self->constraint_combo; +#line 693 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_widget_get_type (), GtkWidget)); +#line 694 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = self->layout; +#line 694 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = self->pivot_reticle_button; +#line 694 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_widget_get_type (), GtkWidget)); +#line 695 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = self->layout; +#line 695 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = self->response_layout; +#line 695 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_widget_get_type (), GtkWidget)); +#line 697 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = self->layout; +#line 697 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_widget_get_type (), GtkWidget)); +#line 662 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (combo_text_renderer); +#line 662 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 12701 "EditingTools.c" +} + + +static EditingToolsCropToolCropToolWindow* editing_tools_crop_tool_crop_tool_window_new (GtkWindow* container) { +#line 662 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_crop_tool_crop_tool_window_construct (EDITING_TOOLS_CROP_TOOL_TYPE_CROP_TOOL_WINDOW, container); +#line 12708 "EditingTools.c" +} + + +static gboolean editing_tools_crop_tool_crop_tool_window_constraint_combo_separator_func (GtkTreeModel* model, GtkTreeIter* iter) { + gboolean result = FALSE; + GValue val = {0}; + GtkTreeModel* _tmp0_ = NULL; + GtkTreeIter _tmp1_ = {0}; + GValue _tmp2_ = {0}; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 700 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GTK_IS_TREE_MODEL (model), FALSE); +#line 700 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (iter != NULL, FALSE); +#line 702 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = model; +#line 702 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = *iter; +#line 702 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_tree_model_get_value (_tmp0_, &_tmp1_, 0, &_tmp2_); +#line 702 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL; +#line 702 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + val = _tmp2_; +#line 704 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = g_value_dup_string (&val); +#line 704 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 704 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = g_strcmp0 (_tmp4_, "-") == 0; +#line 704 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_free0 (_tmp4_); +#line 704 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp5_; +#line 704 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL; +#line 704 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 12749 "EditingTools.c" +} + + +static void editing_tools_crop_tool_crop_tool_window_class_init (EditingToolsCropToolCropToolWindowClass * klass) { +#line 646 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_crop_tool_window_parent_class = g_type_class_peek_parent (klass); +#line 646 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (klass)->finalize = editing_tools_crop_tool_crop_tool_window_finalize; +#line 12758 "EditingTools.c" +} + + +static void editing_tools_crop_tool_crop_tool_window_instance_init (EditingToolsCropToolCropToolWindow * self) { + GtkButton* _tmp0_ = NULL; + GtkButton* _tmp1_ = NULL; + GtkButton* _tmp2_ = NULL; + GtkEntry* _tmp3_ = NULL; + GtkEntry* _tmp4_ = NULL; + GtkLabel* _tmp5_ = NULL; +#line 649 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = (GtkButton*) gtk_button_new_with_label (RESOURCES_CROP_LABEL); +#line 649 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp0_); +#line 649 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->ok_button = _tmp0_; +#line 650 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = (GtkButton*) gtk_button_new_with_mnemonic (RESOURCES_CANCEL_LABEL); +#line 650 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp1_); +#line 650 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->cancel_button = _tmp1_; +#line 652 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = (GtkButton*) gtk_button_new (); +#line 652 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp2_); +#line 652 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->pivot_reticle_button = _tmp2_; +#line 653 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = (GtkEntry*) gtk_entry_new (); +#line 653 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp3_); +#line 653 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->custom_width_entry = _tmp3_; +#line 654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = (GtkEntry*) gtk_entry_new (); +#line 654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp4_); +#line 654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->custom_height_entry = _tmp4_; +#line 655 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = (GtkLabel*) gtk_label_new_with_mnemonic ("x"); +#line 655 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp5_); +#line 655 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->custom_mulsign_label = _tmp5_; +#line 656 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->most_recently_edited = NULL; +#line 657 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->response_layout = NULL; +#line 658 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->layout = NULL; +#line 659 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->normal_width = -1; +#line 660 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->normal_height = -1; +#line 12815 "EditingTools.c" +} + + +static void editing_tools_crop_tool_crop_tool_window_finalize (GObject* obj) { + EditingToolsCropToolCropToolWindow * self; +#line 646 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_CROP_TOOL_TYPE_CROP_TOOL_WINDOW, EditingToolsCropToolCropToolWindow); +#line 649 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->ok_button); +#line 650 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->cancel_button); +#line 651 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->constraint_combo); +#line 652 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->pivot_reticle_button); +#line 653 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->custom_width_entry); +#line 654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->custom_height_entry); +#line 655 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->custom_mulsign_label); +#line 656 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->most_recently_edited); +#line 657 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->response_layout); +#line 658 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->layout); +#line 646 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (editing_tools_crop_tool_crop_tool_window_parent_class)->finalize (obj); +#line 12845 "EditingTools.c" +} + + +static GType editing_tools_crop_tool_crop_tool_window_get_type (void) { + static volatile gsize editing_tools_crop_tool_crop_tool_window_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_crop_tool_crop_tool_window_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsCropToolCropToolWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_crop_tool_crop_tool_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsCropToolCropToolWindow), 0, (GInstanceInitFunc) editing_tools_crop_tool_crop_tool_window_instance_init, NULL }; + GType editing_tools_crop_tool_crop_tool_window_type_id; + editing_tools_crop_tool_crop_tool_window_type_id = g_type_register_static (EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, "EditingToolsCropToolCropToolWindow", &g_define_type_info, 0); + g_once_init_leave (&editing_tools_crop_tool_crop_tool_window_type_id__volatile, editing_tools_crop_tool_crop_tool_window_type_id); + } + return editing_tools_crop_tool_crop_tool_window_type_id__volatile; +} + + +static void editing_tools_crop_tool_class_init (EditingToolsCropToolClass * klass) { +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_crop_tool_parent_class = g_type_class_peek_parent (klass); +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->finalize = editing_tools_crop_tool_finalize; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsCropToolPrivate)); +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->activate = editing_tools_crop_tool_real_activate; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_keypress = editing_tools_crop_tool_real_on_keypress; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->deactivate = editing_tools_crop_tool_real_deactivate; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->get_tool_window = editing_tools_crop_tool_real_get_tool_window; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->get_display_pixbuf = editing_tools_crop_tool_real_get_display_pixbuf; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_left_click = editing_tools_crop_tool_real_on_left_click; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_left_released = editing_tools_crop_tool_real_on_left_released; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_motion = editing_tools_crop_tool_real_on_motion; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->paint = editing_tools_crop_tool_real_paint; +#line 12886 "EditingTools.c" +} + + +static void editing_tools_crop_tool_instance_init (EditingToolsCropTool * self) { + gint _tmp0_ = 0; + EditingToolsCropToolConstraintDescription** _tmp1_ = NULL; + gint _tmp2_ = 0; + EditingToolsCropToolConstraintDescription** _tmp3_ = NULL; + EditingToolsCropToolConstraintDescription** _tmp4_ = NULL; + gint _tmp4__length1 = 0; + GtkListStore* _tmp5_ = NULL; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_CROP_TOOL_GET_PRIVATE (self); +#line 708 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->crop_tool_window = NULL; +#line 709 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->current_cursor_type = GDK_LEFT_PTR; +#line 710 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->in_manipulation = BOX_LOCATION_OUTSIDE; +#line 711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->wide_black_ctx = NULL; +#line 712 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->wide_white_ctx = NULL; +#line 713 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->thin_white_ctx = NULL; +#line 714 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->text_ctx = NULL; +#line 717 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->crop_surface = NULL; +#line 721 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->last_grab_x = -1; +#line 722 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->last_grab_y = -1; +#line 724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = editing_tools_crop_tool_create_constraints (&_tmp0_); +#line 724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->constraints = _tmp1_; +#line 724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->constraints_length1 = _tmp0_; +#line 724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->_constraints_size_ = self->priv->constraints_length1; +#line 725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = editing_tools_crop_tool_create_constraints (&_tmp2_); +#line 725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4__length1 = _tmp2_; +#line 725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = editing_tools_crop_tool_create_constraint_list (_tmp4_, _tmp2_); +#line 725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->constraint_list = _tmp5_; +#line 725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) editing_tools_crop_tool_constraint_description_unref), NULL); +#line 726 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->reticle_orientation = EDITING_TOOLS_CROP_TOOL_RETICLE_ORIENTATION_LANDSCAPE; +#line 727 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->constraint_mode = EDITING_TOOLS_CROP_TOOL_CONSTRAINT_MODE_NORMAL; +#line 728 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->entry_insert_in_progress = FALSE; +#line 729 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_aspect_ratio = 1.0f; +#line 730 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_width = -1; +#line 731 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_height = -1; +#line 732 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_init_width = -1; +#line 733 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->custom_init_height = -1; +#line 734 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->pre_aspect_ratio = EDITING_TOOLS_CROP_TOOL_ANY_ASPECT_RATIO; +#line 12958 "EditingTools.c" +} + + +static void editing_tools_crop_tool_finalize (EditingToolsEditingTool* obj) { + EditingToolsCropTool * self; +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool); +#line 708 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->crop_tool_window); +#line 711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->wide_black_ctx); +#line 712 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->wide_white_ctx); +#line 713 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->thin_white_ctx); +#line 714 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->text_ctx); +#line 717 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_surface_destroy0 (self->priv->crop_surface); +#line 724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->constraints = (_vala_array_free (self->priv->constraints, self->priv->constraints_length1, (GDestroyNotify) editing_tools_crop_tool_constraint_description_unref), NULL); +#line 725 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->constraint_list); +#line 586 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_crop_tool_parent_class)->finalize (obj); +#line 12984 "EditingTools.c" +} + + +GType editing_tools_crop_tool_get_type (void) { + static volatile gsize editing_tools_crop_tool_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_crop_tool_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsCropToolClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_crop_tool_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsCropTool), 0, (GInstanceInitFunc) editing_tools_crop_tool_instance_init, NULL }; + GType editing_tools_crop_tool_type_id; + editing_tools_crop_tool_type_id = g_type_register_static (EDITING_TOOLS_TYPE_EDITING_TOOL, "EditingToolsCropTool", &g_define_type_info, 0); + g_once_init_leave (&editing_tools_crop_tool_type_id__volatile, editing_tools_crop_tool_type_id); + } + return editing_tools_crop_tool_type_id__volatile; +} + + +static void editing_tools_redeye_instance_init (EditingToolsRedeyeInstance *self) { + GdkPoint default_center = {0}; + GdkPoint _tmp0_ = {0}; +#line 1840 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + memset (self, 0, sizeof (EditingToolsRedeyeInstance)); +#line 1841 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + memset (&default_center, 0, sizeof (GdkPoint)); +#line 1842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = default_center; +#line 1842 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*self).center = _tmp0_; +#line 1843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + (*self).radius = EDITING_TOOLS_REDEYE_INSTANCE_DEFAULT_RADIUS; +#line 13013 "EditingTools.c" +} + + +void editing_tools_redeye_instance_to_bounds_rect (EditingToolsRedeyeInstance* inst, GdkRectangle* result) { + GdkRectangle _result_ = {0}; + EditingToolsRedeyeInstance _tmp0_ = {0}; + GdkPoint _tmp1_ = {0}; + gint _tmp2_ = 0; + EditingToolsRedeyeInstance _tmp3_ = {0}; + gint _tmp4_ = 0; + EditingToolsRedeyeInstance _tmp5_ = {0}; + GdkPoint _tmp6_ = {0}; + gint _tmp7_ = 0; + EditingToolsRedeyeInstance _tmp8_ = {0}; + gint _tmp9_ = 0; + EditingToolsRedeyeInstance _tmp10_ = {0}; + gint _tmp11_ = 0; + GdkRectangle _tmp12_ = {0}; + gint _tmp13_ = 0; +#line 1846 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (inst != NULL); +#line 1847 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + memset (&_result_, 0, sizeof (GdkRectangle)); +#line 1848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = *inst; +#line 1848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_.center; +#line 1848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_.x; +#line 1848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = *inst; +#line 1848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.radius; +#line 1848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.x = _tmp2_ - _tmp4_; +#line 1849 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = *inst; +#line 1849 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.center; +#line 1849 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.y; +#line 1849 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = *inst; +#line 1849 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.radius; +#line 1849 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.y = _tmp7_ - _tmp9_; +#line 1850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = *inst; +#line 1850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_.radius; +#line 1850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.width = 2 * _tmp11_; +#line 1851 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _result_; +#line 1851 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.width; +#line 1851 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.height = _tmp13_; +#line 1853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _result_; +#line 1853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 13077 "EditingTools.c" +} + + +void editing_tools_redeye_instance_from_bounds_rect (GdkRectangle* rect, EditingToolsRedeyeInstance* result) { + GdkRectangle in_rect = {0}; + GdkRectangle _tmp0_ = {0}; + EditingToolsRedeyeInstance _result_ = {0}; + GdkRectangle _tmp1_ = {0}; + gint _tmp2_ = 0; + GdkRectangle _tmp3_ = {0}; + gint _tmp4_ = 0; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; + EditingToolsRedeyeInstance _tmp7_ = {0}; + gint _tmp8_ = 0; + GdkRectangle _tmp9_ = {0}; + gint _tmp10_ = 0; + EditingToolsRedeyeInstance _tmp11_ = {0}; + gint _tmp12_ = 0; +#line 1856 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (rect != NULL); +#line 1857 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = *rect; +#line 1857 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + in_rect = _tmp0_; +#line 1859 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_instance_init (&_result_); +#line 1860 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = in_rect; +#line 1860 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_.width; +#line 1860 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = in_rect; +#line 1860 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.height; +#line 1860 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.radius = (_tmp2_ + _tmp4_) / 4; +#line 1861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = in_rect; +#line 1861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.x; +#line 1861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _result_; +#line 1861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.radius; +#line 1861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.center.x = _tmp6_ + _tmp8_; +#line 1862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = in_rect; +#line 1862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.y; +#line 1862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _result_; +#line 1862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_.radius; +#line 1862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.center.y = _tmp10_ + _tmp12_; +#line 1864 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _result_; +#line 1864 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 13139 "EditingTools.c" +} + + +EditingToolsRedeyeInstance* editing_tools_redeye_instance_dup (const EditingToolsRedeyeInstance* self) { + EditingToolsRedeyeInstance* dup; +#line 1832 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dup = g_new0 (EditingToolsRedeyeInstance, 1); +#line 1832 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + memcpy (dup, self, sizeof (EditingToolsRedeyeInstance)); +#line 1832 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return dup; +#line 13151 "EditingTools.c" +} + + +void editing_tools_redeye_instance_free (EditingToolsRedeyeInstance* self) { +#line 1832 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_free (self); +#line 13158 "EditingTools.c" +} + + +GType editing_tools_redeye_instance_get_type (void) { + static volatile gsize editing_tools_redeye_instance_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_redeye_instance_type_id__volatile)) { + GType editing_tools_redeye_instance_type_id; + editing_tools_redeye_instance_type_id = g_boxed_type_register_static ("EditingToolsRedeyeInstance", (GBoxedCopyFunc) editing_tools_redeye_instance_dup, (GBoxedFreeFunc) editing_tools_redeye_instance_free); + g_once_init_leave (&editing_tools_redeye_instance_type_id__volatile, editing_tools_redeye_instance_type_id); + } + return editing_tools_redeye_instance_type_id__volatile; +} + + +static EditingToolsRedeyeTool* editing_tools_redeye_tool_construct (GType object_type) { + EditingToolsRedeyeTool* self = NULL; +#line 1916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsRedeyeTool*) editing_tools_editing_tool_construct (object_type, "RedeyeTool"); +#line 1915 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 13179 "EditingTools.c" +} + + +static EditingToolsRedeyeTool* editing_tools_redeye_tool_new (void) { +#line 1915 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_redeye_tool_construct (EDITING_TOOLS_TYPE_REDEYE_TOOL); +#line 13186 "EditingTools.c" +} + + +EditingToolsRedeyeTool* editing_tools_redeye_tool_factory (void) { + EditingToolsRedeyeTool* result = NULL; + EditingToolsRedeyeTool* _tmp0_ = NULL; +#line 1920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = editing_tools_redeye_tool_new (); +#line 1920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp0_; +#line 1920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 13199 "EditingTools.c" +} + + +gboolean editing_tools_redeye_tool_is_available (Photo* photo, Scaling* scaling) { + gboolean result = FALSE; + Dimensions dim = {0}; + Photo* _tmp0_ = NULL; + Dimensions _tmp1_ = {0}; + Dimensions _tmp2_ = {0}; + gboolean _tmp3_ = FALSE; + Dimensions _tmp4_ = {0}; + gint _tmp5_ = 0; +#line 1923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PHOTO (photo), FALSE); +#line 1923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (scaling != NULL, FALSE); +#line 1924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = photo; +#line 1924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp1_); +#line 1924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scaling_get_scaled_dimensions (scaling, &_tmp1_, &_tmp2_); +#line 1924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dim = _tmp2_; +#line 1926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = dim; +#line 1926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_.width; +#line 1926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp5_ >= (EDITING_TOOLS_REDEYE_INSTANCE_MAX_RADIUS * 2)) { +#line 13230 "EditingTools.c" + Dimensions _tmp6_ = {0}; + gint _tmp7_ = 0; +#line 1927 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = dim; +#line 1927 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.height; +#line 1927 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp7_ >= (EDITING_TOOLS_REDEYE_INSTANCE_MAX_RADIUS * 2); +#line 13239 "EditingTools.c" + } else { +#line 1926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = FALSE; +#line 13243 "EditingTools.c" + } +#line 1926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp3_; +#line 1926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 13249 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_new_interaction_instance (EditingToolsRedeyeTool* self, EditingToolsPhotoCanvas* canvas, EditingToolsRedeyeInstance* result) { + GdkRectangle photo_bounds = {0}; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + GdkRectangle _tmp1_ = {0}; + GdkPoint photo_center = {0}; + GdkPoint _tmp2_ = {0}; + GdkRectangle _tmp3_ = {0}; + gint _tmp4_ = 0; + GdkRectangle _tmp5_ = {0}; + gint _tmp6_ = 0; + GdkRectangle _tmp7_ = {0}; + gint _tmp8_ = 0; + GdkRectangle _tmp9_ = {0}; + gint _tmp10_ = 0; + EditingToolsRedeyeInstance _result_ = {0}; + GdkPoint _tmp11_ = {0}; + gint _tmp12_ = 0; + GdkPoint _tmp13_ = {0}; + gint _tmp14_ = 0; +#line 1930 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 1930 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 1931 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 1931 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp0_, &_tmp1_); +#line 1931 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_bounds = _tmp1_; +#line 1932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_.x = 0; +#line 1932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_center = _tmp2_; +#line 1933 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = photo_bounds; +#line 1933 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.x; +#line 1933 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = photo_bounds; +#line 1933 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.width; +#line 1933 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_center.x = _tmp4_ + (_tmp6_ / 2); +#line 1934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = photo_bounds; +#line 1934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.y; +#line 1934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = photo_bounds; +#line 1934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.height; +#line 1934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_center.y = _tmp8_ + (_tmp10_ / 2); +#line 1936 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_instance_init (&_result_); +#line 1937 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = photo_center; +#line 1937 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_.x; +#line 1937 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.center.x = _tmp12_; +#line 1938 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = photo_center; +#line 1938 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_.y; +#line 1938 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.center.y = _tmp14_; +#line 1939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _result_.radius = EDITING_TOOLS_REDEYE_INSTANCE_DEFAULT_RADIUS; +#line 1941 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *result = _result_; +#line 1941 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 13326 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_prepare_ctx (EditingToolsRedeyeTool* self, cairo_t* ctx, Dimensions* dim) { + cairo_t* _tmp0_ = NULL; + cairo_surface_t* _tmp1_ = NULL; + cairo_t* _tmp2_ = NULL; + cairo_t* _tmp3_ = NULL; + cairo_t* _tmp4_ = NULL; + cairo_t* _tmp5_ = NULL; + cairo_surface_t* _tmp6_ = NULL; + cairo_t* _tmp7_ = NULL; + cairo_t* _tmp8_ = NULL; + cairo_t* _tmp9_ = NULL; +#line 1944 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 1944 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 1944 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (dim != NULL); +#line 1945 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = ctx; +#line 1945 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = cairo_get_target (_tmp0_); +#line 1945 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = cairo_create (_tmp1_); +#line 1945 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->wider_gray_ctx); +#line 1945 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->wider_gray_ctx = _tmp2_; +#line 1946 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->wider_gray_ctx; +#line 1946 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + set_source_color_from_string (_tmp3_, "#111"); +#line 1947 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->wider_gray_ctx; +#line 1947 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_line_width (_tmp4_, (gdouble) 3); +#line 1949 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = ctx; +#line 1949 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = cairo_get_target (_tmp5_); +#line 1949 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = cairo_create (_tmp6_); +#line 1949 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->thin_white_ctx); +#line 1949 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->thin_white_ctx = _tmp7_; +#line 1950 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->thin_white_ctx; +#line 1950 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + set_source_color_from_string (_tmp8_, "#FFF"); +#line 1951 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->thin_white_ctx; +#line 1951 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cairo_set_line_width (_tmp9_, (gdouble) 1); +#line 13383 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_draw_redeye_instance (EditingToolsRedeyeTool* self, EditingToolsRedeyeInstance* inst) { + EditingToolsPhotoCanvas* _tmp0_ = NULL; + cairo_t* _tmp1_ = NULL; + EditingToolsRedeyeInstance _tmp2_ = {0}; + GdkPoint _tmp3_ = {0}; + gint _tmp4_ = 0; + EditingToolsRedeyeInstance _tmp5_ = {0}; + GdkPoint _tmp6_ = {0}; + gint _tmp7_ = 0; + EditingToolsRedeyeInstance _tmp8_ = {0}; + gint _tmp9_ = 0; + EditingToolsPhotoCanvas* _tmp10_ = NULL; + cairo_t* _tmp11_ = NULL; + EditingToolsRedeyeInstance _tmp12_ = {0}; + GdkPoint _tmp13_ = {0}; + gint _tmp14_ = 0; + EditingToolsRedeyeInstance _tmp15_ = {0}; + GdkPoint _tmp16_ = {0}; + gint _tmp17_ = 0; + EditingToolsRedeyeInstance _tmp18_ = {0}; + gint _tmp19_ = 0; +#line 1954 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 1954 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (inst != NULL); +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->wider_gray_ctx; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = *inst; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_.center; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.x; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = *inst; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.center; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.y; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = *inst; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.radius; +#line 1955 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_circle (_tmp0_, _tmp1_, _tmp4_, _tmp7_, _tmp9_); +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->thin_white_ctx; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = *inst; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.center; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_.x; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = *inst; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_.center; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _tmp16_.y; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = *inst; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_.radius; +#line 1957 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_draw_circle (_tmp10_, _tmp11_, _tmp14_, _tmp17_, _tmp19_); +#line 13456 "EditingTools.c" +} + + +static gboolean editing_tools_redeye_tool_on_size_slider_adjust (EditingToolsRedeyeTool* self, GtkScrollType type) { + gboolean result = FALSE; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + gdouble _tmp2_ = 0.0; + EditingToolsPhotoCanvas* _tmp3_ = NULL; +#line 1961 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self), FALSE); +#line 1962 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->redeye_tool_window; +#line 1962 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->slider; +#line 1962 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange)); +#line 1962 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.radius = (gint) _tmp2_; +#line 1965 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1965 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp3_); +#line 1967 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 1967 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 13484 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_on_apply (EditingToolsRedeyeTool* self) { + GdkRectangle bounds_rect_user = {0}; + EditingToolsRedeyeInstance _tmp0_ = {0}; + GdkRectangle _tmp1_ = {0}; + GdkRectangle bounds_rect_active = {0}; + EditingToolsPhotoCanvas* _tmp2_ = NULL; + GdkRectangle _tmp3_ = {0}; + GdkRectangle _tmp4_ = {0}; + GdkRectangle bounds_rect_unscaled = {0}; + EditingToolsPhotoCanvas* _tmp5_ = NULL; + GdkRectangle _tmp6_ = {0}; + GdkRectangle _tmp7_ = {0}; + GdkRectangle bounds_rect_raw = {0}; + EditingToolsPhotoCanvas* _tmp8_ = NULL; + GdkRectangle _tmp9_ = {0}; + GdkRectangle _tmp10_ = {0}; + EditingToolsRedeyeInstance instance_raw = {0}; + GdkRectangle _tmp11_ = {0}; + EditingToolsRedeyeInstance _tmp12_ = {0}; + Dimensions dimensions = {0}; + EditingToolsPhotoCanvas* _tmp13_ = NULL; + Photo* _tmp14_ = NULL; + Photo* _tmp15_ = NULL; + Dimensions _tmp16_ = {0}; + Dimensions _tmp17_ = {0}; + gdouble theta = 0.0; + EditingToolsPhotoCanvas* _tmp18_ = NULL; + Photo* _tmp19_ = NULL; + Photo* _tmp20_ = NULL; + gdouble _tmp21_ = 0.0; + EditingToolsRedeyeInstance _tmp22_ = {0}; + GdkPoint _tmp23_ = {0}; + Dimensions _tmp24_ = {0}; + gint _tmp25_ = 0; + Dimensions _tmp26_ = {0}; + gint _tmp27_ = 0; + gdouble _tmp28_ = 0.0; + GdkPoint _tmp29_ = {0}; + RedeyeCommand* command = NULL; + EditingToolsPhotoCanvas* _tmp30_ = NULL; + Photo* _tmp31_ = NULL; + Photo* _tmp32_ = NULL; + EditingToolsRedeyeInstance _tmp33_ = {0}; + RedeyeCommand* _tmp34_ = NULL; + RedeyeCommand* _tmp35_ = NULL; + CommandManager* _tmp36_ = NULL; + CommandManager* _tmp37_ = NULL; +#line 1970 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 1971 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->user_interaction_instance; +#line 1971 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_instance_to_bounds_rect (&_tmp0_, &_tmp1_); +#line 1971 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bounds_rect_user = _tmp1_; +#line 1974 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1974 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = bounds_rect_user; +#line 1974 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_user_to_active_rect (_tmp2_, &_tmp3_, &_tmp4_); +#line 1974 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bounds_rect_active = _tmp4_; +#line 1976 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1976 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = bounds_rect_active; +#line 1976 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_active_to_unscaled_rect (_tmp5_, &_tmp6_, &_tmp7_); +#line 1976 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bounds_rect_unscaled = _tmp7_; +#line 1978 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1978 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = bounds_rect_unscaled; +#line 1978 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_unscaled_to_raw_rect (_tmp8_, &_tmp9_, &_tmp10_); +#line 1978 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bounds_rect_raw = _tmp10_; +#line 1981 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = bounds_rect_raw; +#line 1981 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_instance_from_bounds_rect (&_tmp11_, &_tmp12_); +#line 1981 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + instance_raw = _tmp12_; +#line 1986 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1986 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = editing_tools_photo_canvas_get_photo (_tmp13_); +#line 1986 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = _tmp14_; +#line 1986 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_STRAIGHTEN | PHOTO_EXCEPTION_CROP, &_tmp16_); +#line 1986 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _tmp16_; +#line 1986 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp15_); +#line 1986 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dimensions = _tmp17_; +#line 1989 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + theta = 0.0; +#line 1991 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1991 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = editing_tools_photo_canvas_get_photo (_tmp18_); +#line 1991 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _tmp19_; +#line 1991 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo_get_straighten (_tmp20_, &_tmp21_); +#line 1991 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + theta = _tmp21_; +#line 1991 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp20_); +#line 1993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = instance_raw; +#line 1993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _tmp22_.center; +#line 1993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = dimensions; +#line 1993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _tmp24_.width; +#line 1993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = dimensions; +#line 1993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = _tmp26_.height; +#line 1993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = theta; +#line 1993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + derotate_point_arb (&_tmp23_, _tmp25_, _tmp27_, _tmp28_, &_tmp29_); +#line 1993 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + instance_raw.center = _tmp29_; +#line 1996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 1996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = editing_tools_photo_canvas_get_photo (_tmp30_); +#line 1996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = _tmp31_; +#line 1996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = instance_raw; +#line 1996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = redeye_command_new (_tmp32_, &_tmp33_, RESOURCES_RED_EYE_LABEL, RESOURCES_RED_EYE_TOOLTIP); +#line 1996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = _tmp34_; +#line 1996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp32_); +#line 1996 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command = _tmp35_; +#line 1998 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = app_window_get_command_manager (); +#line 1998 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = _tmp36_; +#line 1998 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command_manager_execute (_tmp37_, G_TYPE_CHECK_INSTANCE_CAST (command, TYPE_COMMAND, Command)); +#line 1998 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _command_manager_unref0 (_tmp37_); +#line 1970 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (command); +#line 13645 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_on_photos_altered (EditingToolsRedeyeTool* self, GeeMap* map) { + GeeMap* _tmp0_ = NULL; + EditingToolsPhotoCanvas* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; + EditingToolsPhotoCanvas* _tmp17_ = NULL; + GError * _inner_error_ = NULL; +#line 2001 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 2001 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (GEE_IS_MAP (map)); +#line 2002 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = map; +#line 2002 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2002 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = editing_tools_photo_canvas_get_photo (_tmp1_); +#line 2002 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 2002 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = gee_map_has_key (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject)); +#line 2002 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = !_tmp4_; +#line 2002 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp3_); +#line 2002 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp5_) { +#line 2003 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 13680 "EditingTools.c" + } + { + GdkPixbuf* _tmp6_ = NULL; + EditingToolsPhotoCanvas* _tmp7_ = NULL; + Photo* _tmp8_ = NULL; + Photo* _tmp9_ = NULL; + EditingToolsPhotoCanvas* _tmp10_ = NULL; + Scaling _tmp11_ = {0}; + GdkPixbuf* _tmp12_ = NULL; + GdkPixbuf* _tmp13_ = NULL; + GdkPixbuf* _tmp14_ = NULL; +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = editing_tools_photo_canvas_get_photo (_tmp7_); +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_; +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaling (_tmp10_, &_tmp11_); +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = photo_source_get_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_PHOTO_SOURCE, PhotoSource), &_tmp11_, &_inner_error_); +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_; +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp9_); +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp13_; +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 13712 "EditingTools.c" + goto __catch20_g_error; + } +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp6_; +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = NULL; +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->current_pixbuf); +#line 2006 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->current_pixbuf = _tmp14_; +#line 2005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp6_); +#line 13725 "EditingTools.c" + } + goto __finally20; + __catch20_g_error: + { + GError* err = NULL; + GError* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; +#line 2005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + err = _inner_error_; +#line 2005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _inner_error_ = NULL; +#line 2008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = err; +#line 2008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_->message; +#line 2008 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_warning ("EditingTools.vala:2008: %s", _tmp16_); +#line 2009 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), "aborted"); +#line 2011 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_error_free0 (err); +#line 2011 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 13749 "EditingTools.c" + } + __finally20: +#line 2005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 2005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 2005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_clear_error (&_inner_error_); +#line 2005 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 13760 "EditingTools.c" + } +#line 2014 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2014 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp17_); +#line 13766 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_on_close (EditingToolsRedeyeTool* self) { + GdkPixbuf* _tmp0_ = NULL; + EditingToolsPhotoCanvas* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + Dimensions _tmp4_ = {0}; +#line 2017 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 2018 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->current_pixbuf; +#line 2018 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2018 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = editing_tools_photo_canvas_get_photo (_tmp1_); +#line 2018 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 2018 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp4_); +#line 2018 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), "applied", NULL, _tmp0_, &_tmp4_, FALSE); +#line 2018 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp3_); +#line 13792 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_on_canvas_resize (EditingToolsRedeyeTool* self) { + GdkRectangle scaled_pixbuf_position = {0}; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + GdkRectangle _tmp1_ = {0}; + gint _tmp2_ = 0; + GdkRectangle _tmp3_ = {0}; + gint _tmp4_ = 0; + gint _tmp5_ = 0; + GdkRectangle _tmp6_ = {0}; + gint _tmp7_ = 0; + gdouble scale_factor = 0.0; + GdkRectangle _tmp8_ = {0}; + gint _tmp9_ = 0; + GdkRectangle _tmp10_ = {0}; + gint _tmp11_ = 0; + EditingToolsRedeyeInstance _tmp12_ = {0}; + GdkPoint _tmp13_ = {0}; + gint _tmp14_ = 0; + EditingToolsRedeyeInstance _tmp15_ = {0}; + GdkPoint _tmp16_ = {0}; + gint _tmp17_ = 0; + gint _tmp18_ = 0; + GdkRectangle _tmp19_ = {0}; + gint _tmp20_ = 0; + gint _tmp21_ = 0; + GdkRectangle _tmp22_ = {0}; + gint _tmp23_ = 0; + GdkRectangle _tmp24_ = {0}; +#line 2021 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 2022 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2022 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp0_, &_tmp1_); +#line 2022 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scaled_pixbuf_position = _tmp1_; +#line 2025 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->user_interaction_instance.center.x; +#line 2025 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->old_scaled_pixbuf_position; +#line 2025 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.x; +#line 2025 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.x = _tmp2_ - _tmp4_; +#line 2026 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->user_interaction_instance.center.y; +#line 2026 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->old_scaled_pixbuf_position; +#line 2026 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_.y; +#line 2026 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.y = _tmp5_ - _tmp7_; +#line 2028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = scaled_pixbuf_position; +#line 2028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.width; +#line 2028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->old_scaled_pixbuf_position; +#line 2028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_.width; +#line 2028 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + scale_factor = ((gdouble) _tmp9_) / ((gdouble) _tmp11_); +#line 2031 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->user_interaction_instance; +#line 2031 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_.center; +#line 2031 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_.x; +#line 2031 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.x = (gint) ((((gdouble) _tmp14_) * scale_factor) + 0.5); +#line 2034 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->user_interaction_instance; +#line 2034 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_.center; +#line 2034 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _tmp16_.y; +#line 2034 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.y = (gint) ((((gdouble) _tmp17_) * scale_factor) + 0.5); +#line 2038 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->user_interaction_instance.center.x; +#line 2038 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = scaled_pixbuf_position; +#line 2038 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _tmp19_.x; +#line 2038 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.x = _tmp18_ + _tmp20_; +#line 2039 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->user_interaction_instance.center.y; +#line 2039 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = scaled_pixbuf_position; +#line 2039 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _tmp22_.y; +#line 2039 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.y = _tmp21_ + _tmp23_; +#line 2041 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = scaled_pixbuf_position; +#line 2041 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->old_scaled_pixbuf_position = _tmp24_; +#line 2043 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->current_pixbuf); +#line 2043 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->current_pixbuf = NULL; +#line 13898 "EditingTools.c" +} + + +static void _editing_tools_redeye_tool_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) { +#line 2066 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_on_photos_altered ((EditingToolsRedeyeTool*) self, items); +#line 13905 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_real_activate (EditingToolsEditingTool* base, EditingToolsPhotoCanvas* canvas) { + EditingToolsRedeyeTool * self; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + EditingToolsRedeyeInstance _tmp1_ = {0}; + EditingToolsPhotoCanvas* _tmp2_ = NULL; + cairo_t* _tmp3_ = NULL; + cairo_t* _tmp4_ = NULL; + EditingToolsPhotoCanvas* _tmp5_ = NULL; + Dimensions _tmp6_ = {0}; + EditingToolsPhotoCanvas* _tmp7_ = NULL; + EditingToolsPhotoCanvas* _tmp8_ = NULL; + GdkRectangle _tmp9_ = {0}; + EditingToolsPhotoCanvas* _tmp10_ = NULL; + GdkPixbuf* _tmp11_ = NULL; + EditingToolsPhotoCanvas* _tmp12_ = NULL; + GtkWindow* _tmp13_ = NULL; + GtkWindow* _tmp14_ = NULL; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp15_ = NULL; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp16_ = NULL; + GtkScale* _tmp17_ = NULL; + EditingToolsRedeyeInstance _tmp18_ = {0}; + gint _tmp19_ = 0; + GdkCursor* _tmp20_ = NULL; + GdkCursor* _tmp21_ = NULL; + DataCollection* owner = NULL; + EditingToolsPhotoCanvas* _tmp22_ = NULL; + Photo* _tmp23_ = NULL; + Photo* _tmp24_ = NULL; + DataCollection* _tmp25_ = NULL; + DataCollection* _tmp26_ = NULL; + DataCollection* _tmp27_ = NULL; + EditingToolsPhotoCanvas* _tmp29_ = NULL; +#line 2046 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool); +#line 2046 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 2047 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 2047 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_new_interaction_instance (self, _tmp0_, &_tmp1_); +#line 2047 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance = _tmp1_; +#line 2049 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = canvas; +#line 2049 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = editing_tools_photo_canvas_get_default_ctx (_tmp2_); +#line 2049 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 2049 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = canvas; +#line 2049 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_surface_dim (_tmp5_, &_tmp6_); +#line 2049 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_prepare_ctx (self, _tmp4_, &_tmp6_); +#line 2049 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (_tmp4_); +#line 2051 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = canvas; +#line 2051 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_bind_canvas_handlers (self, _tmp7_); +#line 2053 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = canvas; +#line 2053 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp8_, &_tmp9_); +#line 2053 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->old_scaled_pixbuf_position = _tmp9_; +#line 2054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = canvas; +#line 2054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = editing_tools_photo_canvas_get_scaled_pixbuf (_tmp10_); +#line 2054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->current_pixbuf); +#line 2054 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->current_pixbuf = _tmp11_; +#line 2056 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = canvas; +#line 2056 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = editing_tools_photo_canvas_get_container (_tmp12_); +#line 2056 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_; +#line 2056 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = editing_tools_redeye_tool_redeye_tool_window_new (_tmp14_); +#line 2056 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp15_); +#line 2056 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->redeye_tool_window); +#line 2056 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->redeye_tool_window = _tmp15_; +#line 2056 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp14_); +#line 2057 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = self->priv->redeye_tool_window; +#line 2057 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _tmp16_->slider; +#line 2057 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->user_interaction_instance; +#line 2057 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_.radius; +#line 2057 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_range_get_type (), GtkRange), (gdouble) _tmp19_); +#line 2059 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_bind_window_handlers (self); +#line 2061 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = gdk_cursor_new (GDK_LEFT_PTR); +#line 2061 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->cached_arrow_cursor); +#line 2061 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->cached_arrow_cursor = _tmp20_; +#line 2062 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = gdk_cursor_new (GDK_FLEUR); +#line 2062 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->cached_grab_cursor); +#line 2062 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->cached_grab_cursor = _tmp21_; +#line 2064 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = canvas; +#line 2064 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = editing_tools_photo_canvas_get_photo (_tmp22_); +#line 2064 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = _tmp23_; +#line 2064 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_DATA_OBJECT, DataObject)); +#line 2064 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _tmp25_; +#line 2064 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp24_); +#line 2064 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + owner = _tmp26_; +#line 2065 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = owner; +#line 2065 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp27_ != NULL) { +#line 14041 "EditingTools.c" + DataCollection* _tmp28_ = NULL; +#line 2066 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = owner; +#line 2066 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp28_, "items-altered", (GCallback) _editing_tools_redeye_tool_on_photos_altered_data_collection_items_altered, self); +#line 14047 "EditingTools.c" + } +#line 2068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = canvas; +#line 2068 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_redeye_tool_parent_class)->activate (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), _tmp29_); +#line 2046 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _data_collection_unref0 (owner); +#line 14055 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_real_deactivate (EditingToolsEditingTool* base) { + EditingToolsRedeyeTool * self; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp10_ = NULL; +#line 2071 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool); +#line 2072 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2072 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ != NULL) { +#line 14069 "EditingTools.c" + DataCollection* owner = NULL; + EditingToolsPhotoCanvas* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + DataCollection* _tmp4_ = NULL; + DataCollection* _tmp5_ = NULL; + DataCollection* _tmp6_ = NULL; + EditingToolsPhotoCanvas* _tmp9_ = NULL; +#line 2073 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2073 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = editing_tools_photo_canvas_get_photo (_tmp1_); +#line 2073 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 2073 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject)); +#line 2073 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_; +#line 2073 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp3_); +#line 2073 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + owner = _tmp5_; +#line 2074 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = owner; +#line 2074 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp6_ != NULL) { +#line 14096 "EditingTools.c" + DataCollection* _tmp7_ = NULL; + guint _tmp8_ = 0U; +#line 2075 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = owner; +#line 2075 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp8_, NULL, FALSE); +#line 2075 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _editing_tools_redeye_tool_on_photos_altered_data_collection_items_altered, self); +#line 14105 "EditingTools.c" + } +#line 2077 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2077 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_unbind_canvas_handlers (self, _tmp9_); +#line 2072 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _data_collection_unref0 (owner); +#line 14113 "EditingTools.c" + } +#line 2080 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->redeye_tool_window; +#line 2080 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp10_ != NULL) { +#line 14119 "EditingTools.c" + EditingToolsRedeyeToolRedeyeToolWindow* _tmp11_ = NULL; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp12_ = NULL; +#line 2081 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_unbind_window_handlers (self); +#line 2082 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->redeye_tool_window; +#line 2082 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget)); +#line 2083 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->redeye_tool_window; +#line 2083 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget)); +#line 2084 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->redeye_tool_window); +#line 2084 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->redeye_tool_window = NULL; +#line 14136 "EditingTools.c" + } +#line 2087 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_redeye_tool_parent_class)->deactivate (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 14140 "EditingTools.c" +} + + +static void _editing_tools_redeye_tool_prepare_ctx_editing_tools_photo_canvas_new_surface (EditingToolsPhotoCanvas* _sender, cairo_t* ctx, Dimensions* dim, gpointer self) { +#line 2091 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_prepare_ctx ((EditingToolsRedeyeTool*) self, ctx, dim); +#line 14147 "EditingTools.c" +} + + +static void _editing_tools_redeye_tool_on_canvas_resize_editing_tools_photo_canvas_resized_scaled_pixbuf (EditingToolsPhotoCanvas* _sender, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position, gpointer self) { +#line 2092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_on_canvas_resize ((EditingToolsRedeyeTool*) self); +#line 14154 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_bind_canvas_handlers (EditingToolsRedeyeTool* self, EditingToolsPhotoCanvas* canvas) { + EditingToolsPhotoCanvas* _tmp0_ = NULL; + EditingToolsPhotoCanvas* _tmp1_ = NULL; +#line 2090 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 2090 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 2091 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 2091 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp0_, "new-surface", (GCallback) _editing_tools_redeye_tool_prepare_ctx_editing_tools_photo_canvas_new_surface, self); +#line 2092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = canvas; +#line 2092 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp1_, "resized-scaled-pixbuf", (GCallback) _editing_tools_redeye_tool_on_canvas_resize_editing_tools_photo_canvas_resized_scaled_pixbuf, self); +#line 14173 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_unbind_canvas_handlers (EditingToolsRedeyeTool* self, EditingToolsPhotoCanvas* canvas) { + EditingToolsPhotoCanvas* _tmp0_ = NULL; + guint _tmp1_ = 0U; + EditingToolsPhotoCanvas* _tmp2_ = NULL; + guint _tmp3_ = 0U; +#line 2095 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 2095 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 2096 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 2096 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("new-surface", EDITING_TOOLS_TYPE_PHOTO_CANVAS, &_tmp1_, NULL, FALSE); +#line 2096 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _editing_tools_redeye_tool_prepare_ctx_editing_tools_photo_canvas_new_surface, self); +#line 2097 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = canvas; +#line 2097 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("resized-scaled-pixbuf", EDITING_TOOLS_TYPE_PHOTO_CANVAS, &_tmp3_, NULL, FALSE); +#line 2097 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _editing_tools_redeye_tool_on_canvas_resize_editing_tools_photo_canvas_resized_scaled_pixbuf, self); +#line 14198 "EditingTools.c" +} + + +static void _editing_tools_redeye_tool_on_apply_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 2101 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_on_apply ((EditingToolsRedeyeTool*) self); +#line 14205 "EditingTools.c" +} + + +static void _editing_tools_redeye_tool_on_close_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 2102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_on_close ((EditingToolsRedeyeTool*) self); +#line 14212 "EditingTools.c" +} + + +static gboolean _editing_tools_redeye_tool_on_size_slider_adjust_gtk_range_change_value (GtkRange* _sender, GtkScrollType scroll, gdouble new_value, gpointer self) { + gboolean result; + result = editing_tools_redeye_tool_on_size_slider_adjust ((EditingToolsRedeyeTool*) self, scroll); +#line 2103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 14221 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_bind_window_handlers (EditingToolsRedeyeTool* self) { + EditingToolsRedeyeToolRedeyeToolWindow* _tmp0_ = NULL; + GtkButton* _tmp1_ = NULL; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp2_ = NULL; + GtkButton* _tmp3_ = NULL; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp4_ = NULL; + GtkScale* _tmp5_ = NULL; +#line 2100 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 2101 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->redeye_tool_window; +#line 2101 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->apply_button; +#line 2101 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp1_, "clicked", (GCallback) _editing_tools_redeye_tool_on_apply_gtk_button_clicked, self); +#line 2102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->redeye_tool_window; +#line 2102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_->close_button; +#line 2102 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp3_, "clicked", (GCallback) _editing_tools_redeye_tool_on_close_gtk_button_clicked, self); +#line 2103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->redeye_tool_window; +#line 2103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_->slider; +#line 2103 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_range_get_type (), GtkRange), "change-value", (GCallback) _editing_tools_redeye_tool_on_size_slider_adjust_gtk_range_change_value, self); +#line 14252 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_unbind_window_handlers (EditingToolsRedeyeTool* self) { + EditingToolsRedeyeToolRedeyeToolWindow* _tmp0_ = NULL; + GtkButton* _tmp1_ = NULL; + guint _tmp2_ = 0U; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp3_ = NULL; + GtkButton* _tmp4_ = NULL; + guint _tmp5_ = 0U; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp6_ = NULL; + GtkScale* _tmp7_ = NULL; + guint _tmp8_ = 0U; +#line 2106 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_REDEYE_TOOL (self)); +#line 2107 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->redeye_tool_window; +#line 2107 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->apply_button; +#line 2107 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp2_, NULL, FALSE); +#line 2107 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _editing_tools_redeye_tool_on_apply_gtk_button_clicked, self); +#line 2108 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->redeye_tool_window; +#line 2108 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_->close_button; +#line 2108 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp5_, NULL, FALSE); +#line 2108 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _editing_tools_redeye_tool_on_close_gtk_button_clicked, self); +#line 2109 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->redeye_tool_window; +#line 2109 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_->slider; +#line 2109 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("change-value", gtk_range_get_type (), &_tmp8_, NULL, FALSE); +#line 2109 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _editing_tools_redeye_tool_on_size_slider_adjust_gtk_range_change_value, self); +#line 14292 "EditingTools.c" +} + + +static EditingToolsEditingToolWindow* editing_tools_redeye_tool_real_get_tool_window (EditingToolsEditingTool* base) { + EditingToolsRedeyeTool * self; + EditingToolsEditingToolWindow* result = NULL; + EditingToolsRedeyeToolRedeyeToolWindow* _tmp0_ = NULL; + EditingToolsEditingToolWindow* _tmp1_ = NULL; +#line 2112 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool); +#line 2113 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->redeye_tool_window; +#line 2113 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow)); +#line 2113 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp1_; +#line 2113 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 14311 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_real_paint (EditingToolsEditingTool* base, cairo_t* ctx) { + EditingToolsRedeyeTool * self; + GdkPixbuf* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; + EditingToolsPhotoCanvas* _tmp6_ = NULL; + EditingToolsRedeyeInstance active_inst = {0}; + EditingToolsRedeyeInstance _tmp7_ = {0}; + EditingToolsPhotoCanvas* _tmp8_ = NULL; + EditingToolsRedeyeInstance _tmp9_ = {0}; + GdkPoint _tmp10_ = {0}; + GdkPoint _tmp11_ = {0}; + EditingToolsRedeyeInstance _tmp12_ = {0}; +#line 2116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool); +#line 2116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->current_pixbuf; +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_ != NULL) { +#line 14335 "EditingTools.c" + GdkPixbuf* _tmp2_ = NULL; + GdkPixbuf* _tmp3_ = NULL; +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->current_pixbuf; +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _g_object_ref0 (_tmp2_); +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp0_); +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = _tmp3_; +#line 14346 "EditingTools.c" + } else { + EditingToolsPhotoCanvas* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = editing_tools_photo_canvas_get_scaled_pixbuf (_tmp4_); +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp0_); +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = _tmp5_; +#line 14358 "EditingTools.c" + } +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2117 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_paint_pixbuf (_tmp6_, _tmp0_); +#line 2121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = self->priv->user_interaction_instance; +#line 2121 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + active_inst = _tmp7_; +#line 2122 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2122 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->user_interaction_instance; +#line 2122 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.center; +#line 2122 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_user_to_active_point (_tmp8_, &_tmp10_, &_tmp11_); +#line 2122 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + active_inst.center = _tmp11_; +#line 2124 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = active_inst; +#line 2124 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_draw_redeye_instance (self, &_tmp12_); +#line 2116 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp0_); +#line 14384 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_real_on_left_click (EditingToolsEditingTool* base, gint x, gint y) { + EditingToolsRedeyeTool * self; + GdkRectangle bounds_rect = {0}; + EditingToolsRedeyeInstance _tmp0_ = {0}; + GdkRectangle _tmp1_ = {0}; + gint _tmp2_ = 0; + gint _tmp3_ = 0; + GdkRectangle _tmp4_ = {0}; + gboolean _tmp5_ = FALSE; +#line 2127 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool); +#line 2128 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->user_interaction_instance; +#line 2128 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_instance_to_bounds_rect (&_tmp0_, &_tmp1_); +#line 2128 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bounds_rect = _tmp1_; +#line 2131 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = x; +#line 2131 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = y; +#line 2131 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = bounds_rect; +#line 2131 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = coord_in_rectangle (_tmp2_, _tmp3_, &_tmp4_); +#line 2131 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp5_) { +#line 14415 "EditingTools.c" + gint _tmp6_ = 0; + gint _tmp7_ = 0; + EditingToolsRedeyeInstance _tmp8_ = {0}; + GdkPoint _tmp9_ = {0}; +#line 2132 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->is_reticle_move_in_progress = TRUE; +#line 2133 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = x; +#line 2133 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->reticle_move_mouse_start_point.x = _tmp6_; +#line 2134 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = y; +#line 2134 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->reticle_move_mouse_start_point.y = _tmp7_; +#line 2135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->user_interaction_instance; +#line 2135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_.center; +#line 2135 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->reticle_move_anchor = _tmp9_; +#line 14436 "EditingTools.c" + } +} + + +static void editing_tools_redeye_tool_real_on_left_released (EditingToolsEditingTool* base, gint x, gint y) { + EditingToolsRedeyeTool * self; +#line 2139 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool); +#line 2140 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->is_reticle_move_in_progress = FALSE; +#line 14447 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_real_on_motion (EditingToolsEditingTool* base, gint x, gint y, GdkModifierType mask) { + EditingToolsRedeyeTool * self; + gboolean _tmp0_ = FALSE; +#line 2143 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool); +#line 2144 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->is_reticle_move_in_progress; +#line 2144 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_) { +#line 14460 "EditingTools.c" + GdkRectangle active_region_rect = {0}; + EditingToolsPhotoCanvas* _tmp1_ = NULL; + GdkRectangle _tmp2_ = {0}; + gint x_clamp_low = 0; + GdkRectangle _tmp3_ = {0}; + gint _tmp4_ = 0; + EditingToolsRedeyeInstance _tmp5_ = {0}; + gint _tmp6_ = 0; + gint y_clamp_low = 0; + GdkRectangle _tmp7_ = {0}; + gint _tmp8_ = 0; + EditingToolsRedeyeInstance _tmp9_ = {0}; + gint _tmp10_ = 0; + gint x_clamp_high = 0; + GdkRectangle _tmp11_ = {0}; + gint _tmp12_ = 0; + GdkRectangle _tmp13_ = {0}; + gint _tmp14_ = 0; + EditingToolsRedeyeInstance _tmp15_ = {0}; + gint _tmp16_ = 0; + gint y_clamp_high = 0; + GdkRectangle _tmp17_ = {0}; + gint _tmp18_ = 0; + GdkRectangle _tmp19_ = {0}; + gint _tmp20_ = 0; + EditingToolsRedeyeInstance _tmp21_ = {0}; + gint _tmp22_ = 0; + gint delta_x = 0; + gint _tmp23_ = 0; + GdkPoint _tmp24_ = {0}; + gint _tmp25_ = 0; + gint delta_y = 0; + gint _tmp26_ = 0; + GdkPoint _tmp27_ = {0}; + gint _tmp28_ = 0; + GdkPoint _tmp29_ = {0}; + gint _tmp30_ = 0; + gint _tmp31_ = 0; + GdkPoint _tmp32_ = {0}; + gint _tmp33_ = 0; + gint _tmp34_ = 0; + GdkPoint _tmp35_ = {0}; + gint _tmp36_ = 0; + gint _tmp37_ = 0; + gint _tmp38_ = 0; + gint _tmp39_ = 0; + gint _tmp40_ = 0; + GdkPoint _tmp41_ = {0}; + gint _tmp42_ = 0; + gint _tmp43_ = 0; + gint _tmp44_ = 0; + gint _tmp45_ = 0; + gint _tmp46_ = 0; + EditingToolsPhotoCanvas* _tmp47_ = NULL; +#line 2146 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2146 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_get_scaled_pixbuf_position (_tmp1_, &_tmp2_); +#line 2146 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + active_region_rect = _tmp2_; +#line 2149 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = active_region_rect; +#line 2149 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_.x; +#line 2149 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->user_interaction_instance; +#line 2149 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_.radius; +#line 2149 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x_clamp_low = (_tmp4_ + _tmp6_) + 1; +#line 2151 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = active_region_rect; +#line 2151 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_.y; +#line 2151 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->user_interaction_instance; +#line 2151 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_.radius; +#line 2151 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y_clamp_low = (_tmp8_ + _tmp10_) + 1; +#line 2153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = active_region_rect; +#line 2153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _tmp11_.x; +#line 2153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = active_region_rect; +#line 2153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_.width; +#line 2153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->user_interaction_instance; +#line 2153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_.radius; +#line 2153 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + x_clamp_high = ((_tmp12_ + _tmp14_) - _tmp16_) - 1; +#line 2156 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = active_region_rect; +#line 2156 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_.y; +#line 2156 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = active_region_rect; +#line 2156 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _tmp19_.height; +#line 2156 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->user_interaction_instance; +#line 2156 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _tmp21_.radius; +#line 2156 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + y_clamp_high = ((_tmp18_ + _tmp20_) - _tmp22_) - 1; +#line 2160 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = x; +#line 2160 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->priv->reticle_move_mouse_start_point; +#line 2160 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _tmp24_.x; +#line 2160 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + delta_x = _tmp23_ - _tmp25_; +#line 2161 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = y; +#line 2161 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = self->priv->reticle_move_mouse_start_point; +#line 2161 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = _tmp27_.y; +#line 2161 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + delta_y = _tmp26_ - _tmp28_; +#line 2163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = self->priv->reticle_move_anchor; +#line 2163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = _tmp29_.x; +#line 2163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = delta_x; +#line 2163 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.x = _tmp30_ + _tmp31_; +#line 2165 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = self->priv->reticle_move_anchor; +#line 2165 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = _tmp32_.y; +#line 2165 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = delta_y; +#line 2165 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.y = _tmp33_ + _tmp34_; +#line 2168 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = self->priv->reticle_move_anchor; +#line 2168 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = _tmp35_.x; +#line 2168 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = delta_x; +#line 2168 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = x_clamp_low; +#line 2168 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = x_clamp_high; +#line 2168 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = CLAMP (_tmp36_ + _tmp37_, _tmp38_, _tmp39_); +#line 2168 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.x = _tmp40_; +#line 2171 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = self->priv->reticle_move_anchor; +#line 2171 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = _tmp41_.y; +#line 2171 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = delta_y; +#line 2171 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44_ = y_clamp_low; +#line 2171 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = y_clamp_high; +#line 2171 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = CLAMP (_tmp42_ + _tmp43_, _tmp44_, _tmp45_); +#line 2171 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->user_interaction_instance.center.y = _tmp46_; +#line 2175 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2175 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp47_); +#line 14633 "EditingTools.c" + } else { + GdkRectangle bounds = {0}; + EditingToolsRedeyeInstance _tmp48_ = {0}; + GdkRectangle _tmp49_ = {0}; + gint _tmp50_ = 0; + gint _tmp51_ = 0; + GdkRectangle _tmp52_ = {0}; + gboolean _tmp53_ = FALSE; +#line 2177 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp48_ = self->priv->user_interaction_instance; +#line 2177 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_instance_to_bounds_rect (&_tmp48_, &_tmp49_); +#line 2177 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + bounds = _tmp49_; +#line 2180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp50_ = x; +#line 2180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp51_ = y; +#line 2180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52_ = bounds; +#line 2180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp53_ = coord_in_rectangle (_tmp50_, _tmp51_, &_tmp52_); +#line 2180 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp53_) { +#line 14658 "EditingTools.c" + EditingToolsPhotoCanvas* _tmp54_ = NULL; + GdkWindow* _tmp55_ = NULL; + GdkWindow* _tmp56_ = NULL; + GdkCursor* _tmp57_ = NULL; +#line 2181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp54_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp55_ = editing_tools_photo_canvas_get_drawing_window (_tmp54_); +#line 2181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp56_ = _tmp55_; +#line 2181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp57_ = self->priv->cached_grab_cursor; +#line 2181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gdk_window_set_cursor (_tmp56_, _tmp57_); +#line 2181 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp56_); +#line 14675 "EditingTools.c" + } else { + EditingToolsPhotoCanvas* _tmp58_ = NULL; + GdkWindow* _tmp59_ = NULL; + GdkWindow* _tmp60_ = NULL; + GdkCursor* _tmp61_ = NULL; +#line 2183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp58_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp59_ = editing_tools_photo_canvas_get_drawing_window (_tmp58_); +#line 2183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp60_ = _tmp59_; +#line 2183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp61_ = self->priv->cached_arrow_cursor; +#line 2183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gdk_window_set_cursor (_tmp60_, _tmp61_); +#line 2183 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp60_); +#line 14693 "EditingTools.c" + } + } +} + + +static gboolean editing_tools_redeye_tool_real_on_keypress (EditingToolsEditingTool* base, GdkEventKey* event) { + EditingToolsRedeyeTool * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + GdkEventKey* _tmp2_ = NULL; + guint _tmp3_ = 0U; + const gchar* _tmp4_ = NULL; + GdkEventKey* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; +#line 2188 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool); +#line 2188 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 2189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = event; +#line 2189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_->keyval; +#line 2189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = gdk_keyval_name (_tmp3_); +#line 2189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (g_strcmp0 (_tmp4_, "KP_Enter") == 0) { +#line 2189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = TRUE; +#line 14723 "EditingTools.c" + } else { + GdkEventKey* _tmp5_ = NULL; + guint _tmp6_ = 0U; + const gchar* _tmp7_ = NULL; +#line 2190 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = event; +#line 2190 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_->keyval; +#line 2190 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = gdk_keyval_name (_tmp6_); +#line 2190 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = g_strcmp0 (_tmp7_, "Enter") == 0; +#line 14736 "EditingTools.c" + } +#line 2189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_) { +#line 2189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = TRUE; +#line 14742 "EditingTools.c" + } else { + GdkEventKey* _tmp8_ = NULL; + guint _tmp9_ = 0U; + const gchar* _tmp10_ = NULL; +#line 2191 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = event; +#line 2191 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_->keyval; +#line 2191 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = gdk_keyval_name (_tmp9_); +#line 2191 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = g_strcmp0 (_tmp10_, "Return") == 0; +#line 14755 "EditingTools.c" + } +#line 2189 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_) { +#line 2192 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_on_close (self); +#line 2193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 2193 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 14765 "EditingTools.c" + } +#line 2196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = event; +#line 2196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_redeye_tool_parent_class)->on_keypress (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), _tmp11_); +#line 2196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp12_; +#line 2196 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 14775 "EditingTools.c" +} + + +static EditingToolsRedeyeToolRedeyeToolWindow* editing_tools_redeye_tool_redeye_tool_window_construct (GType object_type, GtkWindow* container) { + EditingToolsRedeyeToolRedeyeToolWindow * self = NULL; + GtkWindow* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + GtkScale* _tmp2_ = NULL; + GtkButton* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + GtkButton* _tmp5_ = NULL; + GtkButton* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + GtkButton* _tmp8_ = NULL; + GtkBox* layout = NULL; + GtkBox* _tmp9_ = NULL; + GtkLabel* _tmp10_ = NULL; + GtkScale* _tmp11_ = NULL; + GtkButton* _tmp12_ = NULL; + GtkButton* _tmp13_ = NULL; +#line 1881 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GTK_IS_WINDOW (container), NULL); +#line 1882 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = container; +#line 1882 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsRedeyeToolRedeyeToolWindow*) editing_tools_editing_tool_window_construct (object_type, _tmp0_); +#line 1884 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->slider; +#line 1884 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), 80, -1); +#line 1885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->slider; +#line 1885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_scale_set_draw_value (_tmp2_, FALSE); +#line 1887 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->close_button; +#line 1887 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _ ("Close the red-eye tool"); +#line 1887 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), _tmp4_); +#line 1888 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->close_button; +#line 1888 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_button_set_image_position (_tmp5_, GTK_POS_LEFT); +#line 1890 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->apply_button; +#line 1890 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _ ("Remove any red-eye effects in the selected region"); +#line 1890 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), _tmp7_); +#line 1891 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->apply_button; +#line 1891 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_button_set_image_position (_tmp8_, GTK_POS_LEFT); +#line 1893 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, EDITING_TOOLS_REDEYE_TOOL_REDEYE_TOOL_WINDOW_CONTROL_SPACING); +#line 1893 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp9_); +#line 1893 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + layout = _tmp9_; +#line 1894 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->slider_label; +#line 1894 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (layout, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget)); +#line 1895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->slider; +#line 1895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (layout, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget)); +#line 1896 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->close_button; +#line 1896 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (layout, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget)); +#line 1897 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->apply_button; +#line 1897 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (layout, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget)); +#line 1899 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (layout, gtk_widget_get_type (), GtkWidget)); +#line 1881 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (layout); +#line 1881 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 14858 "EditingTools.c" +} + + +static EditingToolsRedeyeToolRedeyeToolWindow* editing_tools_redeye_tool_redeye_tool_window_new (GtkWindow* container) { +#line 1881 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_redeye_tool_redeye_tool_window_construct (EDITING_TOOLS_REDEYE_TOOL_TYPE_REDEYE_TOOL_WINDOW, container); +#line 14865 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_redeye_tool_window_class_init (EditingToolsRedeyeToolRedeyeToolWindowClass * klass) { +#line 1869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_redeye_tool_window_parent_class = g_type_class_peek_parent (klass); +#line 1869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsRedeyeToolRedeyeToolWindowPrivate)); +#line 1869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (klass)->finalize = editing_tools_redeye_tool_redeye_tool_window_finalize; +#line 14876 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_redeye_tool_window_instance_init (EditingToolsRedeyeToolRedeyeToolWindow * self) { + const gchar* _tmp0_ = NULL; + GtkLabel* _tmp1_ = NULL; + GtkButton* _tmp2_ = NULL; + GtkButton* _tmp3_ = NULL; + GtkScale* _tmp4_ = NULL; +#line 1869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_REDEYE_TOOL_REDEYE_TOOL_WINDOW_GET_PRIVATE (self); +#line 1872 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = _ ("Size:"); +#line 1872 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp0_); +#line 1872 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp1_); +#line 1872 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->slider_label = _tmp1_; +#line 1874 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = (GtkButton*) gtk_button_new_with_mnemonic (RESOURCES_APPLY_LABEL); +#line 1874 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp2_); +#line 1874 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->apply_button = _tmp2_; +#line 1876 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = (GtkButton*) gtk_button_new_with_mnemonic (RESOURCES_CANCEL_LABEL); +#line 1876 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp3_); +#line 1876 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->close_button = _tmp3_; +#line 1878 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) EDITING_TOOLS_REDEYE_INSTANCE_MIN_RADIUS, (gdouble) EDITING_TOOLS_REDEYE_INSTANCE_MAX_RADIUS, 1.0); +#line 1878 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp4_); +#line 1878 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->slider = _tmp4_; +#line 14914 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_redeye_tool_window_finalize (GObject* obj) { + EditingToolsRedeyeToolRedeyeToolWindow * self; +#line 1869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_REDEYE_TOOL_TYPE_REDEYE_TOOL_WINDOW, EditingToolsRedeyeToolRedeyeToolWindow); +#line 1872 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->slider_label); +#line 1874 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->apply_button); +#line 1876 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->close_button); +#line 1878 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->slider); +#line 1869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (editing_tools_redeye_tool_redeye_tool_window_parent_class)->finalize (obj); +#line 14932 "EditingTools.c" +} + + +static GType editing_tools_redeye_tool_redeye_tool_window_get_type (void) { + static volatile gsize editing_tools_redeye_tool_redeye_tool_window_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_redeye_tool_redeye_tool_window_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsRedeyeToolRedeyeToolWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_redeye_tool_redeye_tool_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsRedeyeToolRedeyeToolWindow), 0, (GInstanceInitFunc) editing_tools_redeye_tool_redeye_tool_window_instance_init, NULL }; + GType editing_tools_redeye_tool_redeye_tool_window_type_id; + editing_tools_redeye_tool_redeye_tool_window_type_id = g_type_register_static (EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, "EditingToolsRedeyeToolRedeyeToolWindow", &g_define_type_info, 0); + g_once_init_leave (&editing_tools_redeye_tool_redeye_tool_window_type_id__volatile, editing_tools_redeye_tool_redeye_tool_window_type_id); + } + return editing_tools_redeye_tool_redeye_tool_window_type_id__volatile; +} + + +static void editing_tools_redeye_tool_class_init (EditingToolsRedeyeToolClass * klass) { +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_redeye_tool_parent_class = g_type_class_peek_parent (klass); +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->finalize = editing_tools_redeye_tool_finalize; +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsRedeyeToolPrivate)); +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->activate = editing_tools_redeye_tool_real_activate; +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->deactivate = editing_tools_redeye_tool_real_deactivate; +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->get_tool_window = editing_tools_redeye_tool_real_get_tool_window; +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->paint = editing_tools_redeye_tool_real_paint; +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_left_click = editing_tools_redeye_tool_real_on_left_click; +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_left_released = editing_tools_redeye_tool_real_on_left_released; +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_motion = editing_tools_redeye_tool_real_on_motion; +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_keypress = editing_tools_redeye_tool_real_on_keypress; +#line 14971 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_instance_init (EditingToolsRedeyeTool * self) { +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_REDEYE_TOOL_GET_PRIVATE (self); +#line 1903 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->thin_white_ctx = NULL; +#line 1904 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->wider_gray_ctx = NULL; +#line 1905 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->redeye_tool_window = NULL; +#line 1907 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->is_reticle_move_in_progress = FALSE; +#line 1913 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->current_pixbuf = NULL; +#line 14988 "EditingTools.c" +} + + +static void editing_tools_redeye_tool_finalize (EditingToolsEditingTool* obj) { + EditingToolsRedeyeTool * self; +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool); +#line 1903 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->thin_white_ctx); +#line 1904 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _cairo_destroy0 (self->priv->wider_gray_ctx); +#line 1905 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->redeye_tool_window); +#line 1910 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->cached_arrow_cursor); +#line 1911 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->cached_grab_cursor); +#line 1913 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->current_pixbuf); +#line 1868 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_redeye_tool_parent_class)->finalize (obj); +#line 15010 "EditingTools.c" +} + + +GType editing_tools_redeye_tool_get_type (void) { + static volatile gsize editing_tools_redeye_tool_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_redeye_tool_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsRedeyeToolClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_redeye_tool_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsRedeyeTool), 0, (GInstanceInitFunc) editing_tools_redeye_tool_instance_init, NULL }; + GType editing_tools_redeye_tool_type_id; + editing_tools_redeye_tool_type_id = g_type_register_static (EDITING_TOOLS_TYPE_EDITING_TOOL, "EditingToolsRedeyeTool", &g_define_type_info, 0); + g_once_init_leave (&editing_tools_redeye_tool_type_id__volatile, editing_tools_redeye_tool_type_id); + } + return editing_tools_redeye_tool_type_id__volatile; +} + + +static EditingToolsAdjustTool* editing_tools_adjust_tool_construct (GType object_type) { + EditingToolsAdjustTool* self = NULL; +#line 2491 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsAdjustTool*) editing_tools_editing_tool_construct (object_type, "AdjustTool"); +#line 2490 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 15032 "EditingTools.c" +} + + +static EditingToolsAdjustTool* editing_tools_adjust_tool_new (void) { +#line 2490 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_adjust_tool_construct (EDITING_TOOLS_TYPE_ADJUST_TOOL); +#line 15039 "EditingTools.c" +} + + +EditingToolsAdjustTool* editing_tools_adjust_tool_factory (void) { + EditingToolsAdjustTool* result = NULL; + EditingToolsAdjustTool* _tmp0_ = NULL; +#line 2495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = editing_tools_adjust_tool_new (); +#line 2495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp0_; +#line 2495 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 15052 "EditingTools.c" +} + + +gboolean editing_tools_adjust_tool_is_available (Photo* photo, Scaling* scaling) { + gboolean result = FALSE; +#line 2498 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PHOTO (photo), FALSE); +#line 2498 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (scaling != NULL, FALSE); +#line 2499 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 2499 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 15066 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) { +#line 2582 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_photos_altered ((EditingToolsAdjustTool*) self, items); +#line 15073 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_real_activate (EditingToolsEditingTool* base, EditingToolsPhotoCanvas* canvas) { + EditingToolsAdjustTool * self; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + GtkWindow* _tmp1_ = NULL; + GtkWindow* _tmp2_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp3_ = NULL; + Photo* photo = NULL; + EditingToolsPhotoCanvas* _tmp4_ = NULL; + Photo* _tmp5_ = NULL; + Photo* _tmp6_ = NULL; + PixelTransformationBundle* _tmp7_ = NULL; + PixelTransformationBundle* _tmp8_ = NULL; + PixelTransformer* _tmp9_ = NULL; + PixelTransformer* _tmp10_ = NULL; + ExpansionTransformation* expansion_trans = NULL; + PixelTransformationBundle* _tmp11_ = NULL; + PixelTransformation* _tmp12_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp13_ = NULL; + RGBHistogramManipulator* _tmp14_ = NULL; + ExpansionTransformation* _tmp15_ = NULL; + gint _tmp16_ = 0; + EditingToolsAdjustToolAdjustToolWindow* _tmp17_ = NULL; + RGBHistogramManipulator* _tmp18_ = NULL; + ExpansionTransformation* _tmp19_ = NULL; + gint _tmp20_ = 0; + ShadowDetailTransformation* shadows_trans = NULL; + PixelTransformationBundle* _tmp21_ = NULL; + PixelTransformation* _tmp22_ = NULL; + PixelTransformer* _tmp23_ = NULL; + ShadowDetailTransformation* _tmp24_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp25_ = NULL; + GtkScale* _tmp26_ = NULL; + ShadowDetailTransformation* _tmp27_ = NULL; + gfloat _tmp28_ = 0.0F; + HighlightDetailTransformation* highlights_trans = NULL; + PixelTransformationBundle* _tmp29_ = NULL; + PixelTransformation* _tmp30_ = NULL; + PixelTransformer* _tmp31_ = NULL; + HighlightDetailTransformation* _tmp32_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp33_ = NULL; + GtkScale* _tmp34_ = NULL; + HighlightDetailTransformation* _tmp35_ = NULL; + gfloat _tmp36_ = 0.0F; + TemperatureTransformation* temp_trans = NULL; + PixelTransformationBundle* _tmp37_ = NULL; + PixelTransformation* _tmp38_ = NULL; + PixelTransformer* _tmp39_ = NULL; + TemperatureTransformation* _tmp40_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp41_ = NULL; + GtkScale* _tmp42_ = NULL; + TemperatureTransformation* _tmp43_ = NULL; + gfloat _tmp44_ = 0.0F; + TintTransformation* tint_trans = NULL; + PixelTransformationBundle* _tmp45_ = NULL; + PixelTransformation* _tmp46_ = NULL; + PixelTransformer* _tmp47_ = NULL; + TintTransformation* _tmp48_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp49_ = NULL; + GtkScale* _tmp50_ = NULL; + TintTransformation* _tmp51_ = NULL; + gfloat _tmp52_ = 0.0F; + SaturationTransformation* sat_trans = NULL; + PixelTransformationBundle* _tmp53_ = NULL; + PixelTransformation* _tmp54_ = NULL; + PixelTransformer* _tmp55_ = NULL; + SaturationTransformation* _tmp56_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp57_ = NULL; + GtkScale* _tmp58_ = NULL; + SaturationTransformation* _tmp59_ = NULL; + gfloat _tmp60_ = 0.0F; + ExposureTransformation* exposure_trans = NULL; + PixelTransformationBundle* _tmp61_ = NULL; + PixelTransformation* _tmp62_ = NULL; + PixelTransformer* _tmp63_ = NULL; + ExposureTransformation* _tmp64_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp65_ = NULL; + GtkScale* _tmp66_ = NULL; + ExposureTransformation* _tmp67_ = NULL; + gfloat _tmp68_ = 0.0F; + EditingToolsPhotoCanvas* _tmp69_ = NULL; + EditingToolsPhotoCanvas* _tmp70_ = NULL; + GdkPixbuf* _tmp71_ = NULL; + GdkPixbuf* _tmp72_ = NULL; + GdkPixbuf* _tmp73_ = NULL; + EditingToolsPhotoCanvas* _tmp74_ = NULL; + GdkPixbuf* _tmp75_ = NULL; + GdkPixbuf* _tmp76_ = NULL; + gboolean _tmp77_ = FALSE; + GdkPixbuf* _tmp78_ = NULL; + gint _tmp79_ = 0; + gint _tmp80_ = 0; + gboolean _tmp84_ = FALSE; + gboolean _tmp85_ = FALSE; + GdkPixbuf* _tmp86_ = NULL; + gint _tmp87_ = 0; + gint _tmp88_ = 0; + GdkPixbuf* _tmp89_ = NULL; + gint _tmp90_ = 0; + gint _tmp91_ = 0; + GdkPixbuf* _tmp108_ = NULL; + GdkPixbuf* _tmp109_ = NULL; + DataCollection* owner = NULL; + EditingToolsPhotoCanvas* _tmp110_ = NULL; + Photo* _tmp111_ = NULL; + Photo* _tmp112_ = NULL; + DataCollection* _tmp113_ = NULL; + DataCollection* _tmp114_ = NULL; + DataCollection* _tmp115_ = NULL; + EditingToolsPhotoCanvas* _tmp117_ = NULL; +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustTool); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 2503 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 2503 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = editing_tools_photo_canvas_get_container (_tmp0_); +#line 2503 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_; +#line 2503 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = editing_tools_adjust_tool_adjust_tool_window_new (_tmp2_); +#line 2503 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp3_); +#line 2503 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->adjust_tool_window); +#line 2503 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->adjust_tool_window = _tmp3_; +#line 2503 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp2_); +#line 2505 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = canvas; +#line 2505 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = editing_tools_photo_canvas_get_photo (_tmp4_); +#line 2505 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo = _tmp5_; +#line 2506 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = photo; +#line 2506 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = photo_get_color_adjustments (_tmp6_); +#line 2506 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->transformations); +#line 2506 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->transformations = _tmp7_; +#line 2507 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->transformations; +#line 2507 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = pixel_transformation_bundle_generate_transformer (_tmp8_); +#line 2507 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformer_unref0 (self->priv->transformer); +#line 2507 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->transformer = _tmp9_; +#line 2510 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = pixel_transformer_new (); +#line 2510 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformer_unref0 (self->priv->histogram_transformer); +#line 2510 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->histogram_transformer = _tmp10_; +#line 2513 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->transformations; +#line 2513 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = pixel_transformation_bundle_get_transformation (_tmp11_, PIXEL_TRANSFORMATION_TYPE_TONE_EXPANSION); +#line 2513 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + expansion_trans = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_EXPANSION_TRANSFORMATION, ExpansionTransformation); +#line 2515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->priv->adjust_tool_window; +#line 2515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_->histogram_manipulator; +#line 2515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = expansion_trans; +#line 2515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = expansion_transformation_get_black_point (_tmp15_); +#line 2515 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rgb_histogram_manipulator_set_left_nub_position (_tmp14_, _tmp16_); +#line 2517 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->adjust_tool_window; +#line 2517 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_->histogram_manipulator; +#line 2517 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = expansion_trans; +#line 2517 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = expansion_transformation_get_white_point (_tmp19_); +#line 2517 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rgb_histogram_manipulator_set_right_nub_position (_tmp18_, _tmp20_); +#line 2521 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->transformations; +#line 2521 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = pixel_transformation_bundle_get_transformation (_tmp21_, PIXEL_TRANSFORMATION_TYPE_SHADOWS); +#line 2521 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + shadows_trans = G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_SHADOW_DETAIL_TRANSFORMATION, ShadowDetailTransformation); +#line 2523 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = self->priv->histogram_transformer; +#line 2523 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = shadows_trans; +#line 2523 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_attach_transformation (_tmp23_, G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_PIXEL_TRANSFORMATION, PixelTransformation)); +#line 2524 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = self->priv->adjust_tool_window; +#line 2524 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _tmp25_->shadows_slider; +#line 2524 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = shadows_trans; +#line 2524 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = shadow_detail_transformation_get_parameter (_tmp27_); +#line 2524 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_range_get_type (), GtkRange), (gdouble) _tmp28_); +#line 2527 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = self->priv->transformations; +#line 2527 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = pixel_transformation_bundle_get_transformation (_tmp29_, PIXEL_TRANSFORMATION_TYPE_HIGHLIGHTS); +#line 2527 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + highlights_trans = G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_HIGHLIGHT_DETAIL_TRANSFORMATION, HighlightDetailTransformation); +#line 2529 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = self->priv->histogram_transformer; +#line 2529 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = highlights_trans; +#line 2529 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_attach_transformation (_tmp31_, G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_PIXEL_TRANSFORMATION, PixelTransformation)); +#line 2530 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = self->priv->adjust_tool_window; +#line 2530 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = _tmp33_->highlights_slider; +#line 2530 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = highlights_trans; +#line 2530 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = highlight_detail_transformation_get_parameter (_tmp35_); +#line 2530 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_range_get_type (), GtkRange), (gdouble) _tmp36_); +#line 2533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = self->priv->transformations; +#line 2533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = pixel_transformation_bundle_get_transformation (_tmp37_, PIXEL_TRANSFORMATION_TYPE_TEMPERATURE); +#line 2533 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + temp_trans = G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, TYPE_TEMPERATURE_TRANSFORMATION, TemperatureTransformation); +#line 2535 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = self->priv->histogram_transformer; +#line 2535 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = temp_trans; +#line 2535 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_attach_transformation (_tmp39_, G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, TYPE_PIXEL_TRANSFORMATION, PixelTransformation)); +#line 2536 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = self->priv->adjust_tool_window; +#line 2536 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = _tmp41_->temperature_slider; +#line 2536 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = temp_trans; +#line 2536 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44_ = temperature_transformation_get_parameter (_tmp43_); +#line 2536 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_range_get_type (), GtkRange), (gdouble) _tmp44_); +#line 2538 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = self->priv->transformations; +#line 2538 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = pixel_transformation_bundle_get_transformation (_tmp45_, PIXEL_TRANSFORMATION_TYPE_TINT); +#line 2538 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + tint_trans = G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, TYPE_TINT_TRANSFORMATION, TintTransformation); +#line 2540 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = self->priv->histogram_transformer; +#line 2540 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp48_ = tint_trans; +#line 2540 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_attach_transformation (_tmp47_, G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, TYPE_PIXEL_TRANSFORMATION, PixelTransformation)); +#line 2541 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp49_ = self->priv->adjust_tool_window; +#line 2541 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp50_ = _tmp49_->tint_slider; +#line 2541 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp51_ = tint_trans; +#line 2541 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp52_ = tint_transformation_get_parameter (_tmp51_); +#line 2541 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, gtk_range_get_type (), GtkRange), (gdouble) _tmp52_); +#line 2544 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp53_ = self->priv->transformations; +#line 2544 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp54_ = pixel_transformation_bundle_get_transformation (_tmp53_, PIXEL_TRANSFORMATION_TYPE_SATURATION); +#line 2544 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + sat_trans = G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, TYPE_SATURATION_TRANSFORMATION, SaturationTransformation); +#line 2546 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp55_ = self->priv->histogram_transformer; +#line 2546 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp56_ = sat_trans; +#line 2546 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_attach_transformation (_tmp55_, G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, TYPE_PIXEL_TRANSFORMATION, PixelTransformation)); +#line 2547 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp57_ = self->priv->adjust_tool_window; +#line 2547 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp58_ = _tmp57_->saturation_slider; +#line 2547 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp59_ = sat_trans; +#line 2547 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp60_ = saturation_transformation_get_parameter (_tmp59_); +#line 2547 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, gtk_range_get_type (), GtkRange), (gdouble) _tmp60_); +#line 2550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp61_ = self->priv->transformations; +#line 2550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp62_ = pixel_transformation_bundle_get_transformation (_tmp61_, PIXEL_TRANSFORMATION_TYPE_EXPOSURE); +#line 2550 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + exposure_trans = G_TYPE_CHECK_INSTANCE_CAST (_tmp62_, TYPE_EXPOSURE_TRANSFORMATION, ExposureTransformation); +#line 2552 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp63_ = self->priv->histogram_transformer; +#line 2552 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp64_ = exposure_trans; +#line 2552 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_attach_transformation (_tmp63_, G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, TYPE_PIXEL_TRANSFORMATION, PixelTransformation)); +#line 2553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp65_ = self->priv->adjust_tool_window; +#line 2553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp66_ = _tmp65_->exposure_slider; +#line 2553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp67_ = exposure_trans; +#line 2553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp68_ = exposure_transformation_get_parameter (_tmp67_); +#line 2553 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, gtk_range_get_type (), GtkRange), (gdouble) _tmp68_); +#line 2555 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp69_ = canvas; +#line 2555 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_bind_canvas_handlers (self, _tmp69_); +#line 2556 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_bind_window_handlers (self); +#line 2558 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp70_ = canvas; +#line 2558 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp71_ = editing_tools_photo_canvas_get_scaled_pixbuf (_tmp70_); +#line 2558 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp72_ = _tmp71_; +#line 2558 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp73_ = gdk_pixbuf_copy (_tmp72_); +#line 2558 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->draw_to_pixbuf); +#line 2558 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->draw_to_pixbuf = _tmp73_; +#line 2558 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp72_); +#line 2559 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp74_ = canvas; +#line 2559 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp75_ = editing_tools_photo_canvas_get_scaled_pixbuf (_tmp74_); +#line 2559 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp76_ = _tmp75_; +#line 2559 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_init_fp_pixel_cache (self, _tmp76_); +#line 2559 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp76_); +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp78_ = self->priv->draw_to_pixbuf; +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp79_ = gdk_pixbuf_get_width (_tmp78_); +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp80_ = _tmp79_; +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp80_ == 1) { +#line 15430 "EditingTools.c" + GdkPixbuf* _tmp81_ = NULL; + gint _tmp82_ = 0; + gint _tmp83_ = 0; +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp81_ = self->priv->draw_to_pixbuf; +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp82_ = gdk_pixbuf_get_height (_tmp81_); +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp83_ = _tmp82_; +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp77_ = _tmp83_ == 1; +#line 15442 "EditingTools.c" + } else { +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp77_ = FALSE; +#line 15446 "EditingTools.c" + } +#line 2565 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp77_) { +#line 2566 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->disable_histogram_refresh = TRUE; +#line 15452 "EditingTools.c" + } +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp86_ = self->priv->draw_to_pixbuf; +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp87_ = gdk_pixbuf_get_width (_tmp86_); +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp88_ = _tmp87_; +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp89_ = self->priv->draw_to_pixbuf; +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp90_ = gdk_pixbuf_get_height (_tmp89_); +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp91_ = _tmp90_; +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if ((_tmp88_ * _tmp91_) > 8192) { +#line 15468 "EditingTools.c" + GdkPixbuf* _tmp92_ = NULL; + gint _tmp93_ = 0; + gint _tmp94_ = 0; +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp92_ = self->priv->draw_to_pixbuf; +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp93_ = gdk_pixbuf_get_width (_tmp92_); +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp94_ = _tmp93_; +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp85_ = _tmp94_ > 1; +#line 15480 "EditingTools.c" + } else { +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp85_ = FALSE; +#line 15484 "EditingTools.c" + } +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp85_) { +#line 15488 "EditingTools.c" + GdkPixbuf* _tmp95_ = NULL; + gint _tmp96_ = 0; + gint _tmp97_ = 0; +#line 2572 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp95_ = self->priv->draw_to_pixbuf; +#line 2572 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp96_ = gdk_pixbuf_get_height (_tmp95_); +#line 2572 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp97_ = _tmp96_; +#line 2572 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp84_ = _tmp97_ > 1; +#line 15500 "EditingTools.c" + } else { +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp84_ = FALSE; +#line 15504 "EditingTools.c" + } +#line 2571 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp84_) { +#line 15508 "EditingTools.c" + GdkPixbuf* _tmp98_ = NULL; + GdkPixbuf* _tmp99_ = NULL; + gint _tmp100_ = 0; + gint _tmp101_ = 0; + GdkPixbuf* _tmp102_ = NULL; + gint _tmp103_ = 0; + gint _tmp104_ = 0; + GdkPixbuf* _tmp105_ = NULL; +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp98_ = self->priv->draw_to_pixbuf; +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp99_ = self->priv->draw_to_pixbuf; +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp100_ = gdk_pixbuf_get_width (_tmp99_); +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp101_ = _tmp100_; +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp102_ = self->priv->draw_to_pixbuf; +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp103_ = gdk_pixbuf_get_height (_tmp102_); +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp104_ = _tmp103_; +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp105_ = gdk_pixbuf_scale_simple (_tmp98_, _tmp101_ / 2, _tmp104_ / 2, GDK_INTERP_HYPER); +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->histogram_pixbuf); +#line 2573 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->histogram_pixbuf = _tmp105_; +#line 15537 "EditingTools.c" + } else { + GdkPixbuf* _tmp106_ = NULL; + GdkPixbuf* _tmp107_ = NULL; +#line 2576 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp106_ = self->priv->draw_to_pixbuf; +#line 2576 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp107_ = gdk_pixbuf_copy (_tmp106_); +#line 2576 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->histogram_pixbuf); +#line 2576 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->histogram_pixbuf = _tmp107_; +#line 15549 "EditingTools.c" + } +#line 2578 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp108_ = self->priv->histogram_pixbuf; +#line 2578 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp109_ = gdk_pixbuf_copy (_tmp108_); +#line 2578 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->virgin_histogram_pixbuf); +#line 2578 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->virgin_histogram_pixbuf = _tmp109_; +#line 2580 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp110_ = canvas; +#line 2580 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp111_ = editing_tools_photo_canvas_get_photo (_tmp110_); +#line 2580 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp112_ = _tmp111_; +#line 2580 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp113_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (_tmp112_, TYPE_DATA_OBJECT, DataObject)); +#line 2580 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp114_ = _tmp113_; +#line 2580 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp112_); +#line 2580 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + owner = _tmp114_; +#line 2581 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp115_ = owner; +#line 2581 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp115_ != NULL) { +#line 15577 "EditingTools.c" + DataCollection* _tmp116_ = NULL; +#line 2582 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp116_ = owner; +#line 2582 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp116_, "items-altered", (GCallback) _editing_tools_adjust_tool_on_photos_altered_data_collection_items_altered, self); +#line 15583 "EditingTools.c" + } +#line 2584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp117_ = canvas; +#line 2584 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_adjust_tool_parent_class)->activate (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), _tmp117_); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _data_collection_unref0 (owner); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (exposure_trans); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (sat_trans); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (tint_trans); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (temp_trans); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (highlights_trans); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (shadows_trans); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (expansion_trans); +#line 2502 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (photo); +#line 15607 "EditingTools.c" +} + + +static EditingToolsEditingToolWindow* editing_tools_adjust_tool_real_get_tool_window (EditingToolsEditingTool* base) { + EditingToolsAdjustTool * self; + EditingToolsEditingToolWindow* result = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + EditingToolsEditingToolWindow* _tmp1_ = NULL; +#line 2587 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustTool); +#line 2588 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2588 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow)); +#line 2588 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp1_; +#line 2588 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 15626 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_real_deactivate (EditingToolsEditingTool* base) { + EditingToolsAdjustTool * self; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp10_ = NULL; +#line 2591 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustTool); +#line 2592 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2592 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ != NULL) { +#line 15640 "EditingTools.c" + DataCollection* owner = NULL; + EditingToolsPhotoCanvas* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + DataCollection* _tmp4_ = NULL; + DataCollection* _tmp5_ = NULL; + DataCollection* _tmp6_ = NULL; + EditingToolsPhotoCanvas* _tmp9_ = NULL; +#line 2593 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2593 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = editing_tools_photo_canvas_get_photo (_tmp1_); +#line 2593 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 2593 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject)); +#line 2593 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_; +#line 2593 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp3_); +#line 2593 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + owner = _tmp5_; +#line 2594 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = owner; +#line 2594 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp6_ != NULL) { +#line 15667 "EditingTools.c" + DataCollection* _tmp7_ = NULL; + guint _tmp8_ = 0U; +#line 2595 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = owner; +#line 2595 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp8_, NULL, FALSE); +#line 2595 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_photos_altered_data_collection_items_altered, self); +#line 15676 "EditingTools.c" + } +#line 2597 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2597 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_unbind_canvas_handlers (self, _tmp9_); +#line 2592 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _data_collection_unref0 (owner); +#line 15684 "EditingTools.c" + } +#line 2600 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->adjust_tool_window; +#line 2600 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp10_ != NULL) { +#line 15690 "EditingTools.c" + EditingToolsAdjustToolAdjustToolWindow* _tmp11_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp12_ = NULL; +#line 2601 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_unbind_window_handlers (self); +#line 2602 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->adjust_tool_window; +#line 2602 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget)); +#line 2603 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->adjust_tool_window; +#line 2603 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget)); +#line 2604 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->adjust_tool_window); +#line 2604 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->adjust_tool_window = NULL; +#line 15707 "EditingTools.c" + } +#line 2607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->draw_to_pixbuf); +#line 2607 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->draw_to_pixbuf = NULL; +#line 2608 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->fp_pixel_cache = (g_free (self->priv->fp_pixel_cache), NULL); +#line 2608 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->fp_pixel_cache = NULL; +#line 2608 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->fp_pixel_cache_length1 = 0; +#line 2608 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->_fp_pixel_cache_size_ = self->priv->fp_pixel_cache_length1; +#line 2610 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_adjust_tool_parent_class)->deactivate (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 15723 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_real_paint (EditingToolsEditingTool* base, cairo_t* ctx) { + EditingToolsAdjustTool * self; + gboolean _tmp0_ = FALSE; + EditingToolsPhotoCanvas* _tmp10_ = NULL; + GdkPixbuf* _tmp11_ = NULL; +#line 2613 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustTool); +#line 2613 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (ctx != NULL); +#line 2614 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->suppress_effect_redraw; +#line 2614 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp0_) { +#line 15740 "EditingTools.c" + PixelTransformer* _tmp1_ = NULL; + GdkPixbuf* _tmp2_ = NULL; + PixelTransformer* _tmp3_ = NULL; + GdkPixbuf* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; +#line 2615 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->transformer; +#line 2615 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->draw_to_pixbuf; +#line 2615 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_transform_from_fp (_tmp1_, &self->priv->fp_pixel_cache, &self->priv->fp_pixel_cache_length1, _tmp2_); +#line 2616 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->histogram_transformer; +#line 2616 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->virgin_histogram_pixbuf; +#line 2616 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->histogram_pixbuf; +#line 2616 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_transform_to_other_pixbuf (_tmp3_, _tmp4_, _tmp5_, NULL); +#line 2618 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->disable_histogram_refresh; +#line 2618 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp6_) { +#line 15765 "EditingTools.c" + EditingToolsAdjustToolAdjustToolWindow* _tmp7_ = NULL; + RGBHistogramManipulator* _tmp8_ = NULL; + GdkPixbuf* _tmp9_ = NULL; +#line 2619 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = self->priv->adjust_tool_window; +#line 2619 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_->histogram_manipulator; +#line 2619 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->histogram_pixbuf; +#line 2619 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rgb_histogram_manipulator_update_histogram (_tmp8_, _tmp9_); +#line 15777 "EditingTools.c" + } + } +#line 2622 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2622 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->draw_to_pixbuf; +#line 2622 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_paint_pixbuf (_tmp10_, _tmp11_); +#line 15786 "EditingTools.c" +} + + +static GdkPixbuf* editing_tools_adjust_tool_real_get_display_pixbuf (EditingToolsEditingTool* base, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error) { + EditingToolsAdjustTool * self; + Dimensions _vala_max_dim = {0}; + GdkPixbuf* result = NULL; + Photo* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + Photo* _tmp2_ = NULL; + Dimensions _tmp3_ = {0}; + GdkPixbuf* _tmp4_ = NULL; + Photo* _tmp5_ = NULL; + Scaling _tmp6_ = {0}; + GdkPixbuf* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; + GError * _inner_error_ = NULL; +#line 2625 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustTool); +#line 2625 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (scaling != NULL, NULL); +#line 2625 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PHOTO (photo), NULL); +#line 2627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = photo; +#line 2627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = photo_has_color_adjustments (_tmp0_); +#line 2627 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp1_) { +#line 2628 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + dimensions_init (&_vala_max_dim, 0, 0); +#line 2630 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = NULL; +#line 2630 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (max_dim) { +#line 2630 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *max_dim = _vala_max_dim; +#line 15824 "EditingTools.c" + } +#line 2630 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 15828 "EditingTools.c" + } +#line 2633 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = photo; +#line 2633 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp3_); +#line 2633 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_max_dim = _tmp3_; +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = photo; +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = *scaling; +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = photo_get_pixbuf_with_options (_tmp5_, &_tmp6_, PHOTO_EXCEPTION_ADJUST, BACKING_FETCH_MODE_BASELINE, &_inner_error_); +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp7_; +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_propagate_error (error, _inner_error_); +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return NULL; +#line 15850 "EditingTools.c" + } +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp4_; +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = NULL; +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp8_; +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp4_); +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (max_dim) { +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + *max_dim = _vala_max_dim; +#line 15864 "EditingTools.c" + } +#line 2635 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 15868 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_reset (EditingToolsAdjustTool* self) { + EditingToolsAdjustToolAdjustResetCommand* command = NULL; + PixelTransformationBundle* _tmp0_ = NULL; + EditingToolsAdjustToolAdjustResetCommand* _tmp1_ = NULL; + CommandManager* _tmp2_ = NULL; + CommandManager* _tmp3_ = NULL; +#line 2638 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2639 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->transformations; +#line 2639 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = editing_tools_adjust_tool_adjust_reset_command_new (self, _tmp0_); +#line 2639 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command = _tmp1_; +#line 2640 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = app_window_get_command_manager (); +#line 2640 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 2640 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command_manager_execute (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (command, TYPE_COMMAND, Command)); +#line 2640 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _command_manager_unref0 (_tmp3_); +#line 2638 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (command); +#line 15896 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_ok (EditingToolsAdjustTool* self) { + EditingToolsEditingToolWindow* _tmp0_ = NULL; + EditingToolsEditingToolWindow* _tmp1_ = NULL; + EditingToolsPhotoCanvas* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + Photo* _tmp4_ = NULL; + PixelTransformationBundle* _tmp5_ = NULL; + AdjustColorsSingleCommand* _tmp6_ = NULL; + AdjustColorsSingleCommand* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; + EditingToolsPhotoCanvas* _tmp9_ = NULL; + Photo* _tmp10_ = NULL; + Photo* _tmp11_ = NULL; + Dimensions _tmp12_ = {0}; +#line 2643 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2644 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->suppress_effect_redraw = TRUE; +#line 2646 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = editing_tools_editing_tool_get_tool_window (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 2646 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_; +#line 2646 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget)); +#line 2646 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp1_); +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = editing_tools_photo_canvas_get_photo (_tmp2_); +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->transformations; +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = adjust_colors_single_command_new (_tmp4_, _tmp5_, RESOURCES_ADJUST_LABEL, RESOURCES_ADJUST_TOOLTIP); +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_; +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->draw_to_pixbuf; +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = editing_tools_photo_canvas_get_photo (_tmp9_); +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_; +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp12_); +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), "applied", G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_COMMAND, Command), _tmp8_, &_tmp12_, FALSE); +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp11_); +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp7_); +#line 2648 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp4_); +#line 15956 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_update_transformations (EditingToolsAdjustTool* self, PixelTransformationBundle* new_transformations) { +#line 2653 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2653 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (IS_PIXEL_TRANSFORMATION_BUNDLE (new_transformations)); +#line 15965 "EditingTools.c" + { + GeeIterator* _transformation_it = NULL; + PixelTransformationBundle* _tmp0_ = NULL; + GeeIterable* _tmp1_ = NULL; + GeeIterable* _tmp2_ = NULL; + GeeIterator* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = new_transformations; +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = pixel_transformation_bundle_get_transformations (_tmp0_); +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_; +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = gee_iterable_iterator (_tmp2_); +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp2_); +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _transformation_it = _tmp4_; +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + while (TRUE) { +#line 15989 "EditingTools.c" + GeeIterator* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + PixelTransformation* transformation = NULL; + GeeIterator* _tmp7_ = NULL; + gpointer _tmp8_ = NULL; + PixelTransformation* _tmp9_ = NULL; +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _transformation_it; +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = gee_iterator_next (_tmp5_); +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp6_) { +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 16004 "EditingTools.c" + } +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _transformation_it; +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = gee_iterator_get (_tmp7_); +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + transformation = (PixelTransformation*) _tmp8_; +#line 2655 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = transformation; +#line 2655 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_update_transformation (self, _tmp9_); +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (transformation); +#line 16018 "EditingTools.c" + } +#line 2654 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_transformation_it); +#line 16022 "EditingTools.c" + } +} + + +static void editing_tools_adjust_tool_update_transformation (EditingToolsAdjustTool* self, PixelTransformation* new_transformation) { + PixelTransformation* old_transformation = NULL; + PixelTransformationBundle* _tmp0_ = NULL; + PixelTransformation* _tmp1_ = NULL; + PixelTransformationType _tmp2_ = 0; + PixelTransformation* _tmp3_ = NULL; + PixelTransformer* _tmp4_ = NULL; + PixelTransformation* _tmp5_ = NULL; + PixelTransformation* _tmp6_ = NULL; + PixelTransformation* _tmp7_ = NULL; + PixelTransformationType _tmp8_ = 0; + PixelTransformationBundle* _tmp12_ = NULL; + PixelTransformation* _tmp13_ = NULL; +#line 2658 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2658 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (IS_PIXEL_TRANSFORMATION (new_transformation)); +#line 2659 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->transformations; +#line 2659 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = new_transformation; +#line 2659 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = pixel_transformation_get_transformation_type (_tmp1_); +#line 2659 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = pixel_transformation_bundle_get_transformation (_tmp0_, _tmp2_); +#line 2659 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + old_transformation = _tmp3_; +#line 2662 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->transformer; +#line 2662 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = old_transformation; +#line 2662 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = new_transformation; +#line 2662 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_replace_transformation (_tmp4_, _tmp5_, _tmp6_); +#line 2663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = new_transformation; +#line 2663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = pixel_transformation_get_transformation_type (_tmp7_); +#line 2663 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp8_ != PIXEL_TRANSFORMATION_TYPE_TONE_EXPANSION) { +#line 16068 "EditingTools.c" + PixelTransformer* _tmp9_ = NULL; + PixelTransformation* _tmp10_ = NULL; + PixelTransformation* _tmp11_ = NULL; +#line 2664 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->histogram_transformer; +#line 2664 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = old_transformation; +#line 2664 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = new_transformation; +#line 2664 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformer_replace_transformation (_tmp9_, _tmp10_, _tmp11_); +#line 16080 "EditingTools.c" + } +#line 2666 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->transformations; +#line 2666 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = new_transformation; +#line 2666 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformation_bundle_set (_tmp12_, _tmp13_); +#line 2658 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (old_transformation); +#line 16090 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_slider_updated (EditingToolsAdjustTool* self, PixelTransformation* new_transformation, const gchar* name) { + PixelTransformation* old_transformation = NULL; + PixelTransformationBundle* _tmp0_ = NULL; + PixelTransformation* _tmp1_ = NULL; + PixelTransformationType _tmp2_ = 0; + PixelTransformation* _tmp3_ = NULL; + EditingToolsAdjustToolSliderAdjustmentCommand* command = NULL; + PixelTransformation* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + EditingToolsAdjustToolSliderAdjustmentCommand* _tmp6_ = NULL; + CommandManager* _tmp7_ = NULL; + CommandManager* _tmp8_ = NULL; +#line 2669 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2669 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (IS_PIXEL_TRANSFORMATION (new_transformation)); +#line 2669 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (name != NULL); +#line 2670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->transformations; +#line 2670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = new_transformation; +#line 2670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = pixel_transformation_get_transformation_type (_tmp1_); +#line 2670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = pixel_transformation_bundle_get_transformation (_tmp0_, _tmp2_); +#line 2670 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + old_transformation = _tmp3_; +#line 2672 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = new_transformation; +#line 2672 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = name; +#line 2672 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = editing_tools_adjust_tool_slider_adjustment_command_new (self, old_transformation, _tmp4_, _tmp5_); +#line 2672 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command = _tmp6_; +#line 2674 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = app_window_get_command_manager (); +#line 2674 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_; +#line 2674 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command_manager_execute (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (command, TYPE_COMMAND, Command)); +#line 2674 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _command_manager_unref0 (_tmp8_); +#line 2669 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (command); +#line 2669 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (old_transformation); +#line 16142 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_delayed_temperature_adjustment_one_shot_callback (gpointer self) { +#line 2679 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_delayed_temperature_adjustment ((EditingToolsAdjustTool*) self); +#line 16149 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_temperature_adjustment (EditingToolsAdjustTool* self) { + OneShotScheduler* _tmp0_ = NULL; + OneShotScheduler* _tmp2_ = NULL; +#line 2677 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2678 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->temperature_scheduler; +#line 2678 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == NULL) { +#line 16162 "EditingTools.c" + OneShotScheduler* _tmp1_ = NULL; +#line 2679 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = one_shot_scheduler_new ("temperature", _editing_tools_adjust_tool_on_delayed_temperature_adjustment_one_shot_callback, self); +#line 2679 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->temperature_scheduler); +#line 2679 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->temperature_scheduler = _tmp1_; +#line 16170 "EditingTools.c" + } +#line 2681 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->temperature_scheduler; +#line 2681 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + one_shot_scheduler_after_timeout (_tmp2_, EDITING_TOOLS_ADJUST_TOOL_SLIDER_DELAY_MSEC, TRUE); +#line 16176 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_delayed_temperature_adjustment (EditingToolsAdjustTool* self) { + TemperatureTransformation* new_temp_trans = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + gdouble _tmp2_ = 0.0; + TemperatureTransformation* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 2684 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2685 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2685 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->temperature_slider; +#line 2685 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange)); +#line 2685 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = temperature_transformation_new ((gfloat) _tmp2_); +#line 2685 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_temp_trans = _tmp3_; +#line 2687 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _ ("Temperature"); +#line 2687 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_slider_updated (self, G_TYPE_CHECK_INSTANCE_CAST (new_temp_trans, TYPE_PIXEL_TRANSFORMATION, PixelTransformation), _tmp4_); +#line 2684 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (new_temp_trans); +#line 16205 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_delayed_tint_adjustment_one_shot_callback (gpointer self) { +#line 2692 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_delayed_tint_adjustment ((EditingToolsAdjustTool*) self); +#line 16212 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_tint_adjustment (EditingToolsAdjustTool* self) { + OneShotScheduler* _tmp0_ = NULL; + OneShotScheduler* _tmp2_ = NULL; +#line 2690 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2691 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->tint_scheduler; +#line 2691 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == NULL) { +#line 16225 "EditingTools.c" + OneShotScheduler* _tmp1_ = NULL; +#line 2692 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = one_shot_scheduler_new ("tint", _editing_tools_adjust_tool_on_delayed_tint_adjustment_one_shot_callback, self); +#line 2692 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->tint_scheduler); +#line 2692 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->tint_scheduler = _tmp1_; +#line 16233 "EditingTools.c" + } +#line 2694 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->tint_scheduler; +#line 2694 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + one_shot_scheduler_after_timeout (_tmp2_, EDITING_TOOLS_ADJUST_TOOL_SLIDER_DELAY_MSEC, TRUE); +#line 16239 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_delayed_tint_adjustment (EditingToolsAdjustTool* self) { + TintTransformation* new_tint_trans = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + gdouble _tmp2_ = 0.0; + TintTransformation* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 2697 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2698 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2698 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->tint_slider; +#line 2698 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange)); +#line 2698 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = tint_transformation_new ((gfloat) _tmp2_); +#line 2698 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_tint_trans = _tmp3_; +#line 2700 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _ ("Tint"); +#line 2700 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_slider_updated (self, G_TYPE_CHECK_INSTANCE_CAST (new_tint_trans, TYPE_PIXEL_TRANSFORMATION, PixelTransformation), _tmp4_); +#line 2697 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (new_tint_trans); +#line 16268 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_delayed_saturation_adjustment_one_shot_callback (gpointer self) { +#line 2705 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_delayed_saturation_adjustment ((EditingToolsAdjustTool*) self); +#line 16275 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_saturation_adjustment (EditingToolsAdjustTool* self) { + OneShotScheduler* _tmp0_ = NULL; + OneShotScheduler* _tmp2_ = NULL; +#line 2703 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2704 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->saturation_scheduler; +#line 2704 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == NULL) { +#line 16288 "EditingTools.c" + OneShotScheduler* _tmp1_ = NULL; +#line 2705 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = one_shot_scheduler_new ("saturation", _editing_tools_adjust_tool_on_delayed_saturation_adjustment_one_shot_callback, self); +#line 2705 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->saturation_scheduler); +#line 2705 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->saturation_scheduler = _tmp1_; +#line 16296 "EditingTools.c" + } +#line 2707 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->saturation_scheduler; +#line 2707 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + one_shot_scheduler_after_timeout (_tmp2_, EDITING_TOOLS_ADJUST_TOOL_SLIDER_DELAY_MSEC, TRUE); +#line 16302 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_delayed_saturation_adjustment (EditingToolsAdjustTool* self) { + SaturationTransformation* new_sat_trans = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + gdouble _tmp2_ = 0.0; + SaturationTransformation* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 2710 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->saturation_slider; +#line 2711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange)); +#line 2711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = saturation_transformation_new ((gfloat) _tmp2_); +#line 2711 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_sat_trans = _tmp3_; +#line 2713 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _ ("Saturation"); +#line 2713 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_slider_updated (self, G_TYPE_CHECK_INSTANCE_CAST (new_sat_trans, TYPE_PIXEL_TRANSFORMATION, PixelTransformation), _tmp4_); +#line 2710 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (new_sat_trans); +#line 16331 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_delayed_exposure_adjustment_one_shot_callback (gpointer self) { +#line 2718 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_delayed_exposure_adjustment ((EditingToolsAdjustTool*) self); +#line 16338 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_exposure_adjustment (EditingToolsAdjustTool* self) { + OneShotScheduler* _tmp0_ = NULL; + OneShotScheduler* _tmp2_ = NULL; +#line 2716 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2717 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->exposure_scheduler; +#line 2717 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == NULL) { +#line 16351 "EditingTools.c" + OneShotScheduler* _tmp1_ = NULL; +#line 2718 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = one_shot_scheduler_new ("exposure", _editing_tools_adjust_tool_on_delayed_exposure_adjustment_one_shot_callback, self); +#line 2718 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->exposure_scheduler); +#line 2718 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->exposure_scheduler = _tmp1_; +#line 16359 "EditingTools.c" + } +#line 2720 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->exposure_scheduler; +#line 2720 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + one_shot_scheduler_after_timeout (_tmp2_, EDITING_TOOLS_ADJUST_TOOL_SLIDER_DELAY_MSEC, TRUE); +#line 16365 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_delayed_exposure_adjustment (EditingToolsAdjustTool* self) { + ExposureTransformation* new_exp_trans = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + gdouble _tmp2_ = 0.0; + ExposureTransformation* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 2723 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->exposure_slider; +#line 2724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange)); +#line 2724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = exposure_transformation_new ((gfloat) _tmp2_); +#line 2724 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_exp_trans = _tmp3_; +#line 2726 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _ ("Exposure"); +#line 2726 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_slider_updated (self, G_TYPE_CHECK_INSTANCE_CAST (new_exp_trans, TYPE_PIXEL_TRANSFORMATION, PixelTransformation), _tmp4_); +#line 2723 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (new_exp_trans); +#line 16394 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_delayed_shadows_adjustment_one_shot_callback (gpointer self) { +#line 2731 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_delayed_shadows_adjustment ((EditingToolsAdjustTool*) self); +#line 16401 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_shadows_adjustment (EditingToolsAdjustTool* self) { + OneShotScheduler* _tmp0_ = NULL; + OneShotScheduler* _tmp2_ = NULL; +#line 2729 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2730 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->shadows_scheduler; +#line 2730 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == NULL) { +#line 16414 "EditingTools.c" + OneShotScheduler* _tmp1_ = NULL; +#line 2731 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = one_shot_scheduler_new ("shadows", _editing_tools_adjust_tool_on_delayed_shadows_adjustment_one_shot_callback, self); +#line 2731 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->shadows_scheduler); +#line 2731 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->shadows_scheduler = _tmp1_; +#line 16422 "EditingTools.c" + } +#line 2733 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->shadows_scheduler; +#line 2733 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + one_shot_scheduler_after_timeout (_tmp2_, EDITING_TOOLS_ADJUST_TOOL_SLIDER_DELAY_MSEC, TRUE); +#line 16428 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_delayed_shadows_adjustment (EditingToolsAdjustTool* self) { + ShadowDetailTransformation* new_shadows_trans = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + gdouble _tmp2_ = 0.0; + ShadowDetailTransformation* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 2736 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2737 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2737 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->shadows_slider; +#line 2737 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange)); +#line 2737 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = shadow_detail_transformation_new ((gfloat) _tmp2_); +#line 2737 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_shadows_trans = _tmp3_; +#line 2739 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _ ("Shadows"); +#line 2739 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_slider_updated (self, G_TYPE_CHECK_INSTANCE_CAST (new_shadows_trans, TYPE_PIXEL_TRANSFORMATION, PixelTransformation), _tmp4_); +#line 2736 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (new_shadows_trans); +#line 16457 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_delayed_highlights_adjustment_one_shot_callback (gpointer self) { +#line 2744 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_delayed_highlights_adjustment ((EditingToolsAdjustTool*) self); +#line 16464 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_highlights_adjustment (EditingToolsAdjustTool* self) { + OneShotScheduler* _tmp0_ = NULL; + OneShotScheduler* _tmp2_ = NULL; +#line 2742 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2743 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->highlights_scheduler; +#line 2743 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == NULL) { +#line 16477 "EditingTools.c" + OneShotScheduler* _tmp1_ = NULL; +#line 2744 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = one_shot_scheduler_new ("highlights", _editing_tools_adjust_tool_on_delayed_highlights_adjustment_one_shot_callback, self); +#line 2744 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->highlights_scheduler); +#line 2744 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->highlights_scheduler = _tmp1_; +#line 16485 "EditingTools.c" + } +#line 2746 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->highlights_scheduler; +#line 2746 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + one_shot_scheduler_after_timeout (_tmp2_, EDITING_TOOLS_ADJUST_TOOL_SLIDER_DELAY_MSEC, TRUE); +#line 16491 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_delayed_highlights_adjustment (EditingToolsAdjustTool* self) { + HighlightDetailTransformation* new_highlights_trans = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + gdouble _tmp2_ = 0.0; + HighlightDetailTransformation* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 2749 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2750 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2750 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->highlights_slider; +#line 2750 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange)); +#line 2750 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = highlight_detail_transformation_new ((gfloat) _tmp2_); +#line 2750 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_highlights_trans = _tmp3_; +#line 2752 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _ ("Highlights"); +#line 2752 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_slider_updated (self, G_TYPE_CHECK_INSTANCE_CAST (new_highlights_trans, TYPE_PIXEL_TRANSFORMATION, PixelTransformation), _tmp4_); +#line 2749 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (new_highlights_trans); +#line 16520 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_histogram_constraint (EditingToolsAdjustTool* self) { + gint expansion_black_point = 0; + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + RGBHistogramManipulator* _tmp1_ = NULL; + gint _tmp2_ = 0; + gint expansion_white_point = 0; + EditingToolsAdjustToolAdjustToolWindow* _tmp3_ = NULL; + RGBHistogramManipulator* _tmp4_ = NULL; + gint _tmp5_ = 0; + ExpansionTransformation* new_exp_trans = NULL; + ExpansionTransformation* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; +#line 2755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->histogram_manipulator; +#line 2756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = rgb_histogram_manipulator_get_left_nub_position (_tmp1_); +#line 2756 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + expansion_black_point = _tmp2_; +#line 2758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->adjust_tool_window; +#line 2758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_->histogram_manipulator; +#line 2758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = rgb_histogram_manipulator_get_right_nub_position (_tmp4_); +#line 2758 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + expansion_white_point = _tmp5_; +#line 2760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = expansion_transformation_new_from_extrema (expansion_black_point, expansion_white_point); +#line 2760 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + new_exp_trans = _tmp6_; +#line 2762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _ ("Contrast Expansion"); +#line 2762 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_slider_updated (self, G_TYPE_CHECK_INSTANCE_CAST (new_exp_trans, TYPE_PIXEL_TRANSFORMATION, PixelTransformation), _tmp7_); +#line 2755 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (new_exp_trans); +#line 16564 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_canvas_resize (EditingToolsAdjustTool* self) { + EditingToolsPhotoCanvas* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; + GdkPixbuf* _tmp2_ = NULL; + GdkPixbuf* _tmp3_ = NULL; + EditingToolsPhotoCanvas* _tmp4_ = NULL; + GdkPixbuf* _tmp5_ = NULL; + GdkPixbuf* _tmp6_ = NULL; +#line 2765 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = editing_tools_photo_canvas_get_scaled_pixbuf (_tmp0_); +#line 2766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_; +#line 2766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = gdk_pixbuf_copy (_tmp2_); +#line 2766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->draw_to_pixbuf); +#line 2766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->draw_to_pixbuf = _tmp3_; +#line 2766 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp2_); +#line 2767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = editing_tools_photo_canvas_get_scaled_pixbuf (_tmp4_); +#line 2767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_; +#line 2767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_init_fp_pixel_cache (self, _tmp6_); +#line 2767 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp6_); +#line 16602 "EditingTools.c" +} + + +static gboolean editing_tools_adjust_tool_on_hscale_reset (EditingToolsAdjustTool* self, GtkWidget* widget, GdkEventButton* event) { + gboolean result = FALSE; + GtkScale* source = NULL; + GtkWidget* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + GdkEventButton* _tmp4_ = NULL; + guint _tmp5_ = 0U; +#line 2770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self), FALSE); +#line 2770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); +#line 2770 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 2771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = widget; +#line 2771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_scale_get_type (), GtkScale)); +#line 2771 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + source = _tmp1_; +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = event; +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_->button; +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp5_ == ((guint) 1)) { +#line 16633 "EditingTools.c" + GdkEventButton* _tmp6_ = NULL; + GdkEventType _tmp7_ = 0; +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = event; +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_->type; +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp7_ == GDK_BUTTON_PRESS; +#line 16642 "EditingTools.c" + } else { +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = FALSE; +#line 16646 "EditingTools.c" + } +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp3_) { +#line 16650 "EditingTools.c" + GdkEventButton* _tmp8_ = NULL; + GdkModifierType _tmp9_ = 0; + gboolean _tmp10_ = FALSE; +#line 2774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = event; +#line 2774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_->state; +#line 2774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = has_only_key_modifier (_tmp9_, GDK_CONTROL_MASK); +#line 2774 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp10_; +#line 16662 "EditingTools.c" + } else { +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = FALSE; +#line 16666 "EditingTools.c" + } +#line 2773 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp2_) { +#line 16670 "EditingTools.c" + GtkScale* _tmp11_ = NULL; +#line 2776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = source; +#line 2776 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_range_get_type (), GtkRange), (gdouble) 0); +#line 2778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 2778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (source); +#line 2778 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 16682 "EditingTools.c" + } +#line 2781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 2781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (source); +#line 2781 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 16690 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_canvas_resize_editing_tools_photo_canvas_resized_scaled_pixbuf (EditingToolsPhotoCanvas* _sender, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position, gpointer self) { +#line 2785 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_canvas_resize ((EditingToolsAdjustTool*) self); +#line 16697 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_bind_canvas_handlers (EditingToolsAdjustTool* self, EditingToolsPhotoCanvas* canvas) { + EditingToolsPhotoCanvas* _tmp0_ = NULL; +#line 2784 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2784 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 2785 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 2785 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp0_, "resized-scaled-pixbuf", (GCallback) _editing_tools_adjust_tool_on_canvas_resize_editing_tools_photo_canvas_resized_scaled_pixbuf, self); +#line 16711 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_unbind_canvas_handlers (EditingToolsAdjustTool* self, EditingToolsPhotoCanvas* canvas) { + EditingToolsPhotoCanvas* _tmp0_ = NULL; + guint _tmp1_ = 0U; +#line 2788 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2788 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_PHOTO_CANVAS (canvas)); +#line 2789 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = canvas; +#line 2789 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("resized-scaled-pixbuf", EDITING_TOOLS_TYPE_PHOTO_CANVAS, &_tmp1_, NULL, FALSE); +#line 2789 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_canvas_resize_editing_tools_photo_canvas_resized_scaled_pixbuf, self); +#line 16728 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_ok_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 2793 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_ok ((EditingToolsAdjustTool*) self); +#line 16735 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_reset_gtk_button_clicked (GtkButton* _sender, gpointer self) { +#line 2794 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_reset ((EditingToolsAdjustTool*) self); +#line 16742 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_exposure_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self) { +#line 2796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_exposure_adjustment ((EditingToolsAdjustTool*) self); +#line 16749 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_saturation_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self) { +#line 2797 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_saturation_adjustment ((EditingToolsAdjustTool*) self); +#line 16756 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_tint_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self) { +#line 2798 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_tint_adjustment ((EditingToolsAdjustTool*) self); +#line 16763 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_temperature_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self) { +#line 2799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_temperature_adjustment ((EditingToolsAdjustTool*) self); +#line 16770 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_shadows_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self) { +#line 2800 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_shadows_adjustment ((EditingToolsAdjustTool*) self); +#line 16777 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_highlights_adjustment_gtk_range_value_changed (GtkRange* _sender, gpointer self) { +#line 2801 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_highlights_adjustment ((EditingToolsAdjustTool*) self); +#line 16784 "EditingTools.c" +} + + +static void _editing_tools_adjust_tool_on_histogram_constraint_rgb_histogram_manipulator_nub_position_changed (RGBHistogramManipulator* _sender, gpointer self) { +#line 2802 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_histogram_constraint ((EditingToolsAdjustTool*) self); +#line 16791 "EditingTools.c" +} + + +static gboolean _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) { + gboolean result; + result = editing_tools_adjust_tool_on_hscale_reset ((EditingToolsAdjustTool*) self, _sender, event); +#line 2804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 16800 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_bind_window_handlers (EditingToolsAdjustTool* self) { + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + GtkButton* _tmp1_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp2_ = NULL; + GtkButton* _tmp3_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp4_ = NULL; + GtkButton* _tmp5_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp6_ = NULL; + GtkScale* _tmp7_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp8_ = NULL; + GtkScale* _tmp9_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp10_ = NULL; + GtkScale* _tmp11_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp12_ = NULL; + GtkScale* _tmp13_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp14_ = NULL; + GtkScale* _tmp15_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp16_ = NULL; + GtkScale* _tmp17_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp18_ = NULL; + RGBHistogramManipulator* _tmp19_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp20_ = NULL; + GtkScale* _tmp21_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp22_ = NULL; + GtkScale* _tmp23_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp24_ = NULL; + GtkScale* _tmp25_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp26_ = NULL; + GtkScale* _tmp27_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp28_ = NULL; + GtkScale* _tmp29_ = NULL; + EditingToolsAdjustToolAdjustToolWindow* _tmp30_ = NULL; + GtkScale* _tmp31_ = NULL; +#line 2792 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2793 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2793 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->ok_button; +#line 2793 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp1_, "clicked", (GCallback) _editing_tools_adjust_tool_on_ok_gtk_button_clicked, self); +#line 2794 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = self->priv->adjust_tool_window; +#line 2794 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_->reset_button; +#line 2794 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp3_, "clicked", (GCallback) _editing_tools_adjust_tool_on_reset_gtk_button_clicked, self); +#line 2795 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->adjust_tool_window; +#line 2795 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_->cancel_button; +#line 2795 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp5_, "clicked", (GCallback) _editing_tools_editing_tool_notify_cancel_gtk_button_clicked, G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 2796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->adjust_tool_window; +#line 2796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_->exposure_slider; +#line 2796 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_tools_adjust_tool_on_exposure_adjustment_gtk_range_value_changed, self); +#line 2797 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->adjust_tool_window; +#line 2797 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_->saturation_slider; +#line 2797 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_tools_adjust_tool_on_saturation_adjustment_gtk_range_value_changed, self); +#line 2798 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->priv->adjust_tool_window; +#line 2798 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_->tint_slider; +#line 2798 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_tools_adjust_tool_on_tint_adjustment_gtk_range_value_changed, self); +#line 2799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->adjust_tool_window; +#line 2799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_->temperature_slider; +#line 2799 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_tools_adjust_tool_on_temperature_adjustment_gtk_range_value_changed, self); +#line 2800 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = self->priv->adjust_tool_window; +#line 2800 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = _tmp14_->shadows_slider; +#line 2800 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_tools_adjust_tool_on_shadows_adjustment_gtk_range_value_changed, self); +#line 2801 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = self->priv->adjust_tool_window; +#line 2801 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = _tmp16_->highlights_slider; +#line 2801 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_tools_adjust_tool_on_highlights_adjustment_gtk_range_value_changed, self); +#line 2802 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->adjust_tool_window; +#line 2802 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_->histogram_manipulator; +#line 2802 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (_tmp19_, "nub-position-changed", (GCallback) _editing_tools_adjust_tool_on_histogram_constraint_rgb_histogram_manipulator_nub_position_changed, self); +#line 2804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = self->priv->adjust_tool_window; +#line 2804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = _tmp20_->saturation_slider; +#line 2804 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_widget_get_type (), GtkWidget), "button-press-event", (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2805 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = self->priv->adjust_tool_window; +#line 2805 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = _tmp22_->exposure_slider; +#line 2805 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_widget_get_type (), GtkWidget), "button-press-event", (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2806 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->priv->adjust_tool_window; +#line 2806 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _tmp24_->tint_slider; +#line 2806 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget), "button-press-event", (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = self->priv->adjust_tool_window; +#line 2807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = _tmp26_->temperature_slider; +#line 2807 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_widget_get_type (), GtkWidget), "button-press-event", (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = self->priv->adjust_tool_window; +#line 2808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = _tmp28_->shadows_slider; +#line 2808 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_widget_get_type (), GtkWidget), "button-press-event", (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2809 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = self->priv->adjust_tool_window; +#line 2809 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = _tmp30_->highlights_slider; +#line 2809 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_widget_get_type (), GtkWidget), "button-press-event", (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 16935 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_unbind_window_handlers (EditingToolsAdjustTool* self) { + EditingToolsAdjustToolAdjustToolWindow* _tmp0_ = NULL; + GtkButton* _tmp1_ = NULL; + guint _tmp2_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp3_ = NULL; + GtkButton* _tmp4_ = NULL; + guint _tmp5_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp6_ = NULL; + GtkButton* _tmp7_ = NULL; + guint _tmp8_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp9_ = NULL; + GtkScale* _tmp10_ = NULL; + guint _tmp11_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp12_ = NULL; + GtkScale* _tmp13_ = NULL; + guint _tmp14_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp15_ = NULL; + GtkScale* _tmp16_ = NULL; + guint _tmp17_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp18_ = NULL; + GtkScale* _tmp19_ = NULL; + guint _tmp20_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp21_ = NULL; + GtkScale* _tmp22_ = NULL; + guint _tmp23_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp24_ = NULL; + GtkScale* _tmp25_ = NULL; + guint _tmp26_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp27_ = NULL; + RGBHistogramManipulator* _tmp28_ = NULL; + guint _tmp29_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp30_ = NULL; + GtkScale* _tmp31_ = NULL; + guint _tmp32_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp33_ = NULL; + GtkScale* _tmp34_ = NULL; + guint _tmp35_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp36_ = NULL; + GtkScale* _tmp37_ = NULL; + guint _tmp38_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp39_ = NULL; + GtkScale* _tmp40_ = NULL; + guint _tmp41_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp42_ = NULL; + GtkScale* _tmp43_ = NULL; + guint _tmp44_ = 0U; + EditingToolsAdjustToolAdjustToolWindow* _tmp45_ = NULL; + GtkScale* _tmp46_ = NULL; + guint _tmp47_ = 0U; +#line 2812 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2813 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->adjust_tool_window; +#line 2813 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_->ok_button; +#line 2813 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp2_, NULL, FALSE); +#line 2813 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_ok_gtk_button_clicked, self); +#line 2814 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = self->priv->adjust_tool_window; +#line 2814 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_->reset_button; +#line 2814 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp5_, NULL, FALSE); +#line 2814 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_reset_gtk_button_clicked, self); +#line 2815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->adjust_tool_window; +#line 2815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_->cancel_button; +#line 2815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("clicked", gtk_button_get_type (), &_tmp8_, NULL, FALSE); +#line 2815 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _editing_tools_editing_tool_notify_cancel_gtk_button_clicked, G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)); +#line 2816 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->adjust_tool_window; +#line 2816 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_->exposure_slider; +#line 2816 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp11_, NULL, FALSE); +#line 2816 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_exposure_adjustment_gtk_range_value_changed, self); +#line 2817 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->priv->adjust_tool_window; +#line 2817 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _tmp12_->saturation_slider; +#line 2817 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp14_, NULL, FALSE); +#line 2817 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_saturation_adjustment_gtk_range_value_changed, self); +#line 2818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = self->priv->adjust_tool_window; +#line 2818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = _tmp15_->tint_slider; +#line 2818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp17_, NULL, FALSE); +#line 2818 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp17_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_tint_adjustment_gtk_range_value_changed, self); +#line 2819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->priv->adjust_tool_window; +#line 2819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = _tmp18_->temperature_slider; +#line 2819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp20_, NULL, FALSE); +#line 2819 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp20_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_temperature_adjustment_gtk_range_value_changed, self); +#line 2820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->adjust_tool_window; +#line 2820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _tmp21_->shadows_slider; +#line 2820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp23_, NULL, FALSE); +#line 2820 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp23_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_shadows_adjustment_gtk_range_value_changed, self); +#line 2821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->priv->adjust_tool_window; +#line 2821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = _tmp24_->highlights_slider; +#line 2821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp26_, NULL, FALSE); +#line 2821 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp26_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_highlights_adjustment_gtk_range_value_changed, self); +#line 2822 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = self->priv->adjust_tool_window; +#line 2822 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = _tmp27_->histogram_manipulator; +#line 2822 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("nub-position-changed", TYPE_RGB_HISTOGRAM_MANIPULATOR, &_tmp29_, NULL, FALSE); +#line 2822 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (_tmp28_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp29_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_histogram_constraint_rgb_histogram_manipulator_nub_position_changed, self); +#line 2824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = self->priv->adjust_tool_window; +#line 2824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = _tmp30_->saturation_slider; +#line 2824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("button-press-event", gtk_widget_get_type (), &_tmp32_, NULL, FALSE); +#line 2824 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp32_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = self->priv->adjust_tool_window; +#line 2825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = _tmp33_->exposure_slider; +#line 2825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("button-press-event", gtk_widget_get_type (), &_tmp35_, NULL, FALSE); +#line 2825 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp35_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2826 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = self->priv->adjust_tool_window; +#line 2826 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = _tmp36_->tint_slider; +#line 2826 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("button-press-event", gtk_widget_get_type (), &_tmp38_, NULL, FALSE); +#line 2826 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp38_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2827 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = self->priv->adjust_tool_window; +#line 2827 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = _tmp39_->temperature_slider; +#line 2827 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("button-press-event", gtk_widget_get_type (), &_tmp41_, NULL, FALSE); +#line 2827 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp41_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2828 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = self->priv->adjust_tool_window; +#line 2828 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = _tmp42_->shadows_slider; +#line 2828 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("button-press-event", gtk_widget_get_type (), &_tmp44_, NULL, FALSE); +#line 2828 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp44_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 2829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = self->priv->adjust_tool_window; +#line 2829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = _tmp45_->highlights_slider; +#line 2829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("button-press-event", gtk_widget_get_type (), &_tmp47_, NULL, FALSE); +#line 2829 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp47_, 0, NULL, (GCallback) _editing_tools_adjust_tool_on_hscale_reset_gtk_widget_button_press_event, self); +#line 17118 "EditingTools.c" +} + + +gboolean editing_tools_adjust_tool_enhance (EditingToolsAdjustTool* self) { + gboolean result = FALSE; + EditingToolsAdjustToolAdjustEnhanceCommand* command = NULL; + EditingToolsPhotoCanvas* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + EditingToolsAdjustToolAdjustEnhanceCommand* _tmp3_ = NULL; + EditingToolsAdjustToolAdjustEnhanceCommand* _tmp4_ = NULL; + CommandManager* _tmp5_ = NULL; + CommandManager* _tmp6_ = NULL; +#line 2832 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self), FALSE); +#line 2833 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2833 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = editing_tools_photo_canvas_get_photo (_tmp0_); +#line 2833 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _tmp1_; +#line 2833 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = editing_tools_adjust_tool_adjust_enhance_command_new (self, _tmp2_); +#line 2833 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _tmp3_; +#line 2833 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp2_); +#line 2833 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command = _tmp4_; +#line 2834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = app_window_get_command_manager (); +#line 2834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_; +#line 2834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command_manager_execute (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (command, TYPE_COMMAND, Command)); +#line 2834 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _command_manager_unref0 (_tmp6_); +#line 2836 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 2836 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (command); +#line 2836 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 17162 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_on_photos_altered (EditingToolsAdjustTool* self, GeeMap* map) { + GeeMap* _tmp0_ = NULL; + EditingToolsPhotoCanvas* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; + PixelTransformationBundle* adjustments = NULL; + EditingToolsPhotoCanvas* _tmp6_ = NULL; + Photo* _tmp7_ = NULL; + Photo* _tmp8_ = NULL; + PixelTransformationBundle* _tmp9_ = NULL; + PixelTransformationBundle* _tmp10_ = NULL; + PixelTransformationBundle* _tmp11_ = NULL; +#line 2839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (GEE_IS_MAP (map)); +#line 2840 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = map; +#line 2840 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2840 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = editing_tools_photo_canvas_get_photo (_tmp1_); +#line 2840 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 2840 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = gee_map_has_key (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject)); +#line 2840 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = !_tmp4_; +#line 2840 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp3_); +#line 2840 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp5_) { +#line 2841 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return; +#line 17202 "EditingTools.c" + } +#line 2843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = editing_tools_photo_canvas_get_photo (_tmp6_); +#line 2843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _tmp7_; +#line 2843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = photo_get_color_adjustments (_tmp8_); +#line 2843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_; +#line 2843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp8_); +#line 2843 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + adjustments = _tmp10_; +#line 2844 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = adjustments; +#line 2844 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_set_adjustments (self, _tmp11_); +#line 2839 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (adjustments); +#line 17224 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_set_adjustments (EditingToolsAdjustTool* self, PixelTransformationBundle* new_adjustments) { + PixelTransformationBundle* _tmp0_ = NULL; + EditingToolsPhotoCanvas* _tmp11_ = NULL; +#line 2847 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2847 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (IS_PIXEL_TRANSFORMATION_BUNDLE (new_adjustments)); +#line 2848 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_unbind_window_handlers (self); +#line 2850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = new_adjustments; +#line 2850 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_update_transformations (self, _tmp0_); +#line 17241 "EditingTools.c" + { + GeeIterator* _adjustment_it = NULL; + PixelTransformationBundle* _tmp1_ = NULL; + GeeIterable* _tmp2_ = NULL; + GeeIterable* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = new_adjustments; +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = pixel_transformation_bundle_get_transformations (_tmp1_); +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_; +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = gee_iterable_iterator (_tmp3_); +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = _tmp4_; +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp3_); +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _adjustment_it = _tmp5_; +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + while (TRUE) { +#line 17265 "EditingTools.c" + GeeIterator* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + PixelTransformation* adjustment = NULL; + GeeIterator* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + PixelTransformation* _tmp10_ = NULL; +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _adjustment_it; +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = gee_iterator_next (_tmp6_); +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp7_) { +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17280 "EditingTools.c" + } +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _adjustment_it; +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = gee_iterator_get (_tmp8_); +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + adjustment = (PixelTransformation*) _tmp9_; +#line 2853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = adjustment; +#line 2853 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_update_slider (self, _tmp10_); +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (adjustment); +#line 17294 "EditingTools.c" + } +#line 2852 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_adjustment_it); +#line 17298 "EditingTools.c" + } +#line 2855 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_bind_window_handlers (self); +#line 2856 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2856 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp11_); +#line 17306 "EditingTools.c" +} + + +static gpointer _pixel_transformation_ref0 (gpointer self) { +#line 2864 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self ? pixel_transformation_ref (self) : NULL; +#line 17313 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_update_slider (EditingToolsAdjustTool* self, PixelTransformation* transformation) { + PixelTransformation* _tmp0_ = NULL; + PixelTransformationType _tmp1_ = 0; +#line 2861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2861 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (IS_PIXEL_TRANSFORMATION (transformation)); +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = transformation; +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = pixel_transformation_get_transformation_type (_tmp0_); +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + switch (_tmp1_) { +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case PIXEL_TRANSFORMATION_TYPE_TONE_EXPANSION: +#line 17332 "EditingTools.c" + { + ExpansionTransformation* expansion = NULL; + PixelTransformation* _tmp2_ = NULL; + ExpansionTransformation* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#line 2864 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = transformation; +#line 2864 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _pixel_transformation_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_EXPANSION_TRANSFORMATION, ExpansionTransformation)); +#line 2864 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + expansion = _tmp3_; +#line 2866 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->disable_histogram_refresh; +#line 2866 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp4_) { +#line 17348 "EditingTools.c" + EditingToolsAdjustToolAdjustToolWindow* _tmp5_ = NULL; + RGBHistogramManipulator* _tmp6_ = NULL; + ExpansionTransformation* _tmp7_ = NULL; + gint _tmp8_ = 0; + EditingToolsAdjustToolAdjustToolWindow* _tmp9_ = NULL; + RGBHistogramManipulator* _tmp10_ = NULL; + ExpansionTransformation* _tmp11_ = NULL; + gint _tmp12_ = 0; +#line 2867 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->priv->adjust_tool_window; +#line 2867 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_->histogram_manipulator; +#line 2867 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = expansion; +#line 2867 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = expansion_transformation_get_black_point (_tmp7_); +#line 2867 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rgb_histogram_manipulator_set_left_nub_position (_tmp6_, _tmp8_); +#line 2869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = self->priv->adjust_tool_window; +#line 2869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = _tmp9_->histogram_manipulator; +#line 2869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = expansion; +#line 2869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = expansion_transformation_get_white_point (_tmp11_); +#line 2869 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + rgb_histogram_manipulator_set_right_nub_position (_tmp10_, _tmp12_); +#line 17377 "EditingTools.c" + } +#line 2872 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (expansion); +#line 2872 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17383 "EditingTools.c" + } +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case PIXEL_TRANSFORMATION_TYPE_SHADOWS: +#line 17387 "EditingTools.c" + { + EditingToolsAdjustToolAdjustToolWindow* _tmp13_ = NULL; + GtkScale* _tmp14_ = NULL; + PixelTransformation* _tmp15_ = NULL; + gfloat _tmp16_ = 0.0F; +#line 2875 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->priv->adjust_tool_window; +#line 2875 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _tmp13_->shadows_slider; +#line 2875 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = transformation; +#line 2875 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = shadow_detail_transformation_get_parameter (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_SHADOW_DETAIL_TRANSFORMATION, ShadowDetailTransformation)); +#line 2875 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_range_get_type (), GtkRange), (gdouble) _tmp16_); +#line 2877 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17405 "EditingTools.c" + } +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case PIXEL_TRANSFORMATION_TYPE_HIGHLIGHTS: +#line 17409 "EditingTools.c" + { + EditingToolsAdjustToolAdjustToolWindow* _tmp17_ = NULL; + GtkScale* _tmp18_ = NULL; + PixelTransformation* _tmp19_ = NULL; + gfloat _tmp20_ = 0.0F; +#line 2880 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->priv->adjust_tool_window; +#line 2880 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = _tmp17_->highlights_slider; +#line 2880 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = transformation; +#line 2880 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = highlight_detail_transformation_get_parameter (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_HIGHLIGHT_DETAIL_TRANSFORMATION, HighlightDetailTransformation)); +#line 2880 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_range_get_type (), GtkRange), (gdouble) _tmp20_); +#line 2882 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17427 "EditingTools.c" + } +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case PIXEL_TRANSFORMATION_TYPE_EXPOSURE: +#line 17431 "EditingTools.c" + { + EditingToolsAdjustToolAdjustToolWindow* _tmp21_ = NULL; + GtkScale* _tmp22_ = NULL; + PixelTransformation* _tmp23_ = NULL; + gfloat _tmp24_ = 0.0F; +#line 2885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = self->priv->adjust_tool_window; +#line 2885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = _tmp21_->exposure_slider; +#line 2885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = transformation; +#line 2885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = exposure_transformation_get_parameter (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_EXPOSURE_TRANSFORMATION, ExposureTransformation)); +#line 2885 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_range_get_type (), GtkRange), (gdouble) _tmp24_); +#line 2887 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17449 "EditingTools.c" + } +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case PIXEL_TRANSFORMATION_TYPE_SATURATION: +#line 17453 "EditingTools.c" + { + EditingToolsAdjustToolAdjustToolWindow* _tmp25_ = NULL; + GtkScale* _tmp26_ = NULL; + PixelTransformation* _tmp27_ = NULL; + gfloat _tmp28_ = 0.0F; +#line 2890 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = self->priv->adjust_tool_window; +#line 2890 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _tmp25_->saturation_slider; +#line 2890 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = transformation; +#line 2890 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = saturation_transformation_get_parameter (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, TYPE_SATURATION_TRANSFORMATION, SaturationTransformation)); +#line 2890 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_range_get_type (), GtkRange), (gdouble) _tmp28_); +#line 2892 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17471 "EditingTools.c" + } +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case PIXEL_TRANSFORMATION_TYPE_TINT: +#line 17475 "EditingTools.c" + { + EditingToolsAdjustToolAdjustToolWindow* _tmp29_ = NULL; + GtkScale* _tmp30_ = NULL; + PixelTransformation* _tmp31_ = NULL; + gfloat _tmp32_ = 0.0F; +#line 2895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = self->priv->adjust_tool_window; +#line 2895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = _tmp29_->tint_slider; +#line 2895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = transformation; +#line 2895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = tint_transformation_get_parameter (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_TINT_TRANSFORMATION, TintTransformation)); +#line 2895 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_range_get_type (), GtkRange), (gdouble) _tmp32_); +#line 2897 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17493 "EditingTools.c" + } +#line 2862 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + case PIXEL_TRANSFORMATION_TYPE_TEMPERATURE: +#line 17497 "EditingTools.c" + { + EditingToolsAdjustToolAdjustToolWindow* _tmp33_ = NULL; + GtkScale* _tmp34_ = NULL; + PixelTransformation* _tmp35_ = NULL; + gfloat _tmp36_ = 0.0F; +#line 2900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = self->priv->adjust_tool_window; +#line 2900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = _tmp33_->temperature_slider; +#line 2900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = transformation; +#line 2900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = temperature_transformation_get_parameter (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_TEMPERATURE_TRANSFORMATION, TemperatureTransformation)); +#line 2900 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_range_get_type (), GtkRange), (gdouble) _tmp36_); +#line 2902 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17515 "EditingTools.c" + } + default: + { + PixelTransformation* _tmp37_ = NULL; + PixelTransformationType _tmp38_ = 0; +#line 2905 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = transformation; +#line 2905 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = pixel_transformation_get_transformation_type (_tmp37_); +#line 2905 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_error ("EditingTools.vala:2905: Unknown adjustment: %d", (gint) _tmp38_); +#line 17527 "EditingTools.c" + } + } +} + + +static void editing_tools_adjust_tool_init_fp_pixel_cache (EditingToolsAdjustTool* self, GdkPixbuf* source) { + gint source_width = 0; + GdkPixbuf* _tmp0_ = NULL; + gint _tmp1_ = 0; + gint source_height = 0; + GdkPixbuf* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint source_num_channels = 0; + GdkPixbuf* _tmp4_ = NULL; + gint _tmp5_ = 0; + gint source_rowstride = 0; + GdkPixbuf* _tmp6_ = NULL; + gint _tmp7_ = 0; + guchar* source_pixels = NULL; + GdkPixbuf* _tmp8_ = NULL; + guint8* _tmp9_ = NULL; + gint source_pixels_length1 = 0; + gint _source_pixels_size_ = 0; + gint _tmp10_ = 0; + gint _tmp11_ = 0; + gfloat* _tmp12_ = NULL; + gint cache_pixel_index = 0; + gfloat INV_255 = 0.0F; +#line 2909 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (self)); +#line 2909 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (GDK_IS_PIXBUF (source)); +#line 2910 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = source; +#line 2910 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = gdk_pixbuf_get_width (_tmp0_); +#line 2910 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + source_width = _tmp1_; +#line 2911 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = source; +#line 2911 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = gdk_pixbuf_get_height (_tmp2_); +#line 2911 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + source_height = _tmp3_; +#line 2912 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = source; +#line 2912 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = gdk_pixbuf_get_n_channels (_tmp4_); +#line 2912 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + source_num_channels = _tmp5_; +#line 2913 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = source; +#line 2913 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = gdk_pixbuf_get_rowstride (_tmp6_); +#line 2913 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + source_rowstride = _tmp7_; +#line 2914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = source; +#line 2914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = gdk_pixbuf_get_pixels (_tmp8_); +#line 2914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + source_pixels = _tmp9_; +#line 2914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + source_pixels_length1 = -1; +#line 2914 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _source_pixels_size_ = source_pixels_length1; +#line 2916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = source_width; +#line 2916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = source_height; +#line 2916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = g_new0 (gfloat, (3 * _tmp10_) * _tmp11_); +#line 2916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->fp_pixel_cache = (g_free (self->priv->fp_pixel_cache), NULL); +#line 2916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->fp_pixel_cache = _tmp12_; +#line 2916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->fp_pixel_cache_length1 = (3 * _tmp10_) * _tmp11_; +#line 2916 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->_fp_pixel_cache_size_ = self->priv->fp_pixel_cache_length1; +#line 2917 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cache_pixel_index = 0; +#line 2918 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + INV_255 = 1.0f / 255.0f; +#line 17612 "EditingTools.c" + { + gint j = 0; +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + j = 0; +#line 17617 "EditingTools.c" + { + gboolean _tmp13_ = FALSE; +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = TRUE; +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + while (TRUE) { +#line 17624 "EditingTools.c" + gint _tmp15_ = 0; + gint _tmp16_ = 0; + gint row_start_index = 0; + gint _tmp17_ = 0; + gint _tmp18_ = 0; + gint row_end_index = 0; + gint _tmp19_ = 0; + gint _tmp20_ = 0; + gint _tmp21_ = 0; +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp13_) { +#line 17636 "EditingTools.c" + gint _tmp14_ = 0; +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = j; +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + j = _tmp14_ + 1; +#line 17642 "EditingTools.c" + } +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = FALSE; +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = j; +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = source_height; +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!(_tmp15_ < _tmp16_)) { +#line 2920 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17654 "EditingTools.c" + } +#line 2921 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = j; +#line 2921 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = source_rowstride; +#line 2921 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + row_start_index = _tmp17_ * _tmp18_; +#line 2922 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = row_start_index; +#line 2922 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = source_width; +#line 2922 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = source_num_channels; +#line 2922 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + row_end_index = _tmp19_ + (_tmp20_ * _tmp21_); +#line 17670 "EditingTools.c" + { + gint i = 0; + gint _tmp22_ = 0; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = row_start_index; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + i = _tmp22_; +#line 17678 "EditingTools.c" + { + gboolean _tmp23_ = FALSE; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = TRUE; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + while (TRUE) { +#line 17685 "EditingTools.c" + gint _tmp26_ = 0; + gint _tmp27_ = 0; + gfloat* _tmp28_ = NULL; + gint _tmp28__length1 = 0; + gint _tmp29_ = 0; + guchar* _tmp30_ = NULL; + gint _tmp30__length1 = 0; + gint _tmp31_ = 0; + guchar _tmp32_ = '\0'; + gfloat _tmp33_ = 0.0F; + gfloat _tmp34_ = 0.0F; + gfloat* _tmp35_ = NULL; + gint _tmp35__length1 = 0; + gint _tmp36_ = 0; + guchar* _tmp37_ = NULL; + gint _tmp37__length1 = 0; + gint _tmp38_ = 0; + guchar _tmp39_ = '\0'; + gfloat _tmp40_ = 0.0F; + gfloat _tmp41_ = 0.0F; + gfloat* _tmp42_ = NULL; + gint _tmp42__length1 = 0; + gint _tmp43_ = 0; + guchar* _tmp44_ = NULL; + gint _tmp44__length1 = 0; + gint _tmp45_ = 0; + guchar _tmp46_ = '\0'; + gfloat _tmp47_ = 0.0F; + gfloat _tmp48_ = 0.0F; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!_tmp23_) { +#line 17717 "EditingTools.c" + gint _tmp24_ = 0; + gint _tmp25_ = 0; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = i; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = source_num_channels; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + i = _tmp24_ + _tmp25_; +#line 17726 "EditingTools.c" + } +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = FALSE; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = i; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = row_end_index; +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (!(_tmp26_ < _tmp27_)) { +#line 2923 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + break; +#line 17738 "EditingTools.c" + } +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = self->priv->fp_pixel_cache; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28__length1 = self->priv->fp_pixel_cache_length1; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = cache_pixel_index; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cache_pixel_index = _tmp29_ + 1; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = source_pixels; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30__length1 = source_pixels_length1; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = i; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = _tmp30_[_tmp31_]; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = INV_255; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_[_tmp29_] = ((gfloat) _tmp32_) * _tmp33_; +#line 2924 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = _tmp28_[_tmp29_]; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = self->priv->fp_pixel_cache; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35__length1 = self->priv->fp_pixel_cache_length1; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = cache_pixel_index; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cache_pixel_index = _tmp36_ + 1; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = source_pixels; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37__length1 = source_pixels_length1; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = i; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = _tmp37_[_tmp38_ + 1]; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = INV_255; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_[_tmp36_] = ((gfloat) _tmp39_) * _tmp40_; +#line 2925 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = _tmp35_[_tmp36_]; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = self->priv->fp_pixel_cache; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42__length1 = self->priv->fp_pixel_cache_length1; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = cache_pixel_index; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + cache_pixel_index = _tmp43_ + 1; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44_ = source_pixels; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp44__length1 = source_pixels_length1; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp45_ = i; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp46_ = _tmp44_[_tmp45_ + 2]; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp47_ = INV_255; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_[_tmp43_] = ((gfloat) _tmp46_) * _tmp47_; +#line 2926 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp48_ = _tmp42_[_tmp43_]; +#line 17806 "EditingTools.c" + } + } + } + } + } + } +} + + +static gboolean editing_tools_adjust_tool_real_on_keypress (EditingToolsEditingTool* base, GdkEventKey* event) { + EditingToolsAdjustTool * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + GdkEventKey* _tmp2_ = NULL; + guint _tmp3_ = 0U; + const gchar* _tmp4_ = NULL; + GdkEventKey* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; +#line 2931 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustTool); +#line 2931 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 2932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = event; +#line 2932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = _tmp2_->keyval; +#line 2932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = gdk_keyval_name (_tmp3_); +#line 2932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (g_strcmp0 (_tmp4_, "KP_Enter") == 0) { +#line 2932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = TRUE; +#line 17840 "EditingTools.c" + } else { + GdkEventKey* _tmp5_ = NULL; + guint _tmp6_ = 0U; + const gchar* _tmp7_ = NULL; +#line 2933 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = event; +#line 2933 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _tmp5_->keyval; +#line 2933 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = gdk_keyval_name (_tmp6_); +#line 2933 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = g_strcmp0 (_tmp7_, "Enter") == 0; +#line 17853 "EditingTools.c" + } +#line 2932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp1_) { +#line 2932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = TRUE; +#line 17859 "EditingTools.c" + } else { + GdkEventKey* _tmp8_ = NULL; + guint _tmp9_ = 0U; + const gchar* _tmp10_ = NULL; +#line 2934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = event; +#line 2934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_->keyval; +#line 2934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = gdk_keyval_name (_tmp9_); +#line 2934 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = g_strcmp0 (_tmp10_, "Return") == 0; +#line 17872 "EditingTools.c" + } +#line 2932 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_) { +#line 2935 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_on_ok (self); +#line 2936 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 2936 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 17882 "EditingTools.c" + } +#line 2939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = event; +#line 2939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_adjust_tool_parent_class)->on_keypress (G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), _tmp11_); +#line 2939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp12_; +#line 2939 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 17892 "EditingTools.c" +} + + +static EditingToolsAdjustToolAdjustToolWindow* editing_tools_adjust_tool_adjust_tool_window_construct (GType object_type, GtkWindow* container) { + EditingToolsAdjustToolAdjustToolWindow * self = NULL; + GtkWindow* _tmp0_ = NULL; + GtkGrid* slider_organizer = NULL; + GtkGrid* _tmp1_ = NULL; + GtkLabel* exposure_label = NULL; + const gchar* _tmp2_ = NULL; + GtkLabel* _tmp3_ = NULL; + GtkScale* _tmp4_ = NULL; + GtkScale* _tmp5_ = NULL; + GtkScale* _tmp6_ = NULL; + GtkScale* _tmp7_ = NULL; + GtkLabel* saturation_label = NULL; + const gchar* _tmp8_ = NULL; + GtkLabel* _tmp9_ = NULL; + GtkScale* _tmp10_ = NULL; + GtkScale* _tmp11_ = NULL; + GtkScale* _tmp12_ = NULL; + GtkScale* _tmp13_ = NULL; + GtkLabel* tint_label = NULL; + const gchar* _tmp14_ = NULL; + GtkLabel* _tmp15_ = NULL; + GtkScale* _tmp16_ = NULL; + GtkScale* _tmp17_ = NULL; + GtkScale* _tmp18_ = NULL; + GtkScale* _tmp19_ = NULL; + GtkLabel* temperature_label = NULL; + const gchar* _tmp20_ = NULL; + GtkLabel* _tmp21_ = NULL; + GtkScale* _tmp22_ = NULL; + GtkScale* _tmp23_ = NULL; + GtkScale* _tmp24_ = NULL; + GtkScale* _tmp25_ = NULL; + GtkLabel* shadows_label = NULL; + const gchar* _tmp26_ = NULL; + GtkLabel* _tmp27_ = NULL; + GtkScale* _tmp28_ = NULL; + GtkScale* _tmp29_ = NULL; + GtkScale* _tmp30_ = NULL; + GtkScale* _tmp31_ = NULL; + GtkLabel* highlights_label = NULL; + const gchar* _tmp32_ = NULL; + GtkLabel* _tmp33_ = NULL; + GtkScale* _tmp34_ = NULL; + GtkScale* _tmp35_ = NULL; + GtkScale* _tmp36_ = NULL; + GtkBox* button_layouter = NULL; + GtkBox* _tmp37_ = NULL; + GtkButton* _tmp38_ = NULL; + GtkButton* _tmp39_ = NULL; + GtkButton* _tmp40_ = NULL; + GtkAlignment* histogram_aligner = NULL; + GtkAlignment* _tmp41_ = NULL; + RGBHistogramManipulator* _tmp42_ = NULL; + GtkBox* pane_layouter = NULL; + GtkBox* _tmp43_ = NULL; +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (GTK_IS_WINDOW (container), NULL); +#line 2231 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = container; +#line 2231 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsAdjustToolAdjustToolWindow*) editing_tools_editing_tool_window_construct (object_type, _tmp0_); +#line 2233 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = (GtkGrid*) gtk_grid_new (); +#line 2233 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp1_); +#line 2233 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + slider_organizer = _tmp1_; +#line 2234 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_set_column_homogeneous (slider_organizer, FALSE); +#line 2235 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_set_row_spacing (slider_organizer, (guint) 12); +#line 2236 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_set_column_spacing (slider_organizer, (guint) 12); +#line 2237 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_margin_left (G_TYPE_CHECK_INSTANCE_CAST (slider_organizer, gtk_widget_get_type (), GtkWidget), 12); +#line 2238 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_margin_bottom (G_TYPE_CHECK_INSTANCE_CAST (slider_organizer, gtk_widget_get_type (), GtkWidget), 12); +#line 2240 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _ ("Exposure:"); +#line 2240 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp2_); +#line 2240 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp3_); +#line 2240 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + exposure_label = _tmp3_; +#line 2241 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_misc_set_alignment (G_TYPE_CHECK_INSTANCE_CAST (exposure_label, gtk_misc_get_type (), GtkMisc), 0.0f, 0.5f); +#line 2242 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (exposure_label, gtk_widget_get_type (), GtkWidget), 0, 0, 1, 1); +#line 2243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->exposure_slider; +#line 2243 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), 1, 0, 1, 1); +#line 2244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = self->exposure_slider; +#line 2244 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), EDITING_TOOLS_ADJUST_TOOL_SLIDER_WIDTH, -1); +#line 2245 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->exposure_slider; +#line 2245 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_scale_set_draw_value (_tmp6_, FALSE); +#line 2246 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = self->exposure_slider; +#line 2246 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_margin_right (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), 0); +#line 2248 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = _ ("Saturation:"); +#line 2248 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp8_); +#line 2248 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp9_); +#line 2248 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + saturation_label = _tmp9_; +#line 2249 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_misc_set_alignment (G_TYPE_CHECK_INSTANCE_CAST (saturation_label, gtk_misc_get_type (), GtkMisc), 0.0f, 0.5f); +#line 2250 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (saturation_label, gtk_widget_get_type (), GtkWidget), 0, 1, 1, 1); +#line 2251 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = self->saturation_slider; +#line 2251 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget), 1, 1, 1, 1); +#line 2252 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->saturation_slider; +#line 2252 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget), EDITING_TOOLS_ADJUST_TOOL_SLIDER_WIDTH, -1); +#line 2253 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = self->saturation_slider; +#line 2253 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_scale_set_draw_value (_tmp12_, FALSE); +#line 2254 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = self->saturation_slider; +#line 2254 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_margin_right (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget), 0); +#line 2256 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = _ ("Tint:"); +#line 2256 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp14_); +#line 2256 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp15_); +#line 2256 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + tint_label = _tmp15_; +#line 2257 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_misc_set_alignment (G_TYPE_CHECK_INSTANCE_CAST (tint_label, gtk_misc_get_type (), GtkMisc), 0.0f, 0.5f); +#line 2258 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (tint_label, gtk_widget_get_type (), GtkWidget), 0, 2, 1, 1); +#line 2259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = self->tint_slider; +#line 2259 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget), 1, 2, 1, 1); +#line 2260 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = self->tint_slider; +#line 2260 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget), EDITING_TOOLS_ADJUST_TOOL_SLIDER_WIDTH, -1); +#line 2261 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp18_ = self->tint_slider; +#line 2261 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_scale_set_draw_value (_tmp18_, FALSE); +#line 2262 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp19_ = self->tint_slider; +#line 2262 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_margin_right (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_widget_get_type (), GtkWidget), 0); +#line 2264 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp20_ = _ ("Temperature:"); +#line 2264 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp21_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp20_); +#line 2264 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp21_); +#line 2264 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + temperature_label = _tmp21_; +#line 2266 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_misc_set_alignment (G_TYPE_CHECK_INSTANCE_CAST (temperature_label, gtk_misc_get_type (), GtkMisc), 0.0f, 0.5f); +#line 2267 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (temperature_label, gtk_widget_get_type (), GtkWidget), 0, 3, 1, 1); +#line 2268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp22_ = self->temperature_slider; +#line 2268 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget), 1, 3, 1, 1); +#line 2269 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp23_ = self->temperature_slider; +#line 2269 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_widget_get_type (), GtkWidget), EDITING_TOOLS_ADJUST_TOOL_SLIDER_WIDTH, -1); +#line 2270 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp24_ = self->temperature_slider; +#line 2270 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_scale_set_draw_value (_tmp24_, FALSE); +#line 2271 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp25_ = self->temperature_slider; +#line 2271 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_margin_right (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget), 0); +#line 2273 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp26_ = _ ("Shadows:"); +#line 2273 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp27_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp26_); +#line 2273 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp27_); +#line 2273 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + shadows_label = _tmp27_; +#line 2274 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_misc_set_alignment (G_TYPE_CHECK_INSTANCE_CAST (shadows_label, gtk_misc_get_type (), GtkMisc), 0.0f, 0.5f); +#line 2275 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (shadows_label, gtk_widget_get_type (), GtkWidget), 0, 4, 1, 1); +#line 2276 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp28_ = self->shadows_slider; +#line 2276 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget), 1, 4, 1, 1); +#line 2277 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp29_ = self->shadows_slider; +#line 2277 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_widget_get_type (), GtkWidget), EDITING_TOOLS_ADJUST_TOOL_SLIDER_WIDTH, -1); +#line 2278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp30_ = self->shadows_slider; +#line 2278 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_scale_set_draw_value (_tmp30_, FALSE); +#line 2279 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp31_ = self->shadows_slider; +#line 2279 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_margin_right (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_widget_get_type (), GtkWidget), 0); +#line 2281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp32_ = _ ("Highlights:"); +#line 2281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp33_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp32_); +#line 2281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp33_); +#line 2281 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + highlights_label = _tmp33_; +#line 2282 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_misc_set_alignment (G_TYPE_CHECK_INSTANCE_CAST (highlights_label, gtk_misc_get_type (), GtkMisc), 0.0f, 0.5f); +#line 2283 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (highlights_label, gtk_widget_get_type (), GtkWidget), 0, 5, 1, 1); +#line 2284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp34_ = self->highlights_slider; +#line 2284 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_grid_attach (slider_organizer, G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_widget_get_type (), GtkWidget), 1, 5, 1, 1); +#line 2285 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp35_ = self->highlights_slider; +#line 2285 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_widget_get_type (), GtkWidget), EDITING_TOOLS_ADJUST_TOOL_SLIDER_WIDTH, -1); +#line 2286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp36_ = self->highlights_slider; +#line 2286 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_scale_set_draw_value (_tmp36_, FALSE); +#line 2288 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp37_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8); +#line 2288 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp37_); +#line 2288 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + button_layouter = _tmp37_; +#line 2289 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_box_set_homogeneous (button_layouter, TRUE); +#line 2290 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp38_ = self->cancel_button; +#line 2290 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_box_pack_start (button_layouter, G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 1); +#line 2291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp39_ = self->reset_button; +#line 2291 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_box_pack_start (button_layouter, G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 1); +#line 2292 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp40_ = self->ok_button; +#line 2292 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_box_pack_start (button_layouter, G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 1); +#line 2294 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp41_ = (GtkAlignment*) gtk_alignment_new (0.0f, 0.0f, 0.0f, 0.0f); +#line 2294 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp41_); +#line 2294 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + histogram_aligner = _tmp41_; +#line 2295 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp42_ = self->histogram_manipulator; +#line 2295 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (histogram_aligner, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_widget_get_type (), GtkWidget)); +#line 2296 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_alignment_set_padding (histogram_aligner, (guint) 12, (guint) 8, (guint) 12, (guint) 12); +#line 2298 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp43_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); +#line 2298 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp43_); +#line 2298 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pane_layouter = _tmp43_; +#line 2299 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (pane_layouter, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (histogram_aligner, gtk_widget_get_type (), GtkWidget)); +#line 2300 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (pane_layouter, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (slider_organizer, gtk_widget_get_type (), GtkWidget)); +#line 2301 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (pane_layouter, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (button_layouter, gtk_widget_get_type (), GtkWidget)); +#line 2302 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_box_set_child_packing (pane_layouter, G_TYPE_CHECK_INSTANCE_CAST (histogram_aligner, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0, GTK_PACK_START); +#line 2304 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (pane_layouter, gtk_widget_get_type (), GtkWidget)); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (pane_layouter); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (histogram_aligner); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (button_layouter); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (highlights_label); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (shadows_label); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (temperature_label); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (tint_label); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (saturation_label); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (exposure_label); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (slider_organizer); +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 18208 "EditingTools.c" +} + + +static EditingToolsAdjustToolAdjustToolWindow* editing_tools_adjust_tool_adjust_tool_window_new (GtkWindow* container) { +#line 2230 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_adjust_tool_adjust_tool_window_construct (EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_WINDOW, container); +#line 18215 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_tool_window_class_init (EditingToolsAdjustToolAdjustToolWindowClass * klass) { +#line 2204 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_adjust_tool_window_parent_class = g_type_class_peek_parent (klass); +#line 2204 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (klass)->finalize = editing_tools_adjust_tool_adjust_tool_window_finalize; +#line 18224 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_tool_window_instance_init (EditingToolsAdjustToolAdjustToolWindow * self) { + GtkScale* _tmp0_ = NULL; + GtkScale* _tmp1_ = NULL; + GtkScale* _tmp2_ = NULL; + GtkScale* _tmp3_ = NULL; + GtkScale* _tmp4_ = NULL; + GtkScale* _tmp5_ = NULL; + GtkButton* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + GtkButton* _tmp8_ = NULL; + GtkButton* _tmp9_ = NULL; + RGBHistogramManipulator* _tmp10_ = NULL; +#line 2205 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) EXPOSURE_TRANSFORMATION_MIN_PARAMETER, (gdouble) EXPOSURE_TRANSFORMATION_MAX_PARAMETER, 1.0); +#line 2205 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp0_); +#line 2205 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->exposure_slider = _tmp0_; +#line 2208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) SATURATION_TRANSFORMATION_MIN_PARAMETER, (gdouble) SATURATION_TRANSFORMATION_MAX_PARAMETER, 1.0); +#line 2208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp1_); +#line 2208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->saturation_slider = _tmp1_; +#line 2211 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) TINT_TRANSFORMATION_MIN_PARAMETER, (gdouble) TINT_TRANSFORMATION_MAX_PARAMETER, 1.0); +#line 2211 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp2_); +#line 2211 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->tint_slider = _tmp2_; +#line 2213 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) TEMPERATURE_TRANSFORMATION_MIN_PARAMETER, (gdouble) TEMPERATURE_TRANSFORMATION_MAX_PARAMETER, 1.0); +#line 2213 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp3_); +#line 2213 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->temperature_slider = _tmp3_; +#line 2217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) SHADOW_DETAIL_TRANSFORMATION_MIN_PARAMETER, (gdouble) SHADOW_DETAIL_TRANSFORMATION_MAX_PARAMETER, 1.0); +#line 2217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp4_); +#line 2217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->shadows_slider = _tmp4_; +#line 2221 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) HIGHLIGHT_DETAIL_TRANSFORMATION_MIN_PARAMETER, (gdouble) HIGHLIGHT_DETAIL_TRANSFORMATION_MAX_PARAMETER, 1.0); +#line 2221 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp5_); +#line 2221 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->highlights_slider = _tmp5_; +#line 2225 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = (GtkButton*) gtk_button_new_with_mnemonic (RESOURCES_OK_LABEL); +#line 2225 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp6_); +#line 2225 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->ok_button = _tmp6_; +#line 2226 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _ ("_Reset"); +#line 2226 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = (GtkButton*) gtk_button_new_with_mnemonic (_tmp7_); +#line 2226 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp8_); +#line 2226 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->reset_button = _tmp8_; +#line 2227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = (GtkButton*) gtk_button_new_with_mnemonic (RESOURCES_CANCEL_LABEL); +#line 2227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp9_); +#line 2227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->cancel_button = _tmp9_; +#line 2228 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = rgb_histogram_manipulator_new (); +#line 2228 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_object_ref_sink (_tmp10_); +#line 2228 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->histogram_manipulator = _tmp10_; +#line 18302 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_tool_window_finalize (GObject* obj) { + EditingToolsAdjustToolAdjustToolWindow * self; +#line 2204 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_WINDOW, EditingToolsAdjustToolAdjustToolWindow); +#line 2205 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->exposure_slider); +#line 2208 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->saturation_slider); +#line 2211 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->tint_slider); +#line 2213 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->temperature_slider); +#line 2217 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->shadows_slider); +#line 2221 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->highlights_slider); +#line 2225 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->ok_button); +#line 2226 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->reset_button); +#line 2227 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->cancel_button); +#line 2228 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->histogram_manipulator); +#line 2204 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (editing_tools_adjust_tool_adjust_tool_window_parent_class)->finalize (obj); +#line 18332 "EditingTools.c" +} + + +static GType editing_tools_adjust_tool_adjust_tool_window_get_type (void) { + static volatile gsize editing_tools_adjust_tool_adjust_tool_window_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_adjust_tool_adjust_tool_window_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsAdjustToolAdjustToolWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_adjust_tool_adjust_tool_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsAdjustToolAdjustToolWindow), 0, (GInstanceInitFunc) editing_tools_adjust_tool_adjust_tool_window_instance_init, NULL }; + GType editing_tools_adjust_tool_adjust_tool_window_type_id; + editing_tools_adjust_tool_adjust_tool_window_type_id = g_type_register_static (EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, "EditingToolsAdjustToolAdjustToolWindow", &g_define_type_info, 0); + g_once_init_leave (&editing_tools_adjust_tool_adjust_tool_window_type_id__volatile, editing_tools_adjust_tool_adjust_tool_window_type_id); + } + return editing_tools_adjust_tool_adjust_tool_window_type_id__volatile; +} + + +static void _editing_tools_adjust_tool_adjust_tool_command_on_owner_deactivated_editing_tools_editing_tool_deactivated (EditingToolsEditingTool* _sender, gpointer self) { +#line 2320 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_adjust_tool_command_on_owner_deactivated ((EditingToolsAdjustToolAdjustToolCommand*) self); +#line 18351 "EditingTools.c" +} + + +static EditingToolsAdjustToolAdjustToolCommand* editing_tools_adjust_tool_adjust_tool_command_construct (GType object_type, EditingToolsAdjustTool* owner, const gchar* name, const gchar* explanation) { + EditingToolsAdjustToolAdjustToolCommand * self = NULL; + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + EditingToolsAdjustTool* _tmp2_ = NULL; + EditingToolsAdjustTool* _tmp3_ = NULL; +#line 2311 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (owner), NULL); +#line 2311 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 2311 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (explanation != NULL, NULL); +#line 2312 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = name; +#line 2312 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = explanation; +#line 2312 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsAdjustToolAdjustToolCommand*) command_construct (object_type, _tmp0_, _tmp1_); +#line 2314 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = owner; +#line 2314 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->owner = _tmp2_; +#line 2315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = owner; +#line 2315 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), "deactivated", (GCallback) _editing_tools_adjust_tool_adjust_tool_command_on_owner_deactivated_editing_tools_editing_tool_deactivated, self, 0); +#line 2311 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 18383 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_tool_command_on_owner_deactivated (EditingToolsAdjustToolAdjustToolCommand* self) { + CommandManager* _tmp0_ = NULL; + CommandManager* _tmp1_ = NULL; +#line 2323 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_if_fail (EDITING_TOOLS_ADJUST_TOOL_IS_ADJUST_TOOL_COMMAND (self)); +#line 2326 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = app_window_get_command_manager (); +#line 2326 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _tmp0_; +#line 2326 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command_manager_reset (_tmp1_); +#line 2326 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _command_manager_unref0 (_tmp1_); +#line 18400 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_tool_command_class_init (EditingToolsAdjustToolAdjustToolCommandClass * klass) { +#line 2308 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_adjust_tool_command_parent_class = g_type_class_peek_parent (klass); +#line 2308 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (klass)->finalize = editing_tools_adjust_tool_adjust_tool_command_finalize; +#line 18409 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_tool_command_instance_init (EditingToolsAdjustToolAdjustToolCommand * self) { +} + + +static void editing_tools_adjust_tool_adjust_tool_command_finalize (GObject* obj) { + EditingToolsAdjustToolAdjustToolCommand * self; + EditingToolsAdjustTool* _tmp0_ = NULL; +#line 2308 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand); +#line 2319 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->owner; +#line 2319 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ != NULL) { +#line 18426 "EditingTools.c" + EditingToolsAdjustTool* _tmp1_ = NULL; + guint _tmp2_ = 0U; +#line 2320 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->owner; +#line 2320 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_parse_name ("deactivated", EDITING_TOOLS_TYPE_EDITING_TOOL, &_tmp2_, NULL, FALSE); +#line 2320 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _editing_tools_adjust_tool_adjust_tool_command_on_owner_deactivated_editing_tools_editing_tool_deactivated, self); +#line 18435 "EditingTools.c" + } +#line 2308 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (editing_tools_adjust_tool_adjust_tool_command_parent_class)->finalize (obj); +#line 18439 "EditingTools.c" +} + + +static GType editing_tools_adjust_tool_adjust_tool_command_get_type (void) { + static volatile gsize editing_tools_adjust_tool_adjust_tool_command_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_adjust_tool_adjust_tool_command_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsAdjustToolAdjustToolCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_adjust_tool_adjust_tool_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsAdjustToolAdjustToolCommand), 0, (GInstanceInitFunc) editing_tools_adjust_tool_adjust_tool_command_instance_init, NULL }; + GType editing_tools_adjust_tool_adjust_tool_command_type_id; + editing_tools_adjust_tool_adjust_tool_command_type_id = g_type_register_static (TYPE_COMMAND, "EditingToolsAdjustToolAdjustToolCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_once_init_leave (&editing_tools_adjust_tool_adjust_tool_command_type_id__volatile, editing_tools_adjust_tool_adjust_tool_command_type_id); + } + return editing_tools_adjust_tool_adjust_tool_command_type_id__volatile; +} + + +static EditingToolsAdjustToolAdjustResetCommand* editing_tools_adjust_tool_adjust_reset_command_construct (GType object_type, EditingToolsAdjustTool* owner, PixelTransformationBundle* current) { + EditingToolsAdjustToolAdjustResetCommand * self = NULL; + EditingToolsAdjustTool* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PixelTransformationBundle* _tmp3_ = NULL; + PixelTransformationBundle* _tmp4_ = NULL; + PixelTransformationBundle* _tmp5_ = NULL; + PixelTransformationBundle* _tmp6_ = NULL; +#line 2334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (owner), NULL); +#line 2334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PIXEL_TRANSFORMATION_BUNDLE (current), NULL); +#line 2335 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = owner; +#line 2335 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _ ("Reset Colors"); +#line 2335 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _ ("Reset all color adjustments to original"); +#line 2335 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsAdjustToolAdjustResetCommand*) editing_tools_adjust_tool_adjust_tool_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_); +#line 2337 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = current; +#line 2337 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = pixel_transformation_bundle_copy (_tmp3_); +#line 2337 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->original); +#line 2337 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->original = _tmp4_; +#line 2338 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = pixel_transformation_bundle_new (); +#line 2338 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->reset); +#line 2338 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->reset = _tmp5_; +#line 2339 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = self->priv->reset; +#line 2339 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + pixel_transformation_bundle_set_to_identity (_tmp6_); +#line 2334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 18496 "EditingTools.c" +} + + +static EditingToolsAdjustToolAdjustResetCommand* editing_tools_adjust_tool_adjust_reset_command_new (EditingToolsAdjustTool* owner, PixelTransformationBundle* current) { +#line 2334 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_adjust_tool_adjust_reset_command_construct (EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND, owner, current); +#line 18503 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_reset_command_real_execute (Command* base) { + EditingToolsAdjustToolAdjustResetCommand * self; + EditingToolsAdjustTool* _tmp0_ = NULL; + PixelTransformationBundle* _tmp1_ = NULL; +#line 2342 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND, EditingToolsAdjustToolAdjustResetCommand); +#line 2343 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2343 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->reset; +#line 2343 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_set_adjustments (_tmp0_, _tmp1_); +#line 18519 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_reset_command_real_undo (Command* base) { + EditingToolsAdjustToolAdjustResetCommand * self; + EditingToolsAdjustTool* _tmp0_ = NULL; + PixelTransformationBundle* _tmp1_ = NULL; +#line 2346 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND, EditingToolsAdjustToolAdjustResetCommand); +#line 2347 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2347 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->original; +#line 2347 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_set_adjustments (_tmp0_, _tmp1_); +#line 18535 "EditingTools.c" +} + + +static gboolean editing_tools_adjust_tool_adjust_reset_command_real_compress (Command* base, Command* command) { + EditingToolsAdjustToolAdjustResetCommand * self; + gboolean result = FALSE; + EditingToolsAdjustToolAdjustResetCommand* reset_command = NULL; + Command* _tmp0_ = NULL; + EditingToolsAdjustToolAdjustResetCommand* _tmp1_ = NULL; + EditingToolsAdjustToolAdjustResetCommand* _tmp2_ = NULL; + EditingToolsAdjustToolAdjustResetCommand* _tmp3_ = NULL; + EditingToolsAdjustTool* _tmp4_ = NULL; + EditingToolsAdjustTool* _tmp5_ = NULL; +#line 2350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND, EditingToolsAdjustToolAdjustResetCommand); +#line 2350 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_COMMAND (command), FALSE); +#line 2351 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = command; +#line 2351 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND) ? ((EditingToolsAdjustToolAdjustResetCommand*) _tmp0_) : NULL); +#line 2351 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + reset_command = _tmp1_; +#line 2352 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = reset_command; +#line 2352 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp2_ == NULL) { +#line 2353 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 2353 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (reset_command); +#line 2353 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 18569 "EditingTools.c" + } +#line 2355 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = reset_command; +#line 2355 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2355 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2355 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp4_ != _tmp5_) { +#line 2356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 2356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (reset_command); +#line 2356 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 18585 "EditingTools.c" + } +#line 2359 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 2359 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (reset_command); +#line 2359 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 18593 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_reset_command_class_init (EditingToolsAdjustToolAdjustResetCommandClass * klass) { +#line 2330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_adjust_reset_command_parent_class = g_type_class_peek_parent (klass); +#line 2330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsAdjustToolAdjustResetCommandPrivate)); +#line 2330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->execute = editing_tools_adjust_tool_adjust_reset_command_real_execute; +#line 2330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->undo = editing_tools_adjust_tool_adjust_reset_command_real_undo; +#line 2330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->compress = editing_tools_adjust_tool_adjust_reset_command_real_compress; +#line 2330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (klass)->finalize = editing_tools_adjust_tool_adjust_reset_command_finalize; +#line 18610 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_reset_command_instance_init (EditingToolsAdjustToolAdjustResetCommand * self) { +#line 2330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_ADJUST_TOOL_ADJUST_RESET_COMMAND_GET_PRIVATE (self); +#line 18617 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_reset_command_finalize (GObject* obj) { + EditingToolsAdjustToolAdjustResetCommand * self; +#line 2330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_RESET_COMMAND, EditingToolsAdjustToolAdjustResetCommand); +#line 2331 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->original); +#line 2332 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->reset); +#line 2330 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (editing_tools_adjust_tool_adjust_reset_command_parent_class)->finalize (obj); +#line 18631 "EditingTools.c" +} + + +static GType editing_tools_adjust_tool_adjust_reset_command_get_type (void) { + static volatile gsize editing_tools_adjust_tool_adjust_reset_command_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_adjust_tool_adjust_reset_command_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsAdjustToolAdjustResetCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_adjust_tool_adjust_reset_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsAdjustToolAdjustResetCommand), 0, (GInstanceInitFunc) editing_tools_adjust_tool_adjust_reset_command_instance_init, NULL }; + GType editing_tools_adjust_tool_adjust_reset_command_type_id; + editing_tools_adjust_tool_adjust_reset_command_type_id = g_type_register_static (EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, "EditingToolsAdjustToolAdjustResetCommand", &g_define_type_info, 0); + g_once_init_leave (&editing_tools_adjust_tool_adjust_reset_command_type_id__volatile, editing_tools_adjust_tool_adjust_reset_command_type_id); + } + return editing_tools_adjust_tool_adjust_reset_command_type_id__volatile; +} + + +static EditingToolsAdjustToolSliderAdjustmentCommand* editing_tools_adjust_tool_slider_adjustment_command_construct (GType object_type, EditingToolsAdjustTool* owner, PixelTransformation* old_transformation, PixelTransformation* new_transformation, const gchar* name) { + EditingToolsAdjustToolSliderAdjustmentCommand * self = NULL; + EditingToolsAdjustTool* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PixelTransformation* _tmp3_ = NULL; + PixelTransformation* _tmp4_ = NULL; + PixelTransformation* _tmp5_ = NULL; + PixelTransformation* _tmp6_ = NULL; + PixelTransformation* _tmp7_ = NULL; + PixelTransformationType _tmp8_ = 0; + PixelTransformation* _tmp9_ = NULL; + PixelTransformationType _tmp10_ = 0; + PixelTransformationType _tmp11_ = 0; +#line 2368 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (owner), NULL); +#line 2368 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PIXEL_TRANSFORMATION (old_transformation), NULL); +#line 2368 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PIXEL_TRANSFORMATION (new_transformation), NULL); +#line 2368 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 2370 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = owner; +#line 2370 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = name; +#line 2370 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = name; +#line 2370 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsAdjustToolSliderAdjustmentCommand*) editing_tools_adjust_tool_adjust_tool_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_); +#line 2372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = old_transformation; +#line 2372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = _pixel_transformation_ref0 (_tmp3_); +#line 2372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (self->priv->old_transformation); +#line 2372 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->old_transformation = _tmp4_; +#line 2373 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = new_transformation; +#line 2373 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = _pixel_transformation_ref0 (_tmp5_); +#line 2373 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (self->priv->new_transformation); +#line 2373 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->new_transformation = _tmp6_; +#line 2374 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = old_transformation; +#line 2374 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = pixel_transformation_get_transformation_type (_tmp7_); +#line 2374 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->transformation_type = _tmp8_; +#line 2375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = new_transformation; +#line 2375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = pixel_transformation_get_transformation_type (_tmp9_); +#line 2375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = self->priv->transformation_type; +#line 2375 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _vala_assert (_tmp10_ == _tmp11_, "new_transformation.get_transformation_type() == transformation_type"); +#line 2368 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 18709 "EditingTools.c" +} + + +static EditingToolsAdjustToolSliderAdjustmentCommand* editing_tools_adjust_tool_slider_adjustment_command_new (EditingToolsAdjustTool* owner, PixelTransformation* old_transformation, PixelTransformation* new_transformation, const gchar* name) { +#line 2368 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_adjust_tool_slider_adjustment_command_construct (EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, owner, old_transformation, new_transformation, name); +#line 18716 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_slider_adjustment_command_real_execute (Command* base) { + EditingToolsAdjustToolSliderAdjustmentCommand * self; + EditingToolsAdjustTool* _tmp0_ = NULL; + PixelTransformation* _tmp1_ = NULL; + EditingToolsAdjustTool* _tmp2_ = NULL; + EditingToolsPhotoCanvas* _tmp3_ = NULL; +#line 2378 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, EditingToolsAdjustToolSliderAdjustmentCommand); +#line 2380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->new_transformation; +#line 2380 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_update_transformation (_tmp0_, _tmp1_); +#line 2381 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2381 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2381 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp3_); +#line 18740 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_slider_adjustment_command_real_undo (Command* base) { + EditingToolsAdjustToolSliderAdjustmentCommand * self; + EditingToolsAdjustTool* _tmp0_ = NULL; + PixelTransformation* _tmp1_ = NULL; + EditingToolsAdjustTool* _tmp2_ = NULL; + EditingToolsAdjustTool* _tmp3_ = NULL; + PixelTransformation* _tmp4_ = NULL; + EditingToolsAdjustTool* _tmp5_ = NULL; + EditingToolsAdjustTool* _tmp6_ = NULL; + EditingToolsPhotoCanvas* _tmp7_ = NULL; +#line 2384 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, EditingToolsAdjustToolSliderAdjustmentCommand); +#line 2385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->old_transformation; +#line 2385 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_update_transformation (_tmp0_, _tmp1_); +#line 2387 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2387 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_unbind_window_handlers (_tmp2_); +#line 2388 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2388 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->old_transformation; +#line 2388 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_update_slider (_tmp3_, _tmp4_); +#line 2389 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2389 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_bind_window_handlers (_tmp5_); +#line 2391 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2391 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2391 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp7_); +#line 18782 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_slider_adjustment_command_real_redo (Command* base) { + EditingToolsAdjustToolSliderAdjustmentCommand * self; + EditingToolsAdjustTool* _tmp0_ = NULL; + PixelTransformation* _tmp1_ = NULL; + EditingToolsAdjustTool* _tmp2_ = NULL; + EditingToolsAdjustTool* _tmp3_ = NULL; + PixelTransformation* _tmp4_ = NULL; + EditingToolsAdjustTool* _tmp5_ = NULL; + EditingToolsAdjustTool* _tmp6_ = NULL; + EditingToolsPhotoCanvas* _tmp7_ = NULL; +#line 2394 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, EditingToolsAdjustToolSliderAdjustmentCommand); +#line 2395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->new_transformation; +#line 2395 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_update_transformation (_tmp0_, _tmp1_); +#line 2397 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2397 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_unbind_window_handlers (_tmp2_); +#line 2398 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2398 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->new_transformation; +#line 2398 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_update_slider (_tmp3_, _tmp4_); +#line 2399 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2399 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_bind_window_handlers (_tmp5_); +#line 2401 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2401 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2401 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_photo_canvas_repaint (_tmp7_); +#line 18824 "EditingTools.c" +} + + +static gboolean editing_tools_adjust_tool_slider_adjustment_command_real_compress (Command* base, Command* command) { + EditingToolsAdjustToolSliderAdjustmentCommand * self; + gboolean result = FALSE; + EditingToolsAdjustToolSliderAdjustmentCommand* slider_adjustment = NULL; + Command* _tmp0_ = NULL; + EditingToolsAdjustToolSliderAdjustmentCommand* _tmp1_ = NULL; + EditingToolsAdjustToolSliderAdjustmentCommand* _tmp2_ = NULL; + EditingToolsAdjustToolSliderAdjustmentCommand* _tmp3_ = NULL; + EditingToolsAdjustTool* _tmp4_ = NULL; + EditingToolsAdjustTool* _tmp5_ = NULL; + EditingToolsAdjustToolSliderAdjustmentCommand* _tmp6_ = NULL; + PixelTransformationType _tmp7_ = 0; + PixelTransformationType _tmp8_ = 0; + EditingToolsAdjustToolSliderAdjustmentCommand* _tmp9_ = NULL; + EditingToolsAdjustToolSliderAdjustmentCommand* _tmp10_ = NULL; + PixelTransformation* _tmp11_ = NULL; + PixelTransformation* _tmp12_ = NULL; +#line 2404 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, EditingToolsAdjustToolSliderAdjustmentCommand); +#line 2404 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_COMMAND (command), FALSE); +#line 2405 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = command; +#line 2405 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND) ? ((EditingToolsAdjustToolSliderAdjustmentCommand*) _tmp0_) : NULL); +#line 2405 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + slider_adjustment = _tmp1_; +#line 2406 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = slider_adjustment; +#line 2406 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp2_ == NULL) { +#line 2407 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 2407 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (slider_adjustment); +#line 2407 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 18865 "EditingTools.c" + } +#line 2410 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = slider_adjustment; +#line 2410 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2410 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2410 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp4_ != _tmp5_) { +#line 2411 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 2411 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (slider_adjustment); +#line 2411 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 18881 "EditingTools.c" + } +#line 2414 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = slider_adjustment; +#line 2414 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = _tmp6_->priv->transformation_type; +#line 2414 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = self->priv->transformation_type; +#line 2414 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp7_ != _tmp8_) { +#line 2415 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 2415 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (slider_adjustment); +#line 2415 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 18897 "EditingTools.c" + } +#line 2418 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = slider_adjustment; +#line 2418 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + command_execute (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_COMMAND, Command)); +#line 2421 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = slider_adjustment; +#line 2421 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_->priv->new_transformation; +#line 2421 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = _pixel_transformation_ref0 (_tmp11_); +#line 2421 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (self->priv->new_transformation); +#line 2421 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->new_transformation = _tmp12_; +#line 2423 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 2423 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (slider_adjustment); +#line 2423 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 18919 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_slider_adjustment_command_class_init (EditingToolsAdjustToolSliderAdjustmentCommandClass * klass) { +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_slider_adjustment_command_parent_class = g_type_class_peek_parent (klass); +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsAdjustToolSliderAdjustmentCommandPrivate)); +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->execute = editing_tools_adjust_tool_slider_adjustment_command_real_execute; +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->undo = editing_tools_adjust_tool_slider_adjustment_command_real_undo; +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->redo = editing_tools_adjust_tool_slider_adjustment_command_real_redo; +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->compress = editing_tools_adjust_tool_slider_adjustment_command_real_compress; +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (klass)->finalize = editing_tools_adjust_tool_slider_adjustment_command_finalize; +#line 18938 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_slider_adjustment_command_instance_init (EditingToolsAdjustToolSliderAdjustmentCommand * self) { +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_ADJUST_TOOL_SLIDER_ADJUSTMENT_COMMAND_GET_PRIVATE (self); +#line 18945 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_slider_adjustment_command_finalize (GObject* obj) { + EditingToolsAdjustToolSliderAdjustmentCommand * self; +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_ADJUST_TOOL_TYPE_SLIDER_ADJUSTMENT_COMMAND, EditingToolsAdjustToolSliderAdjustmentCommand); +#line 2365 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (self->priv->new_transformation); +#line 2366 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_unref0 (self->priv->old_transformation); +#line 2363 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (editing_tools_adjust_tool_slider_adjustment_command_parent_class)->finalize (obj); +#line 18959 "EditingTools.c" +} + + +static GType editing_tools_adjust_tool_slider_adjustment_command_get_type (void) { + static volatile gsize editing_tools_adjust_tool_slider_adjustment_command_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_adjust_tool_slider_adjustment_command_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsAdjustToolSliderAdjustmentCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_adjust_tool_slider_adjustment_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsAdjustToolSliderAdjustmentCommand), 0, (GInstanceInitFunc) editing_tools_adjust_tool_slider_adjustment_command_instance_init, NULL }; + GType editing_tools_adjust_tool_slider_adjustment_command_type_id; + editing_tools_adjust_tool_slider_adjustment_command_type_id = g_type_register_static (EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, "EditingToolsAdjustToolSliderAdjustmentCommand", &g_define_type_info, 0); + g_once_init_leave (&editing_tools_adjust_tool_slider_adjustment_command_type_id__volatile, editing_tools_adjust_tool_slider_adjustment_command_type_id); + } + return editing_tools_adjust_tool_slider_adjustment_command_type_id__volatile; +} + + +static EditingToolsAdjustToolAdjustEnhanceCommand* editing_tools_adjust_tool_adjust_enhance_command_construct (GType object_type, EditingToolsAdjustTool* owner, Photo* photo) { + EditingToolsAdjustToolAdjustEnhanceCommand * self = NULL; + EditingToolsAdjustTool* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + PixelTransformationBundle* _tmp4_ = NULL; +#line 2432 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (EDITING_TOOLS_IS_ADJUST_TOOL (owner), NULL); +#line 2432 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_PHOTO (photo), NULL); +#line 2433 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = owner; +#line 2433 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = (EditingToolsAdjustToolAdjustEnhanceCommand*) editing_tools_adjust_tool_adjust_tool_command_construct (object_type, _tmp0_, RESOURCES_ENHANCE_LABEL, RESOURCES_ENHANCE_TOOLTIP); +#line 2435 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = photo; +#line 2435 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = _g_object_ref0 (_tmp1_); +#line 2435 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->photo); +#line 2435 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->photo = _tmp2_; +#line 2436 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = photo; +#line 2436 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = photo_get_color_adjustments (_tmp3_); +#line 2436 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->original); +#line 2436 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->original = _tmp4_; +#line 2432 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return self; +#line 19008 "EditingTools.c" +} + + +static EditingToolsAdjustToolAdjustEnhanceCommand* editing_tools_adjust_tool_adjust_enhance_command_new (EditingToolsAdjustTool* owner, Photo* photo) { +#line 2432 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return editing_tools_adjust_tool_adjust_enhance_command_construct (EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND, owner, photo); +#line 19015 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_enhance_command_real_execute (Command* base) { + EditingToolsAdjustToolAdjustEnhanceCommand * self; + PixelTransformationBundle* _tmp0_ = NULL; + EditingToolsAdjustTool* _tmp3_ = NULL; + PixelTransformationBundle* _tmp4_ = NULL; +#line 2439 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND, EditingToolsAdjustToolAdjustEnhanceCommand); +#line 2440 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = self->priv->enhanced; +#line 2440 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp0_ == NULL) { +#line 19030 "EditingTools.c" + Photo* _tmp1_ = NULL; + PixelTransformationBundle* _tmp2_ = NULL; +#line 2441 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->photo; +#line 2441 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = photo_get_enhance_transformations (_tmp1_); +#line 2441 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->enhanced); +#line 2441 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->enhanced = _tmp2_; +#line 19041 "EditingTools.c" + } +#line 2443 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2443 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = self->priv->enhanced; +#line 2443 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_set_adjustments (_tmp3_, _tmp4_); +#line 19049 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_enhance_command_real_undo (Command* base) { + EditingToolsAdjustToolAdjustEnhanceCommand * self; + EditingToolsAdjustTool* _tmp0_ = NULL; + PixelTransformationBundle* _tmp1_ = NULL; +#line 2446 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND, EditingToolsAdjustToolAdjustEnhanceCommand); +#line 2447 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2447 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = self->priv->original; +#line 2447 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_set_adjustments (_tmp0_, _tmp1_); +#line 19065 "EditingTools.c" +} + + +static gboolean editing_tools_adjust_tool_adjust_enhance_command_real_compress (Command* base, Command* command) { + EditingToolsAdjustToolAdjustEnhanceCommand * self; + gboolean result = FALSE; + EnhanceSingleCommand* enhance_single = NULL; + Command* _tmp0_ = NULL; + EnhanceSingleCommand* _tmp1_ = NULL; + EnhanceSingleCommand* _tmp2_ = NULL; + EditingToolsAdjustToolAdjustEnhanceCommand* enhance_command = NULL; + Command* _tmp12_ = NULL; + EditingToolsAdjustToolAdjustEnhanceCommand* _tmp13_ = NULL; + EditingToolsAdjustToolAdjustEnhanceCommand* _tmp14_ = NULL; + EditingToolsAdjustToolAdjustEnhanceCommand* _tmp15_ = NULL; + EditingToolsAdjustTool* _tmp16_ = NULL; + EditingToolsAdjustTool* _tmp17_ = NULL; +#line 2450 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND, EditingToolsAdjustToolAdjustEnhanceCommand); +#line 2450 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_return_val_if_fail (IS_COMMAND (command), FALSE); +#line 2452 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp0_ = command; +#line 2452 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_ENHANCE_SINGLE_COMMAND) ? ((EnhanceSingleCommand*) _tmp0_) : NULL); +#line 2452 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + enhance_single = _tmp1_; +#line 2453 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp2_ = enhance_single; +#line 2453 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp2_ != NULL) { +#line 19097 "EditingTools.c" + Photo* photo = NULL; + EnhanceSingleCommand* _tmp3_ = NULL; + DataSource* _tmp4_ = NULL; + Photo* _tmp5_ = NULL; + EditingToolsAdjustTool* _tmp6_ = NULL; + EditingToolsPhotoCanvas* _tmp7_ = NULL; + Photo* _tmp8_ = NULL; + Photo* _tmp9_ = NULL; + gboolean _tmp10_ = FALSE; + gboolean _tmp11_ = FALSE; +#line 2454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp3_ = enhance_single; +#line 2454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp4_ = single_data_source_command_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)); +#line 2454 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + photo = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_PHOTO, Photo); +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp5_ = photo; +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool)->canvas; +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp8_ = editing_tools_photo_canvas_get_photo (_tmp7_); +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp9_ = _tmp8_; +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp10_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_SOURCE, DataSource)); +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp11_ = _tmp10_; +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (_tmp9_); +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = _tmp11_; +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (photo); +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (enhance_single); +#line 2458 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 19138 "EditingTools.c" + } +#line 2461 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp12_ = command; +#line 2461 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND) ? ((EditingToolsAdjustToolAdjustEnhanceCommand*) _tmp12_) : NULL); +#line 2461 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + enhance_command = _tmp13_; +#line 2462 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp14_ = enhance_command; +#line 2462 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp14_ == NULL) { +#line 2463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 2463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (enhance_command); +#line 2463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (enhance_single); +#line 2463 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 19158 "EditingTools.c" + } +#line 2465 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp15_ = enhance_command; +#line 2465 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp16_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2465 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _tmp17_ = G_TYPE_CHECK_INSTANCE_CAST (self, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, EditingToolsAdjustToolAdjustToolCommand)->owner; +#line 2465 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + if (_tmp16_ != _tmp17_) { +#line 2466 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = FALSE; +#line 2466 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (enhance_command); +#line 2466 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (enhance_single); +#line 2466 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 19176 "EditingTools.c" + } +#line 2469 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + result = TRUE; +#line 2469 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (enhance_command); +#line 2469 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (enhance_single); +#line 2469 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + return result; +#line 19186 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_enhance_command_class_init (EditingToolsAdjustToolAdjustEnhanceCommandClass * klass) { +#line 2427 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_adjust_enhance_command_parent_class = g_type_class_peek_parent (klass); +#line 2427 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsAdjustToolAdjustEnhanceCommandPrivate)); +#line 2427 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->execute = editing_tools_adjust_tool_adjust_enhance_command_real_execute; +#line 2427 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->undo = editing_tools_adjust_tool_adjust_enhance_command_real_undo; +#line 2427 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((CommandClass *) klass)->compress = editing_tools_adjust_tool_adjust_enhance_command_real_compress; +#line 2427 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (klass)->finalize = editing_tools_adjust_tool_adjust_enhance_command_finalize; +#line 19203 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_enhance_command_instance_init (EditingToolsAdjustToolAdjustEnhanceCommand * self) { +#line 2427 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_ADJUST_TOOL_ADJUST_ENHANCE_COMMAND_GET_PRIVATE (self); +#line 2430 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->enhanced = NULL; +#line 19212 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_adjust_enhance_command_finalize (GObject* obj) { + EditingToolsAdjustToolAdjustEnhanceCommand * self; +#line 2427 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_ENHANCE_COMMAND, EditingToolsAdjustToolAdjustEnhanceCommand); +#line 2428 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->photo); +#line 2429 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->original); +#line 2430 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->enhanced); +#line 2427 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + G_OBJECT_CLASS (editing_tools_adjust_tool_adjust_enhance_command_parent_class)->finalize (obj); +#line 19228 "EditingTools.c" +} + + +static GType editing_tools_adjust_tool_adjust_enhance_command_get_type (void) { + static volatile gsize editing_tools_adjust_tool_adjust_enhance_command_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_adjust_tool_adjust_enhance_command_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsAdjustToolAdjustEnhanceCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_adjust_tool_adjust_enhance_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsAdjustToolAdjustEnhanceCommand), 0, (GInstanceInitFunc) editing_tools_adjust_tool_adjust_enhance_command_instance_init, NULL }; + GType editing_tools_adjust_tool_adjust_enhance_command_type_id; + editing_tools_adjust_tool_adjust_enhance_command_type_id = g_type_register_static (EDITING_TOOLS_ADJUST_TOOL_TYPE_ADJUST_TOOL_COMMAND, "EditingToolsAdjustToolAdjustEnhanceCommand", &g_define_type_info, 0); + g_once_init_leave (&editing_tools_adjust_tool_adjust_enhance_command_type_id__volatile, editing_tools_adjust_tool_adjust_enhance_command_type_id); + } + return editing_tools_adjust_tool_adjust_enhance_command_type_id__volatile; +} + + +static void editing_tools_adjust_tool_class_init (EditingToolsAdjustToolClass * klass) { +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + editing_tools_adjust_tool_parent_class = g_type_class_peek_parent (klass); +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->finalize = editing_tools_adjust_tool_finalize; +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + g_type_class_add_private (klass, sizeof (EditingToolsAdjustToolPrivate)); +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->activate = editing_tools_adjust_tool_real_activate; +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->get_tool_window = editing_tools_adjust_tool_real_get_tool_window; +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->deactivate = editing_tools_adjust_tool_real_deactivate; +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->paint = editing_tools_adjust_tool_real_paint; +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->get_display_pixbuf = editing_tools_adjust_tool_real_get_display_pixbuf; +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + ((EditingToolsEditingToolClass *) klass)->on_keypress = editing_tools_adjust_tool_real_on_keypress; +#line 19263 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_instance_init (EditingToolsAdjustTool * self) { +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv = EDITING_TOOLS_ADJUST_TOOL_GET_PRIVATE (self); +#line 2473 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->adjust_tool_window = NULL; +#line 2474 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->suppress_effect_redraw = FALSE; +#line 2475 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->draw_to_pixbuf = NULL; +#line 2476 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->histogram_pixbuf = NULL; +#line 2477 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->virgin_histogram_pixbuf = NULL; +#line 2478 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->transformer = NULL; +#line 2479 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->histogram_transformer = NULL; +#line 2480 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->transformations = NULL; +#line 2481 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->fp_pixel_cache = NULL; +#line 2481 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->fp_pixel_cache_length1 = 0; +#line 2481 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->_fp_pixel_cache_size_ = self->priv->fp_pixel_cache_length1; +#line 2482 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->disable_histogram_refresh = FALSE; +#line 2483 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->temperature_scheduler = NULL; +#line 2484 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->tint_scheduler = NULL; +#line 2485 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->saturation_scheduler = NULL; +#line 2486 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->exposure_scheduler = NULL; +#line 2487 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->shadows_scheduler = NULL; +#line 2488 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->highlights_scheduler = NULL; +#line 19306 "EditingTools.c" +} + + +static void editing_tools_adjust_tool_finalize (EditingToolsEditingTool* obj) { + EditingToolsAdjustTool * self; +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustTool); +#line 2473 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->adjust_tool_window); +#line 2475 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->draw_to_pixbuf); +#line 2476 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->histogram_pixbuf); +#line 2477 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _g_object_unref0 (self->priv->virgin_histogram_pixbuf); +#line 2478 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformer_unref0 (self->priv->transformer); +#line 2479 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformer_unref0 (self->priv->histogram_transformer); +#line 2480 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _pixel_transformation_bundle_unref0 (self->priv->transformations); +#line 2481 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + self->priv->fp_pixel_cache = (g_free (self->priv->fp_pixel_cache), NULL); +#line 2483 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->temperature_scheduler); +#line 2484 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->tint_scheduler); +#line 2485 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->saturation_scheduler); +#line 2486 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->exposure_scheduler); +#line 2487 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->shadows_scheduler); +#line 2488 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + _one_shot_scheduler_unref0 (self->priv->highlights_scheduler); +#line 2200 "/home/jens/Source/shotwell/src/editing_tools/EditingTools.vala" + EDITING_TOOLS_EDITING_TOOL_CLASS (editing_tools_adjust_tool_parent_class)->finalize (obj); +#line 19344 "EditingTools.c" +} + + +GType editing_tools_adjust_tool_get_type (void) { + static volatile gsize editing_tools_adjust_tool_type_id__volatile = 0; + if (g_once_init_enter (&editing_tools_adjust_tool_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EditingToolsAdjustToolClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_tools_adjust_tool_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingToolsAdjustTool), 0, (GInstanceInitFunc) editing_tools_adjust_tool_instance_init, NULL }; + GType editing_tools_adjust_tool_type_id; + editing_tools_adjust_tool_type_id = g_type_register_static (EDITING_TOOLS_TYPE_EDITING_TOOL, "EditingToolsAdjustTool", &g_define_type_info, 0); + g_once_init_leave (&editing_tools_adjust_tool_type_id__volatile, editing_tools_adjust_tool_type_id); + } + return editing_tools_adjust_tool_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + + |