summaryrefslogtreecommitdiff
path: root/src/photos/PngSupport.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-07-09 12:10:38 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-07-09 12:10:38 +0200
commit709e2d6f5652ec90c194a4ec2b530bebc6f952cb (patch)
tree496b2f3899e1d5728ee9ae76095cc5056c317447 /src/photos/PngSupport.c
parentf1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff)
parent5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff)
Merge branch 'release/0.28.3-1'0.28.3-1
Diffstat (limited to 'src/photos/PngSupport.c')
-rw-r--r--src/photos/PngSupport.c848
1 files changed, 507 insertions, 341 deletions
diff --git a/src/photos/PngSupport.c b/src/photos/PngSupport.c
index 4658dd2..41e90da 100644
--- a/src/photos/PngSupport.c
+++ b/src/photos/PngSupport.c
@@ -1,4 +1,4 @@
-/* PngSupport.c generated by valac 0.36.6, the Vala compiler
+/* PngSupport.c generated by valac 0.40.4, the Vala compiler
* generated from PngSupport.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
@@ -481,17 +482,20 @@ static PngFileFormatDriver* png_file_format_driver_instance = NULL;
gpointer photo_file_format_properties_ref (gpointer instance);
void photo_file_format_properties_unref (gpointer instance);
-GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_photo_file_format_properties (GValue* value, gpointer v_object);
-void value_take_photo_file_format_properties (GValue* value, gpointer v_object);
+GParamSpec* param_spec_photo_file_format_properties (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_photo_file_format_properties (GValue* value,
+ gpointer v_object);
+void value_take_photo_file_format_properties (GValue* value,
+ gpointer v_object);
gpointer value_get_photo_file_format_properties (const GValue* value);
GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
GType photo_file_format_get_type (void) G_GNUC_CONST;
GType photo_file_format_flags_get_type (void) G_GNUC_CONST;
GType png_file_format_properties_get_type (void) G_GNUC_CONST;
-enum {
- PNG_FILE_FORMAT_PROPERTIES_DUMMY_PROPERTY
-};
void png_file_format_properties_init (void);
PngFileFormatProperties* png_file_format_properties_new (void);
PngFileFormatProperties* png_file_format_properties_construct (GType object_type);
@@ -500,44 +504,73 @@ static PhotoFileFormat png_file_format_properties_real_get_file_format (PhotoFil
static PhotoFileFormatFlags png_file_format_properties_real_get_flags (PhotoFileFormatProperties* base);
static gchar* png_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base);
static gchar* png_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base);
-static gchar** png_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1);
-static gchar** _vala_array_dup14 (gchar** self, int length);
+static gchar** png_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base,
+ int* result_length1);
+static gchar** _vala_array_dup12 (gchar** self,
+ int length);
static gchar* png_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base);
-static gchar** png_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1);
-static gchar** _vala_array_dup15 (gchar** self, int length);
+static gchar** png_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base,
+ int* result_length1);
+static gchar** _vala_array_dup13 (gchar** self,
+ int length);
PhotoFileFormatProperties* photo_file_format_properties_construct (GType object_type);
static void png_file_format_properties_finalize (PhotoFileFormatProperties * obj);
gpointer photo_file_sniffer_ref (gpointer instance);
void photo_file_sniffer_unref (gpointer instance);
-GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_photo_file_sniffer (GValue* value, gpointer v_object);
-void value_take_photo_file_sniffer (GValue* value, gpointer v_object);
+GParamSpec* param_spec_photo_file_sniffer (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_photo_file_sniffer (GValue* value,
+ gpointer v_object);
+void value_take_photo_file_sniffer (GValue* value,
+ gpointer v_object);
gpointer value_get_photo_file_sniffer (const GValue* value);
GType photo_file_sniffer_get_type (void) G_GNUC_CONST;
gpointer detected_photo_information_ref (gpointer instance);
void detected_photo_information_unref (gpointer instance);
-GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_detected_photo_information (GValue* value, gpointer v_object);
-void value_take_detected_photo_information (GValue* value, gpointer v_object);
+GParamSpec* param_spec_detected_photo_information (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_detected_photo_information (GValue* value,
+ gpointer v_object);
+void value_take_detected_photo_information (GValue* value,
+ gpointer v_object);
gpointer value_get_detected_photo_information (const GValue* value);
GType detected_photo_information_get_type (void) G_GNUC_CONST;
GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST;
GType gdk_sniffer_get_type (void) G_GNUC_CONST;
GType png_sniffer_get_type (void) G_GNUC_CONST;
-enum {
- PNG_SNIFFER_DUMMY_PROPERTY
-};
-PngSniffer* png_sniffer_new (GFile* file, PhotoFileSnifferOptions options);
-PngSniffer* png_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
-GdkSniffer* gdk_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options);
-static gboolean png_sniffer_is_png_file (GFile* file, GError** error);
-static DetectedPhotoInformation* png_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error);
-DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error);
+PngSniffer* png_sniffer_new (GFile* file,
+ PhotoFileSnifferOptions options);
+PngSniffer* png_sniffer_construct (GType object_type,
+ GFile* file,
+ PhotoFileSnifferOptions options);
+GdkSniffer* gdk_sniffer_construct (GType object_type,
+ GFile* file,
+ PhotoFileSnifferOptions options);
+static gboolean png_sniffer_is_png_file (GFile* file,
+ GError** error);
+static DetectedPhotoInformation* png_sniffer_real_sniff (PhotoFileSniffer* base,
+ gboolean* is_corrupted,
+ GError** error);
+DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self,
+ gboolean* is_corrupted,
+ GError** error);
gpointer media_metadata_ref (gpointer instance);
void media_metadata_unref (gpointer instance);
-GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_media_metadata (GValue* value, gpointer v_object);
-void value_take_media_metadata (GValue* value, gpointer v_object);
+GParamSpec* param_spec_media_metadata (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_media_metadata (GValue* value,
+ gpointer v_object);
+void value_take_media_metadata (GValue* value,
+ gpointer v_object);
gpointer value_get_media_metadata (const GValue* value);
GType media_metadata_get_type (void) G_GNUC_CONST;
GType photo_metadata_get_type (void) G_GNUC_CONST;
@@ -546,67 +579,94 @@ Dimensions* dimensions_dup (const Dimensions* self);
void dimensions_free (Dimensions* self);
gpointer photo_file_adapter_ref (gpointer instance);
void photo_file_adapter_unref (gpointer instance);
-GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_photo_file_adapter (GValue* value, gpointer v_object);
-void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value,
+ gpointer v_object);
+void value_take_photo_file_adapter (GValue* value,
+ gpointer v_object);
gpointer value_get_photo_file_adapter (const GValue* value);
GType photo_file_adapter_get_type (void) G_GNUC_CONST;
GType photo_file_reader_get_type (void) G_GNUC_CONST;
GType gdk_reader_get_type (void) G_GNUC_CONST;
GType png_reader_get_type (void) G_GNUC_CONST;
-enum {
- PNG_READER_DUMMY_PROPERTY
-};
PngReader* png_reader_new (const gchar* filepath);
-PngReader* png_reader_construct (GType object_type, const gchar* filepath);
-GdkReader* gdk_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
-static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error);
+PngReader* png_reader_construct (GType object_type,
+ const gchar* filepath);
+GdkReader* gdk_reader_construct (GType object_type,
+ const gchar* filepath,
+ PhotoFileFormat file_format);
+static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base,
+ Dimensions* full,
+ Dimensions* scaled,
+ GError** error);
GType scale_constraint_get_type (void) G_GNUC_CONST;
-void dimensions_get_scaled_by_constraint (Dimensions *self, gint scale, ScaleConstraint constraint, Dimensions* result);
+void dimensions_get_scaled_by_constraint (Dimensions *self,
+ gint scale,
+ ScaleConstraint constraint,
+ Dimensions* result);
gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self);
GType photo_file_writer_get_type (void) G_GNUC_CONST;
GType jpeg_quality_get_type (void) G_GNUC_CONST;
GType png_writer_get_type (void) G_GNUC_CONST;
-enum {
- PNG_WRITER_DUMMY_PROPERTY
-};
PngWriter* png_writer_new (const gchar* filepath);
-PngWriter* png_writer_construct (GType object_type, const gchar* filepath);
-PhotoFileWriter* photo_file_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
-static void png_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
+PngWriter* png_writer_construct (GType object_type,
+ const gchar* filepath);
+PhotoFileWriter* photo_file_writer_construct (GType object_type,
+ const gchar* filepath,
+ PhotoFileFormat file_format);
+static void png_writer_real_write (PhotoFileWriter* base,
+ GdkPixbuf* pixbuf,
+ JpegQuality quality,
+ GError** error);
GType photo_file_metadata_writer_get_type (void) G_GNUC_CONST;
GType png_metadata_writer_get_type (void) G_GNUC_CONST;
-enum {
- PNG_METADATA_WRITER_DUMMY_PROPERTY
-};
PngMetadataWriter* png_metadata_writer_new (const gchar* filepath);
-PngMetadataWriter* png_metadata_writer_construct (GType object_type, const gchar* filepath);
-PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format);
-static void png_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error);
-void photo_metadata_write_to_file (PhotoMetadata* self, GFile* file, GError** error);
+PngMetadataWriter* png_metadata_writer_construct (GType object_type,
+ const gchar* filepath);
+PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type,
+ const gchar* filepath,
+ PhotoFileFormat file_format);
+static void png_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base,
+ PhotoMetadata* metadata,
+ GError** error);
+void photo_metadata_write_to_file (PhotoMetadata* self,
+ GFile* file,
+ GError** error);
GFile* photo_file_adapter_get_file (PhotoFileAdapter* self);
gpointer photo_file_format_driver_ref (gpointer instance);
void photo_file_format_driver_unref (gpointer instance);
-GParamSpec* param_spec_photo_file_format_driver (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_photo_file_format_driver (GValue* value, gpointer v_object);
-void value_take_photo_file_format_driver (GValue* value, gpointer v_object);
+GParamSpec* param_spec_photo_file_format_driver (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_photo_file_format_driver (GValue* value,
+ gpointer v_object);
+void value_take_photo_file_format_driver (GValue* value,
+ gpointer v_object);
gpointer value_get_photo_file_format_driver (const GValue* value);
GType photo_file_format_driver_get_type (void) G_GNUC_CONST;
GType png_file_format_driver_get_type (void) G_GNUC_CONST;
-enum {
- PNG_FILE_FORMAT_DRIVER_DUMMY_PROPERTY
-};
void png_file_format_driver_init (void);
PngFileFormatDriver* png_file_format_driver_new (void);
PngFileFormatDriver* png_file_format_driver_construct (GType object_type);
PngFileFormatDriver* png_file_format_driver_get_instance (void);
static PhotoFileFormatProperties* png_file_format_driver_real_get_properties (PhotoFileFormatDriver* base);
-static PhotoFileReader* png_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath);
+static PhotoFileReader* png_file_format_driver_real_create_reader (PhotoFileFormatDriver* base,
+ const gchar* filepath);
static gboolean png_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base);
static gboolean png_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base);
-static PhotoFileWriter* png_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath);
-static PhotoFileMetadataWriter* png_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath);
-static PhotoFileSniffer* png_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options);
+static PhotoFileWriter* png_file_format_driver_real_create_writer (PhotoFileFormatDriver* base,
+ const gchar* filepath);
+static PhotoFileMetadataWriter* png_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base,
+ const gchar* filepath);
+static PhotoFileSniffer* png_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base,
+ GFile* file,
+ PhotoFileSnifferOptions options);
static PhotoMetadata* png_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base);
PhotoMetadata* photo_metadata_new (void);
PhotoMetadata* photo_metadata_construct (GType object_type);
@@ -615,7 +675,9 @@ static void png_file_format_driver_finalize (PhotoFileFormatDriver * obj);
static const guint8 PNG_SNIFFER_MAGIC_SEQUENCE[8] = {(guint8) 137, (guint8) 80, (guint8) 78, (guint8) 71, (guint8) 13, (guint8) 10, (guint8) 26, (guint8) 10};
-void png_file_format_properties_init (void) {
+void
+png_file_format_properties_init (void)
+{
PngFileFormatProperties* _tmp0_;
#line 14 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp0_ = png_file_format_properties_new ();
@@ -623,18 +685,22 @@ void png_file_format_properties_init (void) {
_photo_file_format_properties_unref0 (png_file_format_properties_instance);
#line 14 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
png_file_format_properties_instance = _tmp0_;
-#line 627 "PngSupport.c"
+#line 689 "PngSupport.c"
}
-static gpointer _photo_file_format_properties_ref0 (gpointer self) {
+static gpointer
+_photo_file_format_properties_ref0 (gpointer self)
+{
#line 18 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return self ? photo_file_format_properties_ref (self) : NULL;
-#line 634 "PngSupport.c"
+#line 698 "PngSupport.c"
}
-PngFileFormatProperties* png_file_format_properties_get_instance (void) {
+PngFileFormatProperties*
+png_file_format_properties_get_instance (void)
+{
PngFileFormatProperties* result = NULL;
PngFileFormatProperties* _tmp0_;
PngFileFormatProperties* _tmp1_;
@@ -646,11 +712,13 @@ PngFileFormatProperties* png_file_format_properties_get_instance (void) {
result = _tmp1_;
#line 18 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 650 "PngSupport.c"
+#line 716 "PngSupport.c"
}
-static PhotoFileFormat png_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base) {
+static PhotoFileFormat
+png_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base)
+{
PngFileFormatProperties * self;
PhotoFileFormat result = 0;
#line 21 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -659,11 +727,13 @@ static PhotoFileFormat png_file_format_properties_real_get_file_format (PhotoFil
result = PHOTO_FILE_FORMAT_PNG;
#line 22 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 663 "PngSupport.c"
+#line 731 "PngSupport.c"
}
-static PhotoFileFormatFlags png_file_format_properties_real_get_flags (PhotoFileFormatProperties* base) {
+static PhotoFileFormatFlags
+png_file_format_properties_real_get_flags (PhotoFileFormatProperties* base)
+{
PngFileFormatProperties * self;
PhotoFileFormatFlags result = 0;
#line 25 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -672,11 +742,13 @@ static PhotoFileFormatFlags png_file_format_properties_real_get_flags (PhotoFile
result = PHOTO_FILE_FORMAT_FLAGS_NONE;
#line 26 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 676 "PngSupport.c"
+#line 746 "PngSupport.c"
}
-static gchar* png_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base) {
+static gchar*
+png_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base)
+{
PngFileFormatProperties * self;
gchar* result = NULL;
gchar* _tmp0_;
@@ -688,11 +760,13 @@ static gchar* png_file_format_properties_real_get_user_visible_name (PhotoFileFo
result = _tmp0_;
#line 30 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 692 "PngSupport.c"
+#line 764 "PngSupport.c"
}
-static gchar* png_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base) {
+static gchar*
+png_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base)
+{
PngFileFormatProperties * self;
gchar* result = NULL;
gchar** _tmp0_;
@@ -713,32 +787,38 @@ static gchar* png_file_format_properties_real_get_default_extension (PhotoFileFo
result = _tmp2_;
#line 34 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 717 "PngSupport.c"
+#line 791 "PngSupport.c"
}
-static gchar** _vala_array_dup14 (gchar** self, int length) {
+static gchar**
+_vala_array_dup12 (gchar** self,
+ int length)
+{
gchar** result;
int i;
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
result = g_new0 (gchar*, length + 1);
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
for (i = 0; i < length; i++) {
-#line 728 "PngSupport.c"
+#line 805 "PngSupport.c"
gchar* _tmp0_;
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp0_ = g_strdup (self[i]);
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
result[i] = _tmp0_;
-#line 734 "PngSupport.c"
+#line 811 "PngSupport.c"
}
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 738 "PngSupport.c"
+#line 815 "PngSupport.c"
}
-static gchar** png_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1) {
+static gchar**
+png_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base,
+ int* result_length1)
+{
PngFileFormatProperties * self;
gchar** result = NULL;
gchar** _tmp0_;
@@ -754,7 +834,7 @@ static gchar** png_file_format_properties_real_get_known_extensions (PhotoFileFo
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp0__length1 = png_file_format_properties_KNOWN_EXTENSIONS_length1;
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup14 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup12 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp1__length1 = _tmp0__length1;
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -765,17 +845,19 @@ static gchar** png_file_format_properties_real_get_known_extensions (PhotoFileFo
if (result_length1) {
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
*result_length1 = _tmp2__length1;
-#line 769 "PngSupport.c"
+#line 849 "PngSupport.c"
}
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
result = _tmp2_;
#line 38 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 775 "PngSupport.c"
+#line 855 "PngSupport.c"
}
-static gchar* png_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base) {
+static gchar*
+png_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base)
+{
PngFileFormatProperties * self;
gchar* result = NULL;
gchar** _tmp0_;
@@ -796,32 +878,38 @@ static gchar* png_file_format_properties_real_get_default_mime_type (PhotoFileFo
result = _tmp2_;
#line 42 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 800 "PngSupport.c"
+#line 882 "PngSupport.c"
}
-static gchar** _vala_array_dup15 (gchar** self, int length) {
+static gchar**
+_vala_array_dup13 (gchar** self,
+ int length)
+{
gchar** result;
int i;
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
result = g_new0 (gchar*, length + 1);
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
for (i = 0; i < length; i++) {
-#line 811 "PngSupport.c"
+#line 896 "PngSupport.c"
gchar* _tmp0_;
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp0_ = g_strdup (self[i]);
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
result[i] = _tmp0_;
-#line 817 "PngSupport.c"
+#line 902 "PngSupport.c"
}
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 821 "PngSupport.c"
+#line 906 "PngSupport.c"
}
-static gchar** png_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1) {
+static gchar**
+png_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base,
+ int* result_length1)
+{
PngFileFormatProperties * self;
gchar** result = NULL;
gchar** _tmp0_;
@@ -837,7 +925,7 @@ static gchar** png_file_format_properties_real_get_mime_types (PhotoFileFormatPr
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp0__length1 = png_file_format_properties_KNOWN_MIME_TYPES_length1;
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup15 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
+ _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup13 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp1__length1 = _tmp0__length1;
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -848,34 +936,40 @@ static gchar** png_file_format_properties_real_get_mime_types (PhotoFileFormatPr
if (result_length1) {
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
*result_length1 = _tmp2__length1;
-#line 852 "PngSupport.c"
+#line 940 "PngSupport.c"
}
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
result = _tmp2_;
#line 46 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 858 "PngSupport.c"
+#line 946 "PngSupport.c"
}
-PngFileFormatProperties* png_file_format_properties_construct (GType object_type) {
+PngFileFormatProperties*
+png_file_format_properties_construct (GType object_type)
+{
PngFileFormatProperties* self = NULL;
#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = (PngFileFormatProperties*) photo_file_format_properties_construct (object_type);
#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return self;
-#line 868 "PngSupport.c"
+#line 958 "PngSupport.c"
}
-PngFileFormatProperties* png_file_format_properties_new (void) {
+PngFileFormatProperties*
+png_file_format_properties_new (void)
+{
#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return png_file_format_properties_construct (TYPE_PNG_FILE_FORMAT_PROPERTIES);
-#line 875 "PngSupport.c"
+#line 967 "PngSupport.c"
}
-static void png_file_format_properties_class_init (PngFileFormatPropertiesClass * klass) {
+static void
+png_file_format_properties_class_init (PngFileFormatPropertiesClass * klass)
+{
gchar* _tmp0_;
gchar** _tmp1_;
gchar* _tmp2_;
@@ -918,25 +1012,31 @@ static void png_file_format_properties_class_init (PngFileFormatPropertiesClass
png_file_format_properties_KNOWN_MIME_TYPES = _tmp3_;
#line 9 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
png_file_format_properties_KNOWN_MIME_TYPES_length1 = 1;
-#line 922 "PngSupport.c"
+#line 1016 "PngSupport.c"
}
-static void png_file_format_properties_instance_init (PngFileFormatProperties * self) {
+static void
+png_file_format_properties_instance_init (PngFileFormatProperties * self)
+{
}
-static void png_file_format_properties_finalize (PhotoFileFormatProperties * obj) {
+static void
+png_file_format_properties_finalize (PhotoFileFormatProperties * obj)
+{
PngFileFormatProperties * self;
#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PNG_FILE_FORMAT_PROPERTIES, PngFileFormatProperties);
#line 7 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
PHOTO_FILE_FORMAT_PROPERTIES_CLASS (png_file_format_properties_parent_class)->finalize (obj);
-#line 936 "PngSupport.c"
+#line 1034 "PngSupport.c"
}
-GType png_file_format_properties_get_type (void) {
+GType
+png_file_format_properties_get_type (void)
+{
static volatile gsize png_file_format_properties_type_id__volatile = 0;
if (g_once_init_enter (&png_file_format_properties_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (PngFileFormatPropertiesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_file_format_properties_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngFileFormatProperties), 0, (GInstanceInitFunc) png_file_format_properties_instance_init, NULL };
@@ -948,82 +1048,83 @@ GType png_file_format_properties_get_type (void) {
}
-PngSniffer* png_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) {
+PngSniffer*
+png_sniffer_construct (GType object_type,
+ GFile* file,
+ PhotoFileSnifferOptions options)
+{
PngSniffer* self = NULL;
- GFile* _tmp0_;
- PhotoFileSnifferOptions _tmp1_;
#line 53 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 54 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = file;
-#line 54 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = options;
-#line 54 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- self = (PngSniffer*) gdk_sniffer_construct (object_type, _tmp0_, _tmp1_);
+ self = (PngSniffer*) gdk_sniffer_construct (object_type, file, options);
#line 53 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return self;
-#line 966 "PngSupport.c"
+#line 1064 "PngSupport.c"
}
-PngSniffer* png_sniffer_new (GFile* file, PhotoFileSnifferOptions options) {
+PngSniffer*
+png_sniffer_new (GFile* file,
+ PhotoFileSnifferOptions options)
+{
#line 53 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return png_sniffer_construct (TYPE_PNG_SNIFFER, file, options);
-#line 973 "PngSupport.c"
+#line 1074 "PngSupport.c"
}
-static gboolean png_sniffer_is_png_file (GFile* file, GError** error) {
+static gboolean
+png_sniffer_is_png_file (GFile* file,
+ GError** error)
+{
gboolean result = FALSE;
GFileInputStream* instream = NULL;
- GFile* _tmp0_;
- GFileInputStream* _tmp1_;
+ GFileInputStream* _tmp0_;
guint8* file_lead_sequence = NULL;
- guint8* _tmp3_;
+ guint8* _tmp2_;
gint file_lead_sequence_length1;
gint _file_lead_sequence_size_;
- GFileInputStream* _tmp4_;
- guint8* _tmp5_;
- gint _tmp5__length1;
+ GFileInputStream* _tmp3_;
+ guint8* _tmp4_;
+ gint _tmp4__length1;
GError * _inner_error_ = NULL;
#line 57 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = file;
+ _tmp0_ = g_file_read (file, NULL, &_inner_error_);
#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = g_file_read (_tmp0_, NULL, &_inner_error_);
-#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- instream = _tmp1_;
+ instream = _tmp0_;
#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1000 "PngSupport.c"
- gboolean _tmp2_ = FALSE;
+#line 1101 "PngSupport.c"
+ gboolean _tmp1_ = FALSE;
#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_propagate_error (error, _inner_error_);
#line 58 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- return _tmp2_;
-#line 1006 "PngSupport.c"
+ return _tmp1_;
+#line 1107 "PngSupport.c"
}
#line 60 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp3_ = g_new0 (guint8, G_N_ELEMENTS (PNG_SNIFFER_MAGIC_SEQUENCE));
+ _tmp2_ = g_new0 (guint8, G_N_ELEMENTS (PNG_SNIFFER_MAGIC_SEQUENCE));
#line 60 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- file_lead_sequence = _tmp3_;
+ file_lead_sequence = _tmp2_;
#line 60 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
file_lead_sequence_length1 = G_N_ELEMENTS (PNG_SNIFFER_MAGIC_SEQUENCE);
#line 60 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_file_lead_sequence_size_ = file_lead_sequence_length1;
#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp4_ = instream;
+ _tmp3_ = instream;
#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp5_ = file_lead_sequence;
+ _tmp4_ = file_lead_sequence;
#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp5__length1 = file_lead_sequence_length1;
+ _tmp4__length1 = file_lead_sequence_length1;
#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, g_input_stream_get_type (), GInputStream), _tmp5_, (gsize) _tmp5__length1, NULL, &_inner_error_);
+ g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, g_input_stream_get_type (), GInputStream), _tmp4_, (gsize) _tmp4__length1, NULL, &_inner_error_);
#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1026 "PngSupport.c"
- gboolean _tmp6_ = FALSE;
+#line 1127 "PngSupport.c"
+ gboolean _tmp5_ = FALSE;
#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_propagate_error (error, _inner_error_);
#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -1031,62 +1132,62 @@ static gboolean png_sniffer_is_png_file (GFile* file, GError** error) {
#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_g_object_unref0 (instream);
#line 62 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- return _tmp6_;
-#line 1036 "PngSupport.c"
+ return _tmp5_;
+#line 1137 "PngSupport.c"
}
{
gint i = 0;
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
i = 0;
-#line 1042 "PngSupport.c"
+#line 1143 "PngSupport.c"
{
- gboolean _tmp7_ = FALSE;
+ gboolean _tmp6_ = FALSE;
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp7_ = TRUE;
+ _tmp6_ = TRUE;
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
while (TRUE) {
-#line 1049 "PngSupport.c"
- gint _tmp9_;
- guint8* _tmp10_;
- gint _tmp10__length1;
- gint _tmp11_;
- guint8 _tmp12_;
- gint _tmp13_;
- guint8 _tmp14_;
+#line 1150 "PngSupport.c"
+ gint _tmp8_;
+ guint8* _tmp9_;
+ gint _tmp9__length1;
+ gint _tmp10_;
+ guint8 _tmp11_;
+ gint _tmp12_;
+ guint8 _tmp13_;
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- if (!_tmp7_) {
-#line 1059 "PngSupport.c"
- gint _tmp8_;
+ if (!_tmp6_) {
+#line 1160 "PngSupport.c"
+ gint _tmp7_;
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp8_ = i;
+ _tmp7_ = i;
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- i = _tmp8_ + 1;
-#line 1065 "PngSupport.c"
+ i = _tmp7_ + 1;
+#line 1166 "PngSupport.c"
}
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp7_ = FALSE;
+ _tmp6_ = FALSE;
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp9_ = i;
+ _tmp8_ = i;
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- if (!(_tmp9_ < G_N_ELEMENTS (PNG_SNIFFER_MAGIC_SEQUENCE))) {
+ if (!(_tmp8_ < G_N_ELEMENTS (PNG_SNIFFER_MAGIC_SEQUENCE))) {
#line 64 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
break;
-#line 1075 "PngSupport.c"
+#line 1176 "PngSupport.c"
}
#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp10_ = file_lead_sequence;
+ _tmp9_ = file_lead_sequence;
#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp10__length1 = file_lead_sequence_length1;
+ _tmp9__length1 = file_lead_sequence_length1;
#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp11_ = i;
+ _tmp10_ = i;
#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp12_ = _tmp10_[_tmp11_];
+ _tmp11_ = _tmp9_[_tmp10_];
#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp13_ = i;
+ _tmp12_ = i;
#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp14_ = PNG_SNIFFER_MAGIC_SEQUENCE[_tmp13_];
+ _tmp13_ = PNG_SNIFFER_MAGIC_SEQUENCE[_tmp12_];
#line 65 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- if (_tmp12_ != _tmp14_) {
+ if (_tmp11_ != _tmp13_) {
#line 66 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
result = FALSE;
#line 66 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -1095,7 +1196,7 @@ static gboolean png_sniffer_is_png_file (GFile* file, GError** error) {
_g_object_unref0 (instream);
#line 66 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1099 "PngSupport.c"
+#line 1200 "PngSupport.c"
}
}
}
@@ -1108,32 +1209,37 @@ static gboolean png_sniffer_is_png_file (GFile* file, GError** error) {
_g_object_unref0 (instream);
#line 69 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1112 "PngSupport.c"
+#line 1213 "PngSupport.c"
}
-static gpointer _detected_photo_information_ref0 (gpointer self) {
+static gpointer
+_detected_photo_information_ref0 (gpointer self)
+{
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return self ? detected_photo_information_ref (self) : NULL;
-#line 1119 "PngSupport.c"
+#line 1222 "PngSupport.c"
}
-static DetectedPhotoInformation* png_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error) {
+static DetectedPhotoInformation*
+png_sniffer_real_sniff (PhotoFileSniffer* base,
+ gboolean* is_corrupted,
+ GError** error)
+{
PngSniffer * self;
gboolean _vala_is_corrupted = FALSE;
DetectedPhotoInformation* result = NULL;
gboolean _tmp0_ = FALSE;
GFile* _tmp1_;
- gboolean _tmp2_;
DetectedPhotoInformation* detected = NULL;
- gboolean _tmp3_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+ DetectedPhotoInformation* _tmp3_;
DetectedPhotoInformation* _tmp4_;
- DetectedPhotoInformation* _tmp5_;
- DetectedPhotoInformation* _tmp6_ = NULL;
- DetectedPhotoInformation* _tmp7_;
- PhotoFileFormat _tmp8_;
- DetectedPhotoInformation* _tmp10_;
+ DetectedPhotoInformation* _tmp5_ = NULL;
+ DetectedPhotoInformation* _tmp6_;
+ PhotoFileFormat _tmp7_;
+ DetectedPhotoInformation* _tmp9_;
GError * _inner_error_ = NULL;
#line 72 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_SNIFFER, PngSniffer);
@@ -1142,16 +1248,14 @@ static DetectedPhotoInformation* png_sniffer_real_sniff (PhotoFileSniffer* base,
#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file;
#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp2_ = png_sniffer_is_png_file (_tmp1_, &_inner_error_);
-#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = _tmp2_;
+ _tmp0_ = png_sniffer_is_png_file (_tmp1_, &_inner_error_);
#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_propagate_error (error, _inner_error_);
#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return NULL;
-#line 1155 "PngSupport.c"
+#line 1259 "PngSupport.c"
}
#line 76 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (!_tmp0_) {
@@ -1161,30 +1265,30 @@ static DetectedPhotoInformation* png_sniffer_real_sniff (PhotoFileSniffer* base,
if (is_corrupted) {
#line 77 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
*is_corrupted = _vala_is_corrupted;
-#line 1165 "PngSupport.c"
+#line 1269 "PngSupport.c"
}
#line 77 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1169 "PngSupport.c"
+#line 1273 "PngSupport.c"
}
#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp4_ = PHOTO_FILE_SNIFFER_CLASS (png_sniffer_parent_class)->sniff (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_GDK_SNIFFER, GdkSniffer), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer), &_tmp3_, &_inner_error_);
+ _tmp3_ = PHOTO_FILE_SNIFFER_CLASS (png_sniffer_parent_class)->sniff (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_GDK_SNIFFER, GdkSniffer), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer), &_tmp2_, &_inner_error_);
#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _vala_is_corrupted = _tmp3_;
+ _vala_is_corrupted = _tmp2_;
#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- detected = _tmp4_;
+ detected = _tmp3_;
#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_propagate_error (error, _inner_error_);
#line 79 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return NULL;
-#line 1183 "PngSupport.c"
+#line 1287 "PngSupport.c"
}
#line 80 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp5_ = detected;
+ _tmp4_ = detected;
#line 80 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- if (_tmp5_ == NULL) {
+ if (_tmp4_ == NULL) {
#line 81 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
result = NULL;
#line 81 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -1193,62 +1297,68 @@ static DetectedPhotoInformation* png_sniffer_real_sniff (PhotoFileSniffer* base,
if (is_corrupted) {
#line 81 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
*is_corrupted = _vala_is_corrupted;
-#line 1197 "PngSupport.c"
+#line 1301 "PngSupport.c"
}
#line 81 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1201 "PngSupport.c"
+#line 1305 "PngSupport.c"
}
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp7_ = detected;
+ _tmp6_ = detected;
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp8_ = _tmp7_->file_format;
+ _tmp7_ = _tmp6_->file_format;
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- if (_tmp8_ == PHOTO_FILE_FORMAT_PNG) {
-#line 1209 "PngSupport.c"
- DetectedPhotoInformation* _tmp9_;
+ if (_tmp7_ == PHOTO_FILE_FORMAT_PNG) {
+#line 1313 "PngSupport.c"
+ DetectedPhotoInformation* _tmp8_;
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp9_ = detected;
+ _tmp8_ = detected;
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp6_ = _tmp9_;
-#line 1215 "PngSupport.c"
+ _tmp5_ = _tmp8_;
+#line 1319 "PngSupport.c"
} else {
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp6_ = NULL;
-#line 1219 "PngSupport.c"
+ _tmp5_ = NULL;
+#line 1323 "PngSupport.c"
}
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp10_ = _detected_photo_information_ref0 (_tmp6_);
+ _tmp9_ = _detected_photo_information_ref0 (_tmp5_);
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- result = _tmp10_;
+ result = _tmp9_;
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_detected_photo_information_unref0 (detected);
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (is_corrupted) {
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
*is_corrupted = _vala_is_corrupted;
-#line 1231 "PngSupport.c"
+#line 1335 "PngSupport.c"
}
#line 83 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1235 "PngSupport.c"
+#line 1339 "PngSupport.c"
}
-static void png_sniffer_class_init (PngSnifferClass * klass) {
+static void
+png_sniffer_class_init (PngSnifferClass * klass)
+{
#line 50 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
png_sniffer_parent_class = g_type_class_peek_parent (klass);
#line 50 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
((PhotoFileSnifferClass *) klass)->sniff = (DetectedPhotoInformation* (*) (PhotoFileSniffer *, gboolean*, GError**)) png_sniffer_real_sniff;
-#line 1244 "PngSupport.c"
+#line 1350 "PngSupport.c"
}
-static void png_sniffer_instance_init (PngSniffer * self) {
+static void
+png_sniffer_instance_init (PngSniffer * self)
+{
}
-GType png_sniffer_get_type (void) {
+GType
+png_sniffer_get_type (void)
+{
static volatile gsize png_sniffer_type_id__volatile = 0;
if (g_once_init_enter (&png_sniffer_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (PngSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngSniffer), 0, (GInstanceInitFunc) png_sniffer_instance_init, NULL };
@@ -1260,29 +1370,36 @@ GType png_sniffer_get_type (void) {
}
-PngReader* png_reader_construct (GType object_type, const gchar* filepath) {
+PngReader*
+png_reader_construct (GType object_type,
+ const gchar* filepath)
+{
PngReader* self = NULL;
- const gchar* _tmp0_;
#line 88 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_val_if_fail (filepath != NULL, NULL);
#line 89 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = filepath;
-#line 89 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- self = (PngReader*) gdk_reader_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_PNG);
+ self = (PngReader*) gdk_reader_construct (object_type, filepath, PHOTO_FILE_FORMAT_PNG);
#line 88 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return self;
-#line 1275 "PngSupport.c"
+#line 1385 "PngSupport.c"
}
-PngReader* png_reader_new (const gchar* filepath) {
+PngReader*
+png_reader_new (const gchar* filepath)
+{
#line 88 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return png_reader_construct (TYPE_PNG_READER, filepath);
-#line 1282 "PngSupport.c"
+#line 1394 "PngSupport.c"
}
-static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions* full, Dimensions* scaled, GError** error) {
+static GdkPixbuf*
+png_reader_real_scaled_read (PhotoFileReader* base,
+ Dimensions* full,
+ Dimensions* scaled,
+ GError** error)
+{
PngReader * self;
GdkPixbuf* result = NULL;
GdkPixbuf* _result_ = NULL;
@@ -1307,7 +1424,7 @@ static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions
if (_tmp3_ > 9999) {
#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp1_ = TRUE;
-#line 1311 "PngSupport.c"
+#line 1428 "PngSupport.c"
} else {
Dimensions _tmp4_;
gint _tmp5_;
@@ -1317,11 +1434,11 @@ static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions
_tmp5_ = _tmp4_.height;
#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp1_ = _tmp5_ > 9999;
-#line 1321 "PngSupport.c"
+#line 1438 "PngSupport.c"
}
#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (_tmp1_) {
-#line 1325 "PngSupport.c"
+#line 1442 "PngSupport.c"
gboolean _tmp6_ = FALSE;
Dimensions _tmp7_;
gint _tmp8_;
@@ -1333,7 +1450,7 @@ static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions
if (_tmp8_ < 100) {
#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp6_ = TRUE;
-#line 1337 "PngSupport.c"
+#line 1454 "PngSupport.c"
} else {
Dimensions _tmp9_;
gint _tmp10_;
@@ -1343,19 +1460,19 @@ static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions
_tmp10_ = _tmp9_.height;
#line 103 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp6_ = _tmp10_ < 100;
-#line 1347 "PngSupport.c"
+#line 1464 "PngSupport.c"
}
#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp0_ = _tmp6_;
-#line 1351 "PngSupport.c"
+#line 1468 "PngSupport.c"
} else {
#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp0_ = FALSE;
-#line 1355 "PngSupport.c"
+#line 1472 "PngSupport.c"
}
#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (_tmp0_) {
-#line 1359 "PngSupport.c"
+#line 1476 "PngSupport.c"
Dimensions prefetch_dimensions = {0};
Dimensions _tmp11_ = {0};
GdkPixbuf* _tmp12_ = NULL;
@@ -1406,7 +1523,7 @@ static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions
_g_object_unref0 (_result_);
#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return NULL;
-#line 1410 "PngSupport.c"
+#line 1527 "PngSupport.c"
}
#line 107 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp21_ = _tmp12_;
@@ -1434,7 +1551,7 @@ static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions
_result_ = _tmp27_;
#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_g_object_unref0 (_tmp12_);
-#line 1438 "PngSupport.c"
+#line 1555 "PngSupport.c"
} else {
GdkPixbuf* _tmp28_ = NULL;
gchar* _tmp29_;
@@ -1474,7 +1591,7 @@ static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions
_g_object_unref0 (_result_);
#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return NULL;
-#line 1478 "PngSupport.c"
+#line 1595 "PngSupport.c"
}
#line 112 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp37_ = _tmp28_;
@@ -1486,30 +1603,36 @@ static GdkPixbuf* png_reader_real_scaled_read (PhotoFileReader* base, Dimensions
_result_ = _tmp37_;
#line 102 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_g_object_unref0 (_tmp28_);
-#line 1490 "PngSupport.c"
+#line 1607 "PngSupport.c"
}
#line 116 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
result = _result_;
#line 116 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1496 "PngSupport.c"
+#line 1613 "PngSupport.c"
}
-static void png_reader_class_init (PngReaderClass * klass) {
+static void
+png_reader_class_init (PngReaderClass * klass)
+{
#line 87 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
png_reader_parent_class = g_type_class_peek_parent (klass);
#line 87 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
((PhotoFileReaderClass *) klass)->scaled_read = (GdkPixbuf* (*) (PhotoFileReader *, Dimensions*, Dimensions*, GError**)) png_reader_real_scaled_read;
-#line 1505 "PngSupport.c"
+#line 1624 "PngSupport.c"
}
-static void png_reader_instance_init (PngReader * self) {
+static void
+png_reader_instance_init (PngReader * self)
+{
}
-GType png_reader_get_type (void) {
+GType
+png_reader_get_type (void)
+{
static volatile gsize png_reader_type_id__volatile = 0;
if (g_once_init_enter (&png_reader_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (PngReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngReader), 0, (GInstanceInitFunc) png_reader_instance_init, NULL };
@@ -1521,73 +1644,83 @@ GType png_reader_get_type (void) {
}
-PngWriter* png_writer_construct (GType object_type, const gchar* filepath) {
+PngWriter*
+png_writer_construct (GType object_type,
+ const gchar* filepath)
+{
PngWriter* self = NULL;
- const gchar* _tmp0_;
#line 121 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_val_if_fail (filepath != NULL, NULL);
#line 122 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = filepath;
-#line 122 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- self = (PngWriter*) photo_file_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_PNG);
+ self = (PngWriter*) photo_file_writer_construct (object_type, filepath, PHOTO_FILE_FORMAT_PNG);
#line 121 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return self;
-#line 1536 "PngSupport.c"
+#line 1659 "PngSupport.c"
}
-PngWriter* png_writer_new (const gchar* filepath) {
+PngWriter*
+png_writer_new (const gchar* filepath)
+{
#line 121 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return png_writer_construct (TYPE_PNG_WRITER, filepath);
-#line 1543 "PngSupport.c"
+#line 1668 "PngSupport.c"
}
-static void png_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error) {
+static void
+png_writer_real_write (PhotoFileWriter* base,
+ GdkPixbuf* pixbuf,
+ JpegQuality quality,
+ GError** error)
+{
PngWriter * self;
- GdkPixbuf* _tmp0_;
+ gchar* _tmp0_;
gchar* _tmp1_;
- gchar* _tmp2_;
GError * _inner_error_ = NULL;
#line 125 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_WRITER, PngWriter);
#line 125 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = pixbuf;
-#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+ _tmp0_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp2_ = _tmp1_;
+ _tmp1_ = _tmp0_;
#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- gdk_pixbuf_save (_tmp0_, _tmp2_, "png", &_inner_error_, "compression", "9", NULL, NULL);
+ gdk_pixbuf_save (pixbuf, _tmp1_, "png", &_inner_error_, "compression", "9", NULL, NULL);
#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _g_free0 (_tmp2_);
+ _g_free0 (_tmp1_);
#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_propagate_error (error, _inner_error_);
#line 126 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return;
-#line 1573 "PngSupport.c"
+#line 1700 "PngSupport.c"
}
}
-static void png_writer_class_init (PngWriterClass * klass) {
+static void
+png_writer_class_init (PngWriterClass * klass)
+{
#line 120 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
png_writer_parent_class = g_type_class_peek_parent (klass);
#line 120 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
((PhotoFileWriterClass *) klass)->write = (void (*) (PhotoFileWriter *, GdkPixbuf*, JpegQuality, GError**)) png_writer_real_write;
-#line 1583 "PngSupport.c"
+#line 1712 "PngSupport.c"
}
-static void png_writer_instance_init (PngWriter * self) {
+static void
+png_writer_instance_init (PngWriter * self)
+{
}
-GType png_writer_get_type (void) {
+GType
+png_writer_get_type (void)
+{
static volatile gsize png_writer_type_id__volatile = 0;
if (g_once_init_enter (&png_writer_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (PngWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngWriter), 0, (GInstanceInitFunc) png_writer_instance_init, NULL };
@@ -1599,73 +1732,82 @@ GType png_writer_get_type (void) {
}
-PngMetadataWriter* png_metadata_writer_construct (GType object_type, const gchar* filepath) {
+PngMetadataWriter*
+png_metadata_writer_construct (GType object_type,
+ const gchar* filepath)
+{
PngMetadataWriter* self = NULL;
- const gchar* _tmp0_;
#line 131 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_val_if_fail (filepath != NULL, NULL);
#line 132 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = filepath;
-#line 132 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- self = (PngMetadataWriter*) photo_file_metadata_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_PNG);
+ self = (PngMetadataWriter*) photo_file_metadata_writer_construct (object_type, filepath, PHOTO_FILE_FORMAT_PNG);
#line 131 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return self;
-#line 1614 "PngSupport.c"
+#line 1747 "PngSupport.c"
}
-PngMetadataWriter* png_metadata_writer_new (const gchar* filepath) {
+PngMetadataWriter*
+png_metadata_writer_new (const gchar* filepath)
+{
#line 131 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return png_metadata_writer_construct (TYPE_PNG_METADATA_WRITER, filepath);
-#line 1621 "PngSupport.c"
+#line 1756 "PngSupport.c"
}
-static void png_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error) {
+static void
+png_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base,
+ PhotoMetadata* metadata,
+ GError** error)
+{
PngMetadataWriter * self;
- PhotoMetadata* _tmp0_;
+ GFile* _tmp0_;
GFile* _tmp1_;
- GFile* _tmp2_;
GError * _inner_error_ = NULL;
#line 135 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_METADATA_WRITER, PngMetadataWriter);
#line 135 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_if_fail (IS_PHOTO_METADATA (metadata));
#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = metadata;
+ _tmp0_ = photo_file_adapter_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = photo_file_adapter_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter));
+ _tmp1_ = _tmp0_;
#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp2_ = _tmp1_;
+ photo_metadata_write_to_file (metadata, _tmp1_, &_inner_error_);
#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- photo_metadata_write_to_file (_tmp0_, _tmp2_, &_inner_error_);
-#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _g_object_unref0 (_tmp2_);
+ _g_object_unref0 (_tmp1_);
#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_propagate_error (error, _inner_error_);
#line 136 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return;
-#line 1651 "PngSupport.c"
+#line 1787 "PngSupport.c"
}
}
-static void png_metadata_writer_class_init (PngMetadataWriterClass * klass) {
+static void
+png_metadata_writer_class_init (PngMetadataWriterClass * klass)
+{
#line 130 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
png_metadata_writer_parent_class = g_type_class_peek_parent (klass);
#line 130 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
((PhotoFileMetadataWriterClass *) klass)->write_metadata = (void (*) (PhotoFileMetadataWriter *, PhotoMetadata*, GError**)) png_metadata_writer_real_write_metadata;
-#line 1661 "PngSupport.c"
+#line 1799 "PngSupport.c"
}
-static void png_metadata_writer_instance_init (PngMetadataWriter * self) {
+static void
+png_metadata_writer_instance_init (PngMetadataWriter * self)
+{
}
-GType png_metadata_writer_get_type (void) {
+GType
+png_metadata_writer_get_type (void)
+{
static volatile gsize png_metadata_writer_type_id__volatile = 0;
if (g_once_init_enter (&png_metadata_writer_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (PngMetadataWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_metadata_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngMetadataWriter), 0, (GInstanceInitFunc) png_metadata_writer_instance_init, NULL };
@@ -1677,7 +1819,9 @@ GType png_metadata_writer_get_type (void) {
}
-void png_file_format_driver_init (void) {
+void
+png_file_format_driver_init (void)
+{
PngFileFormatDriver* _tmp0_;
#line 144 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
_tmp0_ = png_file_format_driver_new ();
@@ -1687,18 +1831,22 @@ void png_file_format_driver_init (void) {
png_file_format_driver_instance = _tmp0_;
#line 145 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
png_file_format_properties_init ();
-#line 1691 "PngSupport.c"
+#line 1835 "PngSupport.c"
}
-static gpointer _photo_file_format_driver_ref0 (gpointer self) {
+static gpointer
+_photo_file_format_driver_ref0 (gpointer self)
+{
#line 149 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return self ? photo_file_format_driver_ref (self) : NULL;
-#line 1698 "PngSupport.c"
+#line 1844 "PngSupport.c"
}
-PngFileFormatDriver* png_file_format_driver_get_instance (void) {
+PngFileFormatDriver*
+png_file_format_driver_get_instance (void)
+{
PngFileFormatDriver* result = NULL;
PngFileFormatDriver* _tmp0_;
PngFileFormatDriver* _tmp1_;
@@ -1710,11 +1858,13 @@ PngFileFormatDriver* png_file_format_driver_get_instance (void) {
result = _tmp1_;
#line 149 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1714 "PngSupport.c"
+#line 1862 "PngSupport.c"
}
-static PhotoFileFormatProperties* png_file_format_driver_real_get_properties (PhotoFileFormatDriver* base) {
+static PhotoFileFormatProperties*
+png_file_format_driver_real_get_properties (PhotoFileFormatDriver* base)
+{
PngFileFormatDriver * self;
PhotoFileFormatProperties* result = NULL;
PngFileFormatProperties* _tmp0_;
@@ -1726,32 +1876,34 @@ static PhotoFileFormatProperties* png_file_format_driver_real_get_properties (Ph
result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties);
#line 153 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1730 "PngSupport.c"
+#line 1880 "PngSupport.c"
}
-static PhotoFileReader* png_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath) {
+static PhotoFileReader*
+png_file_format_driver_real_create_reader (PhotoFileFormatDriver* base,
+ const gchar* filepath)
+{
PngFileFormatDriver * self;
PhotoFileReader* result = NULL;
- const gchar* _tmp0_;
- PngReader* _tmp1_;
+ PngReader* _tmp0_;
#line 156 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
#line 156 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_val_if_fail (filepath != NULL, NULL);
#line 157 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = filepath;
-#line 157 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = png_reader_new (_tmp0_);
+ _tmp0_ = png_reader_new (filepath);
#line 157 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_READER, PhotoFileReader);
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_READER, PhotoFileReader);
#line 157 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1751 "PngSupport.c"
+#line 1901 "PngSupport.c"
}
-static gboolean png_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base) {
+static gboolean
+png_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base)
+{
PngFileFormatDriver * self;
gboolean result = FALSE;
#line 160 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -1760,11 +1912,13 @@ static gboolean png_file_format_driver_real_can_write_image (PhotoFileFormatDriv
result = TRUE;
#line 161 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1764 "PngSupport.c"
+#line 1916 "PngSupport.c"
}
-static gboolean png_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base) {
+static gboolean
+png_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base)
+{
PngFileFormatDriver * self;
gboolean result = FALSE;
#line 164 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -1773,77 +1927,77 @@ static gboolean png_file_format_driver_real_can_write_metadata (PhotoFileFormatD
result = TRUE;
#line 165 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1777 "PngSupport.c"
+#line 1931 "PngSupport.c"
}
-static PhotoFileWriter* png_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+static PhotoFileWriter*
+png_file_format_driver_real_create_writer (PhotoFileFormatDriver* base,
+ const gchar* filepath)
+{
PngFileFormatDriver * self;
PhotoFileWriter* result = NULL;
- const gchar* _tmp0_;
- PngWriter* _tmp1_;
+ PngWriter* _tmp0_;
#line 168 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
#line 168 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_val_if_fail (filepath != NULL, NULL);
#line 169 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = filepath;
+ _tmp0_ = png_writer_new (filepath);
#line 169 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = png_writer_new (_tmp0_);
-#line 169 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_WRITER, PhotoFileWriter);
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_WRITER, PhotoFileWriter);
#line 169 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1798 "PngSupport.c"
+#line 1952 "PngSupport.c"
}
-static PhotoFileMetadataWriter* png_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath) {
+static PhotoFileMetadataWriter*
+png_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base,
+ const gchar* filepath)
+{
PngFileFormatDriver * self;
PhotoFileMetadataWriter* result = NULL;
- const gchar* _tmp0_;
- PngMetadataWriter* _tmp1_;
+ PngMetadataWriter* _tmp0_;
#line 172 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
#line 172 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_val_if_fail (filepath != NULL, NULL);
#line 173 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = filepath;
-#line 173 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = png_metadata_writer_new (_tmp0_);
+ _tmp0_ = png_metadata_writer_new (filepath);
#line 173 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter);
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter);
#line 173 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1819 "PngSupport.c"
+#line 1973 "PngSupport.c"
}
-static PhotoFileSniffer* png_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options) {
+static PhotoFileSniffer*
+png_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base,
+ GFile* file,
+ PhotoFileSnifferOptions options)
+{
PngFileFormatDriver * self;
PhotoFileSniffer* result = NULL;
- GFile* _tmp0_;
- PhotoFileSnifferOptions _tmp1_;
- PngSniffer* _tmp2_;
+ PngSniffer* _tmp0_;
#line 176 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
#line 176 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp0_ = file;
-#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp1_ = options;
+ _tmp0_ = png_sniffer_new (file, options);
#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- _tmp2_ = png_sniffer_new (_tmp0_, _tmp1_);
-#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
- result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer);
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer);
#line 177 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1843 "PngSupport.c"
+#line 1995 "PngSupport.c"
}
-static PhotoMetadata* png_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base) {
+static PhotoMetadata*
+png_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base)
+{
PngFileFormatDriver * self;
PhotoMetadata* result = NULL;
PhotoMetadata* _tmp0_;
@@ -1855,28 +2009,34 @@ static PhotoMetadata* png_file_format_driver_real_create_metadata (PhotoFileForm
result = _tmp0_;
#line 181 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return result;
-#line 1859 "PngSupport.c"
+#line 2013 "PngSupport.c"
}
-PngFileFormatDriver* png_file_format_driver_construct (GType object_type) {
+PngFileFormatDriver*
+png_file_format_driver_construct (GType object_type)
+{
PngFileFormatDriver* self = NULL;
#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = (PngFileFormatDriver*) photo_file_format_driver_construct (object_type);
#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return self;
-#line 1869 "PngSupport.c"
+#line 2025 "PngSupport.c"
}
-PngFileFormatDriver* png_file_format_driver_new (void) {
+PngFileFormatDriver*
+png_file_format_driver_new (void)
+{
#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
return png_file_format_driver_construct (TYPE_PNG_FILE_FORMAT_DRIVER);
-#line 1876 "PngSupport.c"
+#line 2034 "PngSupport.c"
}
-static void png_file_format_driver_class_init (PngFileFormatDriverClass * klass) {
+static void
+png_file_format_driver_class_init (PngFileFormatDriverClass * klass)
+{
#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
png_file_format_driver_parent_class = g_type_class_peek_parent (klass);
#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
@@ -1897,25 +2057,31 @@ static void png_file_format_driver_class_init (PngFileFormatDriverClass * klass)
((PhotoFileFormatDriverClass *) klass)->create_sniffer = (PhotoFileSniffer* (*) (PhotoFileFormatDriver *, GFile*, PhotoFileSnifferOptions)) png_file_format_driver_real_create_sniffer;
#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
((PhotoFileFormatDriverClass *) klass)->create_metadata = (PhotoMetadata* (*) (PhotoFileFormatDriver *)) png_file_format_driver_real_create_metadata;
-#line 1901 "PngSupport.c"
+#line 2061 "PngSupport.c"
}
-static void png_file_format_driver_instance_init (PngFileFormatDriver * self) {
+static void
+png_file_format_driver_instance_init (PngFileFormatDriver * self)
+{
}
-static void png_file_format_driver_finalize (PhotoFileFormatDriver * obj) {
+static void
+png_file_format_driver_finalize (PhotoFileFormatDriver * obj)
+{
PngFileFormatDriver * self;
#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PNG_FILE_FORMAT_DRIVER, PngFileFormatDriver);
#line 140 "/home/jens/Source/shotwell/src/photos/PngSupport.vala"
PHOTO_FILE_FORMAT_DRIVER_CLASS (png_file_format_driver_parent_class)->finalize (obj);
-#line 1915 "PngSupport.c"
+#line 2079 "PngSupport.c"
}
-GType png_file_format_driver_get_type (void) {
+GType
+png_file_format_driver_get_type (void)
+{
static volatile gsize png_file_format_driver_type_id__volatile = 0;
if (g_once_init_enter (&png_file_format_driver_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (PngFileFormatDriverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) png_file_format_driver_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PngFileFormatDriver), 0, (GInstanceInitFunc) png_file_format_driver_instance_init, NULL };