diff options
Diffstat (limited to 'src/page.c')
-rw-r--r-- | src/page.c | 322 |
1 files changed, 177 insertions, 145 deletions
@@ -1,4 +1,4 @@ -/* page.c generated by valac 0.26.2, the Vala compiler +/* page.c generated by valac 0.28.0, the Vala compiler * generated from page.vala, do not modify */ /* @@ -2711,47 +2711,47 @@ static gchar* string_to_utf8 (const gchar* self, int* result_length1) { gint _tmp6_ = 0; gchar* _tmp7_ = NULL; gint _tmp7__length1 = 0; -#line 1307 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1307 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp0_ = strlen (self); -#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp1_ = _tmp0_; -#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp2_ = g_new0 (gchar, _tmp1_ + 1); -#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _result_ = _tmp2_; -#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _result__length1 = _tmp1_ + 1; -#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" __result__size_ = _result__length1; -#line 1309 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1309 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp3_ = _result__length1; -#line 1309 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1309 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _result__length1 = _tmp3_ - 1; -#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp4_ = _result_; -#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp4__length1 = _result__length1; -#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp5_ = strlen (self); -#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp6_ = _tmp5_; -#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" memcpy (_tmp4_, self, (gsize) _tmp6_); -#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp7_ = _result_; -#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" _tmp7__length1 = _result__length1; -#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" if (result_length1) { -#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" *result_length1 = _tmp7__length1; #line 2751 "page.c" } -#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" result = _tmp7_; -#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.28/vapi/glib-2.0.vapi" return result; #line 2757 "page.c" } @@ -3426,6 +3426,38 @@ void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL); #line 3428 "page.c" } else { + const gchar* _tmp76_ = NULL; + gchar* _tmp77_ = NULL; + gchar* _tmp78_ = NULL; + GError* _tmp79_ = NULL; + GError* _tmp80_ = NULL; +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _tmp76_ = type; +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _tmp77_ = g_strdup_printf ("Unknown file type: %s", _tmp76_); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _tmp78_ = _tmp77_; +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _tmp79_ = g_error_new_literal (G_FILE_ERROR, G_FILE_ERROR_INVAL, _tmp78_); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _tmp80_ = _tmp79_; +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _g_free0 (_tmp78_); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _inner_error_ = _tmp80_; +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + g_propagate_error (error, _inner_error_); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _g_free0 (icc_profile_data); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _g_object_unref0 (image); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _pixbuf_writer_unref0 (writer); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + _g_object_unref0 (stream); +#line 688 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + return; +#line 3461 "page.c" } } } @@ -3437,7 +3469,7 @@ void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError _pixbuf_writer_unref0 (writer); #line 653 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _g_object_unref0 (stream); -#line 3441 "page.c" +#line 3473 "page.c" } @@ -3456,7 +3488,7 @@ gint page_get_width (Page* self) { if (_tmp2_ == SCAN_DIRECTION_TOP_TO_BOTTOM) { #line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp0_ = TRUE; -#line 3460 "page.c" +#line 3492 "page.c" } else { ScanDirection _tmp3_ = 0; ScanDirection _tmp4_ = 0; @@ -3466,11 +3498,11 @@ gint page_get_width (Page* self) { _tmp4_ = _tmp3_; #line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp0_ = _tmp4_ == SCAN_DIRECTION_BOTTOM_TO_TOP; -#line 3470 "page.c" +#line 3502 "page.c" } #line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (_tmp0_) { -#line 3474 "page.c" +#line 3506 "page.c" gint _tmp5_ = 0; #line 28 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp5_ = self->priv->_scan_width; @@ -3478,7 +3510,7 @@ gint page_get_width (Page* self) { result = _tmp5_; #line 28 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3482 "page.c" +#line 3514 "page.c" } else { gint _tmp6_ = 0; #line 30 "/home/bob/bzr/simple-scan/trunk/src/page.vala" @@ -3487,7 +3519,7 @@ gint page_get_width (Page* self) { result = _tmp6_; #line 30 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3491 "page.c" +#line 3523 "page.c" } } @@ -3507,7 +3539,7 @@ gint page_get_height (Page* self) { if (_tmp2_ == SCAN_DIRECTION_TOP_TO_BOTTOM) { #line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp0_ = TRUE; -#line 3511 "page.c" +#line 3543 "page.c" } else { ScanDirection _tmp3_ = 0; ScanDirection _tmp4_ = 0; @@ -3517,11 +3549,11 @@ gint page_get_height (Page* self) { _tmp4_ = _tmp3_; #line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp0_ = _tmp4_ == SCAN_DIRECTION_BOTTOM_TO_TOP; -#line 3521 "page.c" +#line 3553 "page.c" } #line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (_tmp0_) { -#line 3525 "page.c" +#line 3557 "page.c" gint _tmp5_ = 0; #line 40 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp5_ = self->priv->_scan_height; @@ -3529,7 +3561,7 @@ gint page_get_height (Page* self) { result = _tmp5_; #line 40 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3533 "page.c" +#line 3565 "page.c" } else { gint _tmp6_ = 0; #line 42 "/home/bob/bzr/simple-scan/trunk/src/page.vala" @@ -3538,7 +3570,7 @@ gint page_get_height (Page* self) { result = _tmp6_; #line 42 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3542 "page.c" +#line 3574 "page.c" } } @@ -3563,7 +3595,7 @@ gboolean page_get_is_landscape (Page* self) { result = _tmp1_ > _tmp3_; #line 47 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3567 "page.c" +#line 3599 "page.c" } @@ -3578,7 +3610,7 @@ gint page_get_dpi (Page* self) { result = _tmp0_; #line 50 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3582 "page.c" +#line 3614 "page.c" } @@ -3590,7 +3622,7 @@ static void page_set_dpi (Page* self, gint value) { _tmp0_ = value; #line 50 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_dpi = _tmp0_; -#line 3594 "page.c" +#line 3626 "page.c" } @@ -3605,7 +3637,7 @@ gint page_get_depth (Page* self) { result = _tmp0_; #line 56 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3609 "page.c" +#line 3641 "page.c" } @@ -3617,7 +3649,7 @@ static void page_set_depth (Page* self, gint value) { _tmp0_ = value; #line 56 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_depth = _tmp0_; -#line 3621 "page.c" +#line 3653 "page.c" } @@ -3632,7 +3664,7 @@ const gchar* page_get_color_profile (Page* self) { result = _tmp0_; #line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3636 "page.c" +#line 3668 "page.c" } @@ -3649,7 +3681,7 @@ void page_set_color_profile (Page* self, const gchar* value) { _g_free0 (self->priv->_color_profile); #line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_color_profile = _tmp1_; -#line 3653 "page.c" +#line 3685 "page.c" } @@ -3664,7 +3696,7 @@ gint page_get_scan_width (Page* self) { result = _tmp0_; #line 62 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3668 "page.c" +#line 3700 "page.c" } @@ -3676,7 +3708,7 @@ static void page_set_scan_width (Page* self, gint value) { _tmp0_ = value; #line 62 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_scan_width = _tmp0_; -#line 3680 "page.c" +#line 3712 "page.c" } @@ -3691,7 +3723,7 @@ gint page_get_scan_height (Page* self) { result = _tmp0_; #line 65 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3695 "page.c" +#line 3727 "page.c" } @@ -3703,7 +3735,7 @@ static void page_set_scan_height (Page* self, gint value) { _tmp0_ = value; #line 65 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_scan_height = _tmp0_; -#line 3707 "page.c" +#line 3739 "page.c" } @@ -3718,7 +3750,7 @@ gint page_get_rowstride (Page* self) { result = _tmp0_; #line 68 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3722 "page.c" +#line 3754 "page.c" } @@ -3730,7 +3762,7 @@ static void page_set_rowstride (Page* self, gint value) { _tmp0_ = value; #line 68 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_rowstride = _tmp0_; -#line 3734 "page.c" +#line 3766 "page.c" } @@ -3745,7 +3777,7 @@ gint page_get_n_channels (Page* self) { result = _tmp0_; #line 71 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3749 "page.c" +#line 3781 "page.c" } @@ -3757,7 +3789,7 @@ static void page_set_n_channels (Page* self, gint value) { _tmp0_ = value; #line 71 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_n_channels = _tmp0_; -#line 3761 "page.c" +#line 3793 "page.c" } @@ -3772,7 +3804,7 @@ gboolean page_get_is_scanning (Page* self) { result = _tmp0_; #line 77 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3776 "page.c" +#line 3808 "page.c" } @@ -3784,7 +3816,7 @@ static void page_set_is_scanning (Page* self, gboolean value) { _tmp0_ = value; #line 77 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_is_scanning = _tmp0_; -#line 3788 "page.c" +#line 3820 "page.c" } @@ -3799,7 +3831,7 @@ gboolean page_get_has_data (Page* self) { result = _tmp0_; #line 80 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3803 "page.c" +#line 3835 "page.c" } @@ -3811,7 +3843,7 @@ static void page_set_has_data (Page* self, gboolean value) { _tmp0_ = value; #line 80 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_has_data = _tmp0_; -#line 3815 "page.c" +#line 3847 "page.c" } @@ -3826,7 +3858,7 @@ gint page_get_scan_line (Page* self) { result = _tmp0_; #line 83 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3830 "page.c" +#line 3862 "page.c" } @@ -3838,7 +3870,7 @@ static void page_set_scan_line (Page* self, gint value) { _tmp0_ = value; #line 83 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_scan_line = _tmp0_; -#line 3842 "page.c" +#line 3874 "page.c" } @@ -3853,7 +3885,7 @@ gboolean page_get_is_color (Page* self) { result = _tmp0_ > 1; #line 86 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3857 "page.c" +#line 3889 "page.c" } @@ -3868,7 +3900,7 @@ ScanDirection page_get_scan_direction (Page* self) { result = _tmp0_; #line 92 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 3872 "page.c" +#line 3904 "page.c" } @@ -3895,7 +3927,7 @@ void page_set_scan_direction (Page* self, ScanDirection value) { if (_tmp0_ == _tmp1_) { #line 97 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return; -#line 3899 "page.c" +#line 3931 "page.c" } #line 100 "/home/bob/bzr/simple-scan/trunk/src/page.vala" size_has_changed = FALSE; @@ -3909,13 +3941,13 @@ void page_set_scan_direction (Page* self, ScanDirection value) { _tmp4_ = left_steps; #line 102 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (_tmp4_ < 0) { -#line 3913 "page.c" +#line 3945 "page.c" gint _tmp5_ = 0; #line 103 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp5_ = left_steps; #line 103 "/home/bob/bzr/simple-scan/trunk/src/page.vala" left_steps = _tmp5_ + 4; -#line 3919 "page.c" +#line 3951 "page.c" } #line 104 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp6_ = left_steps; @@ -3923,13 +3955,13 @@ void page_set_scan_direction (Page* self, ScanDirection value) { if (_tmp6_ != 2) { #line 105 "/home/bob/bzr/simple-scan/trunk/src/page.vala" size_has_changed = TRUE; -#line 3927 "page.c" +#line 3959 "page.c" } #line 108 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp7_ = self->priv->_has_crop; #line 108 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (_tmp7_) { -#line 3933 "page.c" +#line 3965 "page.c" gint _tmp8_ = 0; #line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _tmp8_ = left_steps; @@ -3937,7 +3969,7 @@ void page_set_scan_direction (Page* self, ScanDirection value) { switch (_tmp8_) { #line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala" case 1: -#line 3941 "page.c" +#line 3973 "page.c" { gint t = 0; gint _tmp9_ = 0; @@ -3981,11 +4013,11 @@ void page_set_scan_direction (Page* self, ScanDirection value) { page_set_crop_height (self, _tmp17_); #line 120 "/home/bob/bzr/simple-scan/trunk/src/page.vala" break; -#line 3985 "page.c" +#line 4017 "page.c" } #line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala" case 2: -#line 3989 "page.c" +#line 4021 "page.c" { gint _tmp18_ = 0; gint _tmp19_ = 0; @@ -4017,11 +4049,11 @@ void page_set_scan_direction (Page* self, ScanDirection value) { page_set_crop_y (self, _tmp23_ - (_tmp24_ + _tmp25_)); #line 125 "/home/bob/bzr/simple-scan/trunk/src/page.vala" break; -#line 4021 "page.c" +#line 4053 "page.c" } #line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala" case 3: -#line 4025 "page.c" +#line 4057 "page.c" { gint t = 0; gint _tmp26_ = 0; @@ -4065,12 +4097,12 @@ void page_set_scan_direction (Page* self, ScanDirection value) { page_set_crop_height (self, _tmp34_); #line 134 "/home/bob/bzr/simple-scan/trunk/src/page.vala" break; -#line 4069 "page.c" +#line 4101 "page.c" } default: #line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala" break; -#line 4074 "page.c" +#line 4106 "page.c" } } #line 138 "/home/bob/bzr/simple-scan/trunk/src/page.vala" @@ -4083,7 +4115,7 @@ void page_set_scan_direction (Page* self, ScanDirection value) { if (_tmp36_) { #line 140 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_signal_emit_by_name (self, "size-changed"); -#line 4087 "page.c" +#line 4119 "page.c" } #line 141 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_signal_emit_by_name (self, "scan-direction-changed"); @@ -4093,7 +4125,7 @@ void page_set_scan_direction (Page* self, ScanDirection value) { if (_tmp37_) { #line 143 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_signal_emit_by_name (self, "crop-changed"); -#line 4097 "page.c" +#line 4129 "page.c" } } @@ -4109,7 +4141,7 @@ gboolean page_get_has_crop (Page* self) { result = _tmp0_; #line 150 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4113 "page.c" +#line 4145 "page.c" } @@ -4121,7 +4153,7 @@ static void page_set_has_crop (Page* self, gboolean value) { _tmp0_ = value; #line 150 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_has_crop = _tmp0_; -#line 4125 "page.c" +#line 4157 "page.c" } @@ -4136,7 +4168,7 @@ const gchar* page_get_crop_name (Page* self) { result = _tmp0_; #line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4140 "page.c" +#line 4172 "page.c" } @@ -4153,7 +4185,7 @@ static void page_set_crop_name (Page* self, const gchar* value) { _g_free0 (self->priv->_crop_name); #line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_crop_name = _tmp1_; -#line 4157 "page.c" +#line 4189 "page.c" } @@ -4168,7 +4200,7 @@ gint page_get_crop_x (Page* self) { result = _tmp0_; #line 156 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4172 "page.c" +#line 4204 "page.c" } @@ -4180,7 +4212,7 @@ static void page_set_crop_x (Page* self, gint value) { _tmp0_ = value; #line 156 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_crop_x = _tmp0_; -#line 4184 "page.c" +#line 4216 "page.c" } @@ -4195,7 +4227,7 @@ gint page_get_crop_y (Page* self) { result = _tmp0_; #line 159 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4199 "page.c" +#line 4231 "page.c" } @@ -4207,7 +4239,7 @@ static void page_set_crop_y (Page* self, gint value) { _tmp0_ = value; #line 159 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_crop_y = _tmp0_; -#line 4211 "page.c" +#line 4243 "page.c" } @@ -4222,7 +4254,7 @@ gint page_get_crop_width (Page* self) { result = _tmp0_; #line 162 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4226 "page.c" +#line 4258 "page.c" } @@ -4234,7 +4266,7 @@ static void page_set_crop_width (Page* self, gint value) { _tmp0_ = value; #line 162 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_crop_width = _tmp0_; -#line 4238 "page.c" +#line 4270 "page.c" } @@ -4249,7 +4281,7 @@ gint page_get_crop_height (Page* self) { result = _tmp0_; #line 165 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4253 "page.c" +#line 4285 "page.c" } @@ -4261,14 +4293,14 @@ static void page_set_crop_height (Page* self, gint value) { _tmp0_ = value; #line 165 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->_crop_height = _tmp0_; -#line 4265 "page.c" +#line 4297 "page.c" } static void value_page_init (GValue* value) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4272 "page.c" +#line 4304 "page.c" } @@ -4277,7 +4309,7 @@ static void value_page_free_value (GValue* value) { if (value->data[0].v_pointer) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" page_unref (value->data[0].v_pointer); -#line 4281 "page.c" +#line 4313 "page.c" } } @@ -4287,11 +4319,11 @@ static void value_page_copy_value (const GValue* src_value, GValue* dest_value) if (src_value->data[0].v_pointer) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" dest_value->data[0].v_pointer = page_ref (src_value->data[0].v_pointer); -#line 4291 "page.c" +#line 4323 "page.c" } else { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" dest_value->data[0].v_pointer = NULL; -#line 4295 "page.c" +#line 4327 "page.c" } } @@ -4299,37 +4331,37 @@ static void value_page_copy_value (const GValue* src_value, GValue* dest_value) static gpointer value_page_peek_pointer (const GValue* value) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return value->data[0].v_pointer; -#line 4303 "page.c" +#line 4335 "page.c" } static gchar* value_page_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (collect_values[0].v_pointer) { -#line 4310 "page.c" +#line 4342 "page.c" Page* object; object = collect_values[0].v_pointer; #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (object->parent_instance.g_class == NULL) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 4317 "page.c" +#line 4349 "page.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.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 4321 "page.c" +#line 4353 "page.c" } #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = page_ref (object); -#line 4325 "page.c" +#line 4357 "page.c" } else { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4329 "page.c" +#line 4361 "page.c" } #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return NULL; -#line 4333 "page.c" +#line 4365 "page.c" } @@ -4340,25 +4372,25 @@ static gchar* value_page_lcopy_value (const GValue* value, guint n_collect_value if (!object_p) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 4344 "page.c" +#line 4376 "page.c" } #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (!value->data[0].v_pointer) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" *object_p = NULL; -#line 4350 "page.c" +#line 4382 "page.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" *object_p = value->data[0].v_pointer; -#line 4354 "page.c" +#line 4386 "page.c" } else { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" *object_p = page_ref (value->data[0].v_pointer); -#line 4358 "page.c" +#line 4390 "page.c" } #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return NULL; -#line 4362 "page.c" +#line 4394 "page.c" } @@ -4372,7 +4404,7 @@ GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* G_PARAM_SPEC (spec)->value_type = object_type; #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return G_PARAM_SPEC (spec); -#line 4376 "page.c" +#line 4408 "page.c" } @@ -4381,7 +4413,7 @@ gpointer value_get_page (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PAGE), NULL); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return value->data[0].v_pointer; -#line 4385 "page.c" +#line 4417 "page.c" } @@ -4401,17 +4433,17 @@ void value_set_page (GValue* value, gpointer v_object) { value->data[0].v_pointer = v_object; #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" page_ref (value->data[0].v_pointer); -#line 4405 "page.c" +#line 4437 "page.c" } else { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4409 "page.c" +#line 4441 "page.c" } #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (old) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" page_unref (old); -#line 4415 "page.c" +#line 4447 "page.c" } } @@ -4430,17 +4462,17 @@ void value_take_page (GValue* value, gpointer v_object) { g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = v_object; -#line 4434 "page.c" +#line 4466 "page.c" } else { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4438 "page.c" +#line 4470 "page.c" } #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (old) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" page_unref (old); -#line 4444 "page.c" +#line 4476 "page.c" } } @@ -4464,7 +4496,7 @@ static void page_class_init (PageClass * klass) { g_signal_new ("crop_changed", TYPE_PAGE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_signal_new ("scan_finished", TYPE_PAGE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 4468 "page.c" +#line 4500 "page.c" } @@ -4473,7 +4505,7 @@ static void page_instance_init (Page * self) { self->priv = PAGE_GET_PRIVATE (self); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->ref_count = 1; -#line 4477 "page.c" +#line 4509 "page.c" } @@ -4489,7 +4521,7 @@ static void page_finalize (Page* obj) { self->priv->pixels = (g_free (self->priv->pixels), NULL); #line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _g_free0 (self->priv->_crop_name); -#line 4493 "page.c" +#line 4525 "page.c" } @@ -4514,7 +4546,7 @@ gpointer page_ref (gpointer instance) { g_atomic_int_inc (&self->ref_count); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return instance; -#line 4518 "page.c" +#line 4550 "page.c" } @@ -4527,7 +4559,7 @@ void page_unref (gpointer instance) { PAGE_GET_CLASS (self)->finalize (self); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_type_free_instance ((GTypeInstance *) self); -#line 4531 "page.c" +#line 4563 "page.c" } } @@ -4550,14 +4582,14 @@ PixbufWriter* pixbuf_writer_construct (GType object_type, GFileOutputStream* str self->stream = _tmp1_; #line 696 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return self; -#line 4554 "page.c" +#line 4586 "page.c" } PixbufWriter* pixbuf_writer_new (GFileOutputStream* stream) { #line 696 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return pixbuf_writer_construct (TYPE_PIXBUF_WRITER, stream); -#line 4561 "page.c" +#line 4593 "page.c" } @@ -4566,7 +4598,7 @@ static gboolean _pixbuf_writer_write_pixbuf_data_gdk_pixbuf_save_func (guint8* b result = pixbuf_writer_write_pixbuf_data ((PixbufWriter*) self, buf, buf_length1, error); #line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4570 "page.c" +#line 4602 "page.c" } @@ -4604,7 +4636,7 @@ void pixbuf_writer_save (PixbufWriter* self, GdkPixbuf* image, const gchar* type g_propagate_error (error, _inner_error_); #line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return; -#line 4608 "page.c" +#line 4640 "page.c" } } @@ -4631,20 +4663,20 @@ static gboolean pixbuf_writer_write_pixbuf_data (PixbufWriter* self, guint8* buf g_propagate_error (error, _inner_error_); #line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return FALSE; -#line 4635 "page.c" +#line 4667 "page.c" } #line 709 "/home/bob/bzr/simple-scan/trunk/src/page.vala" result = TRUE; #line 709 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4641 "page.c" +#line 4673 "page.c" } static void value_pixbuf_writer_init (GValue* value) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4648 "page.c" +#line 4680 "page.c" } @@ -4653,7 +4685,7 @@ static void value_pixbuf_writer_free_value (GValue* value) { if (value->data[0].v_pointer) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_unref (value->data[0].v_pointer); -#line 4657 "page.c" +#line 4689 "page.c" } } @@ -4663,11 +4695,11 @@ static void value_pixbuf_writer_copy_value (const GValue* src_value, GValue* des if (src_value->data[0].v_pointer) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" dest_value->data[0].v_pointer = pixbuf_writer_ref (src_value->data[0].v_pointer); -#line 4667 "page.c" +#line 4699 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" dest_value->data[0].v_pointer = NULL; -#line 4671 "page.c" +#line 4703 "page.c" } } @@ -4675,37 +4707,37 @@ static void value_pixbuf_writer_copy_value (const GValue* src_value, GValue* des static gpointer value_pixbuf_writer_peek_pointer (const GValue* value) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return value->data[0].v_pointer; -#line 4679 "page.c" +#line 4711 "page.c" } static gchar* value_pixbuf_writer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (collect_values[0].v_pointer) { -#line 4686 "page.c" +#line 4718 "page.c" PixbufWriter* object; object = collect_values[0].v_pointer; #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (object->parent_instance.g_class == NULL) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 4693 "page.c" +#line 4725 "page.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.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 4697 "page.c" +#line 4729 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = pixbuf_writer_ref (object); -#line 4701 "page.c" +#line 4733 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4705 "page.c" +#line 4737 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return NULL; -#line 4709 "page.c" +#line 4741 "page.c" } @@ -4716,25 +4748,25 @@ static gchar* value_pixbuf_writer_lcopy_value (const GValue* value, guint n_coll if (!object_p) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 4720 "page.c" +#line 4752 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (!value->data[0].v_pointer) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" *object_p = NULL; -#line 4726 "page.c" +#line 4758 "page.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" *object_p = value->data[0].v_pointer; -#line 4730 "page.c" +#line 4762 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" *object_p = pixbuf_writer_ref (value->data[0].v_pointer); -#line 4734 "page.c" +#line 4766 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return NULL; -#line 4738 "page.c" +#line 4770 "page.c" } @@ -4748,7 +4780,7 @@ GParamSpec* param_spec_pixbuf_writer (const gchar* name, const gchar* nick, cons G_PARAM_SPEC (spec)->value_type = object_type; #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return G_PARAM_SPEC (spec); -#line 4752 "page.c" +#line 4784 "page.c" } @@ -4757,7 +4789,7 @@ gpointer value_get_pixbuf_writer (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PIXBUF_WRITER), NULL); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return value->data[0].v_pointer; -#line 4761 "page.c" +#line 4793 "page.c" } @@ -4777,17 +4809,17 @@ void value_set_pixbuf_writer (GValue* value, gpointer v_object) { value->data[0].v_pointer = v_object; #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_ref (value->data[0].v_pointer); -#line 4781 "page.c" +#line 4813 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4785 "page.c" +#line 4817 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (old) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_unref (old); -#line 4791 "page.c" +#line 4823 "page.c" } } @@ -4806,17 +4838,17 @@ void value_take_pixbuf_writer (GValue* value, gpointer v_object) { g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = v_object; -#line 4810 "page.c" +#line 4842 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4814 "page.c" +#line 4846 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (old) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_unref (old); -#line 4820 "page.c" +#line 4852 "page.c" } } @@ -4826,14 +4858,14 @@ static void pixbuf_writer_class_init (PixbufWriterClass * klass) { pixbuf_writer_parent_class = g_type_class_peek_parent (klass); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" ((PixbufWriterClass *) klass)->finalize = pixbuf_writer_finalize; -#line 4830 "page.c" +#line 4862 "page.c" } static void pixbuf_writer_instance_init (PixbufWriter * self) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->ref_count = 1; -#line 4837 "page.c" +#line 4869 "page.c" } @@ -4845,7 +4877,7 @@ static void pixbuf_writer_finalize (PixbufWriter* obj) { g_signal_handlers_destroy (self); #line 694 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _g_object_unref0 (self->stream); -#line 4849 "page.c" +#line 4881 "page.c" } @@ -4870,7 +4902,7 @@ gpointer pixbuf_writer_ref (gpointer instance) { g_atomic_int_inc (&self->ref_count); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return instance; -#line 4874 "page.c" +#line 4906 "page.c" } @@ -4883,7 +4915,7 @@ void pixbuf_writer_unref (gpointer instance) { PIXBUF_WRITER_GET_CLASS (self)->finalize (self); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_type_free_instance ((GTypeInstance *) self); -#line 4887 "page.c" +#line 4919 "page.c" } } |