summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am58
-rw-r--r--src/Makefile.in851
-rw-r--r--src/autosave-manager.c2721
-rw-r--r--src/autosave-manager.vala361
-rw-r--r--src/book-view.c3891
-rw-r--r--src/book-view.vala610
-rw-r--r--src/book.c5628
-rw-r--r--src/book.vala633
-rw-r--r--src/colord.vapi17
-rw-r--r--src/config.vapi7
-rw-r--r--src/page-view.c6910
-rw-r--r--src/page-view.vala1021
-rw-r--r--src/page.c4863
-rw-r--r--src/page.vala711
-rw-r--r--src/resources.c6477
-rw-r--r--src/sane.vapi754
-rw-r--r--src/scanner.c13352
-rw-r--r--src/scanner.vala1599
-rw-r--r--src/simple-scan.c3965
-rw-r--r--src/simple-scan.vala601
-rw-r--r--src/simple_scan_vala.stamp1
-rw-r--r--src/ui.c11701
-rw-r--r--src/ui.vala2177
23 files changed, 68909 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..d317e66
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,58 @@
+bin_PROGRAMS = simple-scan
+
+resources.c: $(top_srcdir)/data/simple-scan.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir=$(top_srcdir)/data/ $(top_srcdir)/data/simple-scan.gresource.xml)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/data/ --generate-source $<
+
+simple_scan_SOURCES = \
+ config.vapi \
+ book.vala \
+ book-view.vala \
+ colord.vapi \
+ page.vala \
+ page-view.vala \
+ sane.vapi \
+ simple-scan.vala \
+ scanner.vala \
+ ui.vala \
+ autosave-manager.vala \
+ resources.c
+
+simple_scan_VALAFLAGS = \
+ --pkg=zlib \
+ --pkg=gudev-1.0 \
+ --pkg=gio-2.0 \
+ --pkg=gtk+-3.0 \
+ --gresources=$(top_srcdir)/data/simple-scan.gresource.xml \
+ --debug \
+ --target-glib 2.38
+
+if HAVE_COLORD
+simple_scan_VALAFLAGS += -D HAVE_COLORD
+endif
+
+simple_scan_CFLAGS = \
+ -w \
+ $(SIMPLE_SCAN_CFLAGS) \
+ $(COLORD_CFLAGS) \
+ $(WARN_CFLAGS) \
+ -DVERSION=\"$(VERSION)\" \
+ -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
+ -DLOCALE_DIR=\"$(localedir)\" \
+ -DUI_DIR=\"$(datadir)/simple-scan/\" \
+ -DICON_DIR=\"$(datadir)/simple-scan/icons\" \
+ -DGCONF_DIR=\"/apps/simple-scan\" \
+ -DSIMPLE_SCAN_BINARY=\"simple-scan\"
+
+simple_scan_LDADD = \
+ $(SIMPLE_SCAN_LIBS) \
+ $(COLORD_LIBS) \
+ -lsane \
+ -lm
+
+CLEANFILES = \
+ $(patsubst %.vala,%.c,$(filter %.vala, $(SOURCES))) \
+ resources.c \
+ *_vala.stamp
+
+DISTCLEANFILES = \
+ Makefile.in
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..0c0a632
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,851 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+bin_PROGRAMS = simple-scan$(EXEEXT)
+@HAVE_COLORD_TRUE@am__append_1 = -D HAVE_COLORD
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am book.c \
+ book-view.c page.c page-view.c simple-scan.c scanner.c ui.c \
+ autosave-manager.c $(top_srcdir)/depcomp \
+ $(srcdir)/simple_scan_vala.stamp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_simple_scan_OBJECTS = simple_scan-book.$(OBJEXT) \
+ simple_scan-book-view.$(OBJEXT) simple_scan-page.$(OBJEXT) \
+ simple_scan-page-view.$(OBJEXT) \
+ simple_scan-simple-scan.$(OBJEXT) \
+ simple_scan-scanner.$(OBJEXT) simple_scan-ui.$(OBJEXT) \
+ simple_scan-autosave-manager.$(OBJEXT) \
+ simple_scan-resources.$(OBJEXT)
+simple_scan_OBJECTS = $(am_simple_scan_OBJECTS)
+am__DEPENDENCIES_1 =
+simple_scan_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+simple_scan_LINK = $(CCLD) $(simple_scan_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+VALACOMPILE = $(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)
+AM_V_VALAC = $(am__v_VALAC_@AM_V@)
+am__v_VALAC_ = $(am__v_VALAC_@AM_DEFAULT_V@)
+am__v_VALAC_0 = @echo " VALAC " $@;
+am__v_VALAC_1 =
+SOURCES = $(simple_scan_SOURCES)
+DIST_SOURCES = $(simple_scan_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COLORD_CFLAGS = @COLORD_CFLAGS@
+COLORD_LIBS = @COLORD_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
+GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
+HELP_DIR = @HELP_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
+ITSTOOL = @ITSTOOL@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIMPLE_SCAN_CFLAGS = @SIMPLE_SCAN_CFLAGS@
+SIMPLE_SCAN_LIBS = @SIMPLE_SCAN_LIBS@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VALAC = @VALAC@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XMLLINT = @XMLLINT@
+YELP_LC_DIST = @YELP_LC_DIST@
+YELP_LC_MEDIA_LINKS = @YELP_LC_MEDIA_LINKS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gsettingsschemadir = @gsettingsschemadir@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+simple_scan_SOURCES = \
+ config.vapi \
+ book.vala \
+ book-view.vala \
+ colord.vapi \
+ page.vala \
+ page-view.vala \
+ sane.vapi \
+ simple-scan.vala \
+ scanner.vala \
+ ui.vala \
+ autosave-manager.vala \
+ resources.c
+
+simple_scan_VALAFLAGS = --pkg=zlib --pkg=gudev-1.0 --pkg=gio-2.0 \
+ --pkg=gtk+-3.0 \
+ --gresources=$(top_srcdir)/data/simple-scan.gresource.xml \
+ --debug --target-glib 2.38 $(am__append_1)
+simple_scan_CFLAGS = \
+ -w \
+ $(SIMPLE_SCAN_CFLAGS) \
+ $(COLORD_CFLAGS) \
+ $(WARN_CFLAGS) \
+ -DVERSION=\"$(VERSION)\" \
+ -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
+ -DLOCALE_DIR=\"$(localedir)\" \
+ -DUI_DIR=\"$(datadir)/simple-scan/\" \
+ -DICON_DIR=\"$(datadir)/simple-scan/icons\" \
+ -DGCONF_DIR=\"/apps/simple-scan\" \
+ -DSIMPLE_SCAN_BINARY=\"simple-scan\"
+
+simple_scan_LDADD = \
+ $(SIMPLE_SCAN_LIBS) \
+ $(COLORD_LIBS) \
+ -lsane \
+ -lm
+
+CLEANFILES = \
+ $(patsubst %.vala,%.c,$(filter %.vala, $(SOURCES))) \
+ resources.c \
+ *_vala.stamp
+
+DISTCLEANFILES = \
+ Makefile.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+simple-scan$(EXEEXT): $(simple_scan_OBJECTS) $(simple_scan_DEPENDENCIES) $(EXTRA_simple_scan_DEPENDENCIES)
+ @rm -f simple-scan$(EXEEXT)
+ $(AM_V_CCLD)$(simple_scan_LINK) $(simple_scan_OBJECTS) $(simple_scan_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_scan-autosave-manager.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_scan-book-view.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_scan-book.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_scan-page-view.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_scan-page.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_scan-resources.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_scan-scanner.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_scan-simple-scan.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_scan-ui.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+simple_scan-book.o: book.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-book.o -MD -MP -MF $(DEPDIR)/simple_scan-book.Tpo -c -o simple_scan-book.o `test -f 'book.c' || echo '$(srcdir)/'`book.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-book.Tpo $(DEPDIR)/simple_scan-book.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='book.c' object='simple_scan-book.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book.o `test -f 'book.c' || echo '$(srcdir)/'`book.c
+
+simple_scan-book.obj: book.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-book.obj -MD -MP -MF $(DEPDIR)/simple_scan-book.Tpo -c -o simple_scan-book.obj `if test -f 'book.c'; then $(CYGPATH_W) 'book.c'; else $(CYGPATH_W) '$(srcdir)/book.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-book.Tpo $(DEPDIR)/simple_scan-book.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='book.c' object='simple_scan-book.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book.obj `if test -f 'book.c'; then $(CYGPATH_W) 'book.c'; else $(CYGPATH_W) '$(srcdir)/book.c'; fi`
+
+simple_scan-book-view.o: book-view.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-book-view.o -MD -MP -MF $(DEPDIR)/simple_scan-book-view.Tpo -c -o simple_scan-book-view.o `test -f 'book-view.c' || echo '$(srcdir)/'`book-view.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-book-view.Tpo $(DEPDIR)/simple_scan-book-view.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='book-view.c' object='simple_scan-book-view.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book-view.o `test -f 'book-view.c' || echo '$(srcdir)/'`book-view.c
+
+simple_scan-book-view.obj: book-view.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-book-view.obj -MD -MP -MF $(DEPDIR)/simple_scan-book-view.Tpo -c -o simple_scan-book-view.obj `if test -f 'book-view.c'; then $(CYGPATH_W) 'book-view.c'; else $(CYGPATH_W) '$(srcdir)/book-view.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-book-view.Tpo $(DEPDIR)/simple_scan-book-view.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='book-view.c' object='simple_scan-book-view.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book-view.obj `if test -f 'book-view.c'; then $(CYGPATH_W) 'book-view.c'; else $(CYGPATH_W) '$(srcdir)/book-view.c'; fi`
+
+simple_scan-page.o: page.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-page.o -MD -MP -MF $(DEPDIR)/simple_scan-page.Tpo -c -o simple_scan-page.o `test -f 'page.c' || echo '$(srcdir)/'`page.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-page.Tpo $(DEPDIR)/simple_scan-page.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='page.c' object='simple_scan-page.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page.o `test -f 'page.c' || echo '$(srcdir)/'`page.c
+
+simple_scan-page.obj: page.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-page.obj -MD -MP -MF $(DEPDIR)/simple_scan-page.Tpo -c -o simple_scan-page.obj `if test -f 'page.c'; then $(CYGPATH_W) 'page.c'; else $(CYGPATH_W) '$(srcdir)/page.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-page.Tpo $(DEPDIR)/simple_scan-page.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='page.c' object='simple_scan-page.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page.obj `if test -f 'page.c'; then $(CYGPATH_W) 'page.c'; else $(CYGPATH_W) '$(srcdir)/page.c'; fi`
+
+simple_scan-page-view.o: page-view.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-page-view.o -MD -MP -MF $(DEPDIR)/simple_scan-page-view.Tpo -c -o simple_scan-page-view.o `test -f 'page-view.c' || echo '$(srcdir)/'`page-view.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-page-view.Tpo $(DEPDIR)/simple_scan-page-view.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='page-view.c' object='simple_scan-page-view.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page-view.o `test -f 'page-view.c' || echo '$(srcdir)/'`page-view.c
+
+simple_scan-page-view.obj: page-view.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-page-view.obj -MD -MP -MF $(DEPDIR)/simple_scan-page-view.Tpo -c -o simple_scan-page-view.obj `if test -f 'page-view.c'; then $(CYGPATH_W) 'page-view.c'; else $(CYGPATH_W) '$(srcdir)/page-view.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-page-view.Tpo $(DEPDIR)/simple_scan-page-view.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='page-view.c' object='simple_scan-page-view.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page-view.obj `if test -f 'page-view.c'; then $(CYGPATH_W) 'page-view.c'; else $(CYGPATH_W) '$(srcdir)/page-view.c'; fi`
+
+simple_scan-simple-scan.o: simple-scan.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-simple-scan.o -MD -MP -MF $(DEPDIR)/simple_scan-simple-scan.Tpo -c -o simple_scan-simple-scan.o `test -f 'simple-scan.c' || echo '$(srcdir)/'`simple-scan.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-simple-scan.Tpo $(DEPDIR)/simple_scan-simple-scan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple-scan.c' object='simple_scan-simple-scan.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-simple-scan.o `test -f 'simple-scan.c' || echo '$(srcdir)/'`simple-scan.c
+
+simple_scan-simple-scan.obj: simple-scan.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-simple-scan.obj -MD -MP -MF $(DEPDIR)/simple_scan-simple-scan.Tpo -c -o simple_scan-simple-scan.obj `if test -f 'simple-scan.c'; then $(CYGPATH_W) 'simple-scan.c'; else $(CYGPATH_W) '$(srcdir)/simple-scan.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-simple-scan.Tpo $(DEPDIR)/simple_scan-simple-scan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple-scan.c' object='simple_scan-simple-scan.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-simple-scan.obj `if test -f 'simple-scan.c'; then $(CYGPATH_W) 'simple-scan.c'; else $(CYGPATH_W) '$(srcdir)/simple-scan.c'; fi`
+
+simple_scan-scanner.o: scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-scanner.o -MD -MP -MF $(DEPDIR)/simple_scan-scanner.Tpo -c -o simple_scan-scanner.o `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-scanner.Tpo $(DEPDIR)/simple_scan-scanner.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanner.c' object='simple_scan-scanner.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-scanner.o `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
+
+simple_scan-scanner.obj: scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-scanner.obj -MD -MP -MF $(DEPDIR)/simple_scan-scanner.Tpo -c -o simple_scan-scanner.obj `if test -f 'scanner.c'; then $(CYGPATH_W) 'scanner.c'; else $(CYGPATH_W) '$(srcdir)/scanner.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-scanner.Tpo $(DEPDIR)/simple_scan-scanner.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanner.c' object='simple_scan-scanner.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-scanner.obj `if test -f 'scanner.c'; then $(CYGPATH_W) 'scanner.c'; else $(CYGPATH_W) '$(srcdir)/scanner.c'; fi`
+
+simple_scan-ui.o: ui.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-ui.o -MD -MP -MF $(DEPDIR)/simple_scan-ui.Tpo -c -o simple_scan-ui.o `test -f 'ui.c' || echo '$(srcdir)/'`ui.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-ui.Tpo $(DEPDIR)/simple_scan-ui.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ui.c' object='simple_scan-ui.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-ui.o `test -f 'ui.c' || echo '$(srcdir)/'`ui.c
+
+simple_scan-ui.obj: ui.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-ui.obj -MD -MP -MF $(DEPDIR)/simple_scan-ui.Tpo -c -o simple_scan-ui.obj `if test -f 'ui.c'; then $(CYGPATH_W) 'ui.c'; else $(CYGPATH_W) '$(srcdir)/ui.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-ui.Tpo $(DEPDIR)/simple_scan-ui.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ui.c' object='simple_scan-ui.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-ui.obj `if test -f 'ui.c'; then $(CYGPATH_W) 'ui.c'; else $(CYGPATH_W) '$(srcdir)/ui.c'; fi`
+
+simple_scan-autosave-manager.o: autosave-manager.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-autosave-manager.o -MD -MP -MF $(DEPDIR)/simple_scan-autosave-manager.Tpo -c -o simple_scan-autosave-manager.o `test -f 'autosave-manager.c' || echo '$(srcdir)/'`autosave-manager.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-autosave-manager.Tpo $(DEPDIR)/simple_scan-autosave-manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='autosave-manager.c' object='simple_scan-autosave-manager.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-autosave-manager.o `test -f 'autosave-manager.c' || echo '$(srcdir)/'`autosave-manager.c
+
+simple_scan-autosave-manager.obj: autosave-manager.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-autosave-manager.obj -MD -MP -MF $(DEPDIR)/simple_scan-autosave-manager.Tpo -c -o simple_scan-autosave-manager.obj `if test -f 'autosave-manager.c'; then $(CYGPATH_W) 'autosave-manager.c'; else $(CYGPATH_W) '$(srcdir)/autosave-manager.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-autosave-manager.Tpo $(DEPDIR)/simple_scan-autosave-manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='autosave-manager.c' object='simple_scan-autosave-manager.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-autosave-manager.obj `if test -f 'autosave-manager.c'; then $(CYGPATH_W) 'autosave-manager.c'; else $(CYGPATH_W) '$(srcdir)/autosave-manager.c'; fi`
+
+simple_scan-resources.o: resources.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-resources.o -MD -MP -MF $(DEPDIR)/simple_scan-resources.Tpo -c -o simple_scan-resources.o `test -f 'resources.c' || echo '$(srcdir)/'`resources.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-resources.Tpo $(DEPDIR)/simple_scan-resources.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='resources.c' object='simple_scan-resources.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-resources.o `test -f 'resources.c' || echo '$(srcdir)/'`resources.c
+
+simple_scan-resources.obj: resources.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-resources.obj -MD -MP -MF $(DEPDIR)/simple_scan-resources.Tpo -c -o simple_scan-resources.obj `if test -f 'resources.c'; then $(CYGPATH_W) 'resources.c'; else $(CYGPATH_W) '$(srcdir)/resources.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-resources.Tpo $(DEPDIR)/simple_scan-resources.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='resources.c' object='simple_scan-resources.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-resources.obj `if test -f 'resources.c'; then $(CYGPATH_W) 'resources.c'; else $(CYGPATH_W) '$(srcdir)/resources.c'; fi`
+$(srcdir)/book.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
+ fi
+$(srcdir)/book-view.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
+ fi
+$(srcdir)/page.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
+ fi
+$(srcdir)/page-view.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
+ fi
+$(srcdir)/simple-scan.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
+ fi
+$(srcdir)/scanner.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
+ fi
+$(srcdir)/ui.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
+ fi
+$(srcdir)/autosave-manager.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
+ @if test -f $@; then :; else \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
+ fi
+$(srcdir)/simple_scan_vala.stamp: config.vapi book.vala book-view.vala colord.vapi page.vala page-view.vala sane.vapi simple-scan.vala scanner.vala ui.vala autosave-manager.vala
+ $(AM_V_at)rm -f $@ && echo stamp > $@-t
+ $(AM_V_VALAC)$(am__cd) $(srcdir) && $(VALAC) $(simple_scan_VALAFLAGS) $(VALAFLAGS) -C config.vapi book.vala book-view.vala colord.vapi page.vala page-view.vala sane.vapi simple-scan.vala scanner.vala ui.vala autosave-manager.vala
+ $(AM_V_at)mv -f $@-t $@
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f $(srcdir)/autosave-manager.c
+ -rm -f $(srcdir)/book-view.c
+ -rm -f $(srcdir)/book.c
+ -rm -f $(srcdir)/page-view.c
+ -rm -f $(srcdir)/page.c
+ -rm -f $(srcdir)/scanner.c
+ -rm -f $(srcdir)/simple-scan.c
+ -rm -f $(srcdir)/simple_scan_vala.stamp
+ -rm -f $(srcdir)/ui.c
+ -rm -f autosave-manager.c
+ -rm -f book-view.c
+ -rm -f book.c
+ -rm -f page-view.c
+ -rm -f page.c
+ -rm -f scanner.c
+ -rm -f simple-scan.c
+ -rm -f ui.c
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \
+ distclean distclean-compile distclean-generic distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-binPROGRAMS install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS
+
+
+resources.c: $(top_srcdir)/data/simple-scan.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir=$(top_srcdir)/data/ $(top_srcdir)/data/simple-scan.gresource.xml)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/data/ --generate-source $<
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/autosave-manager.c b/src/autosave-manager.c
new file mode 100644
index 0000000..de3f9ca
--- /dev/null
+++ b/src/autosave-manager.c
@@ -0,0 +1,2721 @@
+/* autosave-manager.c generated by valac 0.24.0, the Vala compiler
+ * generated from autosave-manager.vala, do not modify */
+
+/*
+ * Copyright (C) 2011 Timo Kluck
+ * Authors: Timo Kluck <tkluck@infty.nl>
+ * Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+#include <glib/gstdio.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_AUTOSAVE_MANAGER (autosave_manager_get_type ())
+#define AUTOSAVE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOSAVE_MANAGER, AutosaveManager))
+#define AUTOSAVE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOSAVE_MANAGER, AutosaveManagerClass))
+#define IS_AUTOSAVE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOSAVE_MANAGER))
+#define IS_AUTOSAVE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOSAVE_MANAGER))
+#define AUTOSAVE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOSAVE_MANAGER, AutosaveManagerClass))
+
+typedef struct _AutosaveManager AutosaveManager;
+typedef struct _AutosaveManagerClass AutosaveManagerClass;
+typedef struct _AutosaveManagerPrivate AutosaveManagerPrivate;
+
+#define TYPE_PAGE (page_get_type ())
+#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
+#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
+#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
+#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
+#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))
+
+typedef struct _Page Page;
+typedef struct _PageClass PageClass;
+
+#define TYPE_BOOK (book_get_type ())
+#define BOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOK, Book))
+#define BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOK, BookClass))
+#define IS_BOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOK))
+#define IS_BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOK))
+#define BOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOK, BookClass))
+
+typedef struct _Book Book;
+typedef struct _BookClass BookClass;
+#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
+#define _book_unref0(var) ((var == NULL) ? NULL : (var = (book_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+#define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL)))
+
+#define TYPE_SCAN_DIRECTION (scan_direction_get_type ())
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL)))
+#define _g_dir_close0(var) ((var == NULL) ? NULL : (var = (g_dir_close (var), NULL)))
+typedef struct _ParamSpecAutosaveManager ParamSpecAutosaveManager;
+
+struct _AutosaveManager {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ AutosaveManagerPrivate * priv;
+};
+
+struct _AutosaveManagerClass {
+ GTypeClass parent_class;
+ void (*finalize) (AutosaveManager *self);
+};
+
+struct _AutosaveManagerPrivate {
+ guint update_timeout;
+ GHashTable* page_filenames;
+ Book* book_;
+};
+
+typedef enum {
+ SCAN_DIRECTION_TOP_TO_BOTTOM,
+ SCAN_DIRECTION_LEFT_TO_RIGHT,
+ SCAN_DIRECTION_BOTTOM_TO_TOP,
+ SCAN_DIRECTION_RIGHT_TO_LEFT
+} ScanDirection;
+
+struct _ParamSpecAutosaveManager {
+ GParamSpec parent_instance;
+};
+
+
+static gpointer autosave_manager_parent_class = NULL;
+static gchar* autosave_manager_AUTOSAVE_DIR;
+static gchar* autosave_manager_AUTOSAVE_DIR = NULL;
+static gchar* autosave_manager_AUTOSAVE_FILENAME;
+static gchar* autosave_manager_AUTOSAVE_FILENAME = NULL;
+static gchar* autosave_manager_AUTOSAVE_PATH;
+static gchar* autosave_manager_AUTOSAVE_PATH = NULL;
+
+gpointer autosave_manager_ref (gpointer instance);
+void autosave_manager_unref (gpointer instance);
+GParamSpec* param_spec_autosave_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_autosave_manager (GValue* value, gpointer v_object);
+void value_take_autosave_manager (GValue* value, gpointer v_object);
+gpointer value_get_autosave_manager (const GValue* value);
+GType autosave_manager_get_type (void) G_GNUC_CONST;
+gpointer page_ref (gpointer instance);
+void page_unref (gpointer instance);
+GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_page (GValue* value, gpointer v_object);
+void value_take_page (GValue* value, gpointer v_object);
+gpointer value_get_page (const GValue* value);
+GType page_get_type (void) G_GNUC_CONST;
+gpointer book_ref (gpointer instance);
+void book_unref (gpointer instance);
+GParamSpec* param_spec_book (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_book (GValue* value, gpointer v_object);
+void value_take_book (GValue* value, gpointer v_object);
+gpointer value_get_book (const GValue* value);
+GType book_get_type (void) G_GNUC_CONST;
+#define AUTOSAVE_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_AUTOSAVE_MANAGER, AutosaveManagerPrivate))
+enum {
+ AUTOSAVE_MANAGER_DUMMY_PROPERTY
+};
+AutosaveManager* autosave_manager_new (void);
+AutosaveManager* autosave_manager_construct (GType object_type);
+static void _page_unref0_ (gpointer var);
+static void _g_free0_ (gpointer var);
+void autosave_manager_load (AutosaveManager* self);
+Book* autosave_manager_get_book (AutosaveManager* self);
+void book_clear (Book* self);
+static gchar* autosave_manager_get_value (AutosaveManager* self, GKeyFile* file, const gchar* group_name, const gchar* key, const gchar* _default_);
+static gint autosave_manager_get_integer (AutosaveManager* self, GKeyFile* file, const gchar* group_name, const gchar* key, gint _default_);
+GType scan_direction_get_type (void) G_GNUC_CONST;
+static gboolean autosave_manager_get_boolean (AutosaveManager* self, GKeyFile* file, const gchar* group_name, const gchar* key, gboolean _default_);
+Page* page_new_from_data (gint scan_width, gint scan_height, gint rowstride, gint n_channels, gint depth, gint dpi, ScanDirection scan_direction, const gchar* color_profile, guchar* pixels, int pixels_length1, gboolean has_crop, const gchar* crop_name, gint crop_x, gint crop_y, gint crop_width, gint crop_height);
+Page* page_construct_from_data (GType object_type, gint scan_width, gint scan_height, gint rowstride, gint n_channels, gint depth, gint dpi, ScanDirection scan_direction, const gchar* color_profile, guchar* pixels, int pixels_length1, gboolean has_crop, const gchar* crop_name, gint crop_x, gint crop_y, gint crop_width, gint crop_height);
+void book_append_page (Book* self, Page* page);
+void autosave_manager_cleanup (AutosaveManager* self);
+void autosave_manager_on_page_added (AutosaveManager* self, Page* page);
+void autosave_manager_on_scan_finished (AutosaveManager* self, Page* page);
+static void _autosave_manager_on_scan_finished_page_scan_finished (Page* _sender, gpointer self);
+void autosave_manager_on_changed (AutosaveManager* self);
+static void _autosave_manager_on_changed_page_crop_changed (Page* _sender, gpointer self);
+void autosave_manager_on_page_removed (AutosaveManager* self, Page* page);
+static void autosave_manager_save_pixels (AutosaveManager* self, Page* page);
+static void autosave_manager_save (AutosaveManager* self, gboolean do_timeout);
+void autosave_manager_on_cleared (AutosaveManager* self);
+static gboolean ___lambda3_ (AutosaveManager* self);
+static void autosave_manager_real_save (AutosaveManager* self);
+static gboolean ____lambda3__gsource_func (gpointer self);
+guint book_get_n_pages (Book* self);
+Page* book_get_page (Book* self, gint page_number);
+gboolean page_get_has_data (Page* self);
+gint page_get_scan_width (Page* self);
+gint page_get_scan_height (Page* self);
+gint page_get_rowstride (Page* self);
+gint page_get_n_channels (Page* self);
+gint page_get_depth (Page* self);
+gint page_get_dpi (Page* self);
+ScanDirection page_get_scan_direction (Page* self);
+const gchar* page_get_color_profile (Page* self);
+gboolean page_get_has_crop (Page* self);
+const gchar* page_get_crop_name (Page* self);
+gint page_get_crop_x (Page* self);
+gint page_get_crop_y (Page* self);
+gint page_get_crop_width (Page* self);
+gint page_get_crop_height (Page* self);
+guchar* page_get_pixels (Page* self, int* result_length1);
+void autosave_manager_set_book (AutosaveManager* self, Book* value);
+static void _autosave_manager_on_page_added_book_page_added (Book* _sender, Page* page, gpointer self);
+static void _autosave_manager_on_page_removed_book_page_removed (Book* _sender, Page* page, gpointer self);
+static void _autosave_manager_on_changed_book_reordered (Book* _sender, gpointer self);
+static void _autosave_manager_on_cleared_book_cleared (Book* _sender, gpointer self);
+static void autosave_manager_finalize (AutosaveManager* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static gint _vala_array_length (gpointer array);
+
+
+static void _page_unref0_ (gpointer var) {
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ (var == NULL) ? NULL : (var = (page_unref (var), NULL));
+#line 189 "autosave-manager.c"
+}
+
+
+static void _g_free0_ (gpointer var) {
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ var = (g_free (var), NULL);
+#line 196 "autosave-manager.c"
+}
+
+
+AutosaveManager* autosave_manager_construct (GType object_type) {
+ AutosaveManager* self = NULL;
+ GHashFunc _tmp0_ = NULL;
+ GEqualFunc _tmp1_ = NULL;
+ GHashTable* _tmp2_ = NULL;
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self = (AutosaveManager*) g_type_create_instance (object_type);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = g_direct_hash;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = g_direct_equal;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _page_unref0_, _g_free0_);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_hash_table_unref0 (self->priv->page_filenames);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->priv->page_filenames = _tmp2_;
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return self;
+#line 219 "autosave-manager.c"
+}
+
+
+AutosaveManager* autosave_manager_new (void) {
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return autosave_manager_construct (TYPE_AUTOSAVE_MANAGER);
+#line 226 "autosave-manager.c"
+}
+
+
+static gpointer _page_ref0 (gpointer self) {
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return self ? page_ref (self) : NULL;
+#line 233 "autosave-manager.c"
+}
+
+
+void autosave_manager_load (AutosaveManager* self) {
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+ GHashTable* _tmp2_ = NULL;
+ GKeyFile* file = NULL;
+ GKeyFile* _tmp3_ = NULL;
+ gchar* pages = NULL;
+ GKeyFile* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ gchar** _tmp12_ = NULL;
+ gchar** _tmp13_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_debug ("autosave-manager.vala:64: Loading autosave information");
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = autosave_manager_get_book (self);
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = _tmp0_;
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ book_clear (_tmp1_);
+#line 67 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = self->priv->page_filenames;
+#line 67 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_hash_table_remove_all (_tmp2_);
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = g_key_file_new ();
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ file = _tmp3_;
+#line 268 "autosave-manager.c"
+ {
+ GKeyFile* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+#line 72 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = file;
+#line 72 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = autosave_manager_AUTOSAVE_PATH;
+#line 72 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_load_from_file (_tmp4_, _tmp5_, G_KEY_FILE_NONE, &_inner_error_);
+#line 72 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 280 "autosave-manager.c"
+ goto __catch27_g_error;
+ }
+ }
+ goto __finally27;
+ __catch27_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp6_ = NULL;
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ e = _inner_error_;
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _inner_error_ = NULL;
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp6_ = e;
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!g_error_matches (_tmp6_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
+#line 297 "autosave-manager.c"
+ GError* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp7_ = e;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp8_ = _tmp7_->message;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_warning ("autosave-manager.vala:77: Could not load autosave infomation; not rest" \
+"oring any autosaves: %s", _tmp8_);
+#line 306 "autosave-manager.c"
+ }
+#line 78 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_error_free0 (e);
+#line 78 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_key_file_unref0 (file);
+#line 78 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return;
+#line 314 "autosave-manager.c"
+ }
+ __finally27:
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_key_file_unref0 (file);
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_clear_error (&_inner_error_);
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return;
+#line 327 "autosave-manager.c"
+ }
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp9_ = file;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp10_ = autosave_manager_get_value (self, _tmp9_, "simple-scan", "pages", "");
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pages = _tmp10_;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp11_ = pages;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp13_ = _tmp12_ = g_strsplit (_tmp11_, " ", 0);
+#line 339 "autosave-manager.c"
+ {
+ gchar** page_name_collection = NULL;
+ gint page_name_collection_length1 = 0;
+ gint _page_name_collection_size_ = 0;
+ gint page_name_it = 0;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page_name_collection = _tmp13_;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page_name_collection_length1 = _vala_array_length (_tmp12_);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ for (page_name_it = 0; page_name_it < _vala_array_length (_tmp12_); page_name_it = page_name_it + 1) {
+#line 351 "autosave-manager.c"
+ gchar* _tmp14_ = NULL;
+ gchar* page_name = NULL;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp14_ = g_strdup (page_name_collection[page_name_it]);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page_name = _tmp14_;
+#line 358 "autosave-manager.c"
+ {
+ const gchar* _tmp15_ = NULL;
+ gint scan_width = 0;
+ GKeyFile* _tmp16_ = NULL;
+ const gchar* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+ gint scan_height = 0;
+ GKeyFile* _tmp19_ = NULL;
+ const gchar* _tmp20_ = NULL;
+ gint _tmp21_ = 0;
+ gint rowstride = 0;
+ GKeyFile* _tmp22_ = NULL;
+ const gchar* _tmp23_ = NULL;
+ gint _tmp24_ = 0;
+ gint n_channels = 0;
+ GKeyFile* _tmp25_ = NULL;
+ const gchar* _tmp26_ = NULL;
+ gint _tmp27_ = 0;
+ gint depth = 0;
+ GKeyFile* _tmp28_ = NULL;
+ const gchar* _tmp29_ = NULL;
+ gint _tmp30_ = 0;
+ gint dpi = 0;
+ GKeyFile* _tmp31_ = NULL;
+ const gchar* _tmp32_ = NULL;
+ gint _tmp33_ = 0;
+ gchar* scan_direction_name = NULL;
+ GKeyFile* _tmp34_ = NULL;
+ const gchar* _tmp35_ = NULL;
+ gchar* _tmp36_ = NULL;
+ ScanDirection scan_direction = 0;
+ const gchar* _tmp37_ = NULL;
+ const gchar* _tmp38_ = NULL;
+ GQuark _tmp40_ = 0U;
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ static GQuark _tmp39_label0 = 0;
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ static GQuark _tmp39_label1 = 0;
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ static GQuark _tmp39_label2 = 0;
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ static GQuark _tmp39_label3 = 0;
+#line 401 "autosave-manager.c"
+ gchar* color_profile = NULL;
+ GKeyFile* _tmp41_ = NULL;
+ const gchar* _tmp42_ = NULL;
+ gchar* _tmp43_ = NULL;
+ const gchar* _tmp44_ = NULL;
+ gchar* pixels_filename = NULL;
+ GKeyFile* _tmp45_ = NULL;
+ const gchar* _tmp46_ = NULL;
+ gchar* _tmp47_ = NULL;
+ gboolean has_crop = FALSE;
+ GKeyFile* _tmp48_ = NULL;
+ const gchar* _tmp49_ = NULL;
+ gboolean _tmp50_ = FALSE;
+ gchar* crop_name = NULL;
+ GKeyFile* _tmp51_ = NULL;
+ const gchar* _tmp52_ = NULL;
+ gchar* _tmp53_ = NULL;
+ const gchar* _tmp54_ = NULL;
+ gint crop_x = 0;
+ GKeyFile* _tmp55_ = NULL;
+ const gchar* _tmp56_ = NULL;
+ gint _tmp57_ = 0;
+ gint crop_y = 0;
+ GKeyFile* _tmp58_ = NULL;
+ const gchar* _tmp59_ = NULL;
+ gint _tmp60_ = 0;
+ gint crop_width = 0;
+ GKeyFile* _tmp61_ = NULL;
+ const gchar* _tmp62_ = NULL;
+ gint _tmp63_ = 0;
+ gint crop_height = 0;
+ GKeyFile* _tmp64_ = NULL;
+ const gchar* _tmp65_ = NULL;
+ gint _tmp66_ = 0;
+ guchar* pixels = NULL;
+ gint pixels_length1 = 0;
+ gint _pixels_size_ = 0;
+ const gchar* _tmp67_ = NULL;
+ Page* page = NULL;
+ gint _tmp76_ = 0;
+ gint _tmp77_ = 0;
+ gint _tmp78_ = 0;
+ gint _tmp79_ = 0;
+ gint _tmp80_ = 0;
+ gint _tmp81_ = 0;
+ ScanDirection _tmp82_ = 0;
+ const gchar* _tmp83_ = NULL;
+ guchar* _tmp84_ = NULL;
+ gint _tmp84__length1 = 0;
+ gboolean _tmp85_ = FALSE;
+ const gchar* _tmp86_ = NULL;
+ gint _tmp87_ = 0;
+ gint _tmp88_ = 0;
+ gint _tmp89_ = 0;
+ gint _tmp90_ = 0;
+ Page* _tmp91_ = NULL;
+ GHashTable* _tmp92_ = NULL;
+ Page* _tmp93_ = NULL;
+ Page* _tmp94_ = NULL;
+ const gchar* _tmp95_ = NULL;
+ gchar* _tmp96_ = NULL;
+ Book* _tmp97_ = NULL;
+ Book* _tmp98_ = NULL;
+ Page* _tmp99_ = NULL;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp15_ = page_name;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_debug ("autosave-manager.vala:83: Loading automatically saved page %s", _tmp15_);
+#line 85 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp16_ = file;
+#line 85 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp17_ = page_name;
+#line 85 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp18_ = autosave_manager_get_integer (self, _tmp16_, _tmp17_, "scan-width", 0);
+#line 85 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ scan_width = _tmp18_;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp19_ = file;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp20_ = page_name;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp21_ = autosave_manager_get_integer (self, _tmp19_, _tmp20_, "scan-height", 0);
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ scan_height = _tmp21_;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp22_ = file;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp23_ = page_name;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp24_ = autosave_manager_get_integer (self, _tmp22_, _tmp23_, "rowstride", 0);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ rowstride = _tmp24_;
+#line 88 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp25_ = file;
+#line 88 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp26_ = page_name;
+#line 88 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp27_ = autosave_manager_get_integer (self, _tmp25_, _tmp26_, "n-channels", 0);
+#line 88 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ n_channels = _tmp27_;
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp28_ = file;
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp29_ = page_name;
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp30_ = autosave_manager_get_integer (self, _tmp28_, _tmp29_, "depth", 0);
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ depth = _tmp30_;
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp31_ = file;
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp32_ = page_name;
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp33_ = autosave_manager_get_integer (self, _tmp31_, _tmp32_, "dpi", 0);
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ dpi = _tmp33_;
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp34_ = file;
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp35_ = page_name;
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp36_ = autosave_manager_get_value (self, _tmp34_, _tmp35_, "scan-direction", "");
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ scan_direction_name = _tmp36_;
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ scan_direction = SCAN_DIRECTION_TOP_TO_BOTTOM;
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp37_ = scan_direction_name;
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp38_ = _tmp37_;
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp40_ = (NULL == _tmp38_) ? 0 : g_quark_from_string (_tmp38_);
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp40_ == ((0 != _tmp39_label0) ? _tmp39_label0 : (_tmp39_label0 = g_quark_from_static_string ("TOP_TO_BOTTOM")))) {
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ switch (0) {
+#line 538 "autosave-manager.c"
+ default:
+ {
+#line 96 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ scan_direction = SCAN_DIRECTION_TOP_TO_BOTTOM;
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 545 "autosave-manager.c"
+ }
+ }
+ } else if (_tmp40_ == ((0 != _tmp39_label1) ? _tmp39_label1 : (_tmp39_label1 = g_quark_from_static_string ("LEFT_TO_RIGHT")))) {
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ switch (0) {
+#line 551 "autosave-manager.c"
+ default:
+ {
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ scan_direction = SCAN_DIRECTION_LEFT_TO_RIGHT;
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 558 "autosave-manager.c"
+ }
+ }
+ } else if (_tmp40_ == ((0 != _tmp39_label2) ? _tmp39_label2 : (_tmp39_label2 = g_quark_from_static_string ("BOTTOM_TO_TOP")))) {
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ switch (0) {
+#line 564 "autosave-manager.c"
+ default:
+ {
+#line 102 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ scan_direction = SCAN_DIRECTION_BOTTOM_TO_TOP;
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 571 "autosave-manager.c"
+ }
+ }
+ } else if (_tmp40_ == ((0 != _tmp39_label3) ? _tmp39_label3 : (_tmp39_label3 = g_quark_from_static_string ("RIGHT_TO_LEFT")))) {
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ switch (0) {
+#line 577 "autosave-manager.c"
+ default:
+ {
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ scan_direction = SCAN_DIRECTION_RIGHT_TO_LEFT;
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 584 "autosave-manager.c"
+ }
+ }
+ }
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp41_ = file;
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp42_ = page_name;
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp43_ = autosave_manager_get_value (self, _tmp41_, _tmp42_, "color-profile", "");
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ color_profile = _tmp43_;
+#line 109 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp44_ = color_profile;
+#line 109 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (g_strcmp0 (_tmp44_, "") == 0) {
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (color_profile);
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ color_profile = NULL;
+#line 604 "autosave-manager.c"
+ }
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp45_ = file;
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp46_ = page_name;
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp47_ = autosave_manager_get_value (self, _tmp45_, _tmp46_, "pixels-filename", "");
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pixels_filename = _tmp47_;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp48_ = file;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp49_ = page_name;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp50_ = autosave_manager_get_boolean (self, _tmp48_, _tmp49_, "has-crop", FALSE);
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ has_crop = _tmp50_;
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp51_ = file;
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp52_ = page_name;
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp53_ = autosave_manager_get_value (self, _tmp51_, _tmp52_, "crop-name", "");
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ crop_name = _tmp53_;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp54_ = crop_name;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (g_strcmp0 (_tmp54_, "") == 0) {
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (crop_name);
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ crop_name = NULL;
+#line 638 "autosave-manager.c"
+ }
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp55_ = file;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp56_ = page_name;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp57_ = autosave_manager_get_integer (self, _tmp55_, _tmp56_, "crop-x", 0);
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ crop_x = _tmp57_;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp58_ = file;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp59_ = page_name;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp60_ = autosave_manager_get_integer (self, _tmp58_, _tmp59_, "crop-y", 0);
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ crop_y = _tmp60_;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp61_ = file;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp62_ = page_name;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp63_ = autosave_manager_get_integer (self, _tmp61_, _tmp62_, "crop-width", 0);
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ crop_width = _tmp63_;
+#line 119 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp64_ = file;
+#line 119 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp65_ = page_name;
+#line 119 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp66_ = autosave_manager_get_integer (self, _tmp64_, _tmp65_, "crop-height", 0);
+#line 119 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ crop_height = _tmp66_;
+#line 121 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pixels = NULL;
+#line 121 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pixels_length1 = 0;
+#line 121 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _pixels_size_ = pixels_length1;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp67_ = pixels_filename;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (g_strcmp0 (_tmp67_, "") != 0) {
+#line 682 "autosave-manager.c"
+ gchar* path = NULL;
+ const gchar* _tmp68_ = NULL;
+ const gchar* _tmp69_ = NULL;
+ gchar* _tmp70_ = NULL;
+ GFile* f = NULL;
+ const gchar* _tmp71_ = NULL;
+ GFile* _tmp72_ = NULL;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp68_ = autosave_manager_AUTOSAVE_DIR;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp69_ = pixels_filename;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp70_ = g_build_filename (_tmp68_, _tmp69_, NULL);
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ path = _tmp70_;
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp71_ = path;
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp72_ = g_file_new_for_path (_tmp71_);
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ f = _tmp72_;
+#line 704 "autosave-manager.c"
+ {
+ GFile* _tmp73_ = NULL;
+ guint8* _tmp74_ = NULL;
+ gsize _tmp75_;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp73_ = f;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_file_load_contents (_tmp73_, NULL, &_tmp74_, &_tmp75_, NULL, &_inner_error_);
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pixels = (g_free (pixels), NULL);
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pixels = _tmp74_;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pixels_length1 = _tmp75_;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _pixels_size_ = pixels_length1;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 723 "autosave-manager.c"
+ goto __catch28_g_error;
+ }
+ }
+ goto __finally28;
+ __catch28_g_error:
+ {
+ GError* e = NULL;
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ e = _inner_error_;
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _inner_error_ = NULL;
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_warning ("autosave-manager.vala:132: Failed to load pixel information");
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_error_free0 (e);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_object_unref0 (f);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (path);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pixels = (g_free (pixels), NULL);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (crop_name);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (pixels_filename);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (color_profile);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (scan_direction_name);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (page_name);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ continue;
+#line 757 "autosave-manager.c"
+ }
+ __finally28:
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_object_unref0 (f);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (path);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pixels = (g_free (pixels), NULL);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (crop_name);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (pixels_filename);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (color_profile);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (scan_direction_name);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (page_name);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page_name_collection = (_vala_array_free (page_name_collection, page_name_collection_length1, (GDestroyNotify) g_free), NULL);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (pages);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_key_file_unref0 (file);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_clear_error (&_inner_error_);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return;
+#line 790 "autosave-manager.c"
+ }
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_object_unref0 (f);
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (path);
+#line 796 "autosave-manager.c"
+ }
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp76_ = scan_width;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp77_ = scan_height;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp78_ = rowstride;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp79_ = n_channels;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp80_ = depth;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp81_ = dpi;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp82_ = scan_direction;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp83_ = color_profile;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp84_ = pixels;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp84__length1 = pixels_length1;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp85_ = has_crop;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp86_ = crop_name;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp87_ = crop_x;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp88_ = crop_y;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp89_ = crop_width;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp90_ = crop_height;
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp91_ = page_new_from_data (_tmp76_, _tmp77_, _tmp78_, _tmp79_, _tmp80_, _tmp81_, _tmp82_, _tmp83_, _tmp84_, _tmp84__length1, _tmp85_, _tmp86_, _tmp87_, _tmp88_, _tmp89_, _tmp90_);
+#line 137 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page = _tmp91_;
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp92_ = self->priv->page_filenames;
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp93_ = page;
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp94_ = _page_ref0 (_tmp93_);
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp95_ = pixels_filename;
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp96_ = g_strdup (_tmp95_);
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_hash_table_insert (_tmp92_, _tmp94_, _tmp96_);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp97_ = autosave_manager_get_book (self);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp98_ = _tmp97_;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp99_ = page;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ book_append_page (_tmp98_, _tmp99_);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _page_unref0 (page);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ pixels = (g_free (pixels), NULL);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (crop_name);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (pixels_filename);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (color_profile);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (scan_direction_name);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (page_name);
+#line 868 "autosave-manager.c"
+ }
+ }
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page_name_collection = (_vala_array_free (page_name_collection, page_name_collection_length1, (GDestroyNotify) g_free), NULL);
+#line 873 "autosave-manager.c"
+ }
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (pages);
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_key_file_unref0 (file);
+#line 879 "autosave-manager.c"
+}
+
+
+static gchar* autosave_manager_get_value (AutosaveManager* self, GKeyFile* file, const gchar* group_name, const gchar* key, const gchar* _default_) {
+ gchar* result = NULL;
+ GError * _inner_error_ = NULL;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (file != NULL, NULL);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (group_name != NULL, NULL);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (key != NULL, NULL);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (_default_ != NULL, NULL);
+#line 896 "autosave-manager.c"
+ {
+ gchar* _tmp0_ = NULL;
+ GKeyFile* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = file;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = group_name;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = key;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = g_key_file_get_value (_tmp1_, _tmp2_, _tmp3_, &_inner_error_);
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = _tmp4_;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 916 "autosave-manager.c"
+ goto __catch29_g_error;
+ }
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = _tmp0_;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = NULL;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ result = _tmp5_;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (_tmp0_);
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return result;
+#line 929 "autosave-manager.c"
+ }
+ goto __finally29;
+ __catch29_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ e = _inner_error_;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _inner_error_ = NULL;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp6_ = _default_;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp7_ = g_strdup (_tmp6_);
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ result = _tmp7_;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_error_free0 (e);
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return result;
+#line 951 "autosave-manager.c"
+ }
+ __finally29:
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_clear_error (&_inner_error_);
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return NULL;
+#line 960 "autosave-manager.c"
+}
+
+
+static gint autosave_manager_get_integer (AutosaveManager* self, GKeyFile* file, const gchar* group_name, const gchar* key, gint _default_) {
+ gint result = 0;
+ GError * _inner_error_ = NULL;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (file != NULL, 0);
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (group_name != NULL, 0);
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (key != NULL, 0);
+#line 975 "autosave-manager.c"
+ {
+ gint _tmp0_ = 0;
+ GKeyFile* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = file;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = group_name;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = key;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = g_key_file_get_integer (_tmp1_, _tmp2_, _tmp3_, &_inner_error_);
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = _tmp4_;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 994 "autosave-manager.c"
+ goto __catch30_g_error;
+ }
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ result = _tmp0_;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return result;
+#line 1001 "autosave-manager.c"
+ }
+ goto __finally30;
+ __catch30_g_error:
+ {
+ GError* e = NULL;
+ gint _tmp5_ = 0;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ e = _inner_error_;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _inner_error_ = NULL;
+#line 177 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = _default_;
+#line 177 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ result = _tmp5_;
+#line 177 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_error_free0 (e);
+#line 177 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return result;
+#line 1020 "autosave-manager.c"
+ }
+ __finally30:
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_clear_error (&_inner_error_);
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return 0;
+#line 1029 "autosave-manager.c"
+}
+
+
+static gboolean autosave_manager_get_boolean (AutosaveManager* self, GKeyFile* file, const gchar* group_name, const gchar* key, gboolean _default_) {
+ gboolean result = FALSE;
+ GError * _inner_error_ = NULL;
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (file != NULL, FALSE);
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (group_name != NULL, FALSE);
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (key != NULL, FALSE);
+#line 1044 "autosave-manager.c"
+ {
+ gboolean _tmp0_ = FALSE;
+ GKeyFile* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = file;
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = group_name;
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = key;
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = g_key_file_get_boolean (_tmp1_, _tmp2_, _tmp3_, &_inner_error_);
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = _tmp4_;
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 1063 "autosave-manager.c"
+ goto __catch31_g_error;
+ }
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ result = _tmp0_;
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return result;
+#line 1070 "autosave-manager.c"
+ }
+ goto __finally31;
+ __catch31_g_error:
+ {
+ GError* e = NULL;
+ gboolean _tmp5_ = FALSE;
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ e = _inner_error_;
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _inner_error_ = NULL;
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = _default_;
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ result = _tmp5_;
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_error_free0 (e);
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return result;
+#line 1089 "autosave-manager.c"
+ }
+ __finally31:
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_clear_error (&_inner_error_);
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return FALSE;
+#line 1098 "autosave-manager.c"
+}
+
+
+void autosave_manager_cleanup (AutosaveManager* self) {
+ guint _tmp0_ = 0U;
+ GDir* dir = NULL;
+ GError * _inner_error_ = NULL;
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 195 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_debug ("autosave-manager.vala:195: Deleting autosave records");
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = self->priv->update_timeout;
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp0_ > ((guint) 0)) {
+#line 1114 "autosave-manager.c"
+ guint _tmp1_ = 0U;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = self->priv->update_timeout;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_source_remove (_tmp1_);
+#line 1120 "autosave-manager.c"
+ }
+#line 199 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->priv->update_timeout = (guint) 0;
+#line 1124 "autosave-manager.c"
+ {
+ GDir* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ GDir* _tmp4_ = NULL;
+ GDir* _tmp5_ = NULL;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = autosave_manager_AUTOSAVE_DIR;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = g_dir_open (_tmp3_, (guint) 0, &_inner_error_);
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = _tmp4_;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 1138 "autosave-manager.c"
+ goto __catch32_g_error;
+ }
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = _tmp2_;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = NULL;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_dir_close0 (dir);
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ dir = _tmp5_;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_dir_close0 (_tmp2_);
+#line 1151 "autosave-manager.c"
+ }
+ goto __finally32;
+ __catch32_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ e = _inner_error_;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _inner_error_ = NULL;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp6_ = e;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp7_ = _tmp6_->message;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_warning ("autosave-manager.vala:208: Failed to delete autosaves: %s", _tmp7_);
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_error_free0 (e);
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_dir_close0 (dir);
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return;
+#line 1175 "autosave-manager.c"
+ }
+ __finally32:
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_dir_close0 (dir);
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_clear_error (&_inner_error_);
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return;
+#line 1188 "autosave-manager.c"
+ }
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ while (TRUE) {
+#line 1192 "autosave-manager.c"
+ gchar* filename = NULL;
+ GDir* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ gchar* path = NULL;
+ const gchar* _tmp12_ = NULL;
+ const gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ const gchar* _tmp15_ = NULL;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp8_ = dir;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp9_ = g_dir_read_name (_tmp8_);
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp10_ = g_strdup (_tmp9_);
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ filename = _tmp10_;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp11_ = filename;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp11_ == NULL) {
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (filename);
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 1219 "autosave-manager.c"
+ }
+#line 217 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp12_ = autosave_manager_AUTOSAVE_DIR;
+#line 217 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp13_ = filename;
+#line 217 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp14_ = g_build_filename (_tmp12_, _tmp13_, NULL);
+#line 217 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ path = _tmp14_;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp15_ = path;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_unlink (_tmp15_);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (path);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (filename);
+#line 1237 "autosave-manager.c"
+ }
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_dir_close0 (dir);
+#line 1241 "autosave-manager.c"
+}
+
+
+static void _autosave_manager_on_scan_finished_page_scan_finished (Page* _sender, gpointer self) {
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_on_scan_finished ((AutosaveManager*) self, _sender);
+#line 1248 "autosave-manager.c"
+}
+
+
+static void _autosave_manager_on_changed_page_crop_changed (Page* _sender, gpointer self) {
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_on_changed ((AutosaveManager*) self);
+#line 1255 "autosave-manager.c"
+}
+
+
+void autosave_manager_on_page_added (AutosaveManager* self, Page* page) {
+ Page* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (page != NULL);
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = page;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_connect (_tmp0_, "scan-finished", (GCallback) _autosave_manager_on_scan_finished_page_scan_finished, self);
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = page;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_connect (_tmp1_, "crop-changed", (GCallback) _autosave_manager_on_changed_page_crop_changed, self);
+#line 1274 "autosave-manager.c"
+}
+
+
+void autosave_manager_on_page_removed (AutosaveManager* self, Page* page) {
+ Page* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+ Page* _tmp2_ = NULL;
+ guint _tmp3_ = 0U;
+ gchar* filename = NULL;
+ GHashTable* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+ gconstpointer _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ GHashTable* _tmp10_ = NULL;
+ Page* _tmp11_ = NULL;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (page != NULL);
+#line 230 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = page;
+#line 230 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_parse_name ("scan-finished", TYPE_PAGE, &_tmp1_, NULL, FALSE);
+#line 230 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _autosave_manager_on_scan_finished_page_scan_finished, self);
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = page;
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_parse_name ("crop-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE);
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _autosave_manager_on_changed_page_crop_changed, self);
+#line 233 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = self->priv->page_filenames;
+#line 233 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = page;
+#line 233 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp6_ = g_hash_table_lookup (_tmp4_, _tmp5_);
+#line 233 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp7_ = g_strdup ((const gchar*) _tmp6_);
+#line 233 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ filename = _tmp7_;
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp8_ = filename;
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp8_ != NULL) {
+#line 1321 "autosave-manager.c"
+ const gchar* _tmp9_ = NULL;
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp9_ = filename;
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_unlink (_tmp9_);
+#line 1327 "autosave-manager.c"
+ }
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp10_ = self->priv->page_filenames;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp11_ = page;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_hash_table_remove (_tmp10_, _tmp11_);
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (filename);
+#line 1337 "autosave-manager.c"
+}
+
+
+void autosave_manager_on_scan_finished (AutosaveManager* self, Page* page) {
+ Page* _tmp0_ = NULL;
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (page != NULL);
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = page;
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_save_pixels (self, _tmp0_);
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_save (self, FALSE);
+#line 1353 "autosave-manager.c"
+}
+
+
+void autosave_manager_on_changed (AutosaveManager* self) {
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_save (self, TRUE);
+#line 1362 "autosave-manager.c"
+}
+
+
+void autosave_manager_on_cleared (AutosaveManager* self) {
+ GHashTable* _tmp0_ = NULL;
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = self->priv->page_filenames;
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_hash_table_remove_all (_tmp0_);
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_save (self, TRUE);
+#line 1376 "autosave-manager.c"
+}
+
+
+static gboolean ___lambda3_ (AutosaveManager* self) {
+ gboolean result = FALSE;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_real_save (self);
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->priv->update_timeout = (guint) 0;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ result = FALSE;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return result;
+#line 1390 "autosave-manager.c"
+}
+
+
+static gboolean ____lambda3__gsource_func (gpointer self) {
+ gboolean result;
+ result = ___lambda3_ ((AutosaveManager*) self);
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return result;
+#line 1399 "autosave-manager.c"
+}
+
+
+static void autosave_manager_save (AutosaveManager* self, gboolean do_timeout) {
+ gboolean _tmp0_ = FALSE;
+ guint _tmp1_ = 0U;
+ guint _tmp3_ = 0U;
+ gboolean _tmp5_ = FALSE;
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = self->priv->update_timeout;
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp1_ == ((guint) 0)) {
+#line 1414 "autosave-manager.c"
+ gboolean _tmp2_ = FALSE;
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = do_timeout;
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = _tmp2_;
+#line 1420 "autosave-manager.c"
+ } else {
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = FALSE;
+#line 1424 "autosave-manager.c"
+ }
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp0_) {
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_debug ("autosave-manager.vala:259: Waiting to autosave...");
+#line 1430 "autosave-manager.c"
+ }
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = self->priv->update_timeout;
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp3_ > ((guint) 0)) {
+#line 1436 "autosave-manager.c"
+ guint _tmp4_ = 0U;
+#line 263 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = self->priv->update_timeout;
+#line 263 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_source_remove (_tmp4_);
+#line 1442 "autosave-manager.c"
+ }
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->priv->update_timeout = (guint) 0;
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = do_timeout;
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp5_) {
+#line 1450 "autosave-manager.c"
+ guint _tmp6_ = 0U;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp6_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ____lambda3__gsource_func, autosave_manager_ref (self), autosave_manager_unref);
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->priv->update_timeout = _tmp6_;
+#line 1456 "autosave-manager.c"
+ } else {
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_real_save (self);
+#line 1460 "autosave-manager.c"
+ }
+}
+
+
+static void autosave_manager_real_save (AutosaveManager* self) {
+ GKeyFile* file = NULL;
+ GKeyFile* _tmp0_ = NULL;
+ gchar* page_names = NULL;
+ gchar* _tmp1_ = NULL;
+ GKeyFile* _tmp109_ = NULL;
+ const gchar* _tmp110_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_debug ("autosave-manager.vala:281: Autosaving book information");
+#line 283 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = g_key_file_new ();
+#line 283 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ file = _tmp0_;
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = g_strdup ("");
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page_names = _tmp1_;
+#line 1485 "autosave-manager.c"
+ {
+ gint i = 0;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ i = 0;
+#line 1490 "autosave-manager.c"
+ {
+ gboolean _tmp2_ = FALSE;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = TRUE;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ while (TRUE) {
+#line 1497 "autosave-manager.c"
+ gint _tmp4_ = 0;
+ Book* _tmp5_ = NULL;
+ Book* _tmp6_ = NULL;
+ guint _tmp7_ = 0U;
+ guint _tmp8_ = 0U;
+ Page* page = NULL;
+ Book* _tmp9_ = NULL;
+ Book* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ Page* _tmp12_ = NULL;
+ Page* _tmp13_ = NULL;
+ gboolean _tmp14_ = FALSE;
+ gboolean _tmp15_ = FALSE;
+ gchar* page_name = NULL;
+ gint _tmp16_ = 0;
+ gchar* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+ const gchar* _tmp21_ = NULL;
+ const gchar* _tmp22_ = NULL;
+ gchar* _tmp23_ = NULL;
+ const gchar* _tmp24_ = NULL;
+ GKeyFile* _tmp25_ = NULL;
+ const gchar* _tmp26_ = NULL;
+ Page* _tmp27_ = NULL;
+ gint _tmp28_ = 0;
+ gint _tmp29_ = 0;
+ GKeyFile* _tmp30_ = NULL;
+ const gchar* _tmp31_ = NULL;
+ Page* _tmp32_ = NULL;
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+ GKeyFile* _tmp35_ = NULL;
+ const gchar* _tmp36_ = NULL;
+ Page* _tmp37_ = NULL;
+ gint _tmp38_ = 0;
+ gint _tmp39_ = 0;
+ GKeyFile* _tmp40_ = NULL;
+ const gchar* _tmp41_ = NULL;
+ Page* _tmp42_ = NULL;
+ gint _tmp43_ = 0;
+ gint _tmp44_ = 0;
+ GKeyFile* _tmp45_ = NULL;
+ const gchar* _tmp46_ = NULL;
+ Page* _tmp47_ = NULL;
+ gint _tmp48_ = 0;
+ gint _tmp49_ = 0;
+ GKeyFile* _tmp50_ = NULL;
+ const gchar* _tmp51_ = NULL;
+ Page* _tmp52_ = NULL;
+ gint _tmp53_ = 0;
+ gint _tmp54_ = 0;
+ Page* _tmp55_ = NULL;
+ ScanDirection _tmp56_ = 0;
+ ScanDirection _tmp57_ = 0;
+ const gchar* _tmp66_ = NULL;
+ Page* _tmp67_ = NULL;
+ const gchar* _tmp68_ = NULL;
+ const gchar* _tmp69_ = NULL;
+ GKeyFile* _tmp70_ = NULL;
+ const gchar* _tmp71_ = NULL;
+ const gchar* _tmp72_ = NULL;
+ GHashTable* _tmp73_ = NULL;
+ Page* _tmp74_ = NULL;
+ gconstpointer _tmp75_ = NULL;
+ GKeyFile* _tmp76_ = NULL;
+ const gchar* _tmp77_ = NULL;
+ GKeyFile* _tmp78_ = NULL;
+ const gchar* _tmp79_ = NULL;
+ Page* _tmp80_ = NULL;
+ gboolean _tmp81_ = FALSE;
+ gboolean _tmp82_ = FALSE;
+ const gchar* _tmp83_ = NULL;
+ Page* _tmp84_ = NULL;
+ const gchar* _tmp85_ = NULL;
+ const gchar* _tmp86_ = NULL;
+ GKeyFile* _tmp87_ = NULL;
+ const gchar* _tmp88_ = NULL;
+ GKeyFile* _tmp89_ = NULL;
+ const gchar* _tmp90_ = NULL;
+ Page* _tmp91_ = NULL;
+ gint _tmp92_ = 0;
+ gint _tmp93_ = 0;
+ GKeyFile* _tmp94_ = NULL;
+ const gchar* _tmp95_ = NULL;
+ Page* _tmp96_ = NULL;
+ gint _tmp97_ = 0;
+ gint _tmp98_ = 0;
+ GKeyFile* _tmp99_ = NULL;
+ const gchar* _tmp100_ = NULL;
+ Page* _tmp101_ = NULL;
+ gint _tmp102_ = 0;
+ gint _tmp103_ = 0;
+ GKeyFile* _tmp104_ = NULL;
+ const gchar* _tmp105_ = NULL;
+ Page* _tmp106_ = NULL;
+ gint _tmp107_ = 0;
+ gint _tmp108_ = 0;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!_tmp2_) {
+#line 1597 "autosave-manager.c"
+ gint _tmp3_ = 0;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = i;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ i = _tmp3_ + 1;
+#line 1603 "autosave-manager.c"
+ }
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = FALSE;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = i;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = autosave_manager_get_book (self);
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp6_ = _tmp5_;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp7_ = book_get_n_pages (_tmp6_);
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp8_ = _tmp7_;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!(((guint) _tmp4_) < _tmp8_)) {
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 1621 "autosave-manager.c"
+ }
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp9_ = autosave_manager_get_book (self);
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp10_ = _tmp9_;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp11_ = i;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp12_ = book_get_page (_tmp10_, _tmp11_);
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page = _tmp12_;
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp13_ = page;
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp14_ = page_get_has_data (_tmp13_);
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp15_ = _tmp14_;
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!_tmp15_) {
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _page_unref0 (page);
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ continue;
+#line 1645 "autosave-manager.c"
+ }
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp16_ = i;
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp17_ = g_strdup_printf ("page-%d", _tmp16_);
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page_name = _tmp17_;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp18_ = page_names;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (g_strcmp0 (_tmp18_, "") != 0) {
+#line 1657 "autosave-manager.c"
+ const gchar* _tmp19_ = NULL;
+ gchar* _tmp20_ = NULL;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp19_ = page_names;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp20_ = g_strconcat (_tmp19_, " ", NULL);
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (page_names);
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page_names = _tmp20_;
+#line 1668 "autosave-manager.c"
+ }
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp21_ = page_names;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp22_ = page_name;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp23_ = g_strconcat (_tmp21_, _tmp22_, NULL);
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (page_names);
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page_names = _tmp23_;
+#line 298 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp24_ = page_name;
+#line 298 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_debug ("autosave-manager.vala:298: Autosaving page %s", _tmp24_);
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp25_ = file;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp26_ = page_name;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp27_ = page;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp28_ = page_get_scan_width (_tmp27_);
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp29_ = _tmp28_;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp25_, _tmp26_, "scan-width", _tmp29_);
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp30_ = file;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp31_ = page_name;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp32_ = page;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp33_ = page_get_scan_height (_tmp32_);
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp34_ = _tmp33_;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp30_, _tmp31_, "scan-height", _tmp34_);
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp35_ = file;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp36_ = page_name;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp37_ = page;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp38_ = page_get_rowstride (_tmp37_);
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp39_ = _tmp38_;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp35_, _tmp36_, "rowstride", _tmp39_);
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp40_ = file;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp41_ = page_name;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp42_ = page;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp43_ = page_get_n_channels (_tmp42_);
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp44_ = _tmp43_;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp40_, _tmp41_, "n-channels", _tmp44_);
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp45_ = file;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp46_ = page_name;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp47_ = page;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp48_ = page_get_depth (_tmp47_);
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp49_ = _tmp48_;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp45_, _tmp46_, "depth", _tmp49_);
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp50_ = file;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp51_ = page_name;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp52_ = page;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp53_ = page_get_dpi (_tmp52_);
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp54_ = _tmp53_;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp50_, _tmp51_, "dpi", _tmp54_);
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp55_ = page;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp56_ = page_get_scan_direction (_tmp55_);
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp57_ = _tmp56_;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ switch (_tmp57_) {
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ case SCAN_DIRECTION_TOP_TO_BOTTOM:
+#line 1766 "autosave-manager.c"
+ {
+ GKeyFile* _tmp58_ = NULL;
+ const gchar* _tmp59_ = NULL;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp58_ = file;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp59_ = page_name;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_value (_tmp58_, _tmp59_, "scan-direction", "TOP_TO_BOTTOM");
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 1778 "autosave-manager.c"
+ }
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ case SCAN_DIRECTION_LEFT_TO_RIGHT:
+#line 1782 "autosave-manager.c"
+ {
+ GKeyFile* _tmp60_ = NULL;
+ const gchar* _tmp61_ = NULL;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp60_ = file;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp61_ = page_name;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_value (_tmp60_, _tmp61_, "scan-direction", "LEFT_TO_RIGHT");
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 1794 "autosave-manager.c"
+ }
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ case SCAN_DIRECTION_BOTTOM_TO_TOP:
+#line 1798 "autosave-manager.c"
+ {
+ GKeyFile* _tmp62_ = NULL;
+ const gchar* _tmp63_ = NULL;
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp62_ = file;
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp63_ = page_name;
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_value (_tmp62_, _tmp63_, "scan-direction", "BOTTOM_TO_TOP");
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 1810 "autosave-manager.c"
+ }
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ case SCAN_DIRECTION_RIGHT_TO_LEFT:
+#line 1814 "autosave-manager.c"
+ {
+ GKeyFile* _tmp64_ = NULL;
+ const gchar* _tmp65_ = NULL;
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp64_ = file;
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp65_ = page_name;
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_value (_tmp64_, _tmp65_, "scan-direction", "RIGHT_TO_LEFT");
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 1826 "autosave-manager.c"
+ }
+ default:
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 1831 "autosave-manager.c"
+ }
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp67_ = page;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp68_ = page_get_color_profile (_tmp67_);
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp69_ = _tmp68_;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp66_ = _tmp69_;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp66_ == NULL) {
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp66_ = "";
+#line 1845 "autosave-manager.c"
+ }
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp70_ = file;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp71_ = page_name;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_value (_tmp70_, _tmp71_, "color-profile", _tmp66_);
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp73_ = self->priv->page_filenames;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp74_ = page;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp75_ = g_hash_table_lookup (_tmp73_, _tmp74_);
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp72_ = (const gchar*) _tmp75_;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp72_ == NULL) {
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp72_ = "";
+#line 1865 "autosave-manager.c"
+ }
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp76_ = file;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp77_ = page_name;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_value (_tmp76_, _tmp77_, "pixels-filename", _tmp72_);
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp78_ = file;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp79_ = page_name;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp80_ = page;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp81_ = page_get_has_crop (_tmp80_);
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp82_ = _tmp81_;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_boolean (_tmp78_, _tmp79_, "has-crop", _tmp82_);
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp84_ = page;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp85_ = page_get_crop_name (_tmp84_);
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp86_ = _tmp85_;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp83_ = _tmp86_;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp83_ == NULL) {
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp83_ = "";
+#line 1897 "autosave-manager.c"
+ }
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp87_ = file;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp88_ = page_name;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_value (_tmp87_, _tmp88_, "crop-name", _tmp83_);
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp89_ = file;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp90_ = page_name;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp91_ = page;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp92_ = page_get_crop_x (_tmp91_);
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp93_ = _tmp92_;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp89_, _tmp90_, "crop-x", _tmp93_);
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp94_ = file;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp95_ = page_name;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp96_ = page;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp97_ = page_get_crop_y (_tmp96_);
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp98_ = _tmp97_;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp94_, _tmp95_, "crop-y", _tmp98_);
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp99_ = file;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp100_ = page_name;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp101_ = page;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp102_ = page_get_crop_width (_tmp101_);
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp103_ = _tmp102_;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp99_, _tmp100_, "crop-width", _tmp103_);
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp104_ = file;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp105_ = page_name;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp106_ = page;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp107_ = page_get_crop_height (_tmp106_);
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp108_ = _tmp107_;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_integer (_tmp104_, _tmp105_, "crop-height", _tmp108_);
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (page_name);
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _page_unref0 (page);
+#line 1957 "autosave-manager.c"
+ }
+ }
+ }
+#line 330 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp109_ = file;
+#line 330 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp110_ = page_names;
+#line 330 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_key_file_set_value (_tmp109_, "simple-scan", "pages", _tmp110_);
+#line 1967 "autosave-manager.c"
+ {
+ const gchar* _tmp111_ = NULL;
+ const gchar* _tmp112_ = NULL;
+ GKeyFile* _tmp113_ = NULL;
+ gchar* _tmp114_ = NULL;
+ gchar* _tmp115_ = NULL;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp111_ = autosave_manager_AUTOSAVE_DIR;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_mkdir_with_parents (_tmp111_, 0777);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp112_ = autosave_manager_AUTOSAVE_PATH;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp113_ = file;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp114_ = g_key_file_to_data (_tmp113_, NULL, NULL);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp115_ = _tmp114_;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_file_set_contents (_tmp112_, _tmp115_, (gssize) (-1), &_inner_error_);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (_tmp115_);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 1992 "autosave-manager.c"
+ goto __catch33_g_error;
+ }
+ }
+ goto __finally33;
+ __catch33_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp116_ = NULL;
+ const gchar* _tmp117_ = NULL;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ e = _inner_error_;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _inner_error_ = NULL;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp116_ = e;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp117_ = _tmp116_->message;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_warning ("autosave-manager.vala:339: Failed to write autosave: %s", _tmp117_);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_error_free0 (e);
+#line 2014 "autosave-manager.c"
+ }
+ __finally33:
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (page_names);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_key_file_unref0 (file);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_clear_error (&_inner_error_);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return;
+#line 2029 "autosave-manager.c"
+ }
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (page_names);
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_key_file_unref0 (file);
+#line 2035 "autosave-manager.c"
+}
+
+
+static void autosave_manager_save_pixels (AutosaveManager* self, Page* page) {
+ gchar* filename = NULL;
+ GHashFunc _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ guint _tmp2_ = 0U;
+ gchar* _tmp3_ = NULL;
+ gchar* path = NULL;
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ GHashTable* _tmp6_ = NULL;
+ Page* _tmp7_ = NULL;
+ Page* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+ GFile* file = NULL;
+ GFile* _tmp10_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (page != NULL);
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = g_direct_hash;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = page;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = _tmp0_ (_tmp1_);
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = g_strdup_printf ("%u.pixels", _tmp2_);
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ filename = _tmp3_;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = autosave_manager_AUTOSAVE_DIR;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = g_build_filename (_tmp4_, filename, NULL);
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ path = _tmp5_;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp6_ = self->priv->page_filenames;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp7_ = page;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp8_ = _page_ref0 (_tmp7_);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp9_ = g_strdup (filename);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_hash_table_insert (_tmp6_, _tmp8_, _tmp9_);
+#line 349 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_debug ("autosave-manager.vala:349: Autosaving page pixels to %s", path);
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp10_ = g_file_new_for_path (path);
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ file = _tmp10_;
+#line 2091 "autosave-manager.c"
+ {
+ Page* _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ guchar* _tmp13_ = NULL;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp11_ = page;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp13_ = page_get_pixels (_tmp11_, &_tmp12_);
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_file_replace_contents (file, _tmp13_, (gsize) _tmp12_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL, &_inner_error_);
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 2104 "autosave-manager.c"
+ goto __catch34_g_error;
+ }
+ }
+ goto __finally34;
+ __catch34_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp14_ = NULL;
+ const gchar* _tmp15_ = NULL;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ e = _inner_error_;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _inner_error_ = NULL;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp14_ = e;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp15_ = _tmp14_->message;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_warning ("autosave-manager.vala:358: Failed to autosave page contents: %s", _tmp15_);
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_error_free0 (e);
+#line 2126 "autosave-manager.c"
+ }
+ __finally34:
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_inner_error_ != NULL) {
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_object_unref0 (file);
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (path);
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (filename);
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_clear_error (&_inner_error_);
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return;
+#line 2143 "autosave-manager.c"
+ }
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_object_unref0 (file);
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (path);
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_free0 (filename);
+#line 2151 "autosave-manager.c"
+}
+
+
+Book* autosave_manager_get_book (AutosaveManager* self) {
+ Book* result;
+ Book* _tmp0_ = NULL;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 28 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = self->priv->book_;
+#line 28 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ result = _tmp0_;
+#line 28 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return result;
+#line 2166 "autosave-manager.c"
+}
+
+
+static void _autosave_manager_on_page_added_book_page_added (Book* _sender, Page* page, gpointer self) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_on_page_added ((AutosaveManager*) self, page);
+#line 2173 "autosave-manager.c"
+}
+
+
+static void _autosave_manager_on_page_removed_book_page_removed (Book* _sender, Page* page, gpointer self) {
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_on_page_removed ((AutosaveManager*) self, page);
+#line 2180 "autosave-manager.c"
+}
+
+
+static void _autosave_manager_on_changed_book_reordered (Book* _sender, gpointer self) {
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_on_changed ((AutosaveManager*) self);
+#line 2187 "autosave-manager.c"
+}
+
+
+static void _autosave_manager_on_cleared_book_cleared (Book* _sender, gpointer self) {
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_on_cleared ((AutosaveManager*) self);
+#line 2194 "autosave-manager.c"
+}
+
+
+static gpointer _book_ref0 (gpointer self) {
+#line 44 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return self ? book_ref (self) : NULL;
+#line 2201 "autosave-manager.c"
+}
+
+
+void autosave_manager_set_book (AutosaveManager* self, Book* value) {
+ Book* _tmp0_ = NULL;
+ Book* _tmp19_ = NULL;
+ Book* _tmp20_ = NULL;
+ Book* _tmp21_ = NULL;
+ Book* _tmp22_ = NULL;
+ Book* _tmp23_ = NULL;
+ Book* _tmp24_ = NULL;
+#line 30 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (self != NULL);
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = self->priv->book_;
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (_tmp0_ != NULL) {
+#line 2219 "autosave-manager.c"
+ Book* _tmp11_ = NULL;
+ guint _tmp12_ = 0U;
+ Book* _tmp13_ = NULL;
+ guint _tmp14_ = 0U;
+ Book* _tmp15_ = NULL;
+ guint _tmp16_ = 0U;
+ Book* _tmp17_ = NULL;
+ guint _tmp18_ = 0U;
+ {
+ gint i = 0;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ i = 0;
+#line 2232 "autosave-manager.c"
+ {
+ gboolean _tmp1_ = FALSE;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = TRUE;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ while (TRUE) {
+#line 2239 "autosave-manager.c"
+ gint _tmp3_ = 0;
+ Book* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+ guint _tmp6_ = 0U;
+ Page* page = NULL;
+ Book* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ Page* _tmp9_ = NULL;
+ Page* _tmp10_ = NULL;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!_tmp1_) {
+#line 2251 "autosave-manager.c"
+ gint _tmp2_ = 0;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = i;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ i = _tmp2_ + 1;
+#line 2257 "autosave-manager.c"
+ }
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = FALSE;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = i;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = self->priv->book_;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = book_get_n_pages (_tmp4_);
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp6_ = _tmp5_;
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!(((guint) _tmp3_) < _tmp6_)) {
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 2273 "autosave-manager.c"
+ }
+#line 36 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp7_ = self->priv->book_;
+#line 36 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp8_ = i;
+#line 36 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp9_ = book_get_page (_tmp7_, _tmp8_);
+#line 36 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page = _tmp9_;
+#line 37 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp10_ = page;
+#line 37 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_on_page_removed (self, _tmp10_);
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _page_unref0 (page);
+#line 2289 "autosave-manager.c"
+ }
+ }
+ }
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp11_ = self->priv->book_;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_parse_name ("page-added", TYPE_BOOK, &_tmp12_, NULL, FALSE);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_handlers_disconnect_matched (_tmp11_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp12_, 0, NULL, (GCallback) _autosave_manager_on_page_added_book_page_added, self);
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp13_ = self->priv->book_;
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_parse_name ("page-removed", TYPE_BOOK, &_tmp14_, NULL, FALSE);
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_handlers_disconnect_matched (_tmp13_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, 0, NULL, (GCallback) _autosave_manager_on_page_removed_book_page_removed, self);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp15_ = self->priv->book_;
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_parse_name ("reordered", TYPE_BOOK, &_tmp16_, NULL, FALSE);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_handlers_disconnect_matched (_tmp15_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _autosave_manager_on_changed_book_reordered, self);
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp17_ = self->priv->book_;
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_parse_name ("cleared", TYPE_BOOK, &_tmp18_, NULL, FALSE);
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_handlers_disconnect_matched (_tmp17_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp18_, 0, NULL, (GCallback) _autosave_manager_on_cleared_book_cleared, self);
+#line 2317 "autosave-manager.c"
+ }
+#line 44 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp19_ = value;
+#line 44 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp20_ = _book_ref0 (_tmp19_);
+#line 44 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _book_unref0 (self->priv->book_);
+#line 44 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->priv->book_ = _tmp20_;
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp21_ = self->priv->book_;
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_connect (_tmp21_, "page-added", (GCallback) _autosave_manager_on_page_added_book_page_added, self);
+#line 46 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp22_ = self->priv->book_;
+#line 46 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_connect (_tmp22_, "page-removed", (GCallback) _autosave_manager_on_page_removed_book_page_removed, self);
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp23_ = self->priv->book_;
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_connect (_tmp23_, "reordered", (GCallback) _autosave_manager_on_changed_book_reordered, self);
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp24_ = self->priv->book_;
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_signal_connect (_tmp24_, "cleared", (GCallback) _autosave_manager_on_cleared_book_cleared, self);
+#line 2343 "autosave-manager.c"
+ {
+ gint i = 0;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ i = 0;
+#line 2348 "autosave-manager.c"
+ {
+ gboolean _tmp25_ = FALSE;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp25_ = TRUE;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ while (TRUE) {
+#line 2355 "autosave-manager.c"
+ gint _tmp27_ = 0;
+ Book* _tmp28_ = NULL;
+ guint _tmp29_ = 0U;
+ guint _tmp30_ = 0U;
+ Page* page = NULL;
+ Book* _tmp31_ = NULL;
+ gint _tmp32_ = 0;
+ Page* _tmp33_ = NULL;
+ Page* _tmp34_ = NULL;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!_tmp25_) {
+#line 2367 "autosave-manager.c"
+ gint _tmp26_ = 0;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp26_ = i;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ i = _tmp26_ + 1;
+#line 2373 "autosave-manager.c"
+ }
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp25_ = FALSE;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp27_ = i;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp28_ = self->priv->book_;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp29_ = book_get_n_pages (_tmp28_);
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp30_ = _tmp29_;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!(((guint) _tmp27_) < _tmp30_)) {
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ break;
+#line 2389 "autosave-manager.c"
+ }
+#line 51 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp31_ = self->priv->book_;
+#line 51 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp32_ = i;
+#line 51 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp33_ = book_get_page (_tmp31_, _tmp32_);
+#line 51 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ page = _tmp33_;
+#line 52 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp34_ = page;
+#line 52 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_on_page_added (self, _tmp34_);
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _page_unref0 (page);
+#line 2405 "autosave-manager.c"
+ }
+ }
+ }
+}
+
+
+static void value_autosave_manager_init (GValue* value) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ value->data[0].v_pointer = NULL;
+#line 2415 "autosave-manager.c"
+}
+
+
+static void value_autosave_manager_free_value (GValue* value) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (value->data[0].v_pointer) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_unref (value->data[0].v_pointer);
+#line 2424 "autosave-manager.c"
+ }
+}
+
+
+static void value_autosave_manager_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (src_value->data[0].v_pointer) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ dest_value->data[0].v_pointer = autosave_manager_ref (src_value->data[0].v_pointer);
+#line 2434 "autosave-manager.c"
+ } else {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 2438 "autosave-manager.c"
+ }
+}
+
+
+static gpointer value_autosave_manager_peek_pointer (const GValue* value) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return value->data[0].v_pointer;
+#line 2446 "autosave-manager.c"
+}
+
+
+static gchar* value_autosave_manager_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (collect_values[0].v_pointer) {
+#line 2453 "autosave-manager.c"
+ AutosaveManager* object;
+ object = collect_values[0].v_pointer;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 2460 "autosave-manager.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.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 2464 "autosave-manager.c"
+ }
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ value->data[0].v_pointer = autosave_manager_ref (object);
+#line 2468 "autosave-manager.c"
+ } else {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ value->data[0].v_pointer = NULL;
+#line 2472 "autosave-manager.c"
+ }
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return NULL;
+#line 2476 "autosave-manager.c"
+}
+
+
+static gchar* value_autosave_manager_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ AutosaveManager** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!object_p) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 2487 "autosave-manager.c"
+ }
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (!value->data[0].v_pointer) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ *object_p = NULL;
+#line 2493 "autosave-manager.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ *object_p = value->data[0].v_pointer;
+#line 2497 "autosave-manager.c"
+ } else {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ *object_p = autosave_manager_ref (value->data[0].v_pointer);
+#line 2501 "autosave-manager.c"
+ }
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return NULL;
+#line 2505 "autosave-manager.c"
+}
+
+
+GParamSpec* param_spec_autosave_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecAutosaveManager* spec;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_AUTOSAVE_MANAGER), NULL);
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return G_PARAM_SPEC (spec);
+#line 2519 "autosave-manager.c"
+}
+
+
+gpointer value_get_autosave_manager (const GValue* value) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AUTOSAVE_MANAGER), NULL);
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return value->data[0].v_pointer;
+#line 2528 "autosave-manager.c"
+}
+
+
+void value_set_autosave_manager (GValue* value, gpointer v_object) {
+ AutosaveManager* old;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AUTOSAVE_MANAGER));
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ old = value->data[0].v_pointer;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (v_object) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_AUTOSAVE_MANAGER));
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ value->data[0].v_pointer = v_object;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_ref (value->data[0].v_pointer);
+#line 2548 "autosave-manager.c"
+ } else {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ value->data[0].v_pointer = NULL;
+#line 2552 "autosave-manager.c"
+ }
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (old) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_unref (old);
+#line 2558 "autosave-manager.c"
+ }
+}
+
+
+void value_take_autosave_manager (GValue* value, gpointer v_object) {
+ AutosaveManager* old;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AUTOSAVE_MANAGER));
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ old = value->data[0].v_pointer;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (v_object) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_AUTOSAVE_MANAGER));
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ value->data[0].v_pointer = v_object;
+#line 2577 "autosave-manager.c"
+ } else {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ value->data[0].v_pointer = NULL;
+#line 2581 "autosave-manager.c"
+ }
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (old) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_unref (old);
+#line 2587 "autosave-manager.c"
+ }
+}
+
+
+static void autosave_manager_class_init (AutosaveManagerClass * klass) {
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_parent_class = g_type_class_peek_parent (klass);
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ AUTOSAVE_MANAGER_CLASS (klass)->finalize = autosave_manager_finalize;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_type_class_add_private (klass, sizeof (AutosaveManagerPrivate));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp0_ = g_get_user_cache_dir ();
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp1_ = g_build_filename (_tmp0_, "simple-scan", "autosaves", NULL);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_AUTOSAVE_DIR = _tmp1_;
+#line 16 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp2_ = g_strdup ("autosave.book");
+#line 16 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_AUTOSAVE_FILENAME = _tmp2_;
+#line 17 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp3_ = autosave_manager_AUTOSAVE_DIR;
+#line 17 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp4_ = autosave_manager_AUTOSAVE_FILENAME;
+#line 17 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _tmp5_ = g_build_filename (_tmp3_, _tmp4_, NULL);
+#line 17 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ autosave_manager_AUTOSAVE_PATH = _tmp5_;
+#line 2623 "autosave-manager.c"
+}
+
+
+static void autosave_manager_instance_init (AutosaveManager * self) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->priv = AUTOSAVE_MANAGER_GET_PRIVATE (self);
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->priv->update_timeout = (guint) 0;
+#line 23 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->priv->book_ = NULL;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self->ref_count = 1;
+#line 2636 "autosave-manager.c"
+}
+
+
+static void autosave_manager_finalize (AutosaveManager* obj) {
+ AutosaveManager * self;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_AUTOSAVE_MANAGER, AutosaveManager);
+#line 21 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _g_hash_table_unref0 (self->priv->page_filenames);
+#line 23 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ _book_unref0 (self->priv->book_);
+#line 2648 "autosave-manager.c"
+}
+
+
+GType autosave_manager_get_type (void) {
+ static volatile gsize autosave_manager_type_id__volatile = 0;
+ if (g_once_init_enter (&autosave_manager_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_autosave_manager_init, value_autosave_manager_free_value, value_autosave_manager_copy_value, value_autosave_manager_peek_pointer, "p", value_autosave_manager_collect_value, "p", value_autosave_manager_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (AutosaveManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) autosave_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AutosaveManager), 0, (GInstanceInitFunc) autosave_manager_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType autosave_manager_type_id;
+ autosave_manager_type_id = g_type_register_fundamental (g_type_fundamental_next (), "AutosaveManager", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&autosave_manager_type_id__volatile, autosave_manager_type_id);
+ }
+ return autosave_manager_type_id__volatile;
+}
+
+
+gpointer autosave_manager_ref (gpointer instance) {
+ AutosaveManager* self;
+ self = instance;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ return instance;
+#line 2673 "autosave-manager.c"
+}
+
+
+void autosave_manager_unref (gpointer instance) {
+ AutosaveManager* self;
+ self = instance;
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ AUTOSAVE_MANAGER_GET_CLASS (self)->finalize (self);
+#line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 2686 "autosave-manager.c"
+ }
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+static gint _vala_array_length (gpointer array) {
+ int length;
+ length = 0;
+ if (array) {
+ while (((gpointer*) array)[length]) {
+ length++;
+ }
+ }
+ return length;
+}
+
+
+
diff --git a/src/autosave-manager.vala b/src/autosave-manager.vala
new file mode 100644
index 0000000..9ea79f1
--- /dev/null
+++ b/src/autosave-manager.vala
@@ -0,0 +1,361 @@
+/*
+ * Copyright (C) 2011 Timo Kluck
+ * Authors: Timo Kluck <tkluck@infty.nl>
+ * Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+public class AutosaveManager
+{
+ private static string AUTOSAVE_DIR = Path.build_filename (Environment.get_user_cache_dir (), "simple-scan", "autosaves");
+ private static string AUTOSAVE_FILENAME = "autosave.book";
+ private static string AUTOSAVE_PATH = Path.build_filename (AUTOSAVE_DIR, AUTOSAVE_FILENAME);
+
+ private uint update_timeout = 0;
+
+ private HashTable<Page, string> page_filenames;
+
+ private Book book_ = null;
+ public Book book
+ {
+ get
+ {
+ return book_;
+ }
+ set
+ {
+ if (book_ != null)
+ {
+ for (var i = 0; i < book_.n_pages; i++)
+ {
+ var page = book_.get_page (i);
+ on_page_removed (page);
+ }
+ book_.page_added.disconnect (on_page_added);
+ book_.page_removed.disconnect (on_page_removed);
+ book_.reordered.disconnect (on_changed);
+ book_.cleared.disconnect (on_cleared);
+ }
+ book_ = value;
+ book_.page_added.connect (on_page_added);
+ book_.page_removed.connect (on_page_removed);
+ book_.reordered.connect (on_changed);
+ book_.cleared.connect (on_cleared);
+ for (var i = 0; i < book_.n_pages; i++)
+ {
+ var page = book_.get_page (i);
+ on_page_added (page);
+ }
+ }
+ }
+
+ public AutosaveManager ()
+ {
+ page_filenames = new HashTable<Page, string> (direct_hash, direct_equal);
+ }
+
+ public void load ()
+ {
+ debug ("Loading autosave information");
+
+ book.clear ();
+ page_filenames.remove_all ();
+
+ var file = new KeyFile ();
+ try
+ {
+ file.load_from_file (AUTOSAVE_PATH, KeyFileFlags.NONE);
+ }
+ catch (Error e)
+ {
+ if (!(e is FileError.NOENT))
+ warning ("Could not load autosave infomation; not restoring any autosaves: %s", e.message);
+ return;
+ }
+ var pages = get_value (file, "simple-scan", "pages");
+ foreach (var page_name in pages.split (" "))
+ {
+ debug ("Loading automatically saved page %s", page_name);
+
+ var scan_width = get_integer (file, page_name, "scan-width");
+ var scan_height = get_integer (file, page_name, "scan-height");
+ var rowstride = get_integer (file, page_name, "rowstride");
+ var n_channels = get_integer (file, page_name, "n-channels");
+ var depth = get_integer (file, page_name, "depth");
+ var dpi = get_integer (file, page_name, "dpi");
+ var scan_direction_name = get_value (file, page_name, "scan-direction");
+ ScanDirection scan_direction = ScanDirection.TOP_TO_BOTTOM;
+ switch (scan_direction_name)
+ {
+ case "TOP_TO_BOTTOM":
+ scan_direction = ScanDirection.TOP_TO_BOTTOM;
+ break;
+ case "LEFT_TO_RIGHT":
+ scan_direction = ScanDirection.LEFT_TO_RIGHT;
+ break;
+ case "BOTTOM_TO_TOP":
+ scan_direction = ScanDirection.BOTTOM_TO_TOP;
+ break;
+ case "RIGHT_TO_LEFT":
+ scan_direction = ScanDirection.RIGHT_TO_LEFT;
+ break;
+ }
+ var color_profile = get_value (file, page_name, "color-profile");
+ if (color_profile == "")
+ color_profile = null;
+ var pixels_filename = get_value (file, page_name, "pixels-filename");
+ var has_crop = get_boolean (file, page_name, "has-crop");
+ var crop_name = get_value (file, page_name, "crop-name");
+ if (crop_name == "")
+ crop_name = null;
+ var crop_x = get_integer (file, page_name, "crop-x");
+ var crop_y = get_integer (file, page_name, "crop-y");
+ var crop_width = get_integer (file, page_name, "crop-width");
+ var crop_height = get_integer (file, page_name, "crop-height");
+
+ uchar[]? pixels = null;
+ if (pixels_filename != "")
+ {
+ var path = Path.build_filename (AUTOSAVE_DIR, pixels_filename);
+ var f = File.new_for_path (path);
+ try
+ {
+ f.load_contents (null, out pixels, null);
+ }
+ catch (Error e)
+ {
+ warning ("Failed to load pixel information");
+ continue;
+ }
+ }
+
+ var page = new Page.from_data (scan_width,
+ scan_height,
+ rowstride,
+ n_channels,
+ depth,
+ dpi,
+ scan_direction,
+ color_profile,
+ pixels,
+ has_crop,
+ crop_name,
+ crop_x,
+ crop_y,
+ crop_width,
+ crop_height);
+ page_filenames.insert (page, pixels_filename);
+ book.append_page (page);
+ }
+ }
+
+ private string get_value (KeyFile file, string group_name, string key, string default = "")
+ {
+ try
+ {
+ return file.get_value (group_name, key);
+ }
+ catch (Error e)
+ {
+ return default;
+ }
+ }
+
+ private int get_integer (KeyFile file, string group_name, string key, int default = 0)
+ {
+ try
+ {
+ return file.get_integer (group_name, key);
+ }
+ catch (Error e)
+ {
+ return default;
+ }
+ }
+
+ private bool get_boolean (KeyFile file, string group_name, string key, bool default = false)
+ {
+ try
+ {
+ return file.get_boolean (group_name, key);
+ }
+ catch (Error e)
+ {
+ return default;
+ }
+ }
+
+ public void cleanup ()
+ {
+ debug ("Deleting autosave records");
+
+ if (update_timeout > 0)
+ Source.remove (update_timeout);
+ update_timeout = 0;
+
+ Dir dir;
+ try
+ {
+ dir = Dir.open (AUTOSAVE_DIR);
+ }
+ catch (Error e)
+ {
+ warning ("Failed to delete autosaves: %s", e.message);
+ return;
+ }
+
+ while (true)
+ {
+ var filename = dir.read_name ();
+ if (filename == null)
+ break;
+ var path = Path.build_filename (AUTOSAVE_DIR, filename);
+ FileUtils.unlink (path);
+ }
+ }
+
+ public void on_page_added (Page page)
+ {
+ page.scan_finished.connect (on_scan_finished);
+ page.crop_changed.connect (on_changed);
+ }
+
+ public void on_page_removed (Page page)
+ {
+ page.scan_finished.disconnect (on_scan_finished);
+ page.crop_changed.disconnect (on_changed);
+
+ var filename = page_filenames.lookup (page);
+ if (filename != null)
+ FileUtils.unlink (filename);
+ page_filenames.remove (page);
+ }
+
+ public void on_scan_finished (Page page)
+ {
+ save_pixels (page);
+ save (false);
+ }
+
+ public void on_changed ()
+ {
+ save ();
+ }
+
+ public void on_cleared ()
+ {
+ page_filenames.remove_all ();
+ save ();
+ }
+
+ private void save (bool do_timeout = true)
+ {
+ if (update_timeout == 0 && do_timeout)
+ debug ("Waiting to autosave...");
+
+ /* Cancel existing timeout */
+ if (update_timeout > 0)
+ Source.remove (update_timeout);
+ update_timeout = 0;
+
+ if (do_timeout)
+ {
+ update_timeout = Timeout.add (100, () =>
+ {
+ real_save ();
+ update_timeout = 0;
+ return false;
+ });
+ }
+ else
+ real_save();
+ }
+
+ private void real_save ()
+ {
+ debug ("Autosaving book information");
+
+ var file = new KeyFile ();
+ var page_names = "";
+ for (var i = 0; i < book.n_pages; i++)
+ {
+ var page = book.get_page (i);
+
+ /* Skip empty pages */
+ if (!page.has_data)
+ continue;
+
+ var page_name = "page-%d".printf (i);
+ if (page_names != "")
+ page_names += " ";
+ page_names += page_name;
+
+ debug ("Autosaving page %s", page_name);
+
+ file.set_integer (page_name, "scan-width", page.scan_width);
+ file.set_integer (page_name, "scan-height", page.scan_height);
+ file.set_integer (page_name, "rowstride", page.rowstride);
+ file.set_integer (page_name, "n-channels", page.n_channels);
+ file.set_integer (page_name, "depth", page.depth);
+ file.set_integer (page_name, "dpi", page.dpi);
+ switch (page.scan_direction)
+ {
+ case ScanDirection.TOP_TO_BOTTOM:
+ file.set_value (page_name, "scan-direction", "TOP_TO_BOTTOM");
+ break;
+ case ScanDirection.LEFT_TO_RIGHT:
+ file.set_value (page_name, "scan-direction", "LEFT_TO_RIGHT");
+ break;
+ case ScanDirection.BOTTOM_TO_TOP:
+ file.set_value (page_name, "scan-direction", "BOTTOM_TO_TOP");
+ break;
+ case ScanDirection.RIGHT_TO_LEFT:
+ file.set_value (page_name, "scan-direction", "RIGHT_TO_LEFT");
+ break;
+ }
+ file.set_value (page_name, "color-profile", page.color_profile ?? "");
+ file.set_value (page_name, "pixels-filename", page_filenames.lookup (page) ?? "");
+ file.set_boolean (page_name, "has-crop", page.has_crop);
+ file.set_value (page_name, "crop-name", page.crop_name ?? "");
+ file.set_integer (page_name, "crop-x", page.crop_x);
+ file.set_integer (page_name, "crop-y", page.crop_y);
+ file.set_integer (page_name, "crop-width", page.crop_width);
+ file.set_integer (page_name, "crop-height", page.crop_height);
+ }
+ file.set_value ("simple-scan", "pages", page_names);
+
+ try
+ {
+ DirUtils.create_with_parents (AUTOSAVE_DIR, 0777);
+ FileUtils.set_contents (AUTOSAVE_PATH, file.to_data ());
+ }
+ catch (Error e)
+ {
+ warning ("Failed to write autosave: %s", e.message);
+ }
+ }
+
+ private void save_pixels (Page page)
+ {
+ var filename = "%u.pixels".printf (direct_hash (page));
+ var path = Path.build_filename (AUTOSAVE_DIR, filename);
+ page_filenames.insert (page, filename);
+
+ debug ("Autosaving page pixels to %s", path);
+
+ var file = File.new_for_path (path);
+ try
+ {
+ file.replace_contents (page.get_pixels (), null, false, FileCreateFlags.NONE, null);
+ }
+ catch (Error e)
+ {
+ warning ("Failed to autosave page contents: %s", e.message);
+ }
+ }
+}
diff --git a/src/book-view.c b/src/book-view.c
new file mode 100644
index 0000000..4ae0fd2
--- /dev/null
+++ b/src/book-view.c
@@ -0,0 +1,3891 @@
+/* book-view.c generated by valac 0.24.0, the Vala compiler
+ * generated from book-view.vala, do not modify */
+
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+/* FIXME: When scrolling, copy existing render sideways?*/
+/* FIXME: Only render pages that change and only the part that changed*/
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <cairo.h>
+#include <float.h>
+#include <math.h>
+
+
+#define TYPE_BOOK_VIEW (book_view_get_type ())
+#define BOOK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOK_VIEW, BookView))
+#define BOOK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOK_VIEW, BookViewClass))
+#define IS_BOOK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOK_VIEW))
+#define IS_BOOK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOK_VIEW))
+#define BOOK_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOK_VIEW, BookViewClass))
+
+typedef struct _BookView BookView;
+typedef struct _BookViewClass BookViewClass;
+typedef struct _BookViewPrivate BookViewPrivate;
+
+#define TYPE_BOOK (book_get_type ())
+#define BOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOK, Book))
+#define BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOK, BookClass))
+#define IS_BOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOK))
+#define IS_BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOK))
+#define BOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOK, BookClass))
+
+typedef struct _Book Book;
+typedef struct _BookClass BookClass;
+
+#define TYPE_PAGE (page_get_type ())
+#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
+#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
+#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
+#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
+#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))
+
+typedef struct _Page Page;
+typedef struct _PageClass PageClass;
+
+#define TYPE_PAGE_VIEW (page_view_get_type ())
+#define PAGE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_VIEW, PageView))
+#define PAGE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_VIEW, PageViewClass))
+#define IS_PAGE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_VIEW))
+#define IS_PAGE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_VIEW))
+#define PAGE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_VIEW, PageViewClass))
+
+typedef struct _PageView PageView;
+typedef struct _PageViewClass PageViewClass;
+#define _book_unref0(var) ((var == NULL) ? NULL : (var = (book_unref (var), NULL)))
+#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
+#define _page_view_unref0(var) ((var == NULL) ? NULL : (var = (page_view_unref (var), NULL)))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL)))
+
+struct _BookView {
+ GtkBox parent_instance;
+ BookViewPrivate * priv;
+};
+
+struct _BookViewClass {
+ GtkBoxClass parent_class;
+};
+
+struct _BookViewPrivate {
+ Book* _book;
+ GHashTable* page_data;
+ gboolean need_layout;
+ gboolean laying_out;
+ gboolean show_selected_page;
+ PageView* selected_page_view;
+ GtkWidget* drawing_area;
+ GtkScrollbar* scroll;
+ GtkAdjustment* adjustment;
+ GdkCursorType cursor;
+};
+
+
+static gpointer book_view_parent_class = NULL;
+
+GType book_view_get_type (void) G_GNUC_CONST;
+gpointer book_ref (gpointer instance);
+void book_unref (gpointer instance);
+GParamSpec* param_spec_book (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_book (GValue* value, gpointer v_object);
+void value_take_book (GValue* value, gpointer v_object);
+gpointer value_get_book (const GValue* value);
+GType book_get_type (void) G_GNUC_CONST;
+gpointer page_ref (gpointer instance);
+void page_unref (gpointer instance);
+GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_page (GValue* value, gpointer v_object);
+void value_take_page (GValue* value, gpointer v_object);
+gpointer value_get_page (const GValue* value);
+GType page_get_type (void) G_GNUC_CONST;
+gpointer page_view_ref (gpointer instance);
+void page_view_unref (gpointer instance);
+GParamSpec* param_spec_page_view (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_page_view (GValue* value, gpointer v_object);
+void value_take_page_view (GValue* value, gpointer v_object);
+gpointer value_get_page_view (const GValue* value);
+GType page_view_get_type (void) G_GNUC_CONST;
+#define BOOK_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_BOOK_VIEW, BookViewPrivate))
+enum {
+ BOOK_VIEW_DUMMY_PROPERTY,
+ BOOK_VIEW_BOOK,
+ BOOK_VIEW_SELECTED_PAGE,
+ BOOK_VIEW_X_OFFSET
+};
+Book* book_view_get_book (BookView* self);
+static void book_view_add_cb (BookView* self, Book* book, Page* page);
+static void _book_view_add_cb_book_page_added (Book* _sender, Page* page, gpointer self);
+static void book_view_remove_cb (BookView* self, Book* book, Page* page);
+static void _book_view_remove_cb_book_page_removed (Book* _sender, Page* page, gpointer self);
+static void book_view_reorder_cb (BookView* self, Book* book);
+static void _book_view_reorder_cb_book_reordered (Book* _sender, gpointer self);
+static void book_view_clear_cb (BookView* self, Book* book);
+static void _book_view_clear_cb_book_cleared (Book* _sender, gpointer self);
+static gboolean book_view_configure_cb (BookView* self, GtkWidget* widget, GdkEventConfigure* event);
+static gboolean _book_view_configure_cb_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self);
+static gboolean book_view_draw_cb (BookView* self, GtkWidget* widget, cairo_t* context);
+static gboolean _book_view_draw_cb_gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self);
+static gboolean book_view_motion_cb (BookView* self, GtkWidget* widget, GdkEventMotion* event);
+static gboolean _book_view_motion_cb_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self);
+static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey* event);
+static gboolean _book_view_key_cb_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
+static gboolean book_view_button_cb (BookView* self, GtkWidget* widget, GdkEventButton* event);
+static gboolean _book_view_button_cb_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
+static gboolean _book_view_button_cb_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
+static gboolean book_view_focus_cb (BookView* self, GtkWidget* widget, GdkEventFocus* event);
+static gboolean _book_view_focus_cb_gtk_widget_focus_in_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self);
+static gboolean _book_view_focus_cb_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self);
+static void book_view_scroll_cb (BookView* self, GtkAdjustment* adjustment);
+static void _book_view_scroll_cb_gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self);
+BookView* book_view_new (Book* book);
+BookView* book_view_construct (GType object_type, Book* book);
+static void book_view_set_book (BookView* self, Book* value);
+guint book_get_n_pages (Book* self);
+Page* book_get_page (Book* self, gint page_number);
+void book_view_set_selected_page (BookView* self, Page* value);
+static void _page_unref0_ (gpointer var);
+static void _page_view_unref0_ (gpointer var);
+static PageView* book_view_get_nth_page (BookView* self, gint n);
+static PageView* book_view_get_next_page (BookView* self, PageView* page);
+Page* page_view_get_page (PageView* self);
+static PageView* book_view_get_prev_page (BookView* self, PageView* page);
+static void book_view_page_view_changed_cb (BookView* self, PageView* page);
+void book_view_redraw (BookView* self);
+static void book_view_page_view_size_changed_cb (BookView* self, PageView* page);
+PageView* page_view_new (Page* page);
+PageView* page_view_construct (GType object_type, Page* page);
+static void _book_view_page_view_changed_cb_page_view_changed (PageView* _sender, gpointer self);
+static void _book_view_page_view_size_changed_cb_page_view_size_changed (PageView* _sender, gpointer self);
+static void book_view_set_selected_page_view (BookView* self, PageView* page);
+void page_view_set_selected (PageView* self, gboolean value);
+static void book_view_show_page_view (BookView* self, PageView* page);
+gint page_view_get_x_offset (PageView* self);
+gint page_view_get_width (PageView* self);
+gint book_view_get_x_offset (BookView* self);
+void book_view_set_x_offset (BookView* self, gint value);
+static void book_view_select_page_view (BookView* self, PageView* page);
+Page* book_view_get_selected_page (BookView* self);
+static void book_view_layout_into (BookView* self, gint width, gint height, gint* book_width, gint* book_height);
+gint page_get_dpi (Page* self);
+gint page_get_width (Page* self);
+gint page_get_height (Page* self);
+void page_view_set_width (PageView* self, gint value);
+void page_view_set_height (PageView* self, gint value);
+gint page_view_get_height (PageView* self);
+void page_view_set_x_offset (PageView* self, gint value);
+void page_view_set_y_offset (PageView* self, gint value);
+static void book_view_layout (BookView* self);
+void page_view_render (PageView* self, cairo_t* context);
+gboolean page_view_get_selected (PageView* self);
+gint page_view_get_y_offset (PageView* self);
+static PageView* book_view_get_page_at (BookView* self, gint x, gint y, gint* x_, gint* y_);
+void page_view_button_press (PageView* self, gint x, gint y);
+void page_view_button_release (PageView* self, gint x, gint y);
+static void book_view_set_cursor (BookView* self, GdkCursorType cursor);
+void page_view_motion (PageView* self, gint x, gint y);
+GdkCursorType page_view_get_cursor (PageView* self);
+void book_view_select_next_page (BookView* self);
+void book_view_select_prev_page (BookView* self);
+static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
+static void book_view_finalize (GObject* obj);
+static void _vala_book_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+static void _vala_book_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
+
+
+static void _book_view_add_cb_book_page_added (Book* _sender, Page* page, gpointer self) {
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_add_cb ((BookView*) self, _sender, page);
+#line 210 "book-view.c"
+}
+
+
+static void _book_view_remove_cb_book_page_removed (Book* _sender, Page* page, gpointer self) {
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_remove_cb ((BookView*) self, _sender, page);
+#line 217 "book-view.c"
+}
+
+
+static void _book_view_reorder_cb_book_reordered (Book* _sender, gpointer self) {
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_reorder_cb ((BookView*) self, _sender);
+#line 224 "book-view.c"
+}
+
+
+static void _book_view_clear_cb_book_cleared (Book* _sender, gpointer self) {
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_clear_cb ((BookView*) self, _sender);
+#line 231 "book-view.c"
+}
+
+
+static gboolean _book_view_configure_cb_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self) {
+ gboolean result;
+ result = book_view_configure_cb ((BookView*) self, _sender, event);
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 240 "book-view.c"
+}
+
+
+static gboolean _book_view_draw_cb_gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self) {
+ gboolean result;
+ result = book_view_draw_cb ((BookView*) self, _sender, cr);
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 249 "book-view.c"
+}
+
+
+static gboolean _book_view_motion_cb_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self) {
+ gboolean result;
+ result = book_view_motion_cb ((BookView*) self, _sender, event);
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 258 "book-view.c"
+}
+
+
+static gboolean _book_view_key_cb_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
+ gboolean result;
+ result = book_view_key_cb ((BookView*) self, _sender, event);
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 267 "book-view.c"
+}
+
+
+static gboolean _book_view_button_cb_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
+ gboolean result;
+ result = book_view_button_cb ((BookView*) self, _sender, event);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 276 "book-view.c"
+}
+
+
+static gboolean _book_view_button_cb_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
+ gboolean result;
+ result = book_view_button_cb ((BookView*) self, _sender, event);
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 285 "book-view.c"
+}
+
+
+static gboolean _book_view_focus_cb_gtk_widget_focus_in_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self) {
+ gboolean result;
+ result = book_view_focus_cb ((BookView*) self, _sender, event);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 294 "book-view.c"
+}
+
+
+static gboolean _book_view_focus_cb_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self) {
+ gboolean result;
+ result = book_view_focus_cb ((BookView*) self, _sender, event);
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 303 "book-view.c"
+}
+
+
+static void _book_view_scroll_cb_gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) {
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_scroll_cb ((BookView*) self, _sender);
+#line 310 "book-view.c"
+}
+
+
+static void _page_unref0_ (gpointer var) {
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ (var == NULL) ? NULL : (var = (page_unref (var), NULL));
+#line 317 "book-view.c"
+}
+
+
+static void _page_view_unref0_ (gpointer var) {
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ (var == NULL) ? NULL : (var = (page_view_unref (var), NULL));
+#line 324 "book-view.c"
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 331 "book-view.c"
+}
+
+
+BookView* book_view_construct (GType object_type, Book* book) {
+ BookView * self = NULL;
+ Book* _tmp0_ = NULL;
+ Book* _tmp12_ = NULL;
+ Page* _tmp13_ = NULL;
+ Page* _tmp14_ = NULL;
+ Book* _tmp15_ = NULL;
+ Book* _tmp16_ = NULL;
+ Book* _tmp17_ = NULL;
+ Book* _tmp18_ = NULL;
+ GHashFunc _tmp19_ = NULL;
+ GEqualFunc _tmp20_ = NULL;
+ GHashTable* _tmp21_ = NULL;
+ GtkDrawingArea* _tmp22_ = NULL;
+ GtkWidget* _tmp23_ = NULL;
+ GtkWidget* _tmp24_ = NULL;
+ GtkWidget* _tmp25_ = NULL;
+ GtkWidget* _tmp26_ = NULL;
+ GtkScrollbar* _tmp27_ = NULL;
+ GtkScrollbar* _tmp28_ = NULL;
+ GtkAdjustment* _tmp29_ = NULL;
+ GtkAdjustment* _tmp30_ = NULL;
+ GtkAdjustment* _tmp31_ = NULL;
+ GtkScrollbar* _tmp32_ = NULL;
+ GtkWidget* _tmp33_ = NULL;
+ GtkWidget* _tmp34_ = NULL;
+ GtkWidget* _tmp35_ = NULL;
+ GtkWidget* _tmp36_ = NULL;
+ GtkWidget* _tmp37_ = NULL;
+ GtkWidget* _tmp38_ = NULL;
+ GtkWidget* _tmp39_ = NULL;
+ GtkWidget* _tmp40_ = NULL;
+ GtkAdjustment* _tmp41_ = NULL;
+ GtkWidget* _tmp42_ = NULL;
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (book != NULL, NULL);
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self = (BookView*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, NULL);
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = book;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_book (self, _tmp0_);
+#line 377 "book-view.c"
+ {
+ gint i = 0;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 382 "book-view.c"
+ {
+ gboolean _tmp1_ = FALSE;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = TRUE;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 389 "book-view.c"
+ gint _tmp3_ = 0;
+ Book* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+ guint _tmp6_ = 0U;
+ Page* page = NULL;
+ Book* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ Page* _tmp9_ = NULL;
+ Book* _tmp10_ = NULL;
+ Page* _tmp11_ = NULL;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp1_) {
+#line 402 "book-view.c"
+ gint _tmp2_ = 0;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = i;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp2_ + 1;
+#line 408 "book-view.c"
+ }
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = FALSE;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = i;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = book;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = book_get_n_pages (_tmp4_);
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = _tmp5_;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp3_) < _tmp6_)) {
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 424 "book-view.c"
+ }
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = book;
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = i;
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = book_get_page (_tmp7_, _tmp8_);
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp9_;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = book;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = page;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_add_cb (self, _tmp10_, _tmp11_);
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (page);
+#line 442 "book-view.c"
+ }
+ }
+ }
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = book;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = book_get_page (_tmp12_, 0);
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = _tmp13_;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page (self, _tmp14_);
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (_tmp14_);
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = book;
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp15_, "page-added", (GCallback) _book_view_add_cb_book_page_added, self, 0);
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = book;
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp16_, "page-removed", (GCallback) _book_view_remove_cb_book_page_removed, self, 0);
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = book;
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp17_, "reordered", (GCallback) _book_view_reorder_cb_book_reordered, self, 0);
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = book;
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp18_, "cleared", (GCallback) _book_view_clear_cb_book_cleared, self, 0);
+#line 94 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->need_layout = TRUE;
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = g_direct_hash;
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = g_direct_equal;
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = g_hash_table_new_full (_tmp19_, _tmp20_, _page_unref0_, _page_view_unref0_);
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_hash_table_unref0 (self->priv->page_data);
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->page_data = _tmp21_;
+#line 96 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->cursor = GDK_ARROW;
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = (GtkDrawingArea*) gtk_drawing_area_new ();
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_ref_sink (_tmp22_);
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_object_unref0 (self->priv->drawing_area);
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->drawing_area = (GtkWidget*) _tmp22_;
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = self->priv->drawing_area;
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_set_size_request (_tmp23_, 200, 100);
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = self->priv->drawing_area;
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_set (_tmp24_, "can-focus", TRUE, NULL);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = self->priv->drawing_area;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_set_events (_tmp25_, ((((GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK) | GDK_BUTTON_RELEASE_MASK) | GDK_FOCUS_CHANGE_MASK) | GDK_STRUCTURE_MASK) | GDK_SCROLL_MASK);
+#line 102 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = self->priv->drawing_area;
+#line 102 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_box_pack_start ((GtkBox*) self, _tmp26_, TRUE, TRUE, (guint) 0);
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = (GtkScrollbar*) gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, NULL);
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_ref_sink (_tmp27_);
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_object_unref0 (self->priv->scroll);
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->scroll = _tmp27_;
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = self->priv->scroll;
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = gtk_range_get_adjustment ((GtkRange*) _tmp28_);
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = _tmp29_;
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = _g_object_ref0 (_tmp30_);
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_object_unref0 (self->priv->adjustment);
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->adjustment = _tmp31_;
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = self->priv->scroll;
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp32_, FALSE, TRUE, (guint) 0);
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = self->priv->drawing_area;
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp33_, "configure-event", (GCallback) _book_view_configure_cb_gtk_widget_configure_event, self, 0);
+#line 109 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = self->priv->drawing_area;
+#line 109 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp34_, "draw", (GCallback) _book_view_draw_cb_gtk_widget_draw, self, 0);
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = self->priv->drawing_area;
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp35_, "motion-notify-event", (GCallback) _book_view_motion_cb_gtk_widget_motion_notify_event, self, 0);
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp36_ = self->priv->drawing_area;
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp36_, "key-press-event", (GCallback) _book_view_key_cb_gtk_widget_key_press_event, self, 0);
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = self->priv->drawing_area;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp37_, "button-press-event", (GCallback) _book_view_button_cb_gtk_widget_button_press_event, self, 0);
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp38_ = self->priv->drawing_area;
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp38_, "button-release-event", (GCallback) _book_view_button_cb_gtk_widget_button_release_event, self, 0);
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp39_ = self->priv->drawing_area;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp39_, "focus-in-event", (GCallback) _book_view_focus_cb_gtk_widget_focus_in_event, self, G_CONNECT_AFTER);
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp40_ = self->priv->drawing_area;
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp40_, "focus-out-event", (GCallback) _book_view_focus_cb_gtk_widget_focus_out_event, self, G_CONNECT_AFTER);
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp41_ = self->priv->adjustment;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (_tmp41_, "value-changed", (GCallback) _book_view_scroll_cb_gtk_adjustment_value_changed, self, 0);
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp42_ = self->priv->drawing_area;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_set_visible (_tmp42_, TRUE);
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return self;
+#line 576 "book-view.c"
+}
+
+
+BookView* book_view_new (Book* book) {
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return book_view_construct (TYPE_BOOK_VIEW, book);
+#line 583 "book-view.c"
+}
+
+
+static gpointer _page_view_ref0 (gpointer self) {
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return self ? page_view_ref (self) : NULL;
+#line 590 "book-view.c"
+}
+
+
+static PageView* book_view_get_nth_page (BookView* self, gint n) {
+ PageView* result = NULL;
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ Page* _tmp2_ = NULL;
+ GHashTable* _tmp3_ = NULL;
+ gconstpointer _tmp4_ = NULL;
+ PageView* _tmp5_ = NULL;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->_book;
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = n;
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = book_get_page (_tmp0_, _tmp1_);
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp2_;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = self->priv->page_data;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = g_hash_table_lookup (_tmp3_, page);
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = _page_view_ref0 ((PageView*) _tmp4_);
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp5_;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (page);
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 625 "book-view.c"
+}
+
+
+static PageView* book_view_get_next_page (BookView* self, PageView* page) {
+ PageView* result = NULL;
+ PageView* _tmp18_ = NULL;
+ PageView* _tmp19_ = NULL;
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (page != NULL, NULL);
+#line 637 "book-view.c"
+ {
+ gint i = 0;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 642 "book-view.c"
+ {
+ gboolean _tmp0_ = FALSE;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = TRUE;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 649 "book-view.c"
+ Page* p = NULL;
+ Book* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+ Page* _tmp6_ = NULL;
+ PageView* _tmp7_ = NULL;
+ Page* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp0_) {
+#line 661 "book-view.c"
+ gint _tmp1_ = 0;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = i;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp1_ + 1;
+#line 667 "book-view.c"
+ }
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = FALSE;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = self->priv->_book;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = i;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = book_get_page (_tmp2_, _tmp3_);
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ p = _tmp4_;
+#line 149 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = p;
+#line 149 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp5_ == NULL) {
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 687 "book-view.c"
+ }
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = p;
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = page;
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = page_view_get_page (_tmp7_);
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = _tmp8_;
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp6_ == _tmp9_) {
+#line 699 "book-view.c"
+ Book* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ Page* _tmp12_ = NULL;
+ Page* _tmp13_ = NULL;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = self->priv->_book;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = i;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = book_get_page (_tmp10_, _tmp11_ + 1);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ p = _tmp12_;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = p;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp13_ != NULL) {
+#line 718 "book-view.c"
+ GHashTable* _tmp14_ = NULL;
+ Page* _tmp15_ = NULL;
+ gconstpointer _tmp16_ = NULL;
+ PageView* _tmp17_ = NULL;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = self->priv->page_data;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = p;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = g_hash_table_lookup (_tmp14_, _tmp15_);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = _page_view_ref0 ((PageView*) _tmp16_);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp17_;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 737 "book-view.c"
+ }
+ }
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 742 "book-view.c"
+ }
+ }
+ }
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = page;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = _page_view_ref0 (_tmp18_);
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp19_;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 754 "book-view.c"
+}
+
+
+static PageView* book_view_get_prev_page (BookView* self, PageView* page) {
+ PageView* result = NULL;
+ PageView* prev_page = NULL;
+ PageView* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ PageView* _tmp16_ = NULL;
+ PageView* _tmp17_ = NULL;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (page != NULL, NULL);
+#line 164 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = page;
+#line 164 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = _page_view_ref0 (_tmp0_);
+#line 164 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ prev_page = _tmp1_;
+#line 775 "book-view.c"
+ {
+ gint i = 0;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 780 "book-view.c"
+ {
+ gboolean _tmp2_ = FALSE;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = TRUE;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 787 "book-view.c"
+ Page* p = NULL;
+ Book* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ Page* _tmp6_ = NULL;
+ Page* _tmp7_ = NULL;
+ Page* _tmp8_ = NULL;
+ PageView* _tmp9_ = NULL;
+ Page* _tmp10_ = NULL;
+ Page* _tmp11_ = NULL;
+ GHashTable* _tmp12_ = NULL;
+ Page* _tmp13_ = NULL;
+ gconstpointer _tmp14_ = NULL;
+ PageView* _tmp15_ = NULL;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp2_) {
+#line 803 "book-view.c"
+ gint _tmp3_ = 0;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = i;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp3_ + 1;
+#line 809 "book-view.c"
+ }
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = FALSE;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->_book;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = i;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = book_get_page (_tmp4_, _tmp5_);
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ p = _tmp6_;
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = p;
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp7_ == NULL) {
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 829 "book-view.c"
+ }
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = p;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = page;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = page_view_get_page (_tmp9_);
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = _tmp10_;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp8_ == _tmp11_) {
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = prev_page;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 847 "book-view.c"
+ }
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = self->priv->page_data;
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = p;
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = g_hash_table_lookup (_tmp12_, _tmp13_);
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = _page_view_ref0 ((PageView*) _tmp14_);
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (prev_page);
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ prev_page = _tmp15_;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 863 "book-view.c"
+ }
+ }
+ }
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = page;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = _page_view_ref0 (_tmp16_);
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp17_;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (prev_page);
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 877 "book-view.c"
+}
+
+
+static void book_view_page_view_changed_cb (BookView* self, PageView* page) {
+#line 178 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 178 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (page != NULL);
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_redraw (self);
+#line 888 "book-view.c"
+}
+
+
+static void book_view_page_view_size_changed_cb (BookView* self, PageView* page) {
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (page != NULL);
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->need_layout = TRUE;
+#line 186 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_redraw (self);
+#line 901 "book-view.c"
+}
+
+
+static void _book_view_page_view_changed_cb_page_view_changed (PageView* _sender, gpointer self) {
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_page_view_changed_cb ((BookView*) self, _sender);
+#line 908 "book-view.c"
+}
+
+
+static void _book_view_page_view_size_changed_cb_page_view_size_changed (PageView* _sender, gpointer self) {
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_page_view_size_changed_cb ((BookView*) self, _sender);
+#line 915 "book-view.c"
+}
+
+
+static gpointer _page_ref0 (gpointer self) {
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return self ? page_ref (self) : NULL;
+#line 922 "book-view.c"
+}
+
+
+static void book_view_add_cb (BookView* self, Book* book, Page* page) {
+ PageView* page_view = NULL;
+ Page* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ GHashTable* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+ PageView* _tmp5_ = NULL;
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (book != NULL);
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (page != NULL);
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = page;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = page_view_new (_tmp0_);
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view = _tmp1_;
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (page_view, "changed", (GCallback) _book_view_page_view_changed_cb_page_view_changed, self, 0);
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_connect_object (page_view, "size-changed", (GCallback) _book_view_page_view_size_changed_cb_page_view_size_changed, self, 0);
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = self->priv->page_data;
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = page;
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = _page_ref0 (_tmp3_);
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = _page_view_ref0 (page_view);
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_hash_table_insert (_tmp2_, _tmp4_, _tmp5_);
+#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->need_layout = TRUE;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_redraw (self);
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (page_view);
+#line 966 "book-view.c"
+}
+
+
+static void book_view_set_selected_page_view (BookView* self, PageView* page) {
+ gboolean _tmp0_ = FALSE;
+ PageView* _tmp1_ = NULL;
+ PageView* _tmp5_ = NULL;
+ PageView* _tmp6_ = NULL;
+ PageView* _tmp7_ = NULL;
+ GtkWidget* _tmp8_ = NULL;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp10_ = FALSE;
+#line 199 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = self->priv->selected_page_view;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp1_ != NULL) {
+#line 985 "book-view.c"
+ PageView* _tmp2_ = NULL;
+ PageView* _tmp3_ = NULL;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = page;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = self->priv->selected_page_view;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = _tmp2_ != _tmp3_;
+#line 994 "book-view.c"
+ } else {
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = FALSE;
+#line 998 "book-view.c"
+ }
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp0_) {
+#line 1002 "book-view.c"
+ PageView* _tmp4_ = NULL;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->selected_page_view;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_selected (_tmp4_, TRUE);
+#line 1008 "book-view.c"
+ }
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = page;
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = _page_view_ref0 (_tmp5_);
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (self->priv->selected_page_view);
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->selected_page_view = _tmp6_;
+#line 206 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = self->priv->selected_page_view;
+#line 206 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp7_ == NULL) {
+#line 207 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return;
+#line 1024 "book-view.c"
+ }
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = self->priv->drawing_area;
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_get (_tmp8_, "has-focus", &_tmp9_, NULL);
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = _tmp9_;
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp10_) {
+#line 1034 "book-view.c"
+ PageView* _tmp11_ = NULL;
+#line 211 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = self->priv->selected_page_view;
+#line 211 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_selected (_tmp11_, FALSE);
+#line 1040 "book-view.c"
+ } else {
+ PageView* _tmp12_ = NULL;
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = self->priv->selected_page_view;
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_selected (_tmp12_, TRUE);
+#line 1047 "book-view.c"
+ }
+}
+
+
+static void book_view_show_page_view (BookView* self, PageView* page) {
+ gboolean _tmp0_ = FALSE;
+ PageView* _tmp1_ = NULL;
+ GtkAllocation allocation = {0};
+ GtkWidget* _tmp4_ = NULL;
+ GtkAllocation _tmp5_ = {0};
+ gint left_edge = 0;
+ PageView* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ gint right_edge = 0;
+ PageView* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ PageView* _tmp12_ = NULL;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = page;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp1_ == NULL) {
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = TRUE;
+#line 1080 "book-view.c"
+ } else {
+ GtkScrollbar* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = self->priv->scroll;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = gtk_widget_get_visible ((GtkWidget*) _tmp2_);
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = !_tmp3_;
+#line 1090 "book-view.c"
+ }
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp0_) {
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return;
+#line 1096 "book-view.c"
+ }
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->drawing_area;
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_get_allocation (_tmp4_, &_tmp5_);
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ allocation = _tmp5_;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = page;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = page_view_get_x_offset (_tmp6_);
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = _tmp7_;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ left_edge = _tmp8_;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = page;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = page_view_get_x_offset (_tmp9_);
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = _tmp10_;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = page;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = page_view_get_width (_tmp12_);
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = _tmp13_;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right_edge = _tmp11_ + _tmp14_;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = left_edge;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = book_view_get_x_offset (self);
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = _tmp16_;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if ((_tmp15_ - _tmp17_) < 0) {
+#line 1134 "book-view.c"
+ gint _tmp18_ = 0;
+#line 227 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = left_edge;
+#line 227 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, _tmp18_);
+#line 1140 "book-view.c"
+ } else {
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ gint _tmp21_ = 0;
+ GtkAllocation _tmp22_ = {0};
+ gint _tmp23_ = 0;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = right_edge;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = book_view_get_x_offset (self);
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = _tmp20_;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = allocation;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = _tmp22_.width;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if ((_tmp19_ - _tmp21_) > _tmp23_) {
+#line 1159 "book-view.c"
+ gint _tmp24_ = 0;
+ GtkAllocation _tmp25_ = {0};
+ gint _tmp26_ = 0;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = right_edge;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = allocation;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = _tmp25_.width;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, _tmp24_ - _tmp26_);
+#line 1171 "book-view.c"
+ }
+ }
+}
+
+
+static void book_view_select_page_view (BookView* self, PageView* page) {
+ Page* p = NULL;
+ PageView* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ PageView* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ PageView* _tmp5_ = NULL;
+ Page* _tmp10_ = NULL;
+#line 232 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ p = NULL;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = page;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp0_ == _tmp1_) {
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return;
+#line 1199 "book-view.c"
+ }
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = page;
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page_view (self, _tmp2_);
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = self->priv->need_layout;
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp3_) {
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->show_selected_page = TRUE;
+#line 1211 "book-view.c"
+ } else {
+ PageView* _tmp4_ = NULL;
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = page;
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_show_page_view (self, _tmp4_);
+#line 1218 "book-view.c"
+ }
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = page;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp5_ != NULL) {
+#line 1224 "book-view.c"
+ PageView* _tmp6_ = NULL;
+ Page* _tmp7_ = NULL;
+ Page* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = page;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = page_view_get_page (_tmp6_);
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = _tmp7_;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = _page_ref0 (_tmp8_);
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ p = _tmp9_;
+#line 1241 "book-view.c"
+ }
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = p;
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_emit_by_name (self, "page-selected", _tmp10_);
+#line 232 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 1249 "book-view.c"
+}
+
+
+static void book_view_remove_cb (BookView* self, Book* book, Page* page) {
+ PageView* new_selection = NULL;
+ PageView* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+ PageView* page_view = NULL;
+ GHashTable* _tmp11_ = NULL;
+ Page* _tmp12_ = NULL;
+ gconstpointer _tmp13_ = NULL;
+ PageView* _tmp14_ = NULL;
+ guint _tmp15_ = 0U;
+ guint _tmp16_ = 0U;
+ GHashTable* _tmp17_ = NULL;
+ Page* _tmp18_ = NULL;
+ PageView* _tmp19_ = NULL;
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (book != NULL);
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (page != NULL);
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = _page_view_ref0 (_tmp0_);
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ new_selection = _tmp1_;
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = page;
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = book_view_get_selected_page (self);
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = _tmp3_;
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp2_ == _tmp4_) {
+#line 1290 "book-view.c"
+ PageView* _tmp5_ = NULL;
+ PageView* _tmp6_ = NULL;
+ PageView* _tmp7_ = NULL;
+ PageView* _tmp8_ = NULL;
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = self->priv->selected_page_view;
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = book_view_get_prev_page (self, _tmp5_);
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (new_selection);
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ new_selection = _tmp6_;
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = new_selection;
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = self->priv->selected_page_view;
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp7_ == _tmp8_) {
+#line 1309 "book-view.c"
+ PageView* _tmp9_ = NULL;
+ PageView* _tmp10_ = NULL;
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = self->priv->selected_page_view;
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = book_view_get_next_page (self, _tmp9_);
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (new_selection);
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ new_selection = _tmp10_;
+#line 1320 "book-view.c"
+ }
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (self->priv->selected_page_view);
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->selected_page_view = NULL;
+#line 1326 "book-view.c"
+ }
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = self->priv->page_data;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = page;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = g_hash_table_lookup (_tmp11_, _tmp12_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = _page_view_ref0 ((PageView*) _tmp13_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view = _tmp14_;
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("changed", TYPE_PAGE_VIEW, &_tmp15_, NULL, FALSE);
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (page_view, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp15_, 0, NULL, (GCallback) _book_view_page_view_changed_cb_page_view_changed, self);
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("size-changed", TYPE_PAGE_VIEW, &_tmp16_, NULL, FALSE);
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (page_view, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _book_view_page_view_size_changed_cb_page_view_size_changed, self);
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = self->priv->page_data;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = page;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_hash_table_remove (_tmp17_, _tmp18_);
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = new_selection;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, _tmp19_);
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->need_layout = TRUE;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_redraw (self);
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (page_view);
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (new_selection);
+#line 1364 "book-view.c"
+}
+
+
+static void book_view_reorder_cb (BookView* self, Book* book) {
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (book != NULL);
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->need_layout = TRUE;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_redraw (self);
+#line 1377 "book-view.c"
+}
+
+
+static void book_view_clear_cb (BookView* self, Book* book) {
+ GHashTable* _tmp0_ = NULL;
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (book != NULL);
+#line 283 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->page_data;
+#line 283 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_hash_table_remove_all (_tmp0_);
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (self->priv->selected_page_view);
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->selected_page_view = NULL;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_emit_by_name (self, "page-selected", NULL);
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->need_layout = TRUE;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_redraw (self);
+#line 1401 "book-view.c"
+}
+
+
+static gboolean book_view_configure_cb (BookView* self, GtkWidget* widget, GdkEventConfigure* event) {
+ gboolean result = FALSE;
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (event != NULL, FALSE);
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->need_layout = TRUE;
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = FALSE;
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 1419 "book-view.c"
+}
+
+
+static void book_view_layout_into (BookView* self, gint width, gint height, gint* book_width, gint* book_height) {
+ gint _vala_book_width = 0;
+ gint _vala_book_height = 0;
+ gint max_dpi = 0;
+ gint max_width = 0;
+ gint max_height = 0;
+ gdouble aspect = 0.0;
+ gint _tmp47_ = 0;
+ gint _tmp48_ = 0;
+ gdouble max_aspect = 0.0;
+ gint _tmp49_ = 0;
+ gint _tmp50_ = 0;
+ gint spacing = 0;
+ gint x_offset = 0;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 299 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_dpi = 0;
+#line 1441 "book-view.c"
+ {
+ gint i = 0;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 1446 "book-view.c"
+ {
+ gboolean _tmp0_ = FALSE;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = TRUE;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 1453 "book-view.c"
+ gint _tmp2_ = 0;
+ Book* _tmp3_ = NULL;
+ guint _tmp4_ = 0U;
+ guint _tmp5_ = 0U;
+ Page* page = NULL;
+ Book* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ Page* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp0_) {
+#line 1468 "book-view.c"
+ gint _tmp1_ = 0;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = i;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp1_ + 1;
+#line 1474 "book-view.c"
+ }
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = FALSE;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = i;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = self->priv->_book;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = book_get_n_pages (_tmp3_);
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = _tmp4_;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp2_) < _tmp5_)) {
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 1490 "book-view.c"
+ }
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = self->priv->_book;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = i;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = book_get_page (_tmp6_, _tmp7_);
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp8_;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = page;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = page_get_dpi (_tmp9_);
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = _tmp10_;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = max_dpi;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp11_ > _tmp12_) {
+#line 1510 "book-view.c"
+ Page* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = page;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = page_get_dpi (_tmp13_);
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = _tmp14_;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_dpi = _tmp15_;
+#line 1522 "book-view.c"
+ }
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (page);
+#line 1526 "book-view.c"
+ }
+ }
+ }
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_width = 0;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_height = 0;
+#line 1534 "book-view.c"
+ {
+ gint i = 0;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 1539 "book-view.c"
+ {
+ gboolean _tmp16_ = FALSE;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = TRUE;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 1546 "book-view.c"
+ gint _tmp18_ = 0;
+ Book* _tmp19_ = NULL;
+ guint _tmp20_ = 0U;
+ guint _tmp21_ = 0U;
+ Page* page = NULL;
+ Book* _tmp22_ = NULL;
+ gint _tmp23_ = 0;
+ Page* _tmp24_ = NULL;
+ gint w = 0;
+ Page* _tmp25_ = NULL;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+ gint h = 0;
+ Page* _tmp28_ = NULL;
+ gint _tmp29_ = 0;
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+ gint _tmp32_ = 0;
+ Page* _tmp33_ = NULL;
+ gint _tmp34_ = 0;
+ gint _tmp35_ = 0;
+ gint _tmp36_ = 0;
+ gint _tmp37_ = 0;
+ Page* _tmp38_ = NULL;
+ gint _tmp39_ = 0;
+ gint _tmp40_ = 0;
+ gint _tmp41_ = 0;
+ gint _tmp42_ = 0;
+ gint _tmp44_ = 0;
+ gint _tmp45_ = 0;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp16_) {
+#line 1579 "book-view.c"
+ gint _tmp17_ = 0;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = i;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp17_ + 1;
+#line 1585 "book-view.c"
+ }
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = FALSE;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = i;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = self->priv->_book;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = book_get_n_pages (_tmp19_);
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = _tmp20_;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp18_) < _tmp21_)) {
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 1601 "book-view.c"
+ }
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = self->priv->_book;
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = i;
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = book_get_page (_tmp22_, _tmp23_);
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp24_;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = page;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = page_get_width (_tmp25_);
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = _tmp26_;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ w = _tmp27_;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = page;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = page_get_height (_tmp28_);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = _tmp29_;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ h = _tmp30_;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = w;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = max_dpi;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = page;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = page_get_dpi (_tmp33_);
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = _tmp34_;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ w = (gint) (((((gdouble) _tmp31_) * _tmp32_) / _tmp35_) + 0.5);
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp36_ = h;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = max_dpi;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp38_ = page;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp39_ = page_get_dpi (_tmp38_);
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp40_ = _tmp39_;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ h = (gint) (((((gdouble) _tmp36_) * _tmp37_) / _tmp40_) + 0.5);
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp41_ = w;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp42_ = max_width;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp41_ > _tmp42_) {
+#line 1657 "book-view.c"
+ gint _tmp43_ = 0;
+#line 320 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp43_ = w;
+#line 320 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_width = _tmp43_;
+#line 1663 "book-view.c"
+ }
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp44_ = h;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp45_ = max_height;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp44_ > _tmp45_) {
+#line 1671 "book-view.c"
+ gint _tmp46_ = 0;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp46_ = h;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_height = _tmp46_;
+#line 1677 "book-view.c"
+ }
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (page);
+#line 1681 "book-view.c"
+ }
+ }
+ }
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp47_ = width;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp48_ = height;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ aspect = ((gdouble) _tmp47_) / _tmp48_;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp49_ = max_width;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp50_ = max_height;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_aspect = ((gdouble) _tmp49_) / _tmp50_;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ spacing = 12;
+#line 330 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_book_width = 0;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_book_height = 0;
+#line 1703 "book-view.c"
+ {
+ gint i = 0;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 1708 "book-view.c"
+ {
+ gboolean _tmp51_ = FALSE;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp51_ = TRUE;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 1715 "book-view.c"
+ gint _tmp53_ = 0;
+ Book* _tmp54_ = NULL;
+ guint _tmp55_ = 0U;
+ guint _tmp56_ = 0U;
+ PageView* page = NULL;
+ gint _tmp57_ = 0;
+ PageView* _tmp58_ = NULL;
+ Page* p = NULL;
+ PageView* _tmp59_ = NULL;
+ Page* _tmp60_ = NULL;
+ Page* _tmp61_ = NULL;
+ Page* _tmp62_ = NULL;
+ gdouble _tmp63_ = 0.0;
+ gdouble _tmp64_ = 0.0;
+ gint h = 0;
+ PageView* _tmp87_ = NULL;
+ gint _tmp88_ = 0;
+ gint _tmp89_ = 0;
+ gint _tmp90_ = 0;
+ gint _tmp91_ = 0;
+ gint _tmp93_ = 0;
+ PageView* _tmp94_ = NULL;
+ gint _tmp95_ = 0;
+ gint _tmp96_ = 0;
+ gint _tmp97_ = 0;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp51_) {
+#line 1743 "book-view.c"
+ gint _tmp52_ = 0;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp52_ = i;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp52_ + 1;
+#line 1749 "book-view.c"
+ }
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp51_ = FALSE;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp53_ = i;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp54_ = self->priv->_book;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp55_ = book_get_n_pages (_tmp54_);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp56_ = _tmp55_;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp53_) < _tmp56_)) {
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 1765 "book-view.c"
+ }
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp57_ = i;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp58_ = book_view_get_nth_page (self, _tmp57_);
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp58_;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp59_ = page;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp60_ = page_view_get_page (_tmp59_);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp61_ = _tmp60_;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp62_ = _page_ref0 (_tmp61_);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ p = _tmp62_;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp63_ = max_aspect;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp64_ = aspect;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp63_ > _tmp64_) {
+#line 1789 "book-view.c"
+ gint w = 0;
+ Page* _tmp65_ = NULL;
+ gint _tmp66_ = 0;
+ gint _tmp67_ = 0;
+ gint _tmp68_ = 0;
+ gint _tmp69_ = 0;
+ Page* _tmp70_ = NULL;
+ gint _tmp71_ = 0;
+ gint _tmp72_ = 0;
+ gint _tmp73_ = 0;
+ PageView* _tmp74_ = NULL;
+ gint _tmp75_ = 0;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp65_ = p;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp66_ = page_get_width (_tmp65_);
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp67_ = _tmp66_;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp68_ = max_dpi;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp69_ = width;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp70_ = p;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp71_ = page_get_dpi (_tmp70_);
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp72_ = _tmp71_;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp73_ = max_width;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ w = (gint) (((((gdouble) _tmp67_) * _tmp68_) * _tmp69_) / (_tmp72_ * _tmp73_));
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp74_ = page;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp75_ = w;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_width (_tmp74_, _tmp75_);
+#line 1828 "book-view.c"
+ } else {
+ gint h = 0;
+ Page* _tmp76_ = NULL;
+ gint _tmp77_ = 0;
+ gint _tmp78_ = 0;
+ gint _tmp79_ = 0;
+ gint _tmp80_ = 0;
+ Page* _tmp81_ = NULL;
+ gint _tmp82_ = 0;
+ gint _tmp83_ = 0;
+ gint _tmp84_ = 0;
+ PageView* _tmp85_ = NULL;
+ gint _tmp86_ = 0;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp76_ = p;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp77_ = page_get_height (_tmp76_);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp78_ = _tmp77_;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp79_ = max_dpi;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp80_ = height;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp81_ = p;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp82_ = page_get_dpi (_tmp81_);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp83_ = _tmp82_;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp84_ = max_height;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ h = (gint) (((((gdouble) _tmp78_) * _tmp79_) * _tmp80_) / (_tmp83_ * _tmp84_));
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp85_ = page;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp86_ = h;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_height (_tmp85_, _tmp86_);
+#line 1868 "book-view.c"
+ }
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp87_ = page;
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp88_ = page_view_get_height (_tmp87_);
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp89_ = _tmp88_;
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ h = _tmp89_;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp90_ = h;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp91_ = _vala_book_height;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp90_ > _tmp91_) {
+#line 1884 "book-view.c"
+ gint _tmp92_ = 0;
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp92_ = h;
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_book_height = _tmp92_;
+#line 1890 "book-view.c"
+ }
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp93_ = _vala_book_width;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp94_ = page;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp95_ = page_view_get_width (_tmp94_);
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp96_ = _tmp95_;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_book_width = _tmp93_ + _tmp96_;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp97_ = i;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp97_ != 0) {
+#line 1906 "book-view.c"
+ gint _tmp98_ = 0;
+ gint _tmp99_ = 0;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp98_ = _vala_book_width;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp99_ = spacing;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_book_width = _tmp98_ + _tmp99_;
+#line 1915 "book-view.c"
+ }
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (p);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (page);
+#line 1921 "book-view.c"
+ }
+ }
+ }
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x_offset = 0;
+#line 1927 "book-view.c"
+ {
+ gint i = 0;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 1932 "book-view.c"
+ {
+ gboolean _tmp100_ = FALSE;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp100_ = TRUE;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 1939 "book-view.c"
+ gint _tmp102_ = 0;
+ Book* _tmp103_ = NULL;
+ guint _tmp104_ = 0U;
+ guint _tmp105_ = 0U;
+ PageView* page = NULL;
+ gint _tmp106_ = 0;
+ PageView* _tmp107_ = NULL;
+ PageView* _tmp108_ = NULL;
+ gint _tmp109_ = 0;
+ gint _tmp110_ = 0;
+ PageView* _tmp111_ = NULL;
+ gint _tmp112_ = 0;
+ gint _tmp113_ = 0;
+ gint _tmp114_ = 0;
+ PageView* _tmp115_ = NULL;
+ gint _tmp116_ = 0;
+ PageView* _tmp117_ = NULL;
+ gint _tmp118_ = 0;
+ gint _tmp119_ = 0;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp100_) {
+#line 1961 "book-view.c"
+ gint _tmp101_ = 0;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp101_ = i;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp101_ + 1;
+#line 1967 "book-view.c"
+ }
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp100_ = FALSE;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp102_ = i;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp103_ = self->priv->_book;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp104_ = book_get_n_pages (_tmp103_);
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp105_ = _tmp104_;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp102_) < _tmp105_)) {
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 1983 "book-view.c"
+ }
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp106_ = i;
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp107_ = book_view_get_nth_page (self, _tmp106_);
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp107_;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp108_ = page;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp109_ = x_offset;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_x_offset (_tmp108_, _tmp109_);
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp110_ = x_offset;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp111_ = page;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp112_ = page_view_get_width (_tmp111_);
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp113_ = _tmp112_;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp114_ = spacing;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x_offset = _tmp110_ + (_tmp113_ + _tmp114_);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp115_ = page;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp116_ = height;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp117_ = page;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp118_ = page_view_get_height (_tmp117_);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp119_ = _tmp118_;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_y_offset (_tmp115_, (_tmp116_ - _tmp119_) / 2);
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (page);
+#line 2023 "book-view.c"
+ }
+ }
+ }
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (book_width) {
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ *book_width = _vala_book_width;
+#line 2031 "book-view.c"
+ }
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (book_height) {
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ *book_height = _vala_book_height;
+#line 2037 "book-view.c"
+ }
+}
+
+
+static void book_view_layout (BookView* self) {
+ gboolean _tmp0_ = FALSE;
+ GtkAllocation allocation = {0};
+ GtkWidget* _tmp1_ = NULL;
+ GtkAllocation _tmp2_ = {0};
+ GtkAllocation box_allocation = {0};
+ GtkAllocation _tmp3_ = {0};
+ gboolean right_aligned = FALSE;
+ GtkAdjustment* _tmp4_ = NULL;
+ gdouble _tmp5_ = 0.0;
+ GtkAdjustment* _tmp6_ = NULL;
+ gdouble _tmp7_ = 0.0;
+ GtkAdjustment* _tmp8_ = NULL;
+ gdouble _tmp9_ = 0.0;
+ gint width = 0;
+ GtkAllocation _tmp10_ = {0};
+ gint _tmp11_ = 0;
+ gint height = 0;
+ GtkAllocation _tmp12_ = {0};
+ gint _tmp13_ = 0;
+ guint _tmp14_ = 0U;
+ gint book_width = 0;
+ gint book_height = 0;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+ gint _tmp19_ = 0;
+ GtkAllocation _tmp20_ = {0};
+ gint _tmp21_ = 0;
+ gboolean _tmp54_ = FALSE;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->need_layout;
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp0_) {
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return;
+#line 2081 "book-view.c"
+ }
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->laying_out = TRUE;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = self->priv->drawing_area;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_get_allocation (_tmp1_, &_tmp2_);
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ allocation = _tmp2_;
+#line 383 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_get_allocation ((GtkWidget*) self, &_tmp3_);
+#line 383 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ box_allocation = _tmp3_;
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right_aligned = TRUE;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->adjustment;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = gtk_adjustment_get_value (_tmp4_);
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = self->priv->adjustment;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = gtk_adjustment_get_upper (_tmp6_);
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = self->priv->adjustment;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = gtk_adjustment_get_page_size (_tmp8_);
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp5_ < (_tmp7_ - _tmp9_)) {
+#line 388 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right_aligned = FALSE;
+#line 2113 "book-view.c"
+ }
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = allocation;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = _tmp10_.width;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ width = (gint) _tmp11_;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = box_allocation;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = _tmp12_.height;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = gtk_container_get_border_width ((GtkContainer*) self);
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ height = (gint) (_tmp13_ - (_tmp14_ * 2));
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = width;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = height;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_layout_into (self, _tmp15_, _tmp16_, &_tmp17_, &_tmp18_);
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_width = _tmp17_;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_height = _tmp18_;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = book_width;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = allocation;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = _tmp20_.width;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp19_ > _tmp21_) {
+#line 2147 "book-view.c"
+ GtkAllocation _tmp22_ = {0};
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+ GtkAdjustment* _tmp28_ = NULL;
+ GtkAdjustment* _tmp29_ = NULL;
+ gint _tmp30_ = 0;
+ GtkAdjustment* _tmp31_ = NULL;
+ GtkAllocation _tmp32_ = {0};
+ gint _tmp33_ = 0;
+ gint max_offset = 0;
+ gint _tmp34_ = 0;
+ GtkAllocation _tmp35_ = {0};
+ gint _tmp36_ = 0;
+ gboolean _tmp37_ = FALSE;
+ gboolean _tmp38_ = FALSE;
+ GtkScrollbar* _tmp43_ = NULL;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = allocation;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = _tmp22_.height;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ height = _tmp23_;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = width;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = height;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_layout_into (self, _tmp24_, _tmp25_, &_tmp26_, &_tmp27_);
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_width = _tmp26_;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_height = _tmp27_;
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = self->priv->adjustment;
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_lower (_tmp28_, (gdouble) 0);
+#line 405 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = self->priv->adjustment;
+#line 405 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = book_width;
+#line 405 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_upper (_tmp29_, (gdouble) _tmp30_);
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = self->priv->adjustment;
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = allocation;
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = _tmp32_.width;
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_page_size (_tmp31_, (gdouble) _tmp33_);
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = book_width;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = allocation;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp36_ = _tmp35_.width;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_offset = _tmp34_ - _tmp36_;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp38_ = right_aligned;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp38_) {
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = TRUE;
+#line 2215 "book-view.c"
+ } else {
+ gint _tmp39_ = 0;
+ gint _tmp40_ = 0;
+ gint _tmp41_ = 0;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp39_ = book_view_get_x_offset (self);
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp40_ = _tmp39_;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp41_ = max_offset;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = _tmp40_ > _tmp41_;
+#line 2228 "book-view.c"
+ }
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp37_) {
+#line 2232 "book-view.c"
+ gint _tmp42_ = 0;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp42_ = max_offset;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, _tmp42_);
+#line 2238 "book-view.c"
+ }
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp43_ = self->priv->scroll;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp43_, TRUE);
+#line 2244 "book-view.c"
+ } else {
+ GtkScrollbar* _tmp44_ = NULL;
+ gint offset = 0;
+ gint _tmp45_ = 0;
+ GtkAllocation _tmp46_ = {0};
+ gint _tmp47_ = 0;
+ GtkAdjustment* _tmp48_ = NULL;
+ gint _tmp49_ = 0;
+ GtkAdjustment* _tmp50_ = NULL;
+ gint _tmp51_ = 0;
+ GtkAdjustment* _tmp52_ = NULL;
+ gint _tmp53_ = 0;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp44_ = self->priv->scroll;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp44_, FALSE);
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp45_ = book_width;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp46_ = allocation;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp47_ = _tmp46_.width;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ offset = (_tmp45_ - _tmp47_) / 2;
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp48_ = self->priv->adjustment;
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp49_ = offset;
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_lower (_tmp48_, (gdouble) _tmp49_);
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp50_ = self->priv->adjustment;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp51_ = offset;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_upper (_tmp50_, (gdouble) _tmp51_);
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp52_ = self->priv->adjustment;
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_page_size (_tmp52_, (gdouble) 0);
+#line 422 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp53_ = offset;
+#line 422 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, _tmp53_);
+#line 2289 "book-view.c"
+ }
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp54_ = self->priv->show_selected_page;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp54_) {
+#line 2295 "book-view.c"
+ PageView* _tmp55_ = NULL;
+#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp55_ = self->priv->selected_page_view;
+#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_show_page_view (self, _tmp55_);
+#line 2301 "book-view.c"
+ }
+#line 428 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->need_layout = FALSE;
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->show_selected_page = FALSE;
+#line 430 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->laying_out = FALSE;
+#line 2309 "book-view.c"
+}
+
+
+static gboolean book_view_draw_cb (BookView* self, GtkWidget* widget, cairo_t* context) {
+ gboolean result = FALSE;
+ Book* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+ guint _tmp2_ = 0U;
+ gdouble left = 0.0;
+ gdouble top = 0.0;
+ gdouble right = 0.0;
+ gdouble bottom = 0.0;
+ cairo_t* _tmp3_ = NULL;
+ gdouble _tmp4_ = 0.0;
+ gdouble _tmp5_ = 0.0;
+ gdouble _tmp6_ = 0.0;
+ gdouble _tmp7_ = 0.0;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (context != NULL, FALSE);
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->_book;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = book_get_n_pages (_tmp0_);
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = _tmp1_;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp2_ == ((guint) 0)) {
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = FALSE;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 2345 "book-view.c"
+ }
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_layout (self);
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = context;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cairo_clip_extents (_tmp3_, &_tmp4_, &_tmp5_, &_tmp6_, &_tmp7_);
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ left = _tmp4_;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ top = _tmp5_;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right = _tmp6_;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ bottom = _tmp7_;
+#line 2361 "book-view.c"
+ {
+ gint i = 0;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 2366 "book-view.c"
+ {
+ gboolean _tmp8_ = FALSE;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = TRUE;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 2373 "book-view.c"
+ gint _tmp10_ = 0;
+ Book* _tmp11_ = NULL;
+ guint _tmp12_ = 0U;
+ guint _tmp13_ = 0U;
+ PageView* page = NULL;
+ gint _tmp14_ = 0;
+ PageView* _tmp15_ = NULL;
+ gint left_edge = 0;
+ PageView* _tmp16_ = NULL;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ gint right_edge = 0;
+ PageView* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ gint _tmp23_ = 0;
+ PageView* _tmp24_ = NULL;
+ gint _tmp25_ = 0;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+ gint _tmp28_ = 0;
+ gboolean _tmp29_ = FALSE;
+ gint _tmp30_ = 0;
+ gdouble _tmp31_ = 0.0;
+ cairo_t* _tmp34_ = NULL;
+ cairo_t* _tmp35_ = NULL;
+ gint _tmp36_ = 0;
+ gint _tmp37_ = 0;
+ PageView* _tmp38_ = NULL;
+ cairo_t* _tmp39_ = NULL;
+ cairo_t* _tmp40_ = NULL;
+ PageView* _tmp41_ = NULL;
+ gboolean _tmp42_ = FALSE;
+ gboolean _tmp43_ = FALSE;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp8_) {
+#line 2411 "book-view.c"
+ gint _tmp9_ = 0;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = i;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp9_ + 1;
+#line 2417 "book-view.c"
+ }
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = FALSE;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = i;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = self->priv->_book;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = book_get_n_pages (_tmp11_);
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = _tmp12_;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp10_) < _tmp13_)) {
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 2433 "book-view.c"
+ }
+#line 446 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = i;
+#line 446 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = book_view_get_nth_page (self, _tmp14_);
+#line 446 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp15_;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = page;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = page_view_get_x_offset (_tmp16_);
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = _tmp17_;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = book_view_get_x_offset (self);
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = _tmp19_;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ left_edge = _tmp18_ - _tmp20_;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = page;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = page_view_get_x_offset (_tmp21_);
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = _tmp22_;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = page;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = page_view_get_width (_tmp24_);
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = _tmp25_;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = book_view_get_x_offset (self);
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = _tmp27_;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right_edge = (_tmp23_ + _tmp26_) - _tmp28_;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = right_edge;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = left;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (((gdouble) _tmp30_) < _tmp31_) {
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = TRUE;
+#line 2479 "book-view.c"
+ } else {
+ gint _tmp32_ = 0;
+ gdouble _tmp33_ = 0.0;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = left_edge;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = right;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = ((gdouble) _tmp32_) > _tmp33_;
+#line 2489 "book-view.c"
+ }
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp29_) {
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (page);
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ continue;
+#line 2497 "book-view.c"
+ }
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = context;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cairo_save (_tmp34_);
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = context;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp36_ = book_view_get_x_offset (self);
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = _tmp36_;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cairo_translate (_tmp35_, (gdouble) (-_tmp37_), (gdouble) 0);
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp38_ = page;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp39_ = context;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_render (_tmp38_, _tmp39_);
+#line 457 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp40_ = context;
+#line 457 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cairo_restore (_tmp40_);
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp41_ = page;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp42_ = page_view_get_selected (_tmp41_);
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp43_ = _tmp42_;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp43_) {
+#line 2529 "book-view.c"
+ GtkWidget* _tmp44_ = NULL;
+ GtkStyleContext* _tmp45_ = NULL;
+ cairo_t* _tmp46_ = NULL;
+ PageView* _tmp47_ = NULL;
+ gint _tmp48_ = 0;
+ gint _tmp49_ = 0;
+ gint _tmp50_ = 0;
+ gint _tmp51_ = 0;
+ PageView* _tmp52_ = NULL;
+ gint _tmp53_ = 0;
+ gint _tmp54_ = 0;
+ PageView* _tmp55_ = NULL;
+ gint _tmp56_ = 0;
+ gint _tmp57_ = 0;
+ PageView* _tmp58_ = NULL;
+ gint _tmp59_ = 0;
+ gint _tmp60_ = 0;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp44_ = self->priv->drawing_area;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp45_ = gtk_widget_get_style_context (_tmp44_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp46_ = context;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp47_ = page;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp48_ = page_view_get_x_offset (_tmp47_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp49_ = _tmp48_;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp50_ = book_view_get_x_offset (self);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp51_ = _tmp50_;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp52_ = page;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp53_ = page_view_get_y_offset (_tmp52_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp54_ = _tmp53_;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp55_ = page;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp56_ = page_view_get_width (_tmp55_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp57_ = _tmp56_;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp58_ = page;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp59_ = page_view_get_height (_tmp58_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp60_ = _tmp59_;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_render_focus (_tmp45_, _tmp46_, (gdouble) (_tmp49_ - _tmp51_), (gdouble) _tmp54_, (gdouble) _tmp57_, (gdouble) _tmp60_);
+#line 2583 "book-view.c"
+ }
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (page);
+#line 2587 "book-view.c"
+ }
+ }
+ }
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = FALSE;
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 2595 "book-view.c"
+}
+
+
+static PageView* book_view_get_page_at (BookView* self, gint x, gint y, gint* x_, gint* y_) {
+ gint _vala_x_ = 0;
+ gint _vala_y_ = 0;
+ PageView* result = NULL;
+ gint _tmp0_ = 0;
+#line 470 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_y_ = 0;
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = _vala_y_;
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_x_ = _tmp0_;
+#line 2612 "book-view.c"
+ {
+ gint i = 0;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 2617 "book-view.c"
+ {
+ gboolean _tmp1_ = FALSE;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = TRUE;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 2624 "book-view.c"
+ gint _tmp3_ = 0;
+ Book* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+ guint _tmp6_ = 0U;
+ PageView* page = NULL;
+ gint _tmp7_ = 0;
+ PageView* _tmp8_ = NULL;
+ gint left = 0;
+ PageView* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint right = 0;
+ gint _tmp12_ = 0;
+ PageView* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ gint top = 0;
+ PageView* _tmp16_ = NULL;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+ gint bottom = 0;
+ gint _tmp19_ = 0;
+ PageView* _tmp20_ = NULL;
+ gint _tmp21_ = 0;
+ gint _tmp22_ = 0;
+ gboolean _tmp23_ = FALSE;
+ gboolean _tmp24_ = FALSE;
+ gboolean _tmp25_ = FALSE;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp1_) {
+#line 2657 "book-view.c"
+ gint _tmp2_ = 0;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = i;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp2_ + 1;
+#line 2663 "book-view.c"
+ }
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = FALSE;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = i;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->_book;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = book_get_n_pages (_tmp4_);
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = _tmp5_;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp3_) < _tmp6_)) {
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 2679 "book-view.c"
+ }
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = i;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = book_view_get_nth_page (self, _tmp7_);
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp8_;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = page;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = page_view_get_x_offset (_tmp9_);
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = _tmp10_;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ left = _tmp11_;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = left;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = page;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = page_view_get_width (_tmp13_);
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = _tmp14_;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right = _tmp12_ + _tmp15_;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = page;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = page_view_get_y_offset (_tmp16_);
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = _tmp17_;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ top = _tmp18_;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = top;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = page;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = page_view_get_height (_tmp20_);
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = _tmp21_;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ bottom = _tmp19_ + _tmp22_;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = x;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = left;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp26_ >= _tmp27_) {
+#line 2729 "book-view.c"
+ gint _tmp28_ = 0;
+ gint _tmp29_ = 0;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = x;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = right;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = _tmp28_ <= _tmp29_;
+#line 2738 "book-view.c"
+ } else {
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = FALSE;
+#line 2742 "book-view.c"
+ }
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp25_) {
+#line 2746 "book-view.c"
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = y;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = top;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = _tmp30_ >= _tmp31_;
+#line 2755 "book-view.c"
+ } else {
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = FALSE;
+#line 2759 "book-view.c"
+ }
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp24_) {
+#line 2763 "book-view.c"
+ gint _tmp32_ = 0;
+ gint _tmp33_ = 0;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = y;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = bottom;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = _tmp32_ <= _tmp33_;
+#line 2772 "book-view.c"
+ } else {
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = FALSE;
+#line 2776 "book-view.c"
+ }
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp23_) {
+#line 2780 "book-view.c"
+ gint _tmp34_ = 0;
+ gint _tmp35_ = 0;
+ gint _tmp36_ = 0;
+ gint _tmp37_ = 0;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = x;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = left;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_x_ = _tmp34_ - _tmp35_;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp36_ = y;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = top;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_y_ = _tmp36_ - _tmp37_;
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = page;
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (x_) {
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ *x_ = _vala_x_;
+#line 2803 "book-view.c"
+ }
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (y_) {
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ *y_ = _vala_y_;
+#line 2809 "book-view.c"
+ }
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 2813 "book-view.c"
+ }
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (page);
+#line 2817 "book-view.c"
+ }
+ }
+ }
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = NULL;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (x_) {
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ *x_ = _vala_x_;
+#line 2827 "book-view.c"
+ }
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (y_) {
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ *y_ = _vala_y_;
+#line 2833 "book-view.c"
+ }
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 2837 "book-view.c"
+}
+
+
+static gboolean book_view_button_cb (BookView* self, GtkWidget* widget, GdkEventButton* event) {
+ gboolean result = FALSE;
+ GtkWidget* _tmp0_ = NULL;
+ gint x = 0;
+ gint y = 0;
+ GdkEventButton* _tmp1_ = NULL;
+ GdkEventType _tmp2_ = 0;
+ PageView* _tmp13_ = NULL;
+ GdkEventButton* _tmp14_ = NULL;
+ guint _tmp15_ = 0U;
+ GdkEventButton* _tmp30_ = NULL;
+ guint _tmp31_ = 0U;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (event != NULL, FALSE);
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_layout (self);
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->drawing_area;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_grab_focus (_tmp0_);
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x = 0;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ y = 0;
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = event;
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = _tmp1_->type;
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp2_ == GDK_BUTTON_PRESS) {
+#line 2875 "book-view.c"
+ GdkEventButton* _tmp3_ = NULL;
+ gdouble _tmp4_ = 0.0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ GdkEventButton* _tmp7_ = NULL;
+ gdouble _tmp8_ = 0.0;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ PageView* _tmp11_ = NULL;
+ PageView* _tmp12_ = NULL;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = event;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = _tmp3_->x;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = book_view_get_x_offset (self);
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = _tmp5_;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = event;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = _tmp7_->y;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = book_view_get_page_at (self, (gint) (_tmp4_ + _tmp6_), (gint) _tmp8_, &_tmp9_, &_tmp10_);
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x = _tmp9_;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ y = _tmp10_;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = _tmp11_;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, _tmp12_);
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (_tmp12_);
+#line 2910 "book-view.c"
+ }
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = self->priv->selected_page_view;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp13_ == NULL) {
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = FALSE;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 2920 "book-view.c"
+ }
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = event;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = _tmp14_->button;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp15_ == ((guint) 1)) {
+#line 2928 "book-view.c"
+ GdkEventButton* _tmp16_ = NULL;
+ GdkEventType _tmp17_ = 0;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = event;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = _tmp16_->type;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp17_ == GDK_BUTTON_PRESS) {
+#line 2937 "book-view.c"
+ PageView* _tmp18_ = NULL;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = self->priv->selected_page_view;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = x;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = y;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_button_press (_tmp18_, _tmp19_, _tmp20_);
+#line 2949 "book-view.c"
+ } else {
+ GdkEventButton* _tmp21_ = NULL;
+ GdkEventType _tmp22_ = 0;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = event;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = _tmp21_->type;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp22_ == GDK_BUTTON_RELEASE) {
+#line 2959 "book-view.c"
+ PageView* _tmp23_ = NULL;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = self->priv->selected_page_view;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = x;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = y;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_button_release (_tmp23_, _tmp24_, _tmp25_);
+#line 2971 "book-view.c"
+ } else {
+ GdkEventButton* _tmp26_ = NULL;
+ GdkEventType _tmp27_ = 0;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = event;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = _tmp26_->type;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp27_ == GDK_2BUTTON_PRESS) {
+#line 2981 "book-view.c"
+ Page* _tmp28_ = NULL;
+ Page* _tmp29_ = NULL;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = book_view_get_selected_page (self);
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = _tmp28_;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_emit_by_name (self, "show-page", _tmp29_);
+#line 2990 "book-view.c"
+ }
+ }
+ }
+ }
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = event;
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = _tmp30_->button;
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp31_ == ((guint) 3)) {
+#line 517 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_emit_by_name (self, "show-menu");
+#line 3003 "book-view.c"
+ }
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = FALSE;
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3009 "book-view.c"
+}
+
+
+static void book_view_set_cursor (BookView* self, GdkCursorType cursor) {
+ GdkCursor* c = NULL;
+ GdkCursorType _tmp0_ = 0;
+ GdkCursorType _tmp1_ = 0;
+ GdkCursorType _tmp2_ = 0;
+ GdkCursorType _tmp3_ = 0;
+ GdkCursor* _tmp4_ = NULL;
+ GtkWidget* _tmp5_ = NULL;
+ GdkWindow* _tmp6_ = NULL;
+ GdkCursor* _tmp7_ = NULL;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->cursor;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = cursor;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp0_ == _tmp1_) {
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_object_unref0 (c);
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return;
+#line 3035 "book-view.c"
+ }
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = cursor;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->cursor = _tmp2_;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = cursor;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = gdk_cursor_new (_tmp3_);
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_object_unref0 (c);
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ c = _tmp4_;
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = self->priv->drawing_area;
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = gtk_widget_get_window (_tmp5_);
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = c;
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gdk_window_set_cursor (_tmp6_, _tmp7_);
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_object_unref0 (c);
+#line 3059 "book-view.c"
+}
+
+
+static gboolean book_view_motion_cb (BookView* self, GtkWidget* widget, GdkEventMotion* event) {
+ gboolean result = FALSE;
+ GdkCursorType cursor = 0;
+ gboolean _tmp0_ = FALSE;
+ PageView* _tmp1_ = NULL;
+ GdkCursorType _tmp38_ = 0;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (event != NULL, FALSE);
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cursor = GDK_ARROW;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = self->priv->selected_page_view;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp1_ != NULL) {
+#line 3081 "book-view.c"
+ GdkEventMotion* _tmp2_ = NULL;
+ GdkModifierType _tmp3_ = 0;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = event;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = _tmp2_->state;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = (_tmp3_ & GDK_BUTTON1_MASK) != 0;
+#line 3090 "book-view.c"
+ } else {
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = FALSE;
+#line 3094 "book-view.c"
+ }
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp0_) {
+#line 3098 "book-view.c"
+ gint x = 0;
+ GdkEventMotion* _tmp4_ = NULL;
+ gdouble _tmp5_ = 0.0;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+ PageView* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gint y = 0;
+ GdkEventMotion* _tmp11_ = NULL;
+ gdouble _tmp12_ = 0.0;
+ PageView* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ PageView* _tmp16_ = NULL;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+ PageView* _tmp19_ = NULL;
+ GdkCursorType _tmp20_ = 0;
+ GdkCursorType _tmp21_ = 0;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = event;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = _tmp4_->x;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = book_view_get_x_offset (self);
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = _tmp6_;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = self->priv->selected_page_view;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = page_view_get_x_offset (_tmp8_);
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = _tmp9_;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x = (gint) ((_tmp5_ + _tmp7_) - _tmp10_);
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = event;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = _tmp11_->y;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = self->priv->selected_page_view;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = page_view_get_y_offset (_tmp13_);
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = _tmp14_;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ y = (gint) (_tmp12_ - _tmp15_);
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = self->priv->selected_page_view;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = x;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = y;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_motion (_tmp16_, _tmp17_, _tmp18_);
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = self->priv->selected_page_view;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = page_view_get_cursor (_tmp19_);
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = _tmp20_;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cursor = _tmp21_;
+#line 3163 "book-view.c"
+ } else {
+ gint x = 0;
+ gint y = 0;
+ PageView* over_page = NULL;
+ GdkEventMotion* _tmp22_ = NULL;
+ gdouble _tmp23_ = 0.0;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+ GdkEventMotion* _tmp26_ = NULL;
+ gdouble _tmp27_ = 0.0;
+ gint _tmp28_ = 0;
+ gint _tmp29_ = 0;
+ PageView* _tmp30_ = NULL;
+ PageView* _tmp31_ = NULL;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = event;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = _tmp22_->x;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = book_view_get_x_offset (self);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = _tmp24_;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = event;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = _tmp26_->y;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = book_view_get_page_at (self, (gint) (_tmp23_ + _tmp25_), (gint) _tmp27_, &_tmp28_, &_tmp29_);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x = _tmp28_;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ y = _tmp29_;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ over_page = _tmp30_;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = over_page;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp31_ != NULL) {
+#line 3202 "book-view.c"
+ PageView* _tmp32_ = NULL;
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+ PageView* _tmp35_ = NULL;
+ GdkCursorType _tmp36_ = 0;
+ GdkCursorType _tmp37_ = 0;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = over_page;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = x;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = y;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_motion (_tmp32_, _tmp33_, _tmp34_);
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = over_page;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp36_ = page_view_get_cursor (_tmp35_);
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = _tmp36_;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cursor = _tmp37_;
+#line 3225 "book-view.c"
+ }
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (over_page);
+#line 3229 "book-view.c"
+ }
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp38_ = cursor;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_cursor (self, _tmp38_);
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = FALSE;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3239 "book-view.c"
+}
+
+
+static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey* event) {
+ gboolean result = FALSE;
+ GdkEventKey* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (event != NULL, FALSE);
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = event;
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = _tmp0_->keyval;
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ switch (_tmp1_) {
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case 0xff50:
+#line 3261 "book-view.c"
+ {
+ Book* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = self->priv->_book;
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = book_get_page (_tmp2_, 0);
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = _tmp3_;
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page (self, _tmp4_);
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (_tmp4_);
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = TRUE;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3280 "book-view.c"
+ }
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case 0xff51:
+#line 3284 "book-view.c"
+ {
+ PageView* _tmp5_ = NULL;
+ PageView* _tmp6_ = NULL;
+ PageView* _tmp7_ = NULL;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = self->priv->selected_page_view;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = book_view_get_prev_page (self, _tmp5_);
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = _tmp6_;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, _tmp7_);
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (_tmp7_);
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = TRUE;
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3303 "book-view.c"
+ }
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case 0xff53:
+#line 3307 "book-view.c"
+ {
+ PageView* _tmp8_ = NULL;
+ PageView* _tmp9_ = NULL;
+ PageView* _tmp10_ = NULL;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = self->priv->selected_page_view;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = book_view_get_next_page (self, _tmp8_);
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = _tmp9_;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, _tmp10_);
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (_tmp10_);
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = TRUE;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3326 "book-view.c"
+ }
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case 0xFF57:
+#line 3330 "book-view.c"
+ {
+ Book* _tmp11_ = NULL;
+ Book* _tmp12_ = NULL;
+ guint _tmp13_ = 0U;
+ guint _tmp14_ = 0U;
+ Page* _tmp15_ = NULL;
+ Page* _tmp16_ = NULL;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = self->priv->_book;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = self->priv->_book;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = book_get_n_pages (_tmp12_);
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = _tmp13_;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = book_get_page (_tmp11_, ((gint) _tmp14_) - 1);
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = _tmp15_;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page (self, _tmp16_);
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (_tmp16_);
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = TRUE;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3358 "book-view.c"
+ }
+ default:
+ {
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = FALSE;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3366 "book-view.c"
+ }
+ }
+}
+
+
+static gboolean book_view_focus_cb (BookView* self, GtkWidget* widget, GdkEventFocus* event) {
+ gboolean result = FALSE;
+ PageView* _tmp0_ = NULL;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (event != NULL, FALSE);
+#line 586 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 586 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page_view (self, _tmp0_);
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = FALSE;
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3389 "book-view.c"
+}
+
+
+static void book_view_scroll_cb (BookView* self, GtkAdjustment* adjustment) {
+ gboolean _tmp0_ = FALSE;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (adjustment != NULL);
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->laying_out;
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp0_) {
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_redraw (self);
+#line 3405 "book-view.c"
+ }
+}
+
+
+void book_view_redraw (BookView* self) {
+ GtkWidget* _tmp0_ = NULL;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->drawing_area;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_queue_draw (_tmp0_);
+#line 3418 "book-view.c"
+}
+
+
+void book_view_select_next_page (BookView* self) {
+ PageView* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ PageView* _tmp2_ = NULL;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = book_view_get_next_page (self, _tmp0_);
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = _tmp1_;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, _tmp2_);
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (_tmp2_);
+#line 3438 "book-view.c"
+}
+
+
+void book_view_select_prev_page (BookView* self) {
+ PageView* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ PageView* _tmp2_ = NULL;
+#line 606 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = book_view_get_prev_page (self, _tmp0_);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = _tmp1_;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, _tmp2_);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (_tmp2_);
+#line 3458 "book-view.c"
+}
+
+
+Book* book_view_get_book (BookView* self) {
+ Book* result;
+ Book* _tmp0_ = NULL;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->_book;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp0_;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3473 "book-view.c"
+}
+
+
+static gpointer _book_ref0 (gpointer self) {
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return self ? book_ref (self) : NULL;
+#line 3480 "book-view.c"
+}
+
+
+static void book_view_set_book (BookView* self, Book* value) {
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = value;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = _book_ref0 (_tmp0_);
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _book_unref0 (self->priv->_book);
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->_book = _tmp1_;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_notify ((GObject *) self, "book");
+#line 3499 "book-view.c"
+}
+
+
+Page* book_view_get_selected_page (BookView* self) {
+ Page* result;
+ PageView* _tmp0_ = NULL;
+#line 30 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp0_ != NULL) {
+#line 3512 "book-view.c"
+ PageView* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = self->priv->selected_page_view;
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = page_view_get_page (_tmp1_);
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = _tmp2_;
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp3_;
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3526 "book-view.c"
+ } else {
+#line 35 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = NULL;
+#line 35 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3532 "book-view.c"
+ }
+}
+
+
+void book_view_set_selected_page (BookView* self, Page* value) {
+ Page* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+#line 37 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = book_view_get_selected_page (self);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = _tmp0_;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = value;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp1_ == _tmp2_) {
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return;
+#line 3554 "book-view.c"
+ }
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = value;
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp3_ != NULL) {
+#line 3560 "book-view.c"
+ GHashTable* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+ gconstpointer _tmp6_ = NULL;
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->page_data;
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = value;
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = g_hash_table_lookup (_tmp4_, _tmp5_);
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, (PageView*) _tmp6_);
+#line 3572 "book-view.c"
+ } else {
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, NULL);
+#line 3576 "book-view.c"
+ }
+#line 37 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_notify ((GObject *) self, "selected-page");
+#line 3580 "book-view.c"
+}
+
+
+gint book_view_get_x_offset (BookView* self) {
+ gint result;
+ GtkAdjustment* _tmp0_ = NULL;
+ gdouble _tmp1_ = 0.0;
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->adjustment;
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = gtk_adjustment_get_value (_tmp0_);
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = (gint) _tmp1_;
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3598 "book-view.c"
+}
+
+
+void book_view_set_x_offset (BookView* self, gint value) {
+ GtkAdjustment* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->adjustment;
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = value;
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_);
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_notify ((GObject *) self, "x-offset");
+#line 3615 "book-view.c"
+}
+
+
+static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__PAGE) (gpointer data1, gpointer arg_1, gpointer data2);
+ register GMarshalFunc_VOID__PAGE callback;
+ register GCClosure * cc;
+ register gpointer data1;
+ register gpointer data2;
+ cc = (GCClosure *) closure;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (n_param_values == 2);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ data1 = closure->data;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ data2 = param_values->data[0].v_pointer;
+#line 3634 "book-view.c"
+ } else {
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ data1 = param_values->data[0].v_pointer;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ data2 = closure->data;
+#line 3640 "book-view.c"
+ }
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ callback = (GMarshalFunc_VOID__PAGE) (marshal_data ? marshal_data : cc->callback);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ callback (data1, value_get_page (param_values + 1), data2);
+#line 3646 "book-view.c"
+}
+
+
+static void book_view_class_init (BookViewClass * klass) {
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_parent_class = g_type_class_peek_parent (klass);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_type_class_add_private (klass, sizeof (BookViewPrivate));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_CLASS (klass)->get_property = _vala_book_view_get_property;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_CLASS (klass)->set_property = _vala_book_view_set_property;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_CLASS (klass)->finalize = book_view_finalize;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), BOOK_VIEW_BOOK, param_spec_book ("book", "book", "book", TYPE_BOOK, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), BOOK_VIEW_SELECTED_PAGE, param_spec_page ("selected-page", "selected-page", "selected-page", TYPE_PAGE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), BOOK_VIEW_X_OFFSET, g_param_spec_int ("x-offset", "x-offset", "x-offset", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_new ("page_selected", TYPE_BOOK_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__PAGE, G_TYPE_NONE, 1, TYPE_PAGE);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_new ("show_page", TYPE_BOOK_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__PAGE, G_TYPE_NONE, 1, TYPE_PAGE);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_new ("show_menu", TYPE_BOOK_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 3673 "book-view.c"
+}
+
+
+static void book_view_instance_init (BookView * self) {
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv = BOOK_VIEW_GET_PRIVATE (self);
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->selected_page_view = NULL;
+#line 3682 "book-view.c"
+}
+
+
+static void book_view_finalize (GObject* obj) {
+ BookView * self;
+ Book* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+ Book* _tmp2_ = NULL;
+ guint _tmp3_ = 0U;
+ Book* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+ Book* _tmp6_ = NULL;
+ guint _tmp7_ = 0U;
+ GtkWidget* _tmp8_ = NULL;
+ guint _tmp9_ = 0U;
+ GtkWidget* _tmp10_ = NULL;
+ guint _tmp11_ = 0U;
+ GtkWidget* _tmp12_ = NULL;
+ guint _tmp13_ = 0U;
+ GtkWidget* _tmp14_ = NULL;
+ guint _tmp15_ = 0U;
+ GtkWidget* _tmp16_ = NULL;
+ guint _tmp17_ = 0U;
+ GtkWidget* _tmp18_ = NULL;
+ guint _tmp19_ = 0U;
+ GtkWidget* _tmp20_ = NULL;
+ guint _tmp21_ = 0U;
+ GtkWidget* _tmp22_ = NULL;
+ guint _tmp23_ = 0U;
+ GtkAdjustment* _tmp24_ = NULL;
+ guint _tmp25_ = 0U;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BOOK_VIEW, BookView);
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->_book;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("page-added", TYPE_BOOK, &_tmp1_, NULL, FALSE);
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _book_view_add_cb_book_page_added, self);
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = self->priv->_book;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("page-removed", TYPE_BOOK, &_tmp3_, NULL, FALSE);
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _book_view_remove_cb_book_page_removed, self);
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->_book;
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("reordered", TYPE_BOOK, &_tmp5_, NULL, FALSE);
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _book_view_reorder_cb_book_reordered, self);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = self->priv->_book;
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("cleared", TYPE_BOOK, &_tmp7_, NULL, FALSE);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _book_view_clear_cb_book_cleared, self);
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = self->priv->drawing_area;
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("configure-event", GTK_TYPE_WIDGET, &_tmp9_, NULL, FALSE);
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp8_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp9_, 0, NULL, (GCallback) _book_view_configure_cb_gtk_widget_configure_event, self);
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = self->priv->drawing_area;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("draw", GTK_TYPE_WIDGET, &_tmp11_, NULL, FALSE);
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _book_view_draw_cb_gtk_widget_draw, self);
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = self->priv->drawing_area;
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("motion-notify-event", GTK_TYPE_WIDGET, &_tmp13_, NULL, FALSE);
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp12_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp13_, 0, NULL, (GCallback) _book_view_motion_cb_gtk_widget_motion_notify_event, self);
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = self->priv->drawing_area;
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("key-press-event", GTK_TYPE_WIDGET, &_tmp15_, NULL, FALSE);
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp14_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp15_, 0, NULL, (GCallback) _book_view_key_cb_gtk_widget_key_press_event, self);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = self->priv->drawing_area;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("button-press-event", GTK_TYPE_WIDGET, &_tmp17_, NULL, FALSE);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp16_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp17_, 0, NULL, (GCallback) _book_view_button_cb_gtk_widget_button_press_event, self);
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = self->priv->drawing_area;
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("button-release-event", GTK_TYPE_WIDGET, &_tmp19_, NULL, FALSE);
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp18_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp19_, 0, NULL, (GCallback) _book_view_button_cb_gtk_widget_button_release_event, self);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = self->priv->drawing_area;
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("focus-in-event", GTK_TYPE_WIDGET, &_tmp21_, NULL, FALSE);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp20_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp21_, 0, NULL, (GCallback) _book_view_focus_cb_gtk_widget_focus_in_event, self);
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = self->priv->drawing_area;
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("focus-out-event", GTK_TYPE_WIDGET, &_tmp23_, NULL, FALSE);
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp22_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp23_, 0, NULL, (GCallback) _book_view_focus_cb_gtk_widget_focus_out_event, self);
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = self->priv->adjustment;
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("value-changed", GTK_TYPE_ADJUSTMENT, &_tmp25_, NULL, FALSE);
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp24_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp25_, 0, NULL, (GCallback) _book_view_scroll_cb_gtk_adjustment_value_changed, self);
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _book_unref0 (self->priv->_book);
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_hash_table_unref0 (self->priv->page_data);
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (self->priv->selected_page_view);
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_object_unref0 (self->priv->drawing_area);
+#line 53 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_object_unref0 (self->priv->scroll);
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _g_object_unref0 (self->priv->adjustment);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_CLASS (book_view_parent_class)->finalize (obj);
+#line 3808 "book-view.c"
+}
+
+
+GType book_view_get_type (void) {
+ static volatile gsize book_view_type_id__volatile = 0;
+ if (g_once_init_enter (&book_view_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (BookViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) book_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BookView), 0, (GInstanceInitFunc) book_view_instance_init, NULL };
+ GType book_view_type_id;
+ book_view_type_id = g_type_register_static (GTK_TYPE_BOX, "BookView", &g_define_type_info, 0);
+ g_once_init_leave (&book_view_type_id__volatile, book_view_type_id);
+ }
+ return book_view_type_id__volatile;
+}
+
+
+static void _vala_book_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+ BookView * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_BOOK_VIEW, BookView);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ switch (property_id) {
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_BOOK:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ value_set_book (value, book_view_get_book (self));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_SELECTED_PAGE:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ value_set_page (value, book_view_get_selected_page (self));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_X_OFFSET:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_value_set_int (value, book_view_get_x_offset (self));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 3847 "book-view.c"
+ default:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 3853 "book-view.c"
+ }
+}
+
+
+static void _vala_book_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+ BookView * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_BOOK_VIEW, BookView);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ switch (property_id) {
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_BOOK:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_book (self, value_get_book (value));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_SELECTED_PAGE:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page (self, value_get_page (value));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_X_OFFSET:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, g_value_get_int (value));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 3881 "book-view.c"
+ default:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 3887 "book-view.c"
+ }
+}
+
+
+
diff --git a/src/book-view.vala b/src/book-view.vala
new file mode 100644
index 0000000..7e337f1
--- /dev/null
+++ b/src/book-view.vala
@@ -0,0 +1,610 @@
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+// FIXME: When scrolling, copy existing render sideways?
+// FIXME: Only render pages that change and only the part that changed
+
+public class BookView : Gtk.Box
+{
+ /* Book being rendered */
+ public Book book { get; private set; }
+ private HashTable<Page, PageView> page_data;
+
+ /* True if the view needs to be laid out again */
+ private bool need_layout;
+ private bool laying_out;
+ private bool show_selected_page;
+
+ /* Currently selected page */
+ private PageView? selected_page_view = null;
+ public Page? selected_page
+ {
+ get
+ {
+ if (selected_page_view != null)
+ return selected_page_view.page;
+ else
+ return null;
+ }
+ set
+ {
+ if (selected_page == value)
+ return;
+
+ if (value != null)
+ select_page_view (page_data.lookup (value));
+ else
+ select_page_view (null);
+ }
+ }
+
+ /* Widget being rendered to */
+ private Gtk.Widget drawing_area;
+
+ /* Horizontal scrollbar */
+ private Gtk.Scrollbar scroll;
+ private Gtk.Adjustment adjustment;
+
+ private Gdk.CursorType cursor;
+
+ public signal void page_selected (Page? page);
+ public signal void show_page (Page page);
+ public signal void show_menu ();
+
+ public int x_offset
+ {
+ get
+ {
+ return (int) adjustment.get_value ();
+ }
+ set
+ {
+ adjustment.value = value;
+ }
+ }
+
+ public BookView (Book book)
+ {
+ GLib.Object (orientation: Gtk.Orientation.VERTICAL);
+ this.book = book;
+
+ /* Load existing pages */
+ for (var i = 0; i < book.n_pages; i++)
+ {
+ Page page = book.get_page (i);
+ add_cb (book, page);
+ }
+
+ selected_page = book.get_page (0);
+
+ /* Watch for new pages */
+ book.page_added.connect (add_cb);
+ book.page_removed.connect (remove_cb);
+ book.reordered.connect (reorder_cb);
+ book.cleared.connect (clear_cb);
+
+ need_layout = true;
+ page_data = new HashTable<Page, PageView> (direct_hash, direct_equal);
+ cursor = Gdk.CursorType.ARROW;
+
+ drawing_area = new Gtk.DrawingArea ();
+ drawing_area.set_size_request (200, 100);
+ drawing_area.can_focus = true;
+ drawing_area.events = Gdk.EventMask.POINTER_MOTION_MASK | Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.FOCUS_CHANGE_MASK | Gdk.EventMask.STRUCTURE_MASK | Gdk.EventMask.SCROLL_MASK;
+ pack_start (drawing_area, true, true, 0);
+
+ scroll = new Gtk.Scrollbar (Gtk.Orientation.HORIZONTAL, null);
+ adjustment = scroll.adjustment;
+ pack_start (scroll, false, true, 0);
+
+ drawing_area.configure_event.connect (configure_cb);
+ drawing_area.draw.connect (draw_cb);
+ drawing_area.motion_notify_event.connect (motion_cb);
+ drawing_area.key_press_event.connect (key_cb);
+ drawing_area.button_press_event.connect (button_cb);
+ drawing_area.button_release_event.connect (button_cb);
+ drawing_area.focus_in_event.connect_after (focus_cb);
+ drawing_area.focus_out_event.connect_after (focus_cb);
+ adjustment.value_changed.connect (scroll_cb);
+
+ drawing_area.visible = true;
+ }
+
+ ~BookView ()
+ {
+ book.page_added.disconnect (add_cb);
+ book.page_removed.disconnect (remove_cb);
+ book.reordered.disconnect (reorder_cb);
+ book.cleared.disconnect (clear_cb);
+ drawing_area.configure_event.disconnect (configure_cb);
+ drawing_area.draw.disconnect (draw_cb);
+ drawing_area.motion_notify_event.disconnect (motion_cb);
+ drawing_area.key_press_event.disconnect (key_cb);
+ drawing_area.button_press_event.disconnect (button_cb);
+ drawing_area.button_release_event.disconnect (button_cb);
+ drawing_area.focus_in_event.disconnect (focus_cb);
+ drawing_area.focus_out_event.disconnect (focus_cb);
+ adjustment.value_changed.disconnect (scroll_cb);
+ }
+
+ private PageView get_nth_page (int n)
+ {
+ Page page = book.get_page (n);
+ return page_data.lookup (page);
+ }
+
+ private PageView get_next_page (PageView page)
+ {
+ for (var i = 0; ; i++)
+ {
+ var p = book.get_page (i);
+ if (p == null)
+ break;
+ if (p == page.page)
+ {
+ p = book.get_page (i + 1);
+ if (p != null)
+ return page_data.lookup (p);
+ }
+ }
+
+ return page;
+ }
+
+ private PageView get_prev_page (PageView page)
+ {
+ var prev_page = page;
+ for (var i = 0; ; i++)
+ {
+ var p = book.get_page (i);
+ if (p == null)
+ break;
+ if (p == page.page)
+ return prev_page;
+ prev_page = page_data.lookup (p);
+ }
+
+ return page;
+ }
+
+ private void page_view_changed_cb (PageView page)
+ {
+ redraw ();
+ }
+
+ private void page_view_size_changed_cb (PageView page)
+ {
+ need_layout = true;
+ redraw ();
+ }
+
+ private void add_cb (Book book, Page page)
+ {
+ var page_view = new PageView (page);
+ page_view.changed.connect (page_view_changed_cb);
+ page_view.size_changed.connect (page_view_size_changed_cb);
+ page_data.insert (page, page_view);
+ need_layout = true;
+ redraw ();
+ }
+
+ private void set_selected_page_view (PageView? page)
+ {
+ /* Deselect existing page if changed */
+ if (selected_page_view != null && page != selected_page_view)
+ selected_page_view.selected = true;
+
+ selected_page_view = page;
+ if (selected_page_view == null)
+ return;
+
+ /* Select new page if widget has focus */
+ if (!drawing_area.has_focus)
+ selected_page_view.selected = false;
+ else
+ selected_page_view.selected = true;
+ }
+
+ private void show_page_view (PageView? page)
+ {
+ if (page == null || !scroll.get_visible ())
+ return;
+
+ Gtk.Allocation allocation;
+ drawing_area.get_allocation (out allocation);
+ var left_edge = page.x_offset;
+ var right_edge = page.x_offset + page.width;
+
+ if (left_edge - x_offset < 0)
+ x_offset = left_edge;
+ else if (right_edge - x_offset > allocation.width)
+ x_offset = right_edge - allocation.width;
+ }
+
+ private void select_page_view (PageView? page)
+ {
+ Page? p = null;
+
+ if (selected_page_view == page)
+ return;
+
+ set_selected_page_view (page);
+
+ if (need_layout)
+ show_selected_page = true;
+ else
+ show_page_view (page);
+
+ if (page != null)
+ p = page.page;
+ page_selected (p);
+ }
+
+ private void remove_cb (Book book, Page page)
+ {
+ PageView new_selection = selected_page_view;
+
+ /* Select previous page or next if removing the selected page */
+ if (page == selected_page)
+ {
+ new_selection = get_prev_page (selected_page_view);
+ if (new_selection == selected_page_view)
+ new_selection = get_next_page (selected_page_view);
+ selected_page_view = null;
+ }
+
+ var page_view = page_data.lookup (page);
+ page_view.changed.disconnect (page_view_changed_cb);
+ page_view.size_changed.disconnect (page_view_size_changed_cb);
+ page_data.remove (page);
+
+ select_page_view (new_selection);
+
+ need_layout = true;
+ redraw ();
+ }
+
+ private void reorder_cb (Book book)
+ {
+ need_layout = true;
+ redraw ();
+ }
+
+ private void clear_cb (Book book)
+ {
+ page_data.remove_all ();
+ selected_page_view = null;
+ page_selected (null);
+ need_layout = true;
+ redraw ();
+ }
+
+ private bool configure_cb (Gtk.Widget widget, Gdk.EventConfigure event)
+ {
+ need_layout = true;
+ return false;
+ }
+
+ private void layout_into (int width, int height, out int book_width, out int book_height)
+ {
+ /* Get maximum page resolution */
+ int max_dpi = 0;
+ for (var i = 0; i < book.n_pages; i++)
+ {
+ var page = book.get_page (i);
+ if (page.dpi > max_dpi)
+ max_dpi = page.dpi;
+ }
+
+ /* Get area required to fit all pages */
+ int max_width = 0, max_height = 0;
+ for (var i = 0; i < book.n_pages; i++)
+ {
+ var page = book.get_page (i);
+ var w = page.width;
+ var h = page.height;
+
+ /* Scale to the same DPI */
+ w = (int) ((double)w * max_dpi / page.dpi + 0.5);
+ h = (int) ((double)h * max_dpi / page.dpi + 0.5);
+
+ if (w > max_width)
+ max_width = w;
+ if (h > max_height)
+ max_height = h;
+ }
+
+ var aspect = (double)width / height;
+ var max_aspect = (double)max_width / max_height;
+
+ /* Get total dimensions of all pages */
+ int spacing = 12;
+ book_width = 0;
+ book_height = 0;
+ for (var i = 0; i < book.n_pages; i++)
+ {
+ var page = get_nth_page (i);
+ var p = page.page;
+
+ /* NOTE: Using double to avoid overflow for large images */
+ if (max_aspect > aspect)
+ {
+ /* Set width scaled on DPI and maximum width */
+ int w = (int) ((double)p.width * max_dpi * width / (p.dpi * max_width));
+ page.width = w;
+ }
+ else
+ {
+ /* Set height scaled on DPI and maximum height */
+ int h = (int) ((double)p.height * max_dpi * height / (p.dpi * max_height));
+ page.height = h;
+ }
+
+ var h = page.height;
+ if (h > book_height)
+ book_height = h;
+ book_width += page.width;
+ if (i != 0)
+ book_width += spacing;
+ }
+
+ int x_offset = 0;
+ for (var i = 0; i < book.n_pages; i++)
+ {
+ var page = get_nth_page (i);
+
+ /* Layout pages left to right */
+ page.x_offset = x_offset;
+ x_offset += page.width + spacing;
+
+ /* Centre page vertically */
+ page.y_offset = (height - page.height) / 2;
+ }
+ }
+
+ private void layout ()
+ {
+ if (!need_layout)
+ return;
+
+ laying_out = true;
+
+ Gtk.Allocation allocation;
+ drawing_area.get_allocation(out allocation);
+ Gtk.Allocation box_allocation;
+ get_allocation(out box_allocation);
+
+ /* If scroll is right aligned then keep that after layout */
+ bool right_aligned = true;
+ if (adjustment.get_value () < adjustment.get_upper () - adjustment.get_page_size ())
+ right_aligned = false;
+
+ /* Try and fit without scrollbar */
+ var width = (int) allocation.width;
+ var height = (int) (box_allocation.height - get_border_width () * 2);
+ int book_width, book_height;
+ layout_into (width, height, out book_width, out book_height);
+
+ /* Relayout with scrollbar */
+ if (book_width > allocation.width)
+ {
+ /* Re-layout leaving space for scrollbar */
+ height = allocation.height;
+ layout_into (width, height, out book_width, out book_height);
+
+ /* Set scrollbar limits */
+ adjustment.lower = 0;
+ adjustment.upper = book_width;
+ adjustment.page_size = allocation.width;
+
+ /* Keep right-aligned */
+ var max_offset = book_width - allocation.width;
+ if (right_aligned || x_offset > max_offset)
+ x_offset = max_offset;
+
+ scroll.visible = true;
+ }
+ else
+ {
+ scroll.visible = false;
+ var offset = (book_width - allocation.width) / 2;
+ adjustment.lower = offset;
+ adjustment.upper = offset;
+ adjustment.page_size = 0;
+ x_offset = offset;
+ }
+
+ if (show_selected_page)
+ show_page_view (selected_page_view);
+
+ need_layout = false;
+ show_selected_page = false;
+ laying_out = false;
+ }
+
+ private bool draw_cb (Gtk.Widget widget, Cairo.Context context)
+ {
+ if (book.n_pages == 0)
+ return false;
+
+ layout ();
+
+ double left, top, right, bottom;
+ context.clip_extents (out left, out top, out right, out bottom);
+
+ /* Render each page */
+ for (var i = 0; i < book.n_pages; i++)
+ {
+ var page = get_nth_page (i);
+ var left_edge = page.x_offset - x_offset;
+ var right_edge = page.x_offset + page.width - x_offset;
+
+ /* Page not visible, don't render */
+ if (right_edge < left || left_edge > right)
+ continue;
+
+ context.save ();
+ context.translate (-x_offset, 0);
+ page.render (context);
+ context.restore ();
+
+ if (page.selected)
+ drawing_area.get_style_context ().render_focus (context,
+ page.x_offset - x_offset,
+ page.y_offset,
+ page.width,
+ page.height);
+ }
+
+ return false;
+ }
+
+ private PageView? get_page_at (int x, int y, out int x_, out int y_)
+ {
+ x_ = y_ = 0;
+ for (var i = 0; i < book.n_pages; i++)
+ {
+ var page = get_nth_page (i);
+ var left = page.x_offset;
+ var right = left + page.width;
+ var top = page.y_offset;
+ var bottom = top + page.height;
+ if (x >= left && x <= right && y >= top && y <= bottom)
+ {
+ x_ = x - left;
+ y_ = y - top;
+ return page;
+ }
+ }
+
+ return null;
+ }
+
+ private bool button_cb (Gtk.Widget widget, Gdk.EventButton event)
+ {
+ layout ();
+
+ drawing_area.grab_focus ();
+
+ int x = 0, y = 0;
+ if (event.type == Gdk.EventType.BUTTON_PRESS)
+ select_page_view (get_page_at ((int) (event.x + x_offset), (int) event.y, out x, out y));
+
+ if (selected_page_view == null)
+ return false;
+
+ /* Modify page */
+ if (event.button == 1)
+ {
+ if (event.type == Gdk.EventType.BUTTON_PRESS)
+ selected_page_view.button_press (x, y);
+ else if (event.type == Gdk.EventType.BUTTON_RELEASE)
+ selected_page_view.button_release (x, y);
+ else if (event.type == Gdk.EventType.2BUTTON_PRESS)
+ show_page (selected_page);
+ }
+
+ /* Show pop-up menu on right click */
+ if (event.button == 3)
+ show_menu ();
+
+ return false;
+ }
+
+ private void set_cursor (Gdk.CursorType cursor)
+ {
+ Gdk.Cursor c;
+
+ if (this.cursor == cursor)
+ return;
+ this.cursor = cursor;
+
+ c = new Gdk.Cursor (cursor);
+ drawing_area.get_window ().set_cursor (c);
+ }
+
+ private bool motion_cb (Gtk.Widget widget, Gdk.EventMotion event)
+ {
+ Gdk.CursorType cursor = Gdk.CursorType.ARROW;
+
+ /* Dragging */
+ if (selected_page_view != null && (event.state & Gdk.ModifierType.BUTTON1_MASK) != 0)
+ {
+ var x = (int) (event.x + x_offset - selected_page_view.x_offset);
+ var y = (int) (event.y - selected_page_view.y_offset);
+ selected_page_view.motion (x, y);
+ cursor = selected_page_view.cursor;
+ }
+ else
+ {
+ int x, y;
+ var over_page = get_page_at ((int) (event.x + x_offset), (int) event.y, out x, out y);
+ if (over_page != null)
+ {
+ over_page.motion (x, y);
+ cursor = over_page.cursor;
+ }
+ }
+
+ set_cursor (cursor);
+
+ return false;
+ }
+
+ private bool key_cb (Gtk.Widget widget, Gdk.EventKey event)
+ {
+ switch (event.keyval)
+ {
+ case 0xff50: /* FIXME: GDK_Home */
+ selected_page = book.get_page (0);
+ return true;
+ case 0xff51: /* FIXME: GDK_Left */
+ select_page_view (get_prev_page (selected_page_view));
+ return true;
+ case 0xff53: /* FIXME: GDK_Right */
+ select_page_view (get_next_page (selected_page_view));
+ return true;
+ case 0xFF57: /* FIXME: GDK_End */
+ selected_page = book.get_page ((int) book.n_pages - 1);
+ return true;
+
+ default:
+ return false;
+ }
+ }
+
+ private bool focus_cb (Gtk.Widget widget, Gdk.EventFocus event)
+ {
+ set_selected_page_view (selected_page_view);
+ return false;
+ }
+
+ private void scroll_cb (Gtk.Adjustment adjustment)
+ {
+ if (!laying_out)
+ redraw ();
+ }
+
+ public void redraw ()
+ {
+ drawing_area.queue_draw ();
+ }
+
+ public void select_next_page ()
+ {
+ select_page_view (get_next_page (selected_page_view));
+ }
+
+ public void select_prev_page ()
+ {
+ select_page_view (get_prev_page (selected_page_view));
+ }
+}
diff --git a/src/book.c b/src/book.c
new file mode 100644
index 0000000..45fd555
--- /dev/null
+++ b/src/book.c
@@ -0,0 +1,5628 @@
+/* book.c generated by valac 0.24.0, the Vala compiler
+ * generated from book.vala, do not modify */
+
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+#include <cairo.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <float.h>
+#include <math.h>
+#include <gdk/gdk.h>
+#include <cairo-ps.h>
+#include <zlib.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_BOOK (book_get_type ())
+#define BOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOK, Book))
+#define BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOK, BookClass))
+#define IS_BOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOK))
+#define IS_BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOK))
+#define BOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOK, BookClass))
+
+typedef struct _Book Book;
+typedef struct _BookClass BookClass;
+typedef struct _BookPrivate BookPrivate;
+
+#define TYPE_PAGE (page_get_type ())
+#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
+#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
+#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
+#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
+#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))
+
+typedef struct _Page Page;
+typedef struct _PageClass PageClass;
+#define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL)))
+#define __g_list_free__page_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__page_unref0_ (var), NULL)))
+#define _g_byte_array_unref0(var) ((var == NULL) ? NULL : (var = (g_byte_array_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))
+
+#define TYPE_PS_WRITER (ps_writer_get_type ())
+#define PS_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PS_WRITER, PsWriter))
+#define PS_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PS_WRITER, PsWriterClass))
+#define IS_PS_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PS_WRITER))
+#define IS_PS_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PS_WRITER))
+#define PS_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PS_WRITER, PsWriterClass))
+
+typedef struct _PsWriter PsWriter;
+typedef struct _PsWriterClass PsWriterClass;
+typedef struct _PsWriterPrivate PsWriterPrivate;
+#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))
+#define _ps_writer_unref0(var) ((var == NULL) ? NULL : (var = (ps_writer_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+
+#define TYPE_PDF_WRITER (pdf_writer_get_type ())
+#define PDF_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PDF_WRITER, PDFWriter))
+#define PDF_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PDF_WRITER, PDFWriterClass))
+#define IS_PDF_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PDF_WRITER))
+#define IS_PDF_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PDF_WRITER))
+#define PDF_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PDF_WRITER, PDFWriterClass))
+
+typedef struct _PDFWriter PDFWriter;
+typedef struct _PDFWriterClass PDFWriterClass;
+typedef struct _PDFWriterPrivate PDFWriterPrivate;
+#define _pdf_writer_unref0(var) ((var == NULL) ? NULL : (var = (pdf_writer_unref (var), NULL)))
+typedef struct _ParamSpecBook ParamSpecBook;
+#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
+typedef struct _ParamSpecPDFWriter ParamSpecPDFWriter;
+typedef struct _ParamSpecPsWriter ParamSpecPsWriter;
+
+struct _Book {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ BookPrivate * priv;
+};
+
+struct _BookClass {
+ GTypeClass parent_class;
+ void (*finalize) (Book *self);
+};
+
+struct _BookPrivate {
+ GList* pages;
+ gboolean needs_saving_;
+ GByteArray* jpeg_data;
+};
+
+struct _PsWriter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PsWriterPrivate * priv;
+ cairo_surface_t* surface;
+ GFileOutputStream* stream;
+};
+
+struct _PsWriterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PsWriter *self);
+};
+
+struct _PDFWriter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PDFWriterPrivate * priv;
+ gsize offset;
+ GList* object_offsets;
+};
+
+struct _PDFWriterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PDFWriter *self);
+};
+
+struct _ParamSpecBook {
+ GParamSpec parent_instance;
+};
+
+struct _PDFWriterPrivate {
+ GFileOutputStream* stream;
+};
+
+struct _ParamSpecPDFWriter {
+ GParamSpec parent_instance;
+};
+
+struct _ParamSpecPsWriter {
+ GParamSpec parent_instance;
+};
+
+
+static gpointer book_parent_class = NULL;
+static gpointer pdf_writer_parent_class = NULL;
+static gpointer ps_writer_parent_class = NULL;
+
+gpointer book_ref (gpointer instance);
+void book_unref (gpointer instance);
+GParamSpec* param_spec_book (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_book (GValue* value, gpointer v_object);
+void value_take_book (GValue* value, gpointer v_object);
+gpointer value_get_book (const GValue* value);
+GType book_get_type (void) G_GNUC_CONST;
+gpointer page_ref (gpointer instance);
+void page_unref (gpointer instance);
+GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_page (GValue* value, gpointer v_object);
+void value_take_page (GValue* value, gpointer v_object);
+gpointer value_get_page (const GValue* value);
+GType page_get_type (void) G_GNUC_CONST;
+#define BOOK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_BOOK, BookPrivate))
+enum {
+ BOOK_DUMMY_PROPERTY
+};
+static void book_page_changed_cb (Book* self, Page* page);
+static void _book_page_changed_cb_page_pixels_changed (Page* _sender, gpointer self);
+static void _book_page_changed_cb_page_crop_changed (Page* _sender, gpointer self);
+static void _page_unref0_ (gpointer var);
+static void _g_list_free__page_unref0_ (GList* self);
+Book* book_new (void);
+Book* book_construct (GType object_type);
+void book_clear (Book* self);
+void book_set_needs_saving (Book* self, gboolean value);
+void book_append_page (Book* self, Page* page);
+void book_move_page (Book* self, Page* page, guint location);
+void book_reverse (Book* self);
+void book_combine_sides (Book* self);
+guint book_get_n_pages (Book* self);
+void book_combine_sides_reverse (Book* self);
+void book_delete_page (Book* self, Page* page);
+Page* book_get_page (Book* self, gint page_number);
+guint book_get_page_index (Book* self, Page* page);
+static GFile* book_make_indexed_file (Book* self, const gchar* uri, gint i);
+static void book_save_multi_file (Book* self, const gchar* type, gint quality, GFile* file, GError** error);
+void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError** error);
+static void book_save_ps_pdf_surface (Book* self, cairo_surface_t* surface, GdkPixbuf* image, gdouble dpi);
+static void book_save_ps (Book* self, GFile* file, GError** error);
+gpointer ps_writer_ref (gpointer instance);
+void ps_writer_unref (gpointer instance);
+GParamSpec* param_spec_ps_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_ps_writer (GValue* value, gpointer v_object);
+void value_take_ps_writer (GValue* value, gpointer v_object);
+gpointer value_get_ps_writer (const GValue* value);
+GType ps_writer_get_type (void) G_GNUC_CONST;
+PsWriter* ps_writer_new (GFileOutputStream* stream);
+PsWriter* ps_writer_construct (GType object_type, GFileOutputStream* stream);
+GdkPixbuf* page_get_image (Page* self, gboolean apply_crop);
+gint page_get_dpi (Page* self);
+static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, int* result_length1);
+static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, gint dpi, int* result_length1);
+static gboolean book_write_pixbuf_data (Book* self, guint8* buf, int buf_length1, GError** error);
+static gboolean _book_write_pixbuf_data_gdk_pixbuf_save_func (guint8* buf, gsize buf_length1, GError** error, gpointer self);
+static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error);
+gpointer pdf_writer_ref (gpointer instance);
+void pdf_writer_unref (gpointer instance);
+GParamSpec* param_spec_pdf_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_pdf_writer (GValue* value, gpointer v_object);
+void value_take_pdf_writer (GValue* value, gpointer v_object);
+gpointer value_get_pdf_writer (const GValue* value);
+GType pdf_writer_get_type (void) G_GNUC_CONST;
+PDFWriter* pdf_writer_new (GFileOutputStream* stream);
+PDFWriter* pdf_writer_construct (GType object_type, GFileOutputStream* stream);
+void pdf_writer_write_string (PDFWriter* self, const gchar* text);
+guint pdf_writer_start_object (PDFWriter* self);
+gboolean page_get_is_color (Page* self);
+gint page_get_depth (Page* self);
+static guint8* _vala_array_dup1 (guint8* self, int length);
+static guint8* _vala_array_dup2 (guint8* self, int length);
+void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1);
+void book_save (Book* self, const gchar* type, gint quality, GFile* file, GError** error);
+gboolean book_get_needs_saving (Book* self);
+static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
+static void book_finalize (Book* obj);
+#define PDF_WRITER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PDF_WRITER, PDFWriterPrivate))
+enum {
+ PDF_WRITER_DUMMY_PROPERTY
+};
+static void pdf_writer_finalize (PDFWriter* obj);
+enum {
+ PS_WRITER_DUMMY_PROPERTY
+};
+static cairo_status_t ps_writer_write_cairo_data (PsWriter* self, guint8* data, int data_length1);
+static cairo_status_t _ps_writer_write_cairo_data_cairo_write_func_t (gpointer self, guchar* data, int data_length1);
+static void ps_writer_finalize (PsWriter* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+
+static gpointer _page_ref0 (gpointer self) {
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return self ? page_ref (self) : NULL;
+#line 247 "book.c"
+}
+
+
+static void _book_page_changed_cb_page_pixels_changed (Page* _sender, gpointer self) {
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_page_changed_cb ((Book*) self, _sender);
+#line 254 "book.c"
+}
+
+
+static void _book_page_changed_cb_page_crop_changed (Page* _sender, gpointer self) {
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_page_changed_cb ((Book*) self, _sender);
+#line 261 "book.c"
+}
+
+
+static void _page_unref0_ (gpointer var) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ (var == NULL) ? NULL : (var = (page_unref (var), NULL));
+#line 268 "book.c"
+}
+
+
+static void _g_list_free__page_unref0_ (GList* self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_list_foreach (self, (GFunc) _page_unref0_, NULL);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_list_free (self);
+#line 277 "book.c"
+}
+
+
+Book* book_construct (GType object_type) {
+ Book* self = NULL;
+#line 38 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self = (Book*) g_type_create_instance (object_type);
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ __g_list_free__page_unref0_0 (self->priv->pages);
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->pages = NULL;
+#line 38 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return self;
+#line 291 "book.c"
+}
+
+
+Book* book_new (void) {
+#line 38 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return book_construct (TYPE_BOOK);
+#line 298 "book.c"
+}
+
+
+void book_clear (Book* self) {
+ GList* _tmp0_ = NULL;
+#line 52 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->priv->pages;
+#line 308 "book.c"
+ {
+ GList* page_collection = NULL;
+ GList* page_it = NULL;
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_collection = _tmp0_;
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ for (page_it = page_collection; page_it != NULL; page_it = page_it->next) {
+#line 316 "book.c"
+ Page* _tmp1_ = NULL;
+ Page* page = NULL;
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = _page_ref0 ((Page*) page_it->data);
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page = _tmp1_;
+#line 323 "book.c"
+ {
+ Page* _tmp2_ = NULL;
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = page;
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_parse_name ("pixels-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE);
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _book_page_changed_cb_page_pixels_changed, self);
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = page;
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_parse_name ("crop-changed", TYPE_PAGE, &_tmp5_, NULL, FALSE);
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _book_page_changed_cb_page_crop_changed, self);
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_unref0 (page);
+#line 343 "book.c"
+ }
+ }
+ }
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ __g_list_free__page_unref0_0 (self->priv->pages);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->pages = NULL;
+#line 60 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "cleared");
+#line 353 "book.c"
+}
+
+
+static void book_page_changed_cb (Book* self, Page* page) {
+#line 63 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 63 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (page != NULL);
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_set_needs_saving (self, TRUE);
+#line 364 "book.c"
+}
+
+
+void book_append_page (Book* self, Page* page) {
+ Page* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (page != NULL);
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = page;
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_connect (_tmp0_, "pixels-changed", (GCallback) _book_page_changed_cb_page_pixels_changed, self);
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = page;
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_connect (_tmp1_, "crop-changed", (GCallback) _book_page_changed_cb_page_crop_changed, self);
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = page;
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = _page_ref0 (_tmp2_);
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->pages = g_list_append (self->priv->pages, _tmp3_);
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = page;
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "page-added", _tmp4_);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_set_needs_saving (self, TRUE);
+#line 398 "book.c"
+}
+
+
+void book_move_page (Book* self, Page* page, guint location) {
+ Page* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ guint _tmp3_ = 0U;
+#line 78 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 78 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (page != NULL);
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = page;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->pages = g_list_remove (self->priv->pages, _tmp0_);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = page;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = _page_ref0 (_tmp1_);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = location;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->pages = g_list_insert (self->priv->pages, _tmp2_, (gint) _tmp3_);
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "reordered");
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_set_needs_saving (self, TRUE);
+#line 427 "book.c"
+}
+
+
+void book_reverse (Book* self) {
+ GList* new_pages = NULL;
+ GList* _tmp0_ = NULL;
+ GList* _tmp4_ = NULL;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 88 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = NULL;
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->priv->pages;
+#line 441 "book.c"
+ {
+ GList* page_collection = NULL;
+ GList* page_it = NULL;
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_collection = _tmp0_;
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ for (page_it = page_collection; page_it != NULL; page_it = page_it->next) {
+#line 449 "book.c"
+ Page* _tmp1_ = NULL;
+ Page* page = NULL;
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = _page_ref0 ((Page*) page_it->data);
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page = _tmp1_;
+#line 456 "book.c"
+ {
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = page;
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = _page_ref0 (_tmp2_);
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = g_list_prepend (new_pages, _tmp3_);
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_unref0 (page);
+#line 468 "book.c"
+ }
+ }
+ }
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = new_pages;
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = NULL;
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ __g_list_free__page_unref0_0 (self->priv->pages);
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->pages = _tmp4_;
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "reordered");
+#line 94 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_set_needs_saving (self, TRUE);
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ __g_list_free__page_unref0_0 (new_pages);
+#line 486 "book.c"
+}
+
+
+void book_combine_sides (Book* self) {
+ guint n_front = 0U;
+ guint _tmp0_ = 0U;
+ guint _tmp1_ = 0U;
+ guint _tmp2_ = 0U;
+ guint _tmp3_ = 0U;
+ GList* new_pages = NULL;
+ GList* _tmp19_ = NULL;
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = book_get_n_pages (self);
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = _tmp0_;
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = book_get_n_pages (self);
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = _tmp2_;
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ n_front = _tmp1_ - (_tmp3_ / 2);
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = NULL;
+#line 512 "book.c"
+ {
+ gint i = 0;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = 0;
+#line 517 "book.c"
+ {
+ gboolean _tmp4_ = FALSE;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = TRUE;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 524 "book.c"
+ gint _tmp6_ = 0;
+ guint _tmp7_ = 0U;
+ guint _tmp8_ = 0U;
+ gint _tmp9_ = 0;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp4_) {
+#line 531 "book.c"
+ gint _tmp5_ = 0;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = i;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp5_ + 1;
+#line 537 "book.c"
+ }
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = FALSE;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = i;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = book_get_n_pages (self);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = _tmp7_;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(((guint) _tmp6_) < _tmp8_)) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 551 "book.c"
+ }
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = i;
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if ((_tmp9_ % 2) == 0) {
+#line 557 "book.c"
+ GList* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ gconstpointer _tmp12_ = NULL;
+ Page* _tmp13_ = NULL;
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10_ = self->priv->pages;
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp11_ = i;
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp12_ = g_list_nth_data (_tmp10_, (guint) (_tmp11_ / 2));
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_ = _page_ref0 ((Page*) _tmp12_);
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = g_list_append (new_pages, _tmp13_);
+#line 572 "book.c"
+ } else {
+ GList* _tmp14_ = NULL;
+ guint _tmp15_ = 0U;
+ gint _tmp16_ = 0;
+ gconstpointer _tmp17_ = NULL;
+ Page* _tmp18_ = NULL;
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp14_ = self->priv->pages;
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_ = n_front;
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp16_ = i;
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp17_ = g_list_nth_data (_tmp14_, _tmp15_ + (_tmp16_ / 2));
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp18_ = _page_ref0 ((Page*) _tmp17_);
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = g_list_append (new_pages, _tmp18_);
+#line 591 "book.c"
+ }
+ }
+ }
+ }
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp19_ = new_pages;
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = NULL;
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ __g_list_free__page_unref0_0 (self->priv->pages);
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->pages = _tmp19_;
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "reordered");
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_set_needs_saving (self, TRUE);
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ __g_list_free__page_unref0_0 (new_pages);
+#line 610 "book.c"
+}
+
+
+void book_combine_sides_reverse (Book* self) {
+ GList* new_pages = NULL;
+ GList* _tmp16_ = NULL;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = NULL;
+#line 621 "book.c"
+ {
+ gint i = 0;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = 0;
+#line 626 "book.c"
+ {
+ gboolean _tmp0_ = FALSE;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = TRUE;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 633 "book.c"
+ gint _tmp2_ = 0;
+ guint _tmp3_ = 0U;
+ guint _tmp4_ = 0U;
+ gint _tmp5_ = 0;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp0_) {
+#line 640 "book.c"
+ gint _tmp1_ = 0;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = i;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp1_ + 1;
+#line 646 "book.c"
+ }
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = FALSE;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = i;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = book_get_n_pages (self);
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = _tmp3_;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(((guint) _tmp2_) < _tmp4_)) {
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 660 "book.c"
+ }
+#line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = i;
+#line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if ((_tmp5_ % 2) == 0) {
+#line 666 "book.c"
+ GList* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gconstpointer _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = self->priv->pages;
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = i;
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = g_list_nth_data (_tmp6_, (guint) (_tmp7_ / 2));
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = _page_ref0 ((Page*) _tmp8_);
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = g_list_append (new_pages, _tmp9_);
+#line 681 "book.c"
+ } else {
+ GList* _tmp10_ = NULL;
+ guint _tmp11_ = 0U;
+ guint _tmp12_ = 0U;
+ gint _tmp13_ = 0;
+ gconstpointer _tmp14_ = NULL;
+ Page* _tmp15_ = NULL;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10_ = self->priv->pages;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp11_ = book_get_n_pages (self);
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp12_ = _tmp11_;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_ = i;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp14_ = g_list_nth_data (_tmp10_, (_tmp12_ - 1) - (_tmp13_ / 2));
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_ = _page_ref0 ((Page*) _tmp14_);
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = g_list_append (new_pages, _tmp15_);
+#line 703 "book.c"
+ }
+ }
+ }
+ }
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp16_ = new_pages;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ new_pages = NULL;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ __g_list_free__page_unref0_0 (self->priv->pages);
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->pages = _tmp16_;
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "reordered");
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_set_needs_saving (self, TRUE);
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ __g_list_free__page_unref0_0 (new_pages);
+#line 722 "book.c"
+}
+
+
+void book_delete_page (Book* self, Page* page) {
+ Page* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+ Page* _tmp2_ = NULL;
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (page != NULL);
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = page;
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_parse_name ("pixels-changed", TYPE_PAGE, &_tmp1_, NULL, FALSE);
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _book_page_changed_cb_page_pixels_changed, self);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = page;
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_parse_name ("crop-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _book_page_changed_cb_page_crop_changed, self);
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = page;
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->pages = g_list_remove (self->priv->pages, _tmp4_);
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = page;
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "page-removed", _tmp5_);
+#line 136 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_set_needs_saving (self, TRUE);
+#line 759 "book.c"
+}
+
+
+Page* book_get_page (Book* self, gint page_number) {
+ Page* result = NULL;
+ gint _tmp0_ = 0;
+ GList* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gconstpointer _tmp6_ = NULL;
+ Page* _tmp7_ = NULL;
+#line 139 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = page_number;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp0_ < 0) {
+#line 776 "book.c"
+ GList* _tmp1_ = NULL;
+ guint _tmp2_ = 0U;
+ gint _tmp3_ = 0;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = self->priv->pages;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = g_list_length (_tmp1_);
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = page_number;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_number = ((gint) _tmp2_) + _tmp3_;
+#line 788 "book.c"
+ }
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = self->priv->pages;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = page_number;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = g_list_nth_data (_tmp4_, (guint) _tmp5_);
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = _page_ref0 ((Page*) _tmp6_);
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp7_;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 802 "book.c"
+}
+
+
+guint book_get_page_index (Book* self, Page* page) {
+ guint result = 0U;
+ GList* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, 0U);
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (page != NULL, 0U);
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->priv->pages;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = page;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = g_list_index (_tmp0_, _tmp1_);
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = (guint) _tmp2_;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 825 "book.c"
+}
+
+
+static gint string_last_index_of_char (const gchar* self, gunichar c, gint start_index) {
+ gint result = 0;
+ gchar* _result_ = NULL;
+ gint _tmp0_ = 0;
+ gunichar _tmp1_ = 0U;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 930 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, 0);
+#line 931 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = start_index;
+#line 931 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = c;
+#line 931 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) (-1), _tmp1_);
+#line 931 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _result_ = _tmp2_;
+#line 933 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = _result_;
+#line 933 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp3_ != NULL) {
+#line 850 "book.c"
+ gchar* _tmp4_ = NULL;
+#line 934 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = _result_;
+#line 934 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = (gint) (_tmp4_ - ((gchar*) self));
+#line 934 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 858 "book.c"
+ } else {
+#line 936 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = -1;
+#line 936 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 864 "book.c"
+ }
+}
+
+
+static gchar* string_slice (const gchar* self, glong start, glong end) {
+ gchar* result = NULL;
+ glong string_length = 0L;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ glong _tmp2_ = 0L;
+ glong _tmp5_ = 0L;
+ gboolean _tmp8_ = FALSE;
+ glong _tmp9_ = 0L;
+ gboolean _tmp12_ = FALSE;
+ glong _tmp13_ = 0L;
+ glong _tmp16_ = 0L;
+ glong _tmp17_ = 0L;
+ glong _tmp18_ = 0L;
+ glong _tmp19_ = 0L;
+ glong _tmp20_ = 0L;
+ gchar* _tmp21_ = NULL;
+#line 1226 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1227 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = strlen (self);
+#line 1227 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = _tmp0_;
+#line 1227 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ string_length = (glong) _tmp1_;
+#line 1228 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = start;
+#line 1228 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp2_ < ((glong) 0)) {
+#line 898 "book.c"
+ glong _tmp3_ = 0L;
+ glong _tmp4_ = 0L;
+#line 1229 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = string_length;
+#line 1229 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = start;
+#line 1229 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ start = _tmp3_ + _tmp4_;
+#line 907 "book.c"
+ }
+#line 1231 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = end;
+#line 1231 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp5_ < ((glong) 0)) {
+#line 913 "book.c"
+ glong _tmp6_ = 0L;
+ glong _tmp7_ = 0L;
+#line 1232 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp6_ = string_length;
+#line 1232 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp7_ = end;
+#line 1232 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ end = _tmp6_ + _tmp7_;
+#line 922 "book.c"
+ }
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp9_ = start;
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp9_ >= ((glong) 0)) {
+#line 928 "book.c"
+ glong _tmp10_ = 0L;
+ glong _tmp11_ = 0L;
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp10_ = start;
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp11_ = string_length;
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp8_ = _tmp10_ <= _tmp11_;
+#line 937 "book.c"
+ } else {
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp8_ = FALSE;
+#line 941 "book.c"
+ }
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp8_, NULL);
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp13_ = end;
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp13_ >= ((glong) 0)) {
+#line 949 "book.c"
+ glong _tmp14_ = 0L;
+ glong _tmp15_ = 0L;
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp14_ = end;
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp15_ = string_length;
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp12_ = _tmp14_ <= _tmp15_;
+#line 958 "book.c"
+ } else {
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp12_ = FALSE;
+#line 962 "book.c"
+ }
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp12_, NULL);
+#line 1236 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp16_ = start;
+#line 1236 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp17_ = end;
+#line 1236 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp18_ = start;
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp19_ = end;
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp20_ = start;
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp21_;
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 984 "book.c"
+}
+
+
+static GFile* book_make_indexed_file (Book* self, const gchar* uri, gint i) {
+ GFile* result = NULL;
+ guint _tmp0_ = 0U;
+ guint _tmp1_ = 0U;
+ gchar* basename = NULL;
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gchar* prefix = NULL;
+ const gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gchar* suffix = NULL;
+ gchar* _tmp8_ = NULL;
+ gint extension_index = 0;
+ const gchar* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint width = 0;
+ guint _tmp26_ = 0U;
+ guint _tmp27_ = 0U;
+ gchar* _tmp28_ = NULL;
+ gchar* _tmp29_ = NULL;
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+ gint _tmp32_ = 0;
+ gchar* number_format = NULL;
+ gint _tmp33_ = 0;
+ gchar* _tmp34_ = NULL;
+ gchar* filename = NULL;
+ const gchar* _tmp35_ = NULL;
+ gchar* _tmp36_ = NULL;
+ gchar* _tmp37_ = NULL;
+ const gchar* _tmp38_ = NULL;
+ gint _tmp39_ = 0;
+ gchar* _tmp40_ = NULL;
+ gchar* _tmp41_ = NULL;
+ gchar* _tmp42_ = NULL;
+ gchar* _tmp43_ = NULL;
+ const gchar* _tmp44_ = NULL;
+ gchar* _tmp45_ = NULL;
+ gchar* _tmp46_ = NULL;
+ const gchar* _tmp47_ = NULL;
+ GFile* _tmp48_ = NULL;
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (uri != NULL, NULL);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = book_get_n_pages (self);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = _tmp0_;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp1_ == ((guint) 1)) {
+#line 1040 "book.c"
+ const gchar* _tmp2_ = NULL;
+ GFile* _tmp3_ = NULL;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = uri;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = g_file_new_for_uri (_tmp2_);
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp3_;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 1051 "book.c"
+ }
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = uri;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = g_path_get_basename (_tmp4_);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ basename = _tmp5_;
+#line 158 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = uri;
+#line 158 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = g_strdup (_tmp6_);
+#line 158 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ prefix = _tmp7_;
+#line 158 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = g_strdup ("");
+#line 158 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ suffix = _tmp8_;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = basename;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10_ = string_last_index_of_char (_tmp9_, (gunichar) '.', 0);
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ extension_index = _tmp10_;
+#line 160 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp11_ = extension_index;
+#line 160 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp11_ >= 0) {
+#line 1079 "book.c"
+ const gchar* _tmp12_ = NULL;
+ gint _tmp13_ = 0;
+ const gchar* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gchar* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+ const gchar* _tmp19_ = NULL;
+ gint _tmp20_ = 0;
+ gint _tmp21_ = 0;
+ const gchar* _tmp22_ = NULL;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ gchar* _tmp25_ = NULL;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp12_ = basename;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_ = extension_index;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp14_ = basename;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_ = strlen (_tmp14_);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp16_ = _tmp15_;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp17_ = string_slice (_tmp12_, (glong) _tmp13_, (glong) _tmp16_);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (suffix);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ suffix = _tmp17_;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp18_ = uri;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp19_ = uri;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp20_ = strlen (_tmp19_);
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp21_ = _tmp20_;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp22_ = suffix;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp23_ = strlen (_tmp22_);
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp24_ = _tmp23_;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp25_ = string_slice (_tmp18_, (glong) 0, (glong) (_tmp21_ - _tmp24_));
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (prefix);
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ prefix = _tmp25_;
+#line 1130 "book.c"
+ }
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp26_ = book_get_n_pages (self);
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp27_ = _tmp26_;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp28_ = g_strdup_printf ("%u", _tmp27_);
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp29_ = _tmp28_;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp30_ = strlen (_tmp29_);
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp31_ = _tmp30_;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp32_ = _tmp31_;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp29_);
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ width = _tmp32_;
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp33_ = width;
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp34_ = g_strdup_printf ("%%0%dd", _tmp33_);
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ number_format = _tmp34_;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp35_ = prefix;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp36_ = g_strconcat (_tmp35_, "-", NULL);
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp37_ = _tmp36_;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp38_ = number_format;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp39_ = i;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp40_ = g_strdup_printf (_tmp38_, _tmp39_ + 1);
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp41_ = _tmp40_;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp42_ = g_strconcat (_tmp37_, _tmp41_, NULL);
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp43_ = _tmp42_;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp44_ = suffix;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp45_ = g_strconcat (_tmp43_, _tmp44_, NULL);
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp46_ = _tmp45_;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp43_);
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp41_);
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp37_);
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ filename = _tmp46_;
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp47_ = filename;
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp48_ = g_file_new_for_uri (_tmp47_);
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp48_;
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (filename);
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (number_format);
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (suffix);
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (prefix);
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (basename);
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 1206 "book.c"
+}
+
+
+static void book_save_multi_file (Book* self, const gchar* type, gint quality, GFile* file, GError** error) {
+ GError * _inner_error_ = NULL;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (type != NULL);
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (file != NULL);
+#line 1218 "book.c"
+ {
+ gint i = 0;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = 0;
+#line 1223 "book.c"
+ {
+ gboolean _tmp0_ = FALSE;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = TRUE;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 1230 "book.c"
+ gint _tmp2_ = 0;
+ guint _tmp3_ = 0U;
+ guint _tmp4_ = 0U;
+ Page* page = NULL;
+ gint _tmp5_ = 0;
+ Page* _tmp6_ = NULL;
+ Page* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ GFile* _tmp10_ = NULL;
+ gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ gint _tmp13_ = 0;
+ GFile* _tmp14_ = NULL;
+ GFile* _tmp15_ = NULL;
+ gint _tmp16_ = 0;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp0_) {
+#line 1249 "book.c"
+ gint _tmp1_ = 0;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = i;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp1_ + 1;
+#line 1255 "book.c"
+ }
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = FALSE;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = i;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = book_get_n_pages (self);
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = _tmp3_;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(((guint) _tmp2_) < _tmp4_)) {
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 1269 "book.c"
+ }
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = i;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = book_get_page (self, _tmp5_);
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page = _tmp6_;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = page;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = type;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = quality;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10_ = file;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp11_ = g_file_get_uri (_tmp10_);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp12_ = _tmp11_;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_ = i;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp14_ = book_make_indexed_file (self, _tmp12_, _tmp13_);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_ = _tmp14_;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_save (_tmp7_, _tmp8_, _tmp9_, _tmp15_, &_inner_error_);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (_tmp15_);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp12_);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_propagate_error (error, _inner_error_);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_unref0 (page);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return;
+#line 1309 "book.c"
+ }
+#line 177 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp16_ = i;
+#line 177 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "saving", _tmp16_);
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_unref0 (page);
+#line 1317 "book.c"
+ }
+ }
+ }
+}
+
+
+static void book_save_ps_pdf_surface (Book* self, cairo_surface_t* surface, GdkPixbuf* image, gdouble dpi) {
+ cairo_t* context = NULL;
+ cairo_surface_t* _tmp0_ = NULL;
+ cairo_t* _tmp1_ = NULL;
+ gdouble _tmp2_ = 0.0;
+ gdouble _tmp3_ = 0.0;
+ GdkPixbuf* _tmp4_ = NULL;
+ cairo_pattern_t* _tmp5_ = NULL;
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (surface != NULL);
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (image != NULL);
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = surface;
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = cairo_create (_tmp0_);
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ context = _tmp1_;
+#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = dpi;
+#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = dpi;
+#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ cairo_scale (context, 72.0 / _tmp2_, 72.0 / _tmp3_);
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = image;
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ gdk_cairo_set_source_pixbuf (context, _tmp4_, (gdouble) 0, (gdouble) 0);
+#line 186 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = cairo_get_source (context);
+#line 186 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ cairo_pattern_set_filter (_tmp5_, CAIRO_FILTER_BEST);
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ cairo_paint (context);
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _cairo_destroy0 (context);
+#line 1362 "book.c"
+}
+
+
+static gpointer _cairo_surface_reference0 (gpointer self) {
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return self ? cairo_surface_reference (self) : NULL;
+#line 1369 "book.c"
+}
+
+
+static void book_save_ps (Book* self, GFile* file, GError** error) {
+ GFileOutputStream* stream = NULL;
+ GFile* _tmp0_ = NULL;
+ GFileOutputStream* _tmp1_ = NULL;
+ PsWriter* writer = NULL;
+ PsWriter* _tmp2_ = NULL;
+ cairo_surface_t* surface = NULL;
+ PsWriter* _tmp3_ = NULL;
+ cairo_surface_t* _tmp4_ = NULL;
+ cairo_surface_t* _tmp5_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (file != NULL);
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = file;
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = g_file_replace (_tmp0_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &_inner_error_);
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ stream = _tmp1_;
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_propagate_error (error, _inner_error_);
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return;
+#line 1400 "book.c"
+ }
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = ps_writer_new (stream);
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ writer = _tmp2_;
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = writer;
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = _tmp3_->surface;
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = _cairo_surface_reference0 (_tmp4_);
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ surface = _tmp5_;
+#line 1414 "book.c"
+ {
+ gint i = 0;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = 0;
+#line 1419 "book.c"
+ {
+ gboolean _tmp6_ = FALSE;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = TRUE;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 1426 "book.c"
+ gint _tmp8_ = 0;
+ guint _tmp9_ = 0U;
+ guint _tmp10_ = 0U;
+ Page* page = NULL;
+ gint _tmp11_ = 0;
+ Page* _tmp12_ = NULL;
+ GdkPixbuf* image = NULL;
+ Page* _tmp13_ = NULL;
+ GdkPixbuf* _tmp14_ = NULL;
+ gdouble width = 0.0;
+ GdkPixbuf* _tmp15_ = NULL;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+ Page* _tmp18_ = NULL;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ gdouble height = 0.0;
+ GdkPixbuf* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ gint _tmp23_ = 0;
+ Page* _tmp24_ = NULL;
+ gint _tmp25_ = 0;
+ gint _tmp26_ = 0;
+ cairo_surface_t* _tmp27_ = NULL;
+ gdouble _tmp28_ = 0.0;
+ gdouble _tmp29_ = 0.0;
+ cairo_surface_t* _tmp30_ = NULL;
+ GdkPixbuf* _tmp31_ = NULL;
+ Page* _tmp32_ = NULL;
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+ cairo_surface_t* _tmp35_ = NULL;
+ gint _tmp36_ = 0;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp6_) {
+#line 1462 "book.c"
+ gint _tmp7_ = 0;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = i;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp7_ + 1;
+#line 1468 "book.c"
+ }
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = FALSE;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = i;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = book_get_n_pages (self);
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10_ = _tmp9_;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(((guint) _tmp8_) < _tmp10_)) {
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 1482 "book.c"
+ }
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp11_ = i;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp12_ = book_get_page (self, _tmp11_);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page = _tmp12_;
+#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_ = page;
+#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp14_ = page_get_image (_tmp13_, TRUE);
+#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ image = _tmp14_;
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_ = image;
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp16_ = gdk_pixbuf_get_width (_tmp15_);
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp17_ = _tmp16_;
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp18_ = page;
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp19_ = page_get_dpi (_tmp18_);
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp20_ = _tmp19_;
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ width = (_tmp17_ * 72.0) / _tmp20_;
+#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp21_ = image;
+#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp22_ = gdk_pixbuf_get_height (_tmp21_);
+#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp23_ = _tmp22_;
+#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp24_ = page;
+#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp25_ = page_get_dpi (_tmp24_);
+#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp26_ = _tmp25_;
+#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ height = (_tmp23_ * 72.0) / _tmp26_;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp27_ = surface;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp28_ = width;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp29_ = height;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ cairo_ps_surface_set_size (_tmp27_, _tmp28_, _tmp29_);
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp30_ = surface;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp31_ = image;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp32_ = page;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp33_ = page_get_dpi (_tmp32_);
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp34_ = _tmp33_;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_save_ps_pdf_surface (self, _tmp30_, _tmp31_, (gdouble) _tmp34_);
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp35_ = surface;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ cairo_surface_show_page (_tmp35_);
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp36_ = i;
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "saving", _tmp36_);
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (image);
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_unref0 (page);
+#line 1556 "book.c"
+ }
+ }
+ }
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _cairo_surface_destroy0 (surface);
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _ps_writer_unref0 (writer);
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (stream);
+#line 1566 "book.c"
+}
+
+
+static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, int* result_length1) {
+ guint8* result = NULL;
+ z_stream stream = {0};
+ guint8* out_data = NULL;
+ guint8* _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ guint8* _tmp1_ = NULL;
+ gint out_data_length1 = 0;
+ gint _out_data_size_ = 0;
+ guint8* _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+ guint8* _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ z_stream _tmp7_ = {0};
+ guint _tmp8_ = 0U;
+ guint n_written = 0U;
+ guint8* _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+ z_stream _tmp11_ = {0};
+ guint _tmp12_ = 0U;
+ guint _tmp13_ = 0U;
+ gint _tmp14_ = 0;
+ guint8* _tmp15_ = NULL;
+ gint _tmp15__length1 = 0;
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 211 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ deflateInit (&stream, (gint) Z_BEST_COMPRESSION);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = data;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0__length1 = data_length1;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = g_new0 (guint8, _tmp0__length1);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ out_data = _tmp1_;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ out_data_length1 = _tmp0__length1;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _out_data_size_ = out_data_length1;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = data;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2__length1 = data_length1;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ stream.next_in = _tmp2_;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ stream.avail_in = _tmp2__length1;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = out_data;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3__length1 = out_data_length1;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ stream.next_out = _tmp3_;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ stream.avail_out = _tmp3__length1;
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 1628 "book.c"
+ z_stream _tmp4_ = {0};
+ guint _tmp5_ = 0U;
+ gint _tmp6_ = 0;
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = stream;
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = _tmp4_.avail_in;
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp5_ > ((guint) 0))) {
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 1640 "book.c"
+ }
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = deflate (&stream, (gint) Z_FINISH);
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp6_ == ((gint) Z_STREAM_ERROR)) {
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 1648 "book.c"
+ }
+ }
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = stream;
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = _tmp7_.avail_in;
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp8_ > ((guint) 0)) {
+#line 1657 "book.c"
+ guint8* _tmp9_ = NULL;
+ gint _tmp9__length1 = 0;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = NULL;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9__length1 = 0;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (result_length1) {
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *result_length1 = _tmp9__length1;
+#line 1668 "book.c"
+ }
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp9_;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ out_data = (g_free (out_data), NULL);
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ deflateEnd (&stream);
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 1678 "book.c"
+ }
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10_ = data;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10__length1 = data_length1;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp11_ = stream;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp12_ = _tmp11_.avail_out;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ n_written = _tmp10__length1 - _tmp12_;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_ = n_written;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp14_ = (gint) _tmp13_;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ out_data = g_renew (guint8, out_data, (gint) _tmp13_);
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ (_tmp14_ > out_data_length1) ? memset (out_data + out_data_length1, 0, sizeof (guint8) * (_tmp14_ - out_data_length1)) : NULL;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ out_data_length1 = _tmp14_;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _out_data_size_ = _tmp14_;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_ = out_data;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15__length1 = out_data_length1;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (result_length1) {
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *result_length1 = _tmp15__length1;
+#line 1710 "book.c"
+ }
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp15_;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ deflateEnd (&stream);
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 1718 "book.c"
+}
+
+
+static gboolean _book_write_pixbuf_data_gdk_pixbuf_save_func (guint8* buf, gsize buf_length1, GError** error, gpointer self) {
+ gboolean result;
+ result = book_write_pixbuf_data ((Book*) self, buf, buf_length1, error);
+#line 240 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 1727 "book.c"
+}
+
+
+static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, gint dpi, int* result_length1) {
+ guint8* result = NULL;
+ GByteArray* _tmp0_ = NULL;
+ gchar** keys = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar** _tmp5_ = NULL;
+ gint keys_length1 = 0;
+ gint _keys_size_ = 0;
+ gchar** values = NULL;
+ gint _tmp6_ = 0;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ gchar* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ gchar* _tmp12_ = NULL;
+ gchar** _tmp13_ = NULL;
+ gint values_length1 = 0;
+ gint _values_size_ = 0;
+ guint8* data = NULL;
+ GByteArray* _tmp15_ = NULL;
+ guint8* _tmp16_ = NULL;
+ gint _tmp16__length1 = 0;
+ gint data_length1 = 0;
+ gint _data_size_ = 0;
+ guint8* _tmp17_ = NULL;
+ gint _tmp17__length1 = 0;
+ GError * _inner_error_ = NULL;
+#line 233 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 233 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (image != NULL, NULL);
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = g_byte_array_new ();
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_byte_array_unref0 (self->priv->jpeg_data);
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->jpeg_data = _tmp0_;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = g_strdup ("quality");
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = g_strdup ("density-unit");
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = g_strdup ("x-density");
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = g_strdup ("y-density");
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = g_new0 (gchar*, 5 + 1);
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_[0] = _tmp1_;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_[1] = _tmp2_;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_[2] = _tmp3_;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_[3] = _tmp4_;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_[4] = NULL;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ keys = _tmp5_;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ keys_length1 = 5;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _keys_size_ = keys_length1;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = quality;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = g_strdup_printf ("%d", _tmp6_);
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = g_strdup ("dots-per-inch");
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = dpi;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10_ = g_strdup_printf ("%d", _tmp9_);
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp11_ = dpi;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp12_ = g_strdup_printf ("%d", _tmp11_);
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_ = g_new0 (gchar*, 5 + 1);
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_[0] = _tmp7_;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_[1] = _tmp8_;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_[2] = _tmp10_;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_[3] = _tmp12_;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_[4] = NULL;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ values = _tmp13_;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ values_length1 = 5;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _values_size_ = values_length1;
+#line 1830 "book.c"
+ {
+ GdkPixbuf* _tmp14_ = NULL;
+#line 240 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp14_ = image;
+#line 240 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ gdk_pixbuf_save_to_callbackv (_tmp14_, _book_write_pixbuf_data_gdk_pixbuf_save_func, self, "jpeg", keys, values, &_inner_error_);
+#line 240 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 1839 "book.c"
+ goto __catch0_g_error;
+ }
+ }
+ goto __finally0;
+ __catch0_g_error:
+ {
+ GError* e = NULL;
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ e = _inner_error_;
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _inner_error_ = NULL;
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_error_free0 (e);
+#line 1853 "book.c"
+ }
+ __finally0:
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_clear_error (&_inner_error_);
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return NULL;
+#line 1868 "book.c"
+ }
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_ = self->priv->jpeg_data;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp16_ = _tmp15_->data;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp16__length1 = _tmp15_->len;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_->data = NULL;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_->len = 0;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp16_;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp16__length1;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_byte_array_unref0 (self->priv->jpeg_data);
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->jpeg_data = NULL;
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp17_ = data;
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp17__length1 = data_length1;
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (result_length1) {
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *result_length1 = _tmp17__length1;
+#line 1898 "book.c"
+ }
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp17_;
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 1908 "book.c"
+}
+
+
+static gboolean book_write_pixbuf_data (Book* self, guint8* buf, int buf_length1, GError** error) {
+ gboolean result = FALSE;
+ GByteArray* _tmp0_ = NULL;
+ guint8* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->priv->jpeg_data;
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = buf;
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1__length1 = buf_length1;
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_byte_array_append (_tmp0_, _tmp1_, _tmp1__length1);
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = TRUE;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 1931 "book.c"
+}
+
+
+static guint8* _vala_array_dup1 (guint8* self, int length) {
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return g_memdup (self, length * sizeof (guint8));
+#line 1938 "book.c"
+}
+
+
+static guint8* _vala_array_dup2 (guint8* self, int length) {
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return g_memdup (self, length * sizeof (guint8));
+#line 1945 "book.c"
+}
+
+
+static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error) {
+ gchar* id = NULL;
+ gchar* _tmp0_ = NULL;
+ GFileOutputStream* stream = NULL;
+ GFile* _tmp9_ = NULL;
+ GFileOutputStream* _tmp10_ = NULL;
+ PDFWriter* writer = NULL;
+ PDFWriter* _tmp11_ = NULL;
+ PDFWriter* _tmp12_ = NULL;
+ PDFWriter* _tmp13_ = NULL;
+ guint catalog_number = 0U;
+ PDFWriter* _tmp14_ = NULL;
+ guint _tmp15_ = 0U;
+ PDFWriter* _tmp16_ = NULL;
+ guint _tmp17_ = 0U;
+ gchar* _tmp18_ = NULL;
+ gchar* _tmp19_ = NULL;
+ PDFWriter* _tmp20_ = NULL;
+ PDFWriter* _tmp21_ = NULL;
+ PDFWriter* _tmp22_ = NULL;
+ guint _tmp23_ = 0U;
+ gchar* _tmp24_ = NULL;
+ gchar* _tmp25_ = NULL;
+ PDFWriter* _tmp26_ = NULL;
+ PDFWriter* _tmp27_ = NULL;
+ PDFWriter* _tmp28_ = NULL;
+ guint pages_number = 0U;
+ PDFWriter* _tmp29_ = NULL;
+ guint _tmp30_ = 0U;
+ PDFWriter* _tmp31_ = NULL;
+ guint _tmp32_ = 0U;
+ gchar* _tmp33_ = NULL;
+ gchar* _tmp34_ = NULL;
+ PDFWriter* _tmp35_ = NULL;
+ PDFWriter* _tmp36_ = NULL;
+ PDFWriter* _tmp37_ = NULL;
+ PDFWriter* _tmp48_ = NULL;
+ PDFWriter* _tmp49_ = NULL;
+ guint _tmp50_ = 0U;
+ guint _tmp51_ = 0U;
+ gchar* _tmp52_ = NULL;
+ gchar* _tmp53_ = NULL;
+ PDFWriter* _tmp54_ = NULL;
+ PDFWriter* _tmp55_ = NULL;
+ PDFWriter* _tmp366_ = NULL;
+ guint info_number = 0U;
+ PDFWriter* _tmp367_ = NULL;
+ guint _tmp368_ = 0U;
+ PDFWriter* _tmp369_ = NULL;
+ guint _tmp370_ = 0U;
+ gchar* _tmp371_ = NULL;
+ gchar* _tmp372_ = NULL;
+ PDFWriter* _tmp373_ = NULL;
+ PDFWriter* _tmp374_ = NULL;
+ gchar* _tmp375_ = NULL;
+ gchar* _tmp376_ = NULL;
+ PDFWriter* _tmp377_ = NULL;
+ PDFWriter* _tmp378_ = NULL;
+ PDFWriter* _tmp379_ = NULL;
+ gsize xref_offset = 0UL;
+ PDFWriter* _tmp380_ = NULL;
+ gsize _tmp381_ = 0UL;
+ PDFWriter* _tmp382_ = NULL;
+ PDFWriter* _tmp383_ = NULL;
+ PDFWriter* _tmp384_ = NULL;
+ GList* _tmp385_ = NULL;
+ guint _tmp386_ = 0U;
+ gchar* _tmp387_ = NULL;
+ gchar* _tmp388_ = NULL;
+ PDFWriter* _tmp389_ = NULL;
+ PDFWriter* _tmp390_ = NULL;
+ GList* _tmp391_ = NULL;
+ PDFWriter* _tmp396_ = NULL;
+ PDFWriter* _tmp397_ = NULL;
+ PDFWriter* _tmp398_ = NULL;
+ PDFWriter* _tmp399_ = NULL;
+ PDFWriter* _tmp400_ = NULL;
+ GList* _tmp401_ = NULL;
+ guint _tmp402_ = 0U;
+ gchar* _tmp403_ = NULL;
+ gchar* _tmp404_ = NULL;
+ PDFWriter* _tmp405_ = NULL;
+ guint _tmp406_ = 0U;
+ gchar* _tmp407_ = NULL;
+ gchar* _tmp408_ = NULL;
+ PDFWriter* _tmp409_ = NULL;
+ guint _tmp410_ = 0U;
+ gchar* _tmp411_ = NULL;
+ gchar* _tmp412_ = NULL;
+ PDFWriter* _tmp413_ = NULL;
+ const gchar* _tmp414_ = NULL;
+ const gchar* _tmp415_ = NULL;
+ gchar* _tmp416_ = NULL;
+ gchar* _tmp417_ = NULL;
+ PDFWriter* _tmp418_ = NULL;
+ PDFWriter* _tmp419_ = NULL;
+ PDFWriter* _tmp420_ = NULL;
+ gsize _tmp421_ = 0UL;
+ gchar* _tmp422_ = NULL;
+ gchar* _tmp423_ = NULL;
+ PDFWriter* _tmp424_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (file != NULL);
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = g_strdup ("");
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ id = _tmp0_;
+#line 2059 "book.c"
+ {
+ gint i = 0;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = 0;
+#line 2064 "book.c"
+ {
+ gboolean _tmp1_ = FALSE;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = TRUE;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 2071 "book.c"
+ gint _tmp3_ = 0;
+ const gchar* _tmp4_ = NULL;
+ guint32 _tmp5_ = 0U;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp1_) {
+#line 2080 "book.c"
+ gint _tmp2_ = 0;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = i;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp2_ + 1;
+#line 2086 "book.c"
+ }
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = FALSE;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = i;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp3_ < 4)) {
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 2096 "book.c"
+ }
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = id;
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = g_random_int ();
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = g_strdup_printf ("%08x", (guint) _tmp5_);
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = _tmp6_;
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = g_strconcat (_tmp4_, _tmp7_, NULL);
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (id);
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ id = _tmp8_;
+#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp7_);
+#line 2114 "book.c"
+ }
+ }
+ }
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = file;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10_ = g_file_replace (_tmp9_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &_inner_error_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ stream = _tmp10_;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_propagate_error (error, _inner_error_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (id);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return;
+#line 2132 "book.c"
+ }
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp11_ = pdf_writer_new (stream);
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ writer = _tmp11_;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp12_ = writer;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp12_, "%PDF-1.3\n");
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp13_ = writer;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp13_, "%\xe2\xe3\xcf\xd3\n");
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp14_ = writer;
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_ = pdf_writer_start_object (_tmp14_);
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ catalog_number = _tmp15_;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp16_ = writer;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp17_ = catalog_number;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp18_ = g_strdup_printf ("%u 0 obj\n", _tmp17_);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp19_ = _tmp18_;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp16_, _tmp19_);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp19_);
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp20_ = writer;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp20_, "<<\n");
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp21_ = writer;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp21_, "/Type /Catalog\n");
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp22_ = writer;
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp23_ = catalog_number;
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp24_ = g_strdup_printf ("/Pages %u 0 R\n", _tmp23_ + 1);
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp25_ = _tmp24_;
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp22_, _tmp25_);
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp25_);
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp26_ = writer;
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp26_, ">>\n");
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp27_ = writer;
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp27_, "endobj\n");
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp28_ = writer;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp28_, "\n");
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp29_ = writer;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp30_ = pdf_writer_start_object (_tmp29_);
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pages_number = _tmp30_;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp31_ = writer;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp32_ = pages_number;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp33_ = g_strdup_printf ("%u 0 obj\n", _tmp32_);
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp34_ = _tmp33_;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp31_, _tmp34_);
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp34_);
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp35_ = writer;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp35_, "<<\n");
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp36_ = writer;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp36_, "/Type /Pages\n");
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp37_ = writer;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp37_, "/Kids [");
+#line 2226 "book.c"
+ {
+ gint i = 0;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = 0;
+#line 2231 "book.c"
+ {
+ gboolean _tmp38_ = FALSE;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp38_ = TRUE;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 2238 "book.c"
+ gint _tmp40_ = 0;
+ guint _tmp41_ = 0U;
+ guint _tmp42_ = 0U;
+ PDFWriter* _tmp43_ = NULL;
+ guint _tmp44_ = 0U;
+ gint _tmp45_ = 0;
+ gchar* _tmp46_ = NULL;
+ gchar* _tmp47_ = NULL;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp38_) {
+#line 2249 "book.c"
+ gint _tmp39_ = 0;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp39_ = i;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp39_ + 1;
+#line 2255 "book.c"
+ }
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp38_ = FALSE;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp40_ = i;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp41_ = book_get_n_pages (self);
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp42_ = _tmp41_;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(((guint) _tmp40_) < _tmp42_)) {
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 2269 "book.c"
+ }
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp43_ = writer;
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp44_ = pages_number;
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp45_ = i;
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp46_ = g_strdup_printf (" %u 0 R", (_tmp44_ + 1) + (_tmp45_ * 3));
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp47_ = _tmp46_;
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp43_, _tmp47_);
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp47_);
+#line 2285 "book.c"
+ }
+ }
+ }
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp48_ = writer;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp48_, " ]\n");
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp49_ = writer;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp50_ = book_get_n_pages (self);
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp51_ = _tmp50_;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp52_ = g_strdup_printf ("/Count %u\n", _tmp51_);
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp53_ = _tmp52_;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp49_, _tmp53_);
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp53_);
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp54_ = writer;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp54_, ">>\n");
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp55_ = writer;
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp55_, "endobj\n");
+#line 2315 "book.c"
+ {
+ gint i = 0;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = 0;
+#line 2320 "book.c"
+ {
+ gboolean _tmp56_ = FALSE;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp56_ = TRUE;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 2327 "book.c"
+ gint _tmp58_ = 0;
+ guint _tmp59_ = 0U;
+ guint _tmp60_ = 0U;
+ Page* page = NULL;
+ gint _tmp61_ = 0;
+ Page* _tmp62_ = NULL;
+ GdkPixbuf* image = NULL;
+ Page* _tmp63_ = NULL;
+ GdkPixbuf* _tmp64_ = NULL;
+ gint width = 0;
+ GdkPixbuf* _tmp65_ = NULL;
+ gint _tmp66_ = 0;
+ gint _tmp67_ = 0;
+ gint height = 0;
+ GdkPixbuf* _tmp68_ = NULL;
+ gint _tmp69_ = 0;
+ gint _tmp70_ = 0;
+ guint8* pixels = NULL;
+ GdkPixbuf* _tmp71_ = NULL;
+ guint8* _tmp72_ = NULL;
+ gint pixels_length1 = 0;
+ gint _pixels_size_ = 0;
+ gdouble page_width = 0.0;
+ gint _tmp73_ = 0;
+ Page* _tmp74_ = NULL;
+ gint _tmp75_ = 0;
+ gint _tmp76_ = 0;
+ gdouble page_height = 0.0;
+ gint _tmp77_ = 0;
+ Page* _tmp78_ = NULL;
+ gint _tmp79_ = 0;
+ gint _tmp80_ = 0;
+ gint depth = 0;
+ gchar* color_space = NULL;
+ gchar* _tmp81_ = NULL;
+ gchar* filter = NULL;
+ gchar* width_buffer = NULL;
+ gchar* _tmp82_ = NULL;
+ gint width_buffer_length1 = 0;
+ gint _width_buffer_size_ = 0;
+ gchar* height_buffer = NULL;
+ gchar* _tmp83_ = NULL;
+ gint height_buffer_length1 = 0;
+ gint _height_buffer_size_ = 0;
+ guint8* data = NULL;
+ gint data_length1 = 0;
+ gint _data_size_ = 0;
+ Page* _tmp84_ = NULL;
+ gboolean _tmp85_ = FALSE;
+ gboolean _tmp86_ = FALSE;
+ guint8* compressed_data = NULL;
+ guint8* _tmp240_ = NULL;
+ gint _tmp240__length1 = 0;
+ gint _tmp241_ = 0;
+ guint8* _tmp242_ = NULL;
+ gint compressed_data_length1 = 0;
+ gint _compressed_data_size_ = 0;
+ guint8* _tmp243_ = NULL;
+ gint _tmp243__length1 = 0;
+ PDFWriter* _tmp261_ = NULL;
+ guint number = 0U;
+ PDFWriter* _tmp262_ = NULL;
+ guint _tmp263_ = 0U;
+ PDFWriter* _tmp264_ = NULL;
+ guint _tmp265_ = 0U;
+ gchar* _tmp266_ = NULL;
+ gchar* _tmp267_ = NULL;
+ PDFWriter* _tmp268_ = NULL;
+ PDFWriter* _tmp269_ = NULL;
+ PDFWriter* _tmp270_ = NULL;
+ guint _tmp271_ = 0U;
+ gchar* _tmp272_ = NULL;
+ gchar* _tmp273_ = NULL;
+ PDFWriter* _tmp274_ = NULL;
+ gint _tmp275_ = 0;
+ guint _tmp276_ = 0U;
+ gchar* _tmp277_ = NULL;
+ gchar* _tmp278_ = NULL;
+ PDFWriter* _tmp279_ = NULL;
+ gdouble _tmp280_ = 0.0;
+ gchar* _tmp281_ = NULL;
+ gint _tmp281__length1 = 0;
+ const gchar* _tmp282_ = NULL;
+ gdouble _tmp283_ = 0.0;
+ gchar* _tmp284_ = NULL;
+ gint _tmp284__length1 = 0;
+ const gchar* _tmp285_ = NULL;
+ gchar* _tmp286_ = NULL;
+ gchar* _tmp287_ = NULL;
+ PDFWriter* _tmp288_ = NULL;
+ guint _tmp289_ = 0U;
+ gchar* _tmp290_ = NULL;
+ gchar* _tmp291_ = NULL;
+ PDFWriter* _tmp292_ = NULL;
+ PDFWriter* _tmp293_ = NULL;
+ PDFWriter* _tmp294_ = NULL;
+ PDFWriter* _tmp295_ = NULL;
+ guint _tmp296_ = 0U;
+ PDFWriter* _tmp297_ = NULL;
+ guint _tmp298_ = 0U;
+ gchar* _tmp299_ = NULL;
+ gchar* _tmp300_ = NULL;
+ PDFWriter* _tmp301_ = NULL;
+ PDFWriter* _tmp302_ = NULL;
+ PDFWriter* _tmp303_ = NULL;
+ PDFWriter* _tmp304_ = NULL;
+ gint _tmp305_ = 0;
+ gchar* _tmp306_ = NULL;
+ gchar* _tmp307_ = NULL;
+ PDFWriter* _tmp308_ = NULL;
+ gint _tmp309_ = 0;
+ gchar* _tmp310_ = NULL;
+ gchar* _tmp311_ = NULL;
+ PDFWriter* _tmp312_ = NULL;
+ const gchar* _tmp313_ = NULL;
+ gchar* _tmp314_ = NULL;
+ gchar* _tmp315_ = NULL;
+ PDFWriter* _tmp316_ = NULL;
+ gint _tmp317_ = 0;
+ gchar* _tmp318_ = NULL;
+ gchar* _tmp319_ = NULL;
+ PDFWriter* _tmp320_ = NULL;
+ guint8* _tmp321_ = NULL;
+ gint _tmp321__length1 = 0;
+ gchar* _tmp322_ = NULL;
+ gchar* _tmp323_ = NULL;
+ const gchar* _tmp324_ = NULL;
+ PDFWriter* _tmp329_ = NULL;
+ PDFWriter* _tmp330_ = NULL;
+ PDFWriter* _tmp331_ = NULL;
+ guint8* _tmp332_ = NULL;
+ gint _tmp332__length1 = 0;
+ PDFWriter* _tmp333_ = NULL;
+ PDFWriter* _tmp334_ = NULL;
+ PDFWriter* _tmp335_ = NULL;
+ gchar* command = NULL;
+ gdouble _tmp336_ = 0.0;
+ gchar* _tmp337_ = NULL;
+ gint _tmp337__length1 = 0;
+ const gchar* _tmp338_ = NULL;
+ gdouble _tmp339_ = 0.0;
+ gchar* _tmp340_ = NULL;
+ gint _tmp340__length1 = 0;
+ const gchar* _tmp341_ = NULL;
+ gint _tmp342_ = 0;
+ gchar* _tmp343_ = NULL;
+ PDFWriter* _tmp344_ = NULL;
+ PDFWriter* _tmp345_ = NULL;
+ guint _tmp346_ = 0U;
+ PDFWriter* _tmp347_ = NULL;
+ guint _tmp348_ = 0U;
+ gchar* _tmp349_ = NULL;
+ gchar* _tmp350_ = NULL;
+ PDFWriter* _tmp351_ = NULL;
+ PDFWriter* _tmp352_ = NULL;
+ const gchar* _tmp353_ = NULL;
+ gint _tmp354_ = 0;
+ gint _tmp355_ = 0;
+ gchar* _tmp356_ = NULL;
+ gchar* _tmp357_ = NULL;
+ PDFWriter* _tmp358_ = NULL;
+ PDFWriter* _tmp359_ = NULL;
+ PDFWriter* _tmp360_ = NULL;
+ const gchar* _tmp361_ = NULL;
+ PDFWriter* _tmp362_ = NULL;
+ PDFWriter* _tmp363_ = NULL;
+ PDFWriter* _tmp364_ = NULL;
+ gint _tmp365_ = 0;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp56_) {
+#line 2498 "book.c"
+ gint _tmp57_ = 0;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp57_ = i;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp57_ + 1;
+#line 2504 "book.c"
+ }
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp56_ = FALSE;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp58_ = i;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp59_ = book_get_n_pages (self);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp60_ = _tmp59_;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(((guint) _tmp58_) < _tmp60_)) {
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 2518 "book.c"
+ }
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp61_ = i;
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp62_ = book_get_page (self, _tmp61_);
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page = _tmp62_;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp63_ = page;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp64_ = page_get_image (_tmp63_, TRUE);
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ image = _tmp64_;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp65_ = image;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp66_ = gdk_pixbuf_get_width (_tmp65_);
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp67_ = _tmp66_;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ width = _tmp67_;
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp68_ = image;
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp69_ = gdk_pixbuf_get_height (_tmp68_);
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp70_ = _tmp69_;
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ height = _tmp70_;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp71_ = image;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp72_ = gdk_pixbuf_get_pixels (_tmp71_);
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pixels = _tmp72_;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pixels_length1 = -1;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _pixels_size_ = pixels_length1;
+#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp73_ = width;
+#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp74_ = page;
+#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp75_ = page_get_dpi (_tmp74_);
+#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp76_ = _tmp75_;
+#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_width = (_tmp73_ * 72.0) / _tmp76_;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp77_ = height;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp78_ = page;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp79_ = page_get_dpi (_tmp78_);
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp80_ = _tmp79_;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_height = (_tmp77_ * 72.0) / _tmp80_;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ depth = 8;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp81_ = g_strdup ("DeviceRGB");
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ color_space = _tmp81_;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ filter = NULL;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp82_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ width_buffer = _tmp82_;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ width_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _width_buffer_size_ = width_buffer_length1;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp83_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ height_buffer = _tmp83_;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ height_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _height_buffer_size_ = height_buffer_length1;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp84_ = page;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp85_ = page_get_is_color (_tmp84_);
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp86_ = _tmp85_;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp86_) {
+#line 2610 "book.c"
+ gchar* _tmp87_ = NULL;
+ gint data_length = 0;
+ gint _tmp88_ = 0;
+ gint _tmp89_ = 0;
+ gint _tmp90_ = 0;
+ guint8* _tmp91_ = NULL;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ depth = 8;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp87_ = g_strdup ("DeviceRGB");
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (color_space);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ color_space = _tmp87_;
+#line 333 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp88_ = height;
+#line 333 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp89_ = width;
+#line 333 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length = (_tmp88_ * _tmp89_) * 3;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp90_ = data_length;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp91_ = g_new0 (guint8, _tmp90_);
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp91_;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp90_;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 2643 "book.c"
+ {
+ gint row = 0;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = 0;
+#line 2648 "book.c"
+ {
+ gboolean _tmp92_ = FALSE;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp92_ = TRUE;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 2655 "book.c"
+ gint _tmp94_ = 0;
+ gint _tmp95_ = 0;
+ gint in_offset = 0;
+ gint _tmp96_ = 0;
+ GdkPixbuf* _tmp97_ = NULL;
+ gint _tmp98_ = 0;
+ gint _tmp99_ = 0;
+ gint out_offset = 0;
+ gint _tmp100_ = 0;
+ gint _tmp101_ = 0;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp92_) {
+#line 2668 "book.c"
+ gint _tmp93_ = 0;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp93_ = row;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = _tmp93_ + 1;
+#line 2674 "book.c"
+ }
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp92_ = FALSE;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp94_ = row;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp95_ = height;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp94_ < _tmp95_)) {
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 2686 "book.c"
+ }
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp96_ = row;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp97_ = image;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp98_ = gdk_pixbuf_get_rowstride (_tmp97_);
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp99_ = _tmp98_;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ in_offset = _tmp96_ * _tmp99_;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp100_ = row;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp101_ = width;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ out_offset = (_tmp100_ * _tmp101_) * 3;
+#line 2704 "book.c"
+ {
+ gint x = 0;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = 0;
+#line 2709 "book.c"
+ {
+ gboolean _tmp102_ = FALSE;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp102_ = TRUE;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 2716 "book.c"
+ gint _tmp104_ = 0;
+ gint _tmp105_ = 0;
+ gint in_o = 0;
+ gint _tmp106_ = 0;
+ gint _tmp107_ = 0;
+ gint out_o = 0;
+ gint _tmp108_ = 0;
+ gint _tmp109_ = 0;
+ guint8* _tmp110_ = NULL;
+ gint _tmp110__length1 = 0;
+ gint _tmp111_ = 0;
+ guint8* _tmp112_ = NULL;
+ gint _tmp112__length1 = 0;
+ gint _tmp113_ = 0;
+ guint8 _tmp114_ = 0U;
+ guint8 _tmp115_ = 0U;
+ guint8* _tmp116_ = NULL;
+ gint _tmp116__length1 = 0;
+ gint _tmp117_ = 0;
+ guint8* _tmp118_ = NULL;
+ gint _tmp118__length1 = 0;
+ gint _tmp119_ = 0;
+ guint8 _tmp120_ = 0U;
+ guint8 _tmp121_ = 0U;
+ guint8* _tmp122_ = NULL;
+ gint _tmp122__length1 = 0;
+ gint _tmp123_ = 0;
+ guint8* _tmp124_ = NULL;
+ gint _tmp124__length1 = 0;
+ gint _tmp125_ = 0;
+ guint8 _tmp126_ = 0U;
+ guint8 _tmp127_ = 0U;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp102_) {
+#line 2751 "book.c"
+ gint _tmp103_ = 0;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp103_ = x;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = _tmp103_ + 1;
+#line 2757 "book.c"
+ }
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp102_ = FALSE;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp104_ = x;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp105_ = width;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp104_ < _tmp105_)) {
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 2769 "book.c"
+ }
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp106_ = in_offset;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp107_ = x;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ in_o = _tmp106_ + (_tmp107_ * 3);
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp108_ = out_offset;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp109_ = x;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ out_o = _tmp108_ + (_tmp109_ * 3);
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp110_ = data;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp110__length1 = data_length1;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp111_ = out_o;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp112_ = pixels;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp112__length1 = pixels_length1;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp113_ = in_o;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp114_ = _tmp112_[_tmp113_];
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp110_[_tmp111_] = _tmp114_;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp115_ = _tmp110_[_tmp111_];
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp116_ = data;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp116__length1 = data_length1;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp117_ = out_o;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp118_ = pixels;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp118__length1 = pixels_length1;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp119_ = in_o;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp120_ = _tmp118_[_tmp119_ + 1];
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp116_[_tmp117_ + 1] = _tmp120_;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp121_ = _tmp116_[_tmp117_ + 1];
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp122_ = data;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp122__length1 = data_length1;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp123_ = out_o;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp124_ = pixels;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp124__length1 = pixels_length1;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp125_ = in_o;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp126_ = _tmp124_[_tmp125_ + 2];
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp122_[_tmp123_ + 2] = _tmp126_;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp127_ = _tmp122_[_tmp123_ + 2];
+#line 2837 "book.c"
+ }
+ }
+ }
+ }
+ }
+ }
+ } else {
+ Page* _tmp128_ = NULL;
+ gint _tmp129_ = 0;
+ gint _tmp130_ = 0;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp128_ = page;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp129_ = page_get_depth (_tmp128_);
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp130_ = _tmp129_;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp130_ == 2) {
+#line 2856 "book.c"
+ gint shift_count = 0;
+ gchar* _tmp131_ = NULL;
+ gint data_length = 0;
+ gint _tmp132_ = 0;
+ gint _tmp133_ = 0;
+ gint _tmp134_ = 0;
+ guint8* _tmp135_ = NULL;
+ gint offset = 0;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ shift_count = 6;
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ depth = 2;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp131_ = g_strdup ("DeviceGray");
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (color_space);
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ color_space = _tmp131_;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp132_ = height;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp133_ = width;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length = _tmp132_ * (((_tmp133_ * 2) + 7) / 8);
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp134_ = data_length;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp135_ = g_new0 (guint8, _tmp134_);
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp135_;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp134_;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = 0;
+#line 2895 "book.c"
+ {
+ gint row = 0;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = 0;
+#line 2900 "book.c"
+ {
+ gboolean _tmp136_ = FALSE;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp136_ = TRUE;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 2907 "book.c"
+ gint _tmp138_ = 0;
+ gint _tmp139_ = 0;
+ gint _tmp140_ = 0;
+ gint in_offset = 0;
+ gint _tmp142_ = 0;
+ GdkPixbuf* _tmp143_ = NULL;
+ gint _tmp144_ = 0;
+ gint _tmp145_ = 0;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp136_) {
+#line 2918 "book.c"
+ gint _tmp137_ = 0;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp137_ = row;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = _tmp137_ + 1;
+#line 2924 "book.c"
+ }
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp136_ = FALSE;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp138_ = row;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp139_ = height;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp138_ < _tmp139_)) {
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 2936 "book.c"
+ }
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp140_ = shift_count;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp140_ != 6) {
+#line 2942 "book.c"
+ gint _tmp141_ = 0;
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp141_ = offset;
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = _tmp141_ + 1;
+#line 364 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ shift_count = 6;
+#line 2950 "book.c"
+ }
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp142_ = row;
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp143_ = image;
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp144_ = gdk_pixbuf_get_rowstride (_tmp143_);
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp145_ = _tmp144_;
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ in_offset = _tmp142_ * _tmp145_;
+#line 2962 "book.c"
+ {
+ gint x = 0;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = 0;
+#line 2967 "book.c"
+ {
+ gboolean _tmp146_ = FALSE;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp146_ = TRUE;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 2974 "book.c"
+ gint _tmp148_ = 0;
+ gint _tmp149_ = 0;
+ gint _tmp150_ = 0;
+ guint8 p = 0U;
+ guint8* _tmp154_ = NULL;
+ gint _tmp154__length1 = 0;
+ gint _tmp155_ = 0;
+ gint _tmp156_ = 0;
+ guint8 _tmp157_ = 0U;
+ guint8 _tmp158_ = 0U;
+ gint _tmp173_ = 0;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp146_) {
+#line 2988 "book.c"
+ gint _tmp147_ = 0;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp147_ = x;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = _tmp147_ + 1;
+#line 2994 "book.c"
+ }
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp146_ = FALSE;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp148_ = x;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp149_ = width;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp148_ < _tmp149_)) {
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 3006 "book.c"
+ }
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp150_ = shift_count;
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp150_ == 6) {
+#line 3012 "book.c"
+ guint8* _tmp151_ = NULL;
+ gint _tmp151__length1 = 0;
+ gint _tmp152_ = 0;
+ guint8 _tmp153_ = 0U;
+#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp151_ = data;
+#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp151__length1 = data_length1;
+#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp152_ = offset;
+#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp151_[_tmp152_] = (guint8) 0;
+#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp153_ = _tmp151_[_tmp152_];
+#line 3027 "book.c"
+ }
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp154_ = pixels;
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp154__length1 = pixels_length1;
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp155_ = in_offset;
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp156_ = x;
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp157_ = _tmp154_[_tmp155_ + (_tmp156_ * 3)];
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ p = _tmp157_;
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp158_ = p;
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (((gint) _tmp158_) >= 192) {
+#line 3045 "book.c"
+ guint8* _tmp159_ = NULL;
+ gint _tmp159__length1 = 0;
+ gint _tmp160_ = 0;
+ gint _tmp161_ = 0;
+ guint8 _tmp162_ = 0U;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp159_ = data;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp159__length1 = data_length1;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp160_ = offset;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp161_ = shift_count;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp159_[_tmp160_] |= (guint8) (3 << _tmp161_);
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp162_ = _tmp159_[_tmp160_];
+#line 3063 "book.c"
+ } else {
+ guint8 _tmp163_ = 0U;
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp163_ = p;
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (((gint) _tmp163_) >= 128) {
+#line 3070 "book.c"
+ guint8* _tmp164_ = NULL;
+ gint _tmp164__length1 = 0;
+ gint _tmp165_ = 0;
+ gint _tmp166_ = 0;
+ guint8 _tmp167_ = 0U;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp164_ = data;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp164__length1 = data_length1;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp165_ = offset;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp166_ = shift_count;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp164_[_tmp165_] |= (guint8) (2 << _tmp166_);
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp167_ = _tmp164_[_tmp165_];
+#line 3088 "book.c"
+ } else {
+ guint8 _tmp168_ = 0U;
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp168_ = p;
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (((gint) _tmp168_) >= 64) {
+#line 3095 "book.c"
+ guint8* _tmp169_ = NULL;
+ gint _tmp169__length1 = 0;
+ gint _tmp170_ = 0;
+ gint _tmp171_ = 0;
+ guint8 _tmp172_ = 0U;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp169_ = data;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp169__length1 = data_length1;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp170_ = offset;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp171_ = shift_count;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp169_[_tmp170_] |= (guint8) (1 << _tmp171_);
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp172_ = _tmp169_[_tmp170_];
+#line 3113 "book.c"
+ }
+ }
+ }
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp173_ = shift_count;
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp173_ == 0) {
+#line 3121 "book.c"
+ gint _tmp174_ = 0;
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp174_ = offset;
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = _tmp174_ + 1;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ shift_count = 6;
+#line 3129 "book.c"
+ } else {
+ gint _tmp175_ = 0;
+#line 390 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp175_ = shift_count;
+#line 390 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ shift_count = _tmp175_ - 2;
+#line 3136 "book.c"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ } else {
+ Page* _tmp176_ = NULL;
+ gint _tmp177_ = 0;
+ gint _tmp178_ = 0;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp176_ = page;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp177_ = page_get_depth (_tmp176_);
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp178_ = _tmp177_;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp178_ == 1) {
+#line 3156 "book.c"
+ gint mask = 0;
+ gchar* _tmp179_ = NULL;
+ gint data_length = 0;
+ gint _tmp180_ = 0;
+ gint _tmp181_ = 0;
+ gint _tmp182_ = 0;
+ guint8* _tmp183_ = NULL;
+ gint offset = 0;
+#line 396 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ mask = 0x80;
+#line 398 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ depth = 1;
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp179_ = g_strdup ("DeviceGray");
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (color_space);
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ color_space = _tmp179_;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp180_ = height;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp181_ = width;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length = _tmp180_ * ((_tmp181_ + 7) / 8);
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp182_ = data_length;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp183_ = g_new0 (guint8, _tmp182_);
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp183_;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp182_;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = 0;
+#line 3195 "book.c"
+ {
+ gint row = 0;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = 0;
+#line 3200 "book.c"
+ {
+ gboolean _tmp184_ = FALSE;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp184_ = TRUE;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 3207 "book.c"
+ gint _tmp186_ = 0;
+ gint _tmp187_ = 0;
+ gint _tmp188_ = 0;
+ gint in_offset = 0;
+ gint _tmp190_ = 0;
+ GdkPixbuf* _tmp191_ = NULL;
+ gint _tmp192_ = 0;
+ gint _tmp193_ = 0;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp184_) {
+#line 3218 "book.c"
+ gint _tmp185_ = 0;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp185_ = row;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = _tmp185_ + 1;
+#line 3224 "book.c"
+ }
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp184_ = FALSE;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp186_ = row;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp187_ = height;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp186_ < _tmp187_)) {
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 3236 "book.c"
+ }
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp188_ = mask;
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp188_ != 0x80) {
+#line 3242 "book.c"
+ gint _tmp189_ = 0;
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp189_ = offset;
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = _tmp189_ + 1;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ mask = 0x80;
+#line 3250 "book.c"
+ }
+#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp190_ = row;
+#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp191_ = image;
+#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp192_ = gdk_pixbuf_get_rowstride (_tmp191_);
+#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp193_ = _tmp192_;
+#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ in_offset = _tmp190_ * _tmp193_;
+#line 3262 "book.c"
+ {
+ gint x = 0;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = 0;
+#line 3267 "book.c"
+ {
+ gboolean _tmp194_ = FALSE;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp194_ = TRUE;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 3274 "book.c"
+ gint _tmp196_ = 0;
+ gint _tmp197_ = 0;
+ gint _tmp198_ = 0;
+ guint8* _tmp202_ = NULL;
+ gint _tmp202__length1 = 0;
+ gint _tmp203_ = 0;
+ gint _tmp204_ = 0;
+ guint8 _tmp205_ = 0U;
+ gint _tmp210_ = 0;
+ gint _tmp211_ = 0;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp194_) {
+#line 3287 "book.c"
+ gint _tmp195_ = 0;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp195_ = x;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = _tmp195_ + 1;
+#line 3293 "book.c"
+ }
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp194_ = FALSE;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp196_ = x;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp197_ = width;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp196_ < _tmp197_)) {
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 3305 "book.c"
+ }
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp198_ = mask;
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp198_ == 0x80) {
+#line 3311 "book.c"
+ guint8* _tmp199_ = NULL;
+ gint _tmp199__length1 = 0;
+ gint _tmp200_ = 0;
+ guint8 _tmp201_ = 0U;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp199_ = data;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp199__length1 = data_length1;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp200_ = offset;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp199_[_tmp200_] = (guint8) 0;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp201_ = _tmp199_[_tmp200_];
+#line 3326 "book.c"
+ }
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp202_ = pixels;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp202__length1 = pixels_length1;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp203_ = in_offset;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp204_ = x;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp205_ = _tmp202_[_tmp203_ + (_tmp204_ * 3)];
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (((gint) _tmp205_) != 0) {
+#line 3340 "book.c"
+ guint8* _tmp206_ = NULL;
+ gint _tmp206__length1 = 0;
+ gint _tmp207_ = 0;
+ gint _tmp208_ = 0;
+ guint8 _tmp209_ = 0U;
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp206_ = data;
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp206__length1 = data_length1;
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp207_ = offset;
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp208_ = mask;
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp206_[_tmp207_] |= (guint8) _tmp208_;
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp209_ = _tmp206_[_tmp207_];
+#line 3358 "book.c"
+ }
+#line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp210_ = mask;
+#line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ mask = _tmp210_ >> 1;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp211_ = mask;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp211_ == 0) {
+#line 3368 "book.c"
+ gint _tmp212_ = 0;
+#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp212_ = offset;
+#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = _tmp212_ + 1;
+#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ mask = 0x80;
+#line 3376 "book.c"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ } else {
+ gchar* _tmp213_ = NULL;
+ gint data_length = 0;
+ gint _tmp214_ = 0;
+ gint _tmp215_ = 0;
+ gint _tmp216_ = 0;
+ guint8* _tmp217_ = NULL;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ depth = 8;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp213_ = g_strdup ("DeviceGray");
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (color_space);
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ color_space = _tmp213_;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp214_ = height;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp215_ = width;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length = _tmp214_ * _tmp215_;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp216_ = data_length;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp217_ = g_new0 (guint8, _tmp216_);
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp217_;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp216_;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 3417 "book.c"
+ {
+ gint row = 0;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = 0;
+#line 3422 "book.c"
+ {
+ gboolean _tmp218_ = FALSE;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp218_ = TRUE;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 3429 "book.c"
+ gint _tmp220_ = 0;
+ gint _tmp221_ = 0;
+ gint in_offset = 0;
+ gint _tmp222_ = 0;
+ GdkPixbuf* _tmp223_ = NULL;
+ gint _tmp224_ = 0;
+ gint _tmp225_ = 0;
+ gint out_offset = 0;
+ gint _tmp226_ = 0;
+ gint _tmp227_ = 0;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp218_) {
+#line 3442 "book.c"
+ gint _tmp219_ = 0;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp219_ = row;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = _tmp219_ + 1;
+#line 3448 "book.c"
+ }
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp218_ = FALSE;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp220_ = row;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp221_ = height;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp220_ < _tmp221_)) {
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 3460 "book.c"
+ }
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp222_ = row;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp223_ = image;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp224_ = gdk_pixbuf_get_rowstride (_tmp223_);
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp225_ = _tmp224_;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ in_offset = _tmp222_ * _tmp225_;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp226_ = row;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp227_ = width;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ out_offset = _tmp226_ * _tmp227_;
+#line 3478 "book.c"
+ {
+ gint x = 0;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = 0;
+#line 3483 "book.c"
+ {
+ gboolean _tmp228_ = FALSE;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp228_ = TRUE;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 3490 "book.c"
+ gint _tmp230_ = 0;
+ gint _tmp231_ = 0;
+ guint8* _tmp232_ = NULL;
+ gint _tmp232__length1 = 0;
+ gint _tmp233_ = 0;
+ gint _tmp234_ = 0;
+ guint8* _tmp235_ = NULL;
+ gint _tmp235__length1 = 0;
+ gint _tmp236_ = 0;
+ gint _tmp237_ = 0;
+ guint8 _tmp238_ = 0U;
+ guint8 _tmp239_ = 0U;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp228_) {
+#line 3505 "book.c"
+ gint _tmp229_ = 0;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp229_ = x;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = _tmp229_ + 1;
+#line 3511 "book.c"
+ }
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp228_ = FALSE;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp230_ = x;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp231_ = width;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp230_ < _tmp231_)) {
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 3523 "book.c"
+ }
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp232_ = data;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp232__length1 = data_length1;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp233_ = out_offset;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp234_ = x;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp235_ = pixels;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp235__length1 = pixels_length1;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp236_ = in_offset;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp237_ = x;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp238_ = _tmp235_[_tmp236_ + (_tmp237_ * 3)];
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp232_[_tmp233_ + _tmp234_] = _tmp238_;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp239_ = _tmp232_[_tmp233_ + _tmp234_];
+#line 3547 "book.c"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp240_ = data;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp240__length1 = data_length1;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp242_ = book_compress_zlib (self, _tmp240_, _tmp240__length1, &_tmp241_);
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ compressed_data = _tmp242_;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ compressed_data_length1 = _tmp241_;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _compressed_data_size_ = compressed_data_length1;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp243_ = compressed_data;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp243__length1 = compressed_data_length1;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp243_ != NULL) {
+#line 3575 "book.c"
+ gint _tmp244_ = 0;
+ const gchar* _tmp257_ = NULL;
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp244_ = depth;
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp244_ > 1) {
+#line 3582 "book.c"
+ guint8* jpeg_data = NULL;
+ GdkPixbuf* _tmp245_ = NULL;
+ gint _tmp246_ = 0;
+ Page* _tmp247_ = NULL;
+ gint _tmp248_ = 0;
+ gint _tmp249_ = 0;
+ gint _tmp250_ = 0;
+ guint8* _tmp251_ = NULL;
+ gint jpeg_data_length1 = 0;
+ gint _jpeg_data_size_ = 0;
+ guint8* _tmp252_ = NULL;
+ gint _tmp252__length1 = 0;
+ guint8* _tmp253_ = NULL;
+ gint _tmp253__length1 = 0;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp245_ = image;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp246_ = quality;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp247_ = page;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp248_ = page_get_dpi (_tmp247_);
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp249_ = _tmp248_;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp251_ = book_compress_jpeg (self, _tmp245_, _tmp246_, _tmp249_, &_tmp250_);
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ jpeg_data = _tmp251_;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ jpeg_data_length1 = _tmp250_;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _jpeg_data_size_ = jpeg_data_length1;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp252_ = jpeg_data;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp252__length1 = jpeg_data_length1;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp253_ = compressed_data;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp253__length1 = compressed_data_length1;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp252__length1 < _tmp253__length1) {
+#line 3625 "book.c"
+ gchar* _tmp254_ = NULL;
+ guint8* _tmp255_ = NULL;
+ gint _tmp255__length1 = 0;
+ guint8* _tmp256_ = NULL;
+ gint _tmp256__length1 = 0;
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp254_ = g_strdup ("DCTDecode");
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (filter);
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ filter = _tmp254_;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp255_ = jpeg_data;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp255__length1 = jpeg_data_length1;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp256_ = (_tmp255_ != NULL) ? _vala_array_dup1 (_tmp255_, _tmp255__length1) : ((gpointer) _tmp255_);
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp256__length1 = _tmp255__length1;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp256_;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp256__length1;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 3653 "book.c"
+ }
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ jpeg_data = (g_free (jpeg_data), NULL);
+#line 3657 "book.c"
+ }
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp257_ = filter;
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp257_ == NULL) {
+#line 3663 "book.c"
+ gchar* _tmp258_ = NULL;
+ guint8* _tmp259_ = NULL;
+ gint _tmp259__length1 = 0;
+ guint8* _tmp260_ = NULL;
+ gint _tmp260__length1 = 0;
+#line 465 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp258_ = g_strdup ("FlateDecode");
+#line 465 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (filter);
+#line 465 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ filter = _tmp258_;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp259_ = compressed_data;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp259__length1 = compressed_data_length1;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp260_ = (_tmp259_ != NULL) ? _vala_array_dup2 (_tmp259_, _tmp259__length1) : ((gpointer) _tmp259_);
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp260__length1 = _tmp259__length1;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp260_;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp260__length1;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 3691 "book.c"
+ }
+ }
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp261_ = writer;
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp261_, "\n");
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp262_ = writer;
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp263_ = pdf_writer_start_object (_tmp262_);
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ number = _tmp263_;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp264_ = writer;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp265_ = number;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp266_ = g_strdup_printf ("%u 0 obj\n", _tmp265_);
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp267_ = _tmp266_;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp264_, _tmp267_);
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp267_);
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp268_ = writer;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp268_, "<<\n");
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp269_ = writer;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp269_, "/Type /Page\n");
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp270_ = writer;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp271_ = pages_number;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp272_ = g_strdup_printf ("/Parent %u 0 R\n", _tmp271_);
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp273_ = _tmp272_;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp270_, _tmp273_);
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp273_);
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp274_ = writer;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp275_ = i;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp276_ = number;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp277_ = g_strdup_printf ("/Resources << /XObject << /Im%d %u 0 R >> >>\n", _tmp275_, _tmp276_ + 1);
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp278_ = _tmp277_;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp274_, _tmp278_);
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp278_);
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp279_ = writer;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp280_ = page_width;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp281_ = width_buffer;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp281__length1 = width_buffer_length1;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp282_ = g_ascii_formatd (_tmp281_, _tmp281__length1, "%.2f", _tmp280_);
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp283_ = page_height;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp284_ = height_buffer;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp284__length1 = height_buffer_length1;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp285_ = g_ascii_formatd (_tmp284_, _tmp284__length1, "%.2f", _tmp283_);
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp286_ = g_strdup_printf ("/MediaBox [ 0 0 %s %s ]\n", _tmp282_, _tmp285_);
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp287_ = _tmp286_;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp279_, _tmp287_);
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp287_);
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp288_ = writer;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp289_ = number;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp290_ = g_strdup_printf ("/Contents %u 0 R\n", _tmp289_ + 2);
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp291_ = _tmp290_;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp288_, _tmp291_);
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp291_);
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp292_ = writer;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp292_, ">>\n");
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp293_ = writer;
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp293_, "endobj\n");
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp294_ = writer;
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp294_, "\n");
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp295_ = writer;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp296_ = pdf_writer_start_object (_tmp295_);
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ number = _tmp296_;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp297_ = writer;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp298_ = number;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp299_ = g_strdup_printf ("%u 0 obj\n", _tmp298_);
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp300_ = _tmp299_;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp297_, _tmp300_);
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp300_);
+#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp301_ = writer;
+#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp301_, "<<\n");
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp302_ = writer;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp302_, "/Type /XObject\n");
+#line 489 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp303_ = writer;
+#line 489 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp303_, "/Subtype /Image\n");
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp304_ = writer;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp305_ = width;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp306_ = g_strdup_printf ("/Width %d\n", _tmp305_);
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp307_ = _tmp306_;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp304_, _tmp307_);
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp307_);
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp308_ = writer;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp309_ = height;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp310_ = g_strdup_printf ("/Height %d\n", _tmp309_);
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp311_ = _tmp310_;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp308_, _tmp311_);
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp311_);
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp312_ = writer;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp313_ = color_space;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp314_ = g_strdup_printf ("/ColorSpace /%s\n", _tmp313_);
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp315_ = _tmp314_;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp312_, _tmp315_);
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp315_);
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp316_ = writer;
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp317_ = depth;
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp318_ = g_strdup_printf ("/BitsPerComponent %d\n", _tmp317_);
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp319_ = _tmp318_;
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp316_, _tmp319_);
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp319_);
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp320_ = writer;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp321_ = data;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp321__length1 = data_length1;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp322_ = g_strdup_printf ("/Length %d\n", _tmp321__length1);
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp323_ = _tmp322_;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp320_, _tmp323_);
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp323_);
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp324_ = filter;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp324_ != NULL) {
+#line 3896 "book.c"
+ PDFWriter* _tmp325_ = NULL;
+ const gchar* _tmp326_ = NULL;
+ gchar* _tmp327_ = NULL;
+ gchar* _tmp328_ = NULL;
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp325_ = writer;
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp326_ = filter;
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp327_ = g_strdup_printf ("/Filter /%s\n", _tmp326_);
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp328_ = _tmp327_;
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp325_, _tmp328_);
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp328_);
+#line 3913 "book.c"
+ }
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp329_ = writer;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp329_, ">>\n");
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp330_ = writer;
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp330_, "stream\n");
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp331_ = writer;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp332_ = data;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp332__length1 = data_length1;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write (_tmp331_, _tmp332_, _tmp332__length1);
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp333_ = writer;
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp333_, "\n");
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp334_ = writer;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp334_, "endstream\n");
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp335_ = writer;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp335_, "endobj\n");
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp336_ = page_width;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp337_ = width_buffer;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp337__length1 = width_buffer_length1;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp338_ = g_ascii_formatd (_tmp337_, _tmp337__length1, "%f", _tmp336_);
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp339_ = page_height;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp340_ = height_buffer;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp340__length1 = height_buffer_length1;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp341_ = g_ascii_formatd (_tmp340_, _tmp340__length1, "%f", _tmp339_);
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp342_ = i;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp343_ = g_strdup_printf ("q\n%s 0 0 %s 0 0 cm\n/Im%d Do\nQ", _tmp338_, _tmp341_, _tmp342_);
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ command = _tmp343_;
+#line 506 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp344_ = writer;
+#line 506 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp344_, "\n");
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp345_ = writer;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp346_ = pdf_writer_start_object (_tmp345_);
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ number = _tmp346_;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp347_ = writer;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp348_ = number;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp349_ = g_strdup_printf ("%u 0 obj\n", _tmp348_);
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp350_ = _tmp349_;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp347_, _tmp350_);
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp350_);
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp351_ = writer;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp351_, "<<\n");
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp352_ = writer;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp353_ = command;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp354_ = strlen (_tmp353_);
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp355_ = _tmp354_;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp356_ = g_strdup_printf ("/Length %d\n", _tmp355_);
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp357_ = _tmp356_;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp352_, _tmp357_);
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp357_);
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp358_ = writer;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp358_, ">>\n");
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp359_ = writer;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp359_, "stream\n");
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp360_ = writer;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp361_ = command;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp360_, _tmp361_);
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp362_ = writer;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp362_, "\n");
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp363_ = writer;
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp363_, "endstream\n");
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp364_ = writer;
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp364_, "endobj\n");
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp365_ = i;
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "saving", _tmp365_);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (command);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ compressed_data = (g_free (compressed_data), NULL);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ height_buffer = (g_free (height_buffer), NULL);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ width_buffer = (g_free (width_buffer), NULL);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (filter);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (color_space);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (image);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_unref0 (page);
+#line 4055 "book.c"
+ }
+ }
+ }
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp366_ = writer;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp366_, "\n");
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp367_ = writer;
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp368_ = pdf_writer_start_object (_tmp367_);
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ info_number = _tmp368_;
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp369_ = writer;
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp370_ = info_number;
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp371_ = g_strdup_printf ("%u 0 obj\n", _tmp370_);
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp372_ = _tmp371_;
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp369_, _tmp372_);
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp372_);
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp373_ = writer;
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp373_, "<<\n");
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp374_ = writer;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp375_ = g_strdup_printf ("/Creator (Simple Scan %s)\n", VERSION);
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp376_ = _tmp375_;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp374_, _tmp376_);
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp376_);
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp377_ = writer;
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp377_, ">>\n");
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp378_ = writer;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp378_, "endobj\n");
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp379_ = writer;
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp379_, "\n");
+#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp380_ = writer;
+#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp381_ = _tmp380_->offset;
+#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ xref_offset = _tmp381_;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp382_ = writer;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp382_, "xref\n");
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp383_ = writer;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp384_ = writer;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp385_ = _tmp384_->object_offsets;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp386_ = g_list_length (_tmp385_);
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp387_ = g_strdup_printf ("0 %zu\n", (gsize) (_tmp386_ + 1));
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp388_ = _tmp387_;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp383_, _tmp388_);
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp388_);
+#line 535 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp389_ = writer;
+#line 535 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp389_, "0000000000 65535 f \n");
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp390_ = writer;
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp391_ = _tmp390_->object_offsets;
+#line 4141 "book.c"
+ {
+ GList* offset_collection = NULL;
+ GList* offset_it = NULL;
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset_collection = _tmp391_;
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ for (offset_it = offset_collection; offset_it != NULL; offset_it = offset_it->next) {
+#line 4149 "book.c"
+ guint offset = 0U;
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = (guint) ((guintptr) offset_it->data);
+#line 4153 "book.c"
+ {
+ PDFWriter* _tmp392_ = NULL;
+ guint _tmp393_ = 0U;
+ gchar* _tmp394_ = NULL;
+ gchar* _tmp395_ = NULL;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp392_ = writer;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp393_ = offset;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp394_ = g_strdup_printf ("%010zu 00000 n \n", (gsize) _tmp393_);
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp395_ = _tmp394_;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp392_, _tmp395_);
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp395_);
+#line 4171 "book.c"
+ }
+ }
+ }
+#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp396_ = writer;
+#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp396_, "\n");
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp397_ = writer;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp397_, "trailer\n");
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp398_ = writer;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp398_, "<<\n");
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp399_ = writer;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp400_ = writer;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp401_ = _tmp400_->object_offsets;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp402_ = g_list_length (_tmp401_);
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp403_ = g_strdup_printf ("/Size %zu\n", (gsize) (_tmp402_ + 1));
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp404_ = _tmp403_;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp399_, _tmp404_);
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp404_);
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp405_ = writer;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp406_ = info_number;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp407_ = g_strdup_printf ("/Info %u 0 R\n", _tmp406_);
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp408_ = _tmp407_;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp405_, _tmp408_);
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp408_);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp409_ = writer;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp410_ = catalog_number;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp411_ = g_strdup_printf ("/Root %u 0 R\n", _tmp410_);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp412_ = _tmp411_;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp409_, _tmp412_);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp412_);
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp413_ = writer;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp414_ = id;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp415_ = id;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp416_ = g_strdup_printf ("/ID [<%s> <%s>]\n", _tmp414_, _tmp415_);
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp417_ = _tmp416_;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp413_, _tmp417_);
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp417_);
+#line 547 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp418_ = writer;
+#line 547 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp418_, ">>\n");
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp419_ = writer;
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp419_, "startxref\n");
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp420_ = writer;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp421_ = xref_offset;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp422_ = g_strdup_printf ("%zu\n", _tmp421_);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp423_ = _tmp422_;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp420_, _tmp423_);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp423_);
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp424_ = writer;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp424_, "%%EOF\n");
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _pdf_writer_unref0 (writer);
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (stream);
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (id);
+#line 4271 "book.c"
+}
+
+
+void book_save (Book* self, const gchar* type, gint quality, GFile* file, GError** error) {
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ GQuark _tmp3_ = 0U;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ static GQuark _tmp2_label0 = 0;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ static GQuark _tmp2_label1 = 0;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ static GQuark _tmp2_label2 = 0;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ static GQuark _tmp2_label3 = 0;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ static GQuark _tmp2_label4 = 0;
+#line 4289 "book.c"
+ GError * _inner_error_ = NULL;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (type != NULL);
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (file != NULL);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = type;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = _tmp0_;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (((_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("jpeg")))) || (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("png"))))) || (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("tiff"))))) {
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ switch (0) {
+#line 4307 "book.c"
+ default:
+ {
+ const gchar* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ GFile* _tmp6_ = NULL;
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = type;
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = quality;
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = file;
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_save_multi_file (self, _tmp4_, _tmp5_, _tmp6_, &_inner_error_);
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_propagate_error (error, _inner_error_);
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return;
+#line 4327 "book.c"
+ }
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 4331 "book.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("ps")))) {
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ switch (0) {
+#line 4337 "book.c"
+ default:
+ {
+ GFile* _tmp7_ = NULL;
+#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = file;
+#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_save_ps (self, _tmp7_, &_inner_error_);
+#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_propagate_error (error, _inner_error_);
+#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return;
+#line 4351 "book.c"
+ }
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 4355 "book.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("pdf")))) {
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ switch (0) {
+#line 4361 "book.c"
+ default:
+ {
+ GFile* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = file;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = quality;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_save_pdf (self, _tmp8_, _tmp9_, &_inner_error_);
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_propagate_error (error, _inner_error_);
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return;
+#line 4378 "book.c"
+ }
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 4382 "book.c"
+ }
+ }
+ }
+}
+
+
+guint book_get_n_pages (Book* self) {
+ guint result;
+ GList* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, 0U);
+#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->priv->pages;
+#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = g_list_length (_tmp0_);
+#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp1_;
+#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 4403 "book.c"
+}
+
+
+gboolean book_get_needs_saving (Book* self) {
+ gboolean result;
+ gboolean _tmp0_ = FALSE;
+#line 21 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 21 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->priv->needs_saving_;
+#line 21 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp0_;
+#line 21 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 4418 "book.c"
+}
+
+
+void book_set_needs_saving (Book* self, gboolean value) {
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 22 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 24 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->priv->needs_saving_;
+#line 24 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = value;
+#line 24 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp0_ == _tmp1_) {
+#line 25 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return;
+#line 4436 "book.c"
+ }
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = value;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->needs_saving_ = _tmp2_;
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "needs-saving-changed");
+#line 4444 "book.c"
+}
+
+
+static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__PAGE) (gpointer data1, gpointer arg_1, gpointer data2);
+ register GMarshalFunc_VOID__PAGE callback;
+ register GCClosure * cc;
+ register gpointer data1;
+ register gpointer data2;
+ cc = (GCClosure *) closure;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (n_param_values == 2);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data1 = closure->data;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data2 = param_values->data[0].v_pointer;
+#line 4463 "book.c"
+ } else {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data1 = param_values->data[0].v_pointer;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data2 = closure->data;
+#line 4469 "book.c"
+ }
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ callback = (GMarshalFunc_VOID__PAGE) (marshal_data ? marshal_data : cc->callback);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ callback (data1, value_get_page (param_values + 1), data2);
+#line 4475 "book.c"
+}
+
+
+static void value_book_init (GValue* value) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 4482 "book.c"
+}
+
+
+static void value_book_free_value (GValue* value) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (value->data[0].v_pointer) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_unref (value->data[0].v_pointer);
+#line 4491 "book.c"
+ }
+}
+
+
+static void value_book_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (src_value->data[0].v_pointer) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ dest_value->data[0].v_pointer = book_ref (src_value->data[0].v_pointer);
+#line 4501 "book.c"
+ } else {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 4505 "book.c"
+ }
+}
+
+
+static gpointer value_book_peek_pointer (const GValue* value) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return value->data[0].v_pointer;
+#line 4513 "book.c"
+}
+
+
+static gchar* value_book_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (collect_values[0].v_pointer) {
+#line 4520 "book.c"
+ Book* object;
+ object = collect_values[0].v_pointer;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 4527 "book.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.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 4531 "book.c"
+ }
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = book_ref (object);
+#line 4535 "book.c"
+ } else {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 4539 "book.c"
+ }
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return NULL;
+#line 4543 "book.c"
+}
+
+
+static gchar* value_book_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ Book** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!object_p) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 4554 "book.c"
+ }
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!value->data[0].v_pointer) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *object_p = NULL;
+#line 4560 "book.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *object_p = value->data[0].v_pointer;
+#line 4564 "book.c"
+ } else {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *object_p = book_ref (value->data[0].v_pointer);
+#line 4568 "book.c"
+ }
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return NULL;
+#line 4572 "book.c"
+}
+
+
+GParamSpec* param_spec_book (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecBook* spec;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_BOOK), NULL);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return G_PARAM_SPEC (spec);
+#line 4586 "book.c"
+}
+
+
+gpointer value_get_book (const GValue* value) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BOOK), NULL);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return value->data[0].v_pointer;
+#line 4595 "book.c"
+}
+
+
+void value_set_book (GValue* value, gpointer v_object) {
+ Book* old;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BOOK));
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ old = value->data[0].v_pointer;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (v_object) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_BOOK));
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = v_object;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_ref (value->data[0].v_pointer);
+#line 4615 "book.c"
+ } else {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 4619 "book.c"
+ }
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (old) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_unref (old);
+#line 4625 "book.c"
+ }
+}
+
+
+void value_take_book (GValue* value, gpointer v_object) {
+ Book* old;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BOOK));
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ old = value->data[0].v_pointer;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (v_object) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_BOOK));
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = v_object;
+#line 4644 "book.c"
+ } else {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 4648 "book.c"
+ }
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (old) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_unref (old);
+#line 4654 "book.c"
+ }
+}
+
+
+static void book_class_init (BookClass * klass) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ book_parent_class = g_type_class_peek_parent (klass);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ BOOK_CLASS (klass)->finalize = book_finalize;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_type_class_add_private (klass, sizeof (BookPrivate));
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_new ("page_added", TYPE_BOOK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__PAGE, G_TYPE_NONE, 1, TYPE_PAGE);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_new ("page_removed", TYPE_BOOK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__PAGE, G_TYPE_NONE, 1, TYPE_PAGE);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_new ("reordered", TYPE_BOOK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_new ("cleared", TYPE_BOOK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_new ("needs_saving_changed", TYPE_BOOK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_new ("saving", TYPE_BOOK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
+#line 4678 "book.c"
+}
+
+
+static void book_instance_init (Book * self) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv = BOOK_GET_PRIVATE (self);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->ref_count = 1;
+#line 4687 "book.c"
+}
+
+
+static void book_finalize (Book* obj) {
+ Book * self;
+ GList* _tmp0_ = NULL;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BOOK, Book);
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->priv->pages;
+#line 4698 "book.c"
+ {
+ GList* page_collection = NULL;
+ GList* page_it = NULL;
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_collection = _tmp0_;
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ for (page_it = page_collection; page_it != NULL; page_it = page_it->next) {
+#line 4706 "book.c"
+ Page* _tmp1_ = NULL;
+ Page* page = NULL;
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = _page_ref0 ((Page*) page_it->data);
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page = _tmp1_;
+#line 4713 "book.c"
+ {
+ Page* _tmp2_ = NULL;
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = page;
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_parse_name ("pixels-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE);
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _book_page_changed_cb_page_pixels_changed, self);
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = page;
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_parse_name ("crop-changed", TYPE_PAGE, &_tmp5_, NULL, FALSE);
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _book_page_changed_cb_page_crop_changed, self);
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_unref0 (page);
+#line 4733 "book.c"
+ }
+ }
+ }
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ __g_list_free__page_unref0_0 (self->priv->pages);
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_byte_array_unref0 (self->priv->jpeg_data);
+#line 4741 "book.c"
+}
+
+
+GType book_get_type (void) {
+ static volatile gsize book_type_id__volatile = 0;
+ if (g_once_init_enter (&book_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_book_init, value_book_free_value, value_book_copy_value, value_book_peek_pointer, "p", value_book_collect_value, "p", value_book_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (BookClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) book_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Book), 0, (GInstanceInitFunc) book_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType book_type_id;
+ book_type_id = g_type_register_fundamental (g_type_fundamental_next (), "Book", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&book_type_id__volatile, book_type_id);
+ }
+ return book_type_id__volatile;
+}
+
+
+gpointer book_ref (gpointer instance) {
+ Book* self;
+ self = instance;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return instance;
+#line 4766 "book.c"
+}
+
+
+void book_unref (gpointer instance) {
+ Book* self;
+ self = instance;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ BOOK_GET_CLASS (self)->finalize (self);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 4779 "book.c"
+ }
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 4787 "book.c"
+}
+
+
+PDFWriter* pdf_writer_construct (GType object_type, GFileOutputStream* stream) {
+ PDFWriter* self = NULL;
+ GFileOutputStream* _tmp0_ = NULL;
+ GFileOutputStream* _tmp1_ = NULL;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (stream != NULL, NULL);
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self = (PDFWriter*) g_type_create_instance (object_type);
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = stream;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (self->priv->stream);
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv->stream = _tmp1_;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return self;
+#line 4809 "book.c"
+}
+
+
+PDFWriter* pdf_writer_new (GFileOutputStream* stream) {
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return pdf_writer_construct (TYPE_PDF_WRITER, stream);
+#line 4816 "book.c"
+}
+
+
+void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1) {
+ gsize _tmp4_ = 0UL;
+ guint8* _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ GError * _inner_error_ = NULL;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 4827 "book.c"
+ {
+ GFileOutputStream* _tmp0_ = NULL;
+ guint8* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->priv->stream;
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = data;
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1__length1 = data_length1;
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_output_stream_write_all ((GOutputStream*) _tmp0_, _tmp1_, (gsize) _tmp1__length1, NULL, NULL, &_inner_error_);
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 4842 "book.c"
+ goto __catch1_g_error;
+ }
+ }
+ goto __finally1;
+ __catch1_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ e = _inner_error_;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _inner_error_ = NULL;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = e;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = _tmp2_->message;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_warning ("book.vala:591: Error writing PDF: %s", _tmp3_);
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_error_free0 (e);
+#line 4864 "book.c"
+ }
+ __finally1:
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_clear_error (&_inner_error_);
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return;
+#line 4875 "book.c"
+ }
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = self->offset;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = data;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5__length1 = data_length1;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->offset = _tmp4_ + _tmp5__length1;
+#line 4885 "book.c"
+}
+
+
+static gchar* string_to_utf8 (const gchar* self, int* result_length1) {
+ gchar* result = NULL;
+ gchar* _result_ = NULL;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ gchar* _tmp2_ = NULL;
+ gint _result__length1 = 0;
+ gint __result__size_ = 0;
+ gint _tmp3_ = 0;
+ gchar* _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gchar* _tmp7_ = NULL;
+ gint _tmp7__length1 = 0;
+#line 1303 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = strlen (self);
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = _tmp0_;
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = g_new0 (gchar, _tmp1_ + 1);
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _result_ = _tmp2_;
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _result__length1 = _tmp1_ + 1;
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ __result__size_ = _result__length1;
+#line 1305 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = _result__length1;
+#line 1305 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _result__length1 = _tmp3_ - 1;
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = _result_;
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4__length1 = _result__length1;
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = strlen (self);
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp6_ = _tmp5_;
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ memcpy (_tmp4_, self, (gsize) _tmp6_);
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp7_ = _result_;
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp7__length1 = _result__length1;
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (result_length1) {
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ *result_length1 = _tmp7__length1;
+#line 4940 "book.c"
+ }
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp7_;
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 4946 "book.c"
+}
+
+
+void pdf_writer_write_string (PDFWriter* self, const gchar* text) {
+ const gchar* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gchar* _tmp2_ = NULL;
+ guint8* _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (text != NULL);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = text;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = string_to_utf8 (_tmp0_, &_tmp1_);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = (guint8*) _tmp2_;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3__length1 = (_tmp1_ * sizeof (gchar)) / sizeof (guint8);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write (self, _tmp3_, (_tmp1_ * sizeof (gchar)) / sizeof (guint8));
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = (g_free (_tmp3_), NULL);
+#line 4972 "book.c"
+}
+
+
+guint pdf_writer_start_object (PDFWriter* self) {
+ guint result = 0U;
+ gsize _tmp0_ = 0UL;
+ GList* _tmp1_ = NULL;
+ guint _tmp2_ = 0U;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, 0U);
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->offset;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->object_offsets = g_list_append (self->object_offsets, (gpointer) ((guintptr) ((guint) _tmp0_)));
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = self->object_offsets;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = g_list_length (_tmp1_);
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp2_;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 4995 "book.c"
+}
+
+
+static void value_pdf_writer_init (GValue* value) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 5002 "book.c"
+}
+
+
+static void value_pdf_writer_free_value (GValue* value) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (value->data[0].v_pointer) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_unref (value->data[0].v_pointer);
+#line 5011 "book.c"
+ }
+}
+
+
+static void value_pdf_writer_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (src_value->data[0].v_pointer) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ dest_value->data[0].v_pointer = pdf_writer_ref (src_value->data[0].v_pointer);
+#line 5021 "book.c"
+ } else {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 5025 "book.c"
+ }
+}
+
+
+static gpointer value_pdf_writer_peek_pointer (const GValue* value) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return value->data[0].v_pointer;
+#line 5033 "book.c"
+}
+
+
+static gchar* value_pdf_writer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (collect_values[0].v_pointer) {
+#line 5040 "book.c"
+ PDFWriter* object;
+ object = collect_values[0].v_pointer;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 5047 "book.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.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 5051 "book.c"
+ }
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = pdf_writer_ref (object);
+#line 5055 "book.c"
+ } else {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 5059 "book.c"
+ }
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return NULL;
+#line 5063 "book.c"
+}
+
+
+static gchar* value_pdf_writer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PDFWriter** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!object_p) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 5074 "book.c"
+ }
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!value->data[0].v_pointer) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *object_p = NULL;
+#line 5080 "book.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *object_p = value->data[0].v_pointer;
+#line 5084 "book.c"
+ } else {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *object_p = pdf_writer_ref (value->data[0].v_pointer);
+#line 5088 "book.c"
+ }
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return NULL;
+#line 5092 "book.c"
+}
+
+
+GParamSpec* param_spec_pdf_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPDFWriter* spec;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PDF_WRITER), NULL);
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return G_PARAM_SPEC (spec);
+#line 5106 "book.c"
+}
+
+
+gpointer value_get_pdf_writer (const GValue* value) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PDF_WRITER), NULL);
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return value->data[0].v_pointer;
+#line 5115 "book.c"
+}
+
+
+void value_set_pdf_writer (GValue* value, gpointer v_object) {
+ PDFWriter* old;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PDF_WRITER));
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ old = value->data[0].v_pointer;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (v_object) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PDF_WRITER));
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = v_object;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_ref (value->data[0].v_pointer);
+#line 5135 "book.c"
+ } else {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 5139 "book.c"
+ }
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (old) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_unref (old);
+#line 5145 "book.c"
+ }
+}
+
+
+void value_take_pdf_writer (GValue* value, gpointer v_object) {
+ PDFWriter* old;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PDF_WRITER));
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ old = value->data[0].v_pointer;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (v_object) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PDF_WRITER));
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = v_object;
+#line 5164 "book.c"
+ } else {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 5168 "book.c"
+ }
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (old) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_unref (old);
+#line 5174 "book.c"
+ }
+}
+
+
+static void pdf_writer_class_init (PDFWriterClass * klass) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_parent_class = g_type_class_peek_parent (klass);
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ PDF_WRITER_CLASS (klass)->finalize = pdf_writer_finalize;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_type_class_add_private (klass, sizeof (PDFWriterPrivate));
+#line 5186 "book.c"
+}
+
+
+static void pdf_writer_instance_init (PDFWriter * self) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->priv = PDF_WRITER_GET_PRIVATE (self);
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->offset = (gsize) 0;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->ref_count = 1;
+#line 5197 "book.c"
+}
+
+
+static void pdf_writer_finalize (PDFWriter* obj) {
+ PDFWriter * self;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PDF_WRITER, PDFWriter);
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_list_free0 (self->object_offsets);
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (self->priv->stream);
+#line 5209 "book.c"
+}
+
+
+GType pdf_writer_get_type (void) {
+ static volatile gsize pdf_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&pdf_writer_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_pdf_writer_init, value_pdf_writer_free_value, value_pdf_writer_copy_value, value_pdf_writer_peek_pointer, "p", value_pdf_writer_collect_value, "p", value_pdf_writer_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PDFWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdf_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PDFWriter), 0, (GInstanceInitFunc) pdf_writer_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType pdf_writer_type_id;
+ pdf_writer_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PDFWriter", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&pdf_writer_type_id__volatile, pdf_writer_type_id);
+ }
+ return pdf_writer_type_id__volatile;
+}
+
+
+gpointer pdf_writer_ref (gpointer instance) {
+ PDFWriter* self;
+ self = instance;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return instance;
+#line 5234 "book.c"
+}
+
+
+void pdf_writer_unref (gpointer instance) {
+ PDFWriter* self;
+ self = instance;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ PDF_WRITER_GET_CLASS (self)->finalize (self);
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 5247 "book.c"
+ }
+}
+
+
+static cairo_status_t _ps_writer_write_cairo_data_cairo_write_func_t (gpointer self, guchar* data, int data_length1) {
+ cairo_status_t result;
+ result = ps_writer_write_cairo_data ((PsWriter*) self, data, data_length1);
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 5257 "book.c"
+}
+
+
+PsWriter* ps_writer_construct (GType object_type, GFileOutputStream* stream) {
+ PsWriter* self = NULL;
+ GFileOutputStream* _tmp0_ = NULL;
+ GFileOutputStream* _tmp1_ = NULL;
+ cairo_surface_t* _tmp2_ = NULL;
+#line 613 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (stream != NULL, NULL);
+#line 613 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self = (PsWriter*) g_type_create_instance (object_type);
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = stream;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (self->stream);
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->stream = _tmp1_;
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = cairo_ps_surface_create_for_stream (_ps_writer_write_cairo_data_cairo_write_func_t, self, (gdouble) 0, (gdouble) 0);
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _cairo_surface_destroy0 (self->surface);
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->surface = _tmp2_;
+#line 613 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return self;
+#line 5286 "book.c"
+}
+
+
+PsWriter* ps_writer_new (GFileOutputStream* stream) {
+#line 613 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return ps_writer_construct (TYPE_PS_WRITER, stream);
+#line 5293 "book.c"
+}
+
+
+static cairo_status_t ps_writer_write_cairo_data (PsWriter* self, guint8* data, int data_length1) {
+ cairo_status_t result = 0;
+ GError * _inner_error_ = NULL;
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 5302 "book.c"
+ {
+ GFileOutputStream* _tmp0_ = NULL;
+ guint8* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->stream;
+#line 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = data;
+#line 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1__length1 = data_length1;
+#line 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_output_stream_write_all ((GOutputStream*) _tmp0_, _tmp1_, (gsize) _tmp1__length1, NULL, NULL, &_inner_error_);
+#line 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 5317 "book.c"
+ goto __catch2_g_error;
+ }
+ }
+ goto __finally2;
+ __catch2_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ e = _inner_error_;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _inner_error_ = NULL;
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = e;
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = _tmp2_->message;
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_warning ("book.vala:627: Error writing data: %s", _tmp3_);
+#line 628 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = CAIRO_STATUS_WRITE_ERROR;
+#line 628 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_error_free0 (e);
+#line 628 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 5343 "book.c"
+ }
+ __finally2:
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_inner_error_ != NULL) {
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_clear_error (&_inner_error_);
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return 0;
+#line 5354 "book.c"
+ }
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = CAIRO_STATUS_SUCCESS;
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 5360 "book.c"
+}
+
+
+static void value_ps_writer_init (GValue* value) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 5367 "book.c"
+}
+
+
+static void value_ps_writer_free_value (GValue* value) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (value->data[0].v_pointer) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ ps_writer_unref (value->data[0].v_pointer);
+#line 5376 "book.c"
+ }
+}
+
+
+static void value_ps_writer_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (src_value->data[0].v_pointer) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ dest_value->data[0].v_pointer = ps_writer_ref (src_value->data[0].v_pointer);
+#line 5386 "book.c"
+ } else {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 5390 "book.c"
+ }
+}
+
+
+static gpointer value_ps_writer_peek_pointer (const GValue* value) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return value->data[0].v_pointer;
+#line 5398 "book.c"
+}
+
+
+static gchar* value_ps_writer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (collect_values[0].v_pointer) {
+#line 5405 "book.c"
+ PsWriter* object;
+ object = collect_values[0].v_pointer;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 5412 "book.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.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 5416 "book.c"
+ }
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = ps_writer_ref (object);
+#line 5420 "book.c"
+ } else {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 5424 "book.c"
+ }
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return NULL;
+#line 5428 "book.c"
+}
+
+
+static gchar* value_ps_writer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PsWriter** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!object_p) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 5439 "book.c"
+ }
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!value->data[0].v_pointer) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *object_p = NULL;
+#line 5445 "book.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *object_p = value->data[0].v_pointer;
+#line 5449 "book.c"
+ } else {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ *object_p = ps_writer_ref (value->data[0].v_pointer);
+#line 5453 "book.c"
+ }
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return NULL;
+#line 5457 "book.c"
+}
+
+
+GParamSpec* param_spec_ps_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPsWriter* spec;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PS_WRITER), NULL);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return G_PARAM_SPEC (spec);
+#line 5471 "book.c"
+}
+
+
+gpointer value_get_ps_writer (const GValue* value) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PS_WRITER), NULL);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return value->data[0].v_pointer;
+#line 5480 "book.c"
+}
+
+
+void value_set_ps_writer (GValue* value, gpointer v_object) {
+ PsWriter* old;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PS_WRITER));
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ old = value->data[0].v_pointer;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (v_object) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PS_WRITER));
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = v_object;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ ps_writer_ref (value->data[0].v_pointer);
+#line 5500 "book.c"
+ } else {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 5504 "book.c"
+ }
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (old) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ ps_writer_unref (old);
+#line 5510 "book.c"
+ }
+}
+
+
+void value_take_ps_writer (GValue* value, gpointer v_object) {
+ PsWriter* old;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PS_WRITER));
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ old = value->data[0].v_pointer;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (v_object) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PS_WRITER));
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = v_object;
+#line 5529 "book.c"
+ } else {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ value->data[0].v_pointer = NULL;
+#line 5533 "book.c"
+ }
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (old) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ ps_writer_unref (old);
+#line 5539 "book.c"
+ }
+}
+
+
+static void ps_writer_class_init (PsWriterClass * klass) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ ps_writer_parent_class = g_type_class_peek_parent (klass);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ PS_WRITER_CLASS (klass)->finalize = ps_writer_finalize;
+#line 5549 "book.c"
+}
+
+
+static void ps_writer_instance_init (PsWriter * self) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->ref_count = 1;
+#line 5556 "book.c"
+}
+
+
+static void ps_writer_finalize (PsWriter* obj) {
+ PsWriter * self;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PS_WRITER, PsWriter);
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _cairo_surface_destroy0 (self->surface);
+#line 611 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (self->stream);
+#line 5568 "book.c"
+}
+
+
+GType ps_writer_get_type (void) {
+ static volatile gsize ps_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&ps_writer_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_ps_writer_init, value_ps_writer_free_value, value_ps_writer_copy_value, value_ps_writer_peek_pointer, "p", value_ps_writer_collect_value, "p", value_ps_writer_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PsWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ps_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PsWriter), 0, (GInstanceInitFunc) ps_writer_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType ps_writer_type_id;
+ ps_writer_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PsWriter", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&ps_writer_type_id__volatile, ps_writer_type_id);
+ }
+ return ps_writer_type_id__volatile;
+}
+
+
+gpointer ps_writer_ref (gpointer instance) {
+ PsWriter* self;
+ self = instance;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return instance;
+#line 5593 "book.c"
+}
+
+
+void ps_writer_unref (gpointer instance) {
+ PsWriter* self;
+ self = instance;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ PS_WRITER_GET_CLASS (self)->finalize (self);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 5606 "book.c"
+ }
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/src/book.vala b/src/book.vala
new file mode 100644
index 0000000..db9be0b
--- /dev/null
+++ b/src/book.vala
@@ -0,0 +1,633 @@
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+public class Book
+{
+ private List<Page> pages;
+
+ public uint n_pages { get { return pages.length (); } }
+
+ private bool needs_saving_;
+ public bool needs_saving
+ {
+ get { return needs_saving_; }
+ set
+ {
+ if (needs_saving_ == value)
+ return;
+ needs_saving_ = value;
+ needs_saving_changed ();
+ }
+ }
+
+ public signal void page_added (Page page);
+ public signal void page_removed (Page page);
+ public signal void reordered ();
+ public signal void cleared ();
+ public signal void needs_saving_changed ();
+ public signal void saving (int i);
+
+ public Book ()
+ {
+ pages = new List<Page> ();
+ }
+
+ ~Book ()
+ {
+ foreach (var page in pages)
+ {
+ page.pixels_changed.disconnect (page_changed_cb);
+ page.crop_changed.disconnect (page_changed_cb);
+ }
+ }
+
+ public void clear ()
+ {
+ foreach (var page in pages)
+ {
+ page.pixels_changed.disconnect (page_changed_cb);
+ page.crop_changed.disconnect (page_changed_cb);
+ }
+ pages = null;
+ cleared ();
+ }
+
+ private void page_changed_cb (Page page)
+ {
+ needs_saving = true;
+ }
+
+ public void append_page (Page page)
+ {
+ page.pixels_changed.connect (page_changed_cb);
+ page.crop_changed.connect (page_changed_cb);
+
+ pages.append (page);
+ page_added (page);
+ needs_saving = true;
+ }
+
+ public void move_page (Page page, uint location)
+ {
+ pages.remove (page);
+ pages.insert (page, (int) location);
+ reordered ();
+ needs_saving = true;
+ }
+
+ public void reverse ()
+ {
+ var new_pages = new List<Page> ();
+ foreach (var page in pages)
+ new_pages.prepend (page);
+ pages = (owned) new_pages;
+
+ reordered ();
+ needs_saving = true;
+ }
+
+ public void combine_sides ()
+ {
+ var n_front = n_pages - n_pages / 2;
+ var new_pages = new List<Page> ();
+ for (var i = 0; i < n_pages; i++)
+ {
+ if (i % 2 == 0)
+ new_pages.append (pages.nth_data (i / 2));
+ else
+ new_pages.append (pages.nth_data (n_front + (i / 2)));
+ }
+ pages = (owned) new_pages;
+
+ reordered ();
+ needs_saving = true;
+ }
+
+ public void combine_sides_reverse ()
+ {
+ var new_pages = new List<Page> ();
+ for (var i = 0; i < n_pages; i++)
+ {
+ if (i % 2 == 0)
+ new_pages.append (pages.nth_data (i / 2));
+ else
+ new_pages.append (pages.nth_data (n_pages - 1 - (i / 2)));
+ }
+ pages = (owned) new_pages;
+
+ reordered ();
+ needs_saving = true;
+ }
+
+ public void delete_page (Page page)
+ {
+ page.pixels_changed.disconnect (page_changed_cb);
+ page.crop_changed.disconnect (page_changed_cb);
+ pages.remove (page);
+ page_removed (page);
+ needs_saving = true;
+ }
+
+ public Page get_page (int page_number)
+ {
+ if (page_number < 0)
+ page_number = (int) pages.length () + page_number;
+ return pages.nth_data (page_number);
+ }
+
+ public uint get_page_index (Page page)
+ {
+ return pages.index (page);
+ }
+
+ private File make_indexed_file (string uri, int i)
+ {
+ if (n_pages == 1)
+ return File.new_for_uri (uri);
+
+ /* Insert index before extension */
+ var basename = Path.get_basename (uri);
+ string prefix = uri, suffix = "";
+ var extension_index = basename.last_index_of_char ('.');
+ if (extension_index >= 0)
+ {
+ suffix = basename.slice (extension_index, basename.length);
+ prefix = uri.slice (0, uri.length - suffix.length);
+ }
+ var width = n_pages.to_string().length;
+ var number_format = "%%0%dd".printf (width);
+ var filename = prefix + "-" + number_format.printf (i + 1) + suffix;
+ return File.new_for_uri (filename);
+ }
+
+ private void save_multi_file (string type, int quality, File file) throws Error
+ {
+ for (var i = 0; i < n_pages; i++)
+ {
+ var page = get_page (i);
+ page.save (type, quality, make_indexed_file (file.get_uri (), i));
+ saving (i);
+ }
+ }
+
+ private void save_ps_pdf_surface (Cairo.Surface surface, Gdk.Pixbuf image, double dpi)
+ {
+ var context = new Cairo.Context (surface);
+ context.scale (72.0 / dpi, 72.0 / dpi);
+ Gdk.cairo_set_source_pixbuf (context, image, 0, 0);
+ context.get_source ().set_filter (Cairo.Filter.BEST);
+ context.paint ();
+ }
+
+ private void save_ps (File file) throws Error
+ {
+ var stream = file.replace (null, false, FileCreateFlags.NONE, null);
+ var writer = new PsWriter (stream);
+ var surface = writer.surface;
+
+ for (var i = 0; i < n_pages; i++)
+ {
+ var page = get_page (i);
+ var image = page.get_image (true);
+ var width = image.width * 72.0 / page.dpi;
+ var height = image.height * 72.0 / page.dpi;
+ surface.set_size (width, height);
+ save_ps_pdf_surface (surface, image, page.dpi);
+ surface.show_page ();
+ saving (i);
+ }
+ }
+
+ private uint8[]? compress_zlib (uint8[] data)
+ {
+ var stream = ZLib.DeflateStream (ZLib.Level.BEST_COMPRESSION);
+ var out_data = new uint8[data.length];
+
+ stream.next_in = data;
+ stream.next_out = out_data;
+ while (stream.avail_in > 0)
+ {
+ if (stream.deflate (ZLib.Flush.FINISH) == ZLib.Status.STREAM_ERROR)
+ break;
+ }
+
+ if (stream.avail_in > 0)
+ return null;
+
+ var n_written = data.length - stream.avail_out;
+ out_data.resize ((int) n_written);
+
+ return out_data;
+ }
+
+ private ByteArray jpeg_data;
+
+ private uint8[] compress_jpeg (Gdk.Pixbuf image, int quality, int dpi)
+ {
+ jpeg_data = new ByteArray ();
+ string[] keys = { "quality", "density-unit", "x-density", "y-density", null };
+ string[] values = { "%d".printf (quality), "dots-per-inch", "%d".printf (dpi), "%d".printf (dpi), null };
+ try
+ {
+ image.save_to_callbackv (write_pixbuf_data, "jpeg", keys, values);
+ }
+ catch (Error e)
+ {
+ }
+ var data = (owned) jpeg_data.data;
+ jpeg_data = null;
+
+ return data;
+ }
+
+ private bool write_pixbuf_data (uint8[] buf) throws Error
+ {
+ jpeg_data.append (buf);
+ return true;
+ }
+
+ private void save_pdf (File file, int quality) throws Error
+ {
+ /* Generate a random ID for this file */
+ var id = "";
+ for (var i = 0; i < 4; i++)
+ id += "%08x".printf (Random.next_int ());
+
+ var stream = file.replace (null, false, FileCreateFlags.NONE, null);
+ var writer = new PDFWriter (stream);
+
+ /* Header */
+ writer.write_string ("%PDF-1.3\n");
+
+ /* Comment with binary as recommended so file is treated as binary */
+ writer.write_string ("%\xe2\xe3\xcf\xd3\n");
+
+ /* Catalog */
+ var catalog_number = writer.start_object ();
+ writer.write_string ("%u 0 obj\n".printf (catalog_number));
+ writer.write_string ("<<\n");
+ writer.write_string ("/Type /Catalog\n");
+ //FIXMEwriter.write_string ("/Metadata %u 0 R\n".printf (catalog_number + 1));
+ //FIXMEwriter.write_string ("/MarkInfo << /Marked true >>");
+ writer.write_string ("/Pages %u 0 R\n".printf (catalog_number + 1)); //+2
+ writer.write_string (">>\n");
+ writer.write_string ("endobj\n");
+
+ /* Metadata */
+ /* FIXME writer.write_string ("\n");
+ number = writer.start_object ();
+ writer.write_string ("%u 0 obj\n".printf (number));
+ writer.write_string ("<<\n");
+ writer.write_string ("/Type /Metadata\n");
+ writer.write_string ("/Subtype /XML\n");
+ writer.write_string ("/Length %u\n".printf (...));
+ writer.write_string (">>\n");
+ writer.write_string ("stream\n");
+ // ...
+ writer.write_string ("\n");
+ writer.write_string ("endstream\n");
+ writer.write_string ("endobj\n");*/
+
+ /* Pages */
+ writer.write_string ("\n");
+ var pages_number = writer.start_object ();
+ writer.write_string ("%u 0 obj\n".printf (pages_number));
+ writer.write_string ("<<\n");
+ writer.write_string ("/Type /Pages\n");
+ writer.write_string ("/Kids [");
+ for (var i = 0; i < n_pages; i++)
+ writer.write_string (" %u 0 R".printf (pages_number + 1 + (i*3)));
+ writer.write_string (" ]\n");
+ writer.write_string ("/Count %u\n".printf (n_pages));
+ writer.write_string (">>\n");
+ writer.write_string ("endobj\n");
+
+ for (var i = 0; i < n_pages; i++)
+ {
+ var page = get_page (i);
+ var image = page.get_image (true);
+ var width = image.width;
+ var height = image.height;
+ unowned uint8[] pixels = image.get_pixels ();
+ var page_width = width * 72.0 / page.dpi;
+ var page_height = height * 72.0 / page.dpi;
+
+ int depth = 8;
+ string color_space = "DeviceRGB";
+ string? filter = null;
+ char[] width_buffer = new char[double.DTOSTR_BUF_SIZE];
+ char[] height_buffer = new char[double.DTOSTR_BUF_SIZE];
+ uint8[] data;
+ if (page.is_color)
+ {
+ depth = 8;
+ color_space = "DeviceRGB";
+ var data_length = height * width * 3;
+ data = new uint8[data_length];
+ for (var row = 0; row < height; row++)
+ {
+ var in_offset = row * image.rowstride;
+ var out_offset = row * width * 3;
+ for (var x = 0; x < width; x++)
+ {
+ var in_o = in_offset + x*3;
+ var out_o = out_offset + x*3;
+
+ data[out_o] = pixels[in_o];
+ data[out_o+1] = pixels[in_o+1];
+ data[out_o+2] = pixels[in_o+2];
+ }
+ }
+ }
+ else if (page.depth == 2)
+ {
+ int shift_count = 6;
+ depth = 2;
+ color_space = "DeviceGray";
+ var data_length = height * ((width * 2 + 7) / 8);
+ data = new uint8[data_length];
+ var offset = 0;
+ for (var row = 0; row < height; row++)
+ {
+ /* Pad to the next line */
+ if (shift_count != 6)
+ {
+ offset++;
+ shift_count = 6;
+ }
+
+ var in_offset = row * image.rowstride;
+ for (var x = 0; x < width; x++)
+ {
+ /* Clear byte */
+ if (shift_count == 6)
+ data[offset] = 0;
+
+ /* Set bits */
+ var p = pixels[in_offset + x*3];
+ if (p >= 192)
+ data[offset] |= 3 << shift_count;
+ else if (p >= 128)
+ data[offset] |= 2 << shift_count;
+ else if (p >= 64)
+ data[offset] |= 1 << shift_count;
+
+ /* Move to the next position */
+ if (shift_count == 0)
+ {
+ offset++;
+ shift_count = 6;
+ }
+ else
+ shift_count -= 2;
+ }
+ }
+ }
+ else if (page.depth == 1)
+ {
+ int mask = 0x80;
+
+ depth = 1;
+ color_space = "DeviceGray";
+ var data_length = height * ((width + 7) / 8);
+ data = new uint8[data_length];
+ var offset = 0;
+ for (var row = 0; row < height; row++)
+ {
+ /* Pad to the next line */
+ if (mask != 0x80)
+ {
+ offset++;
+ mask = 0x80;
+ }
+
+ var in_offset = row * image.rowstride;
+ for (var x = 0; x < width; x++)
+ {
+ /* Clear byte */
+ if (mask == 0x80)
+ data[offset] = 0;
+
+ /* Set bit */
+ if (pixels[in_offset+x*3] != 0)
+ data[offset] |= (uint8) mask;
+
+ /* Move to the next bit */
+ mask >>= 1;
+ if (mask == 0)
+ {
+ offset++;
+ mask = 0x80;
+ }
+ }
+ }
+ }
+ else
+ {
+ depth = 8;
+ color_space = "DeviceGray";
+ var data_length = height * width;
+ data = new uint8 [data_length];
+ for (var row = 0; row < height; row++)
+ {
+ var in_offset = row * image.rowstride;
+ var out_offset = row * width;
+ for (var x = 0; x < width; x++)
+ data[out_offset+x] = pixels[in_offset+x*3];
+ }
+ }
+
+ /* Compress data */
+ var compressed_data = compress_zlib (data);
+ if (compressed_data != null)
+ {
+ /* Try if JPEG compression is better */
+ if (depth > 1)
+ {
+ var jpeg_data = compress_jpeg (image, quality, page.dpi);
+ if (jpeg_data.length < compressed_data.length)
+ {
+ filter = "DCTDecode";
+ data = jpeg_data;
+ }
+ }
+
+ if (filter == null)
+ {
+ filter = "FlateDecode";
+ data = compressed_data;
+ }
+ }
+
+ /* Page */
+ writer.write_string ("\n");
+ var number = writer.start_object ();
+ writer.write_string ("%u 0 obj\n".printf (number));
+ writer.write_string ("<<\n");
+ writer.write_string ("/Type /Page\n");
+ writer.write_string ("/Parent %u 0 R\n".printf (pages_number));
+ writer.write_string ("/Resources << /XObject << /Im%d %u 0 R >> >>\n".printf (i, number+1));
+ writer.write_string ("/MediaBox [ 0 0 %s %s ]\n".printf (page_width.format (width_buffer, "%.2f"), page_height.format (height_buffer, "%.2f")));
+ writer.write_string ("/Contents %u 0 R\n".printf (number+2));
+ writer.write_string (">>\n");
+ writer.write_string ("endobj\n");
+
+ /* Page image */
+ writer.write_string ("\n");
+ number = writer.start_object ();
+ writer.write_string ("%u 0 obj\n".printf (number));
+ writer.write_string ("<<\n");
+ writer.write_string ("/Type /XObject\n");
+ writer.write_string ("/Subtype /Image\n");
+ writer.write_string ("/Width %d\n".printf (width));
+ writer.write_string ("/Height %d\n".printf (height));
+ writer.write_string ("/ColorSpace /%s\n".printf (color_space));
+ writer.write_string ("/BitsPerComponent %d\n".printf (depth));
+ writer.write_string ("/Length %d\n".printf (data.length));
+ if (filter != null)
+ writer.write_string ("/Filter /%s\n".printf (filter));
+ writer.write_string (">>\n");
+ writer.write_string ("stream\n");
+ writer.write (data);
+ writer.write_string ("\n");
+ writer.write_string ("endstream\n");
+ writer.write_string ("endobj\n");
+
+ /* Page contents */
+ var command = "q\n%s 0 0 %s 0 0 cm\n/Im%d Do\nQ".printf (page_width.format (width_buffer, "%f"), page_height.format (height_buffer, "%f"), i);
+ writer.write_string ("\n");
+ number = writer.start_object ();
+ writer.write_string ("%u 0 obj\n".printf (number));
+ writer.write_string ("<<\n");
+ writer.write_string ("/Length %d\n".printf (command.length));
+ writer.write_string (">>\n");
+ writer.write_string ("stream\n");
+ writer.write_string (command);
+ writer.write_string ("\n");
+ writer.write_string ("endstream\n");
+ writer.write_string ("endobj\n");
+
+ saving (i);
+ }
+
+ /* Info */
+ writer.write_string ("\n");
+ var info_number = writer.start_object ();
+ writer.write_string ("%u 0 obj\n".printf (info_number));
+ writer.write_string ("<<\n");
+ writer.write_string ("/Creator (Simple Scan %s)\n".printf (VERSION));
+ writer.write_string (">>\n");
+ writer.write_string ("endobj\n");
+
+ /* Cross-reference table */
+ writer.write_string ("\n");
+ var xref_offset = writer.offset;
+ writer.write_string ("xref\n");
+ writer.write_string ("0 %zu\n".printf (writer.object_offsets.length () + 1));
+ writer.write_string ("0000000000 65535 f \n");
+ foreach (var offset in writer.object_offsets)
+ writer.write_string ("%010zu 00000 n \n".printf (offset));
+
+ /* Trailer */
+ writer.write_string ("\n");
+ writer.write_string ("trailer\n");
+ writer.write_string ("<<\n");
+ writer.write_string ("/Size %zu\n".printf (writer.object_offsets.length () + 1));
+ writer.write_string ("/Info %u 0 R\n".printf (info_number));
+ writer.write_string ("/Root %u 0 R\n".printf (catalog_number));
+ writer.write_string ("/ID [<%s> <%s>]\n".printf (id, id));
+ writer.write_string (">>\n");
+ writer.write_string ("startxref\n");
+ writer.write_string ("%zu\n".printf (xref_offset));
+ writer.write_string ("%%EOF\n");
+ }
+
+ public void save (string type, int quality, File file) throws Error
+ {
+ switch (type)
+ {
+ case "jpeg":
+ case "png":
+ case "tiff":
+ save_multi_file (type, quality, file);
+ break;
+ case "ps":
+ save_ps (file);
+ break;
+ case "pdf":
+ save_pdf (file, quality);
+ break;
+ }
+ }
+}
+
+private class PDFWriter
+{
+ public size_t offset = 0;
+ public List<uint> object_offsets;
+ private FileOutputStream stream;
+
+ public PDFWriter (FileOutputStream stream)
+ {
+ this.stream = stream;
+ }
+
+ public void write (uint8[] data)
+ {
+ try
+ {
+ stream.write_all (data, null, null);
+ }
+ catch (Error e)
+ {
+ warning ("Error writing PDF: %s", e.message);
+ }
+ offset += data.length;
+ }
+
+ public void write_string (string text)
+ {
+ write ((uint8[]) text.to_utf8 ());
+ }
+
+ public uint start_object ()
+ {
+ object_offsets.append ((uint)offset);
+ return object_offsets.length ();
+ }
+}
+
+public class PsWriter
+{
+ public Cairo.PsSurface surface;
+ public FileOutputStream stream;
+
+ public PsWriter (FileOutputStream stream)
+ {
+ this.stream = stream;
+ surface = new Cairo.PsSurface.for_stream (write_cairo_data, 0, 0);
+ }
+
+ private Cairo.Status write_cairo_data (uint8[] data)
+ {
+ try
+ {
+ stream.write_all (data, null, null);
+ }
+ catch (Error e)
+ {
+ warning ("Error writing data: %s", e.message);
+ return Cairo.Status.WRITE_ERROR;
+ }
+
+ return Cairo.Status.SUCCESS;
+ }
+}
diff --git a/src/colord.vapi b/src/colord.vapi
new file mode 100644
index 0000000..817673f
--- /dev/null
+++ b/src/colord.vapi
@@ -0,0 +1,17 @@
+[CCode (cprefix = "Cd", lower_case_cprefix = "cd_", cheader_filename = "colord.h")]
+namespace Colord {
+ public class Client : GLib.Object {
+ public Client ();
+ public bool connect_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
+ public Device find_device_by_property_sync (string key, string value, GLib.Cancellable? cancellable = null) throws GLib.Error;
+ }
+ public class Device : GLib.Object {
+ public bool connect_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
+ public Profile? get_default_profile ();
+ }
+ public class Profile : GLib.Object {
+ public bool connect_sync (GLib.Cancellable? cancellable = null) throws GLib.Error;
+ public string? filename { get; }
+ }
+ public const string DEVICE_PROPERTY_SERIAL;
+}
diff --git a/src/config.vapi b/src/config.vapi
new file mode 100644
index 0000000..e6efeda
--- /dev/null
+++ b/src/config.vapi
@@ -0,0 +1,7 @@
+[CCode (cprefix = "", lower_case_cprefix = "")]
+public const string PKGDATADIR;
+public const string LOCALE_DIR;
+public const string GETTEXT_PACKAGE;
+public const string VERSION;
+public const string UI_DIR;
+public const string ICON_DIR;
diff --git a/src/page-view.c b/src/page-view.c
new file mode 100644
index 0000000..93a7130
--- /dev/null
+++ b/src/page-view.c
@@ -0,0 +1,6910 @@
+/* page-view.c generated by valac 0.24.0, the Vala compiler
+ * generated from page-view.vala, do not modify */
+
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <float.h>
+#include <math.h>
+#include <gdk/gdk.h>
+#include <string.h>
+#include <stdlib.h>
+#include <cairo.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_CROP_LOCATION (crop_location_get_type ())
+
+#define TYPE_PAGE_VIEW (page_view_get_type ())
+#define PAGE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_VIEW, PageView))
+#define PAGE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_VIEW, PageViewClass))
+#define IS_PAGE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_VIEW))
+#define IS_PAGE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_VIEW))
+#define PAGE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_VIEW, PageViewClass))
+
+typedef struct _PageView PageView;
+typedef struct _PageViewClass PageViewClass;
+typedef struct _PageViewPrivate PageViewPrivate;
+
+#define TYPE_PAGE (page_get_type ())
+#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
+#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
+#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
+#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
+#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))
+
+typedef struct _Page Page;
+typedef struct _PageClass PageClass;
+
+#define TYPE_SCAN_DIRECTION (scan_direction_get_type ())
+#define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL)))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _ParamSpecPageView ParamSpecPageView;
+
+typedef enum {
+ CROP_LOCATION_NONE = 0,
+ CROP_LOCATION_MIDDLE,
+ CROP_LOCATION_TOP,
+ CROP_LOCATION_BOTTOM,
+ CROP_LOCATION_LEFT,
+ CROP_LOCATION_RIGHT,
+ CROP_LOCATION_TOP_LEFT,
+ CROP_LOCATION_TOP_RIGHT,
+ CROP_LOCATION_BOTTOM_LEFT,
+ CROP_LOCATION_BOTTOM_RIGHT
+} CropLocation;
+
+struct _PageView {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PageViewPrivate * priv;
+};
+
+struct _PageViewClass {
+ GTypeClass parent_class;
+ void (*finalize) (PageView *self);
+};
+
+typedef enum {
+ SCAN_DIRECTION_TOP_TO_BOTTOM,
+ SCAN_DIRECTION_LEFT_TO_RIGHT,
+ SCAN_DIRECTION_BOTTOM_TO_TOP,
+ SCAN_DIRECTION_RIGHT_TO_LEFT
+} ScanDirection;
+
+struct _PageViewPrivate {
+ Page* _page;
+ GdkPixbuf* image;
+ gboolean selected_;
+ gint border_width;
+ gboolean update_image;
+ ScanDirection scan_direction;
+ gint scan_line;
+ gint width_;
+ gint height_;
+ gint _x_offset;
+ gint _y_offset;
+ CropLocation crop_location;
+ gdouble selected_crop_px;
+ gdouble selected_crop_py;
+ gint selected_crop_x;
+ gint selected_crop_y;
+ gint selected_crop_w;
+ gint selected_crop_h;
+ GdkCursorType _cursor;
+ gint animate_n_segments;
+ gint animate_segment;
+ guint animate_timeout;
+};
+
+struct _ParamSpecPageView {
+ GParamSpec parent_instance;
+};
+
+
+static gpointer page_view_parent_class = NULL;
+
+GType crop_location_get_type (void) G_GNUC_CONST;
+gpointer page_view_ref (gpointer instance);
+void page_view_unref (gpointer instance);
+GParamSpec* param_spec_page_view (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_page_view (GValue* value, gpointer v_object);
+void value_take_page_view (GValue* value, gpointer v_object);
+gpointer value_get_page_view (const GValue* value);
+GType page_view_get_type (void) G_GNUC_CONST;
+gpointer page_ref (gpointer instance);
+void page_unref (gpointer instance);
+GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_page (GValue* value, gpointer v_object);
+void value_take_page (GValue* value, gpointer v_object);
+gpointer value_get_page (const GValue* value);
+GType page_get_type (void) G_GNUC_CONST;
+GType scan_direction_get_type (void) G_GNUC_CONST;
+#define PAGE_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PAGE_VIEW, PageViewPrivate))
+enum {
+ PAGE_VIEW_DUMMY_PROPERTY
+};
+Page* page_view_get_page (PageView* self);
+static void page_view_page_pixels_changed_cb (PageView* self, Page* p);
+static void _page_view_page_pixels_changed_cb_page_pixels_changed (Page* _sender, gpointer self);
+static void page_view_page_size_changed_cb (PageView* self, Page* p);
+static void _page_view_page_size_changed_cb_page_size_changed (Page* _sender, gpointer self);
+static void page_view_page_overlay_changed_cb (PageView* self, Page* p);
+static void _page_view_page_overlay_changed_cb_page_crop_changed (Page* _sender, gpointer self);
+static void _page_view_page_overlay_changed_cb_page_scan_line_changed (Page* _sender, gpointer self);
+static void page_view_scan_direction_changed_cb (PageView* self, Page* p);
+static void _page_view_scan_direction_changed_cb_page_scan_direction_changed (Page* _sender, gpointer self);
+PageView* page_view_new (Page* page);
+PageView* page_view_construct (GType object_type, Page* page);
+static void page_view_set_page (PageView* self, Page* value);
+static guchar page_view_get_sample (PageView* self, guchar* pixels, int pixels_length1, gint offset, gint x, gint depth, gint sample);
+static void page_view_get_pixel (PageView* self, Page* page, gint x, gint y, guchar* pixel, int pixel_length1);
+ScanDirection page_get_scan_direction (Page* self);
+gint page_get_scan_width (Page* self);
+gint page_get_scan_height (Page* self);
+gint page_get_depth (Page* self);
+gint page_get_n_channels (Page* self);
+guchar* page_get_pixels (Page* self, int* result_length1);
+gint page_get_rowstride (Page* self);
+static void page_view_set_pixel (PageView* self, Page* page, gdouble l, gdouble r, gdouble t, gdouble b, guchar* output, int output_length1, gint offset);
+static void page_view_update_preview (PageView* self, Page* page, GdkPixbuf** output_image, gint output_width, gint output_height, ScanDirection scan_direction, gint old_scan_line, gint scan_line);
+gint page_get_width (Page* self);
+gint page_get_height (Page* self);
+gboolean page_get_has_data (Page* self);
+static gint page_view_get_preview_width (PageView* self);
+static gint page_view_get_preview_height (PageView* self);
+static void page_view_update_page_view (PageView* self);
+gint page_get_scan_line (Page* self);
+static gint page_view_page_to_screen_x (PageView* self, gint x);
+static gint page_view_page_to_screen_y (PageView* self, gint y);
+static gint page_view_screen_to_page_x (PageView* self, gint x);
+static gint page_view_screen_to_page_y (PageView* self, gint y);
+static CropLocation page_view_get_crop_location (PageView* self, gint x, gint y);
+gboolean page_get_has_crop (Page* self);
+gint page_get_crop_x (Page* self);
+gint page_get_crop_y (Page* self);
+gint page_get_crop_width (Page* self);
+gint page_get_crop_height (Page* self);
+const gchar* page_get_crop_name (Page* self);
+void page_view_button_press (PageView* self, gint x, gint y);
+void page_view_motion (PageView* self, gint x, gint y);
+static void page_view_set_cursor (PageView* self, GdkCursorType value);
+void page_move_crop (Page* self, gint x, gint y);
+void page_set_custom_crop (Page* self, gint width, gint height);
+void page_view_button_release (PageView* self, gint x, gint y);
+static gboolean page_view_animation_cb (PageView* self);
+static void page_view_update_animation (PageView* self);
+gboolean page_get_is_scanning (Page* self);
+static gboolean _page_view_animation_cb_gsource_func (gpointer self);
+void page_view_render (PageView* self, cairo_t* context);
+gint page_view_get_x_offset (PageView* self);
+gint page_view_get_y_offset (PageView* self);
+gboolean page_view_get_selected (PageView* self);
+void page_view_set_selected (PageView* self, gboolean value);
+void page_view_set_x_offset (PageView* self, gint value);
+void page_view_set_y_offset (PageView* self, gint value);
+GdkCursorType page_view_get_cursor (PageView* self);
+gint page_view_get_width (PageView* self);
+void page_view_set_width (PageView* self, gint value);
+gint page_view_get_height (PageView* self);
+void page_view_set_height (PageView* self, gint value);
+static void page_view_finalize (PageView* obj);
+
+
+GType crop_location_get_type (void) {
+ static volatile gsize crop_location_type_id__volatile = 0;
+ if (g_once_init_enter (&crop_location_type_id__volatile)) {
+ static const GEnumValue values[] = {{CROP_LOCATION_NONE, "CROP_LOCATION_NONE", "none"}, {CROP_LOCATION_MIDDLE, "CROP_LOCATION_MIDDLE", "middle"}, {CROP_LOCATION_TOP, "CROP_LOCATION_TOP", "top"}, {CROP_LOCATION_BOTTOM, "CROP_LOCATION_BOTTOM", "bottom"}, {CROP_LOCATION_LEFT, "CROP_LOCATION_LEFT", "left"}, {CROP_LOCATION_RIGHT, "CROP_LOCATION_RIGHT", "right"}, {CROP_LOCATION_TOP_LEFT, "CROP_LOCATION_TOP_LEFT", "top-left"}, {CROP_LOCATION_TOP_RIGHT, "CROP_LOCATION_TOP_RIGHT", "top-right"}, {CROP_LOCATION_BOTTOM_LEFT, "CROP_LOCATION_BOTTOM_LEFT", "bottom-left"}, {CROP_LOCATION_BOTTOM_RIGHT, "CROP_LOCATION_BOTTOM_RIGHT", "bottom-right"}, {0, NULL, NULL}};
+ GType crop_location_type_id;
+ crop_location_type_id = g_enum_register_static ("CropLocation", values);
+ g_once_init_leave (&crop_location_type_id__volatile, crop_location_type_id);
+ }
+ return crop_location_type_id__volatile;
+}
+
+
+static void _page_view_page_pixels_changed_cb_page_pixels_changed (Page* _sender, gpointer self) {
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_page_pixels_changed_cb ((PageView*) self, _sender);
+#line 222 "page-view.c"
+}
+
+
+static void _page_view_page_size_changed_cb_page_size_changed (Page* _sender, gpointer self) {
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_page_size_changed_cb ((PageView*) self, _sender);
+#line 229 "page-view.c"
+}
+
+
+static void _page_view_page_overlay_changed_cb_page_crop_changed (Page* _sender, gpointer self) {
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_page_overlay_changed_cb ((PageView*) self, _sender);
+#line 236 "page-view.c"
+}
+
+
+static void _page_view_page_overlay_changed_cb_page_scan_line_changed (Page* _sender, gpointer self) {
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_page_overlay_changed_cb ((PageView*) self, _sender);
+#line 243 "page-view.c"
+}
+
+
+static void _page_view_scan_direction_changed_cb_page_scan_direction_changed (Page* _sender, gpointer self) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_scan_direction_changed_cb ((PageView*) self, _sender);
+#line 250 "page-view.c"
+}
+
+
+PageView* page_view_construct (GType object_type, Page* page) {
+ PageView* self = NULL;
+ Page* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+#line 85 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (page != NULL, NULL);
+#line 85 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self = (PageView*) g_type_create_instance (object_type);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = page;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_set_page (self, _tmp0_);
+#line 88 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = page;
+#line 88 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_connect (_tmp1_, "pixels-changed", (GCallback) _page_view_page_pixels_changed_cb_page_pixels_changed, self);
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = page;
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_connect (_tmp2_, "size-changed", (GCallback) _page_view_page_size_changed_cb_page_size_changed, self);
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = page;
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_connect (_tmp3_, "crop-changed", (GCallback) _page_view_page_overlay_changed_cb_page_crop_changed, self);
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = page;
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_connect (_tmp4_, "scan-line-changed", (GCallback) _page_view_page_overlay_changed_cb_page_scan_line_changed, self);
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = page;
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_connect (_tmp5_, "scan-direction-changed", (GCallback) _page_view_scan_direction_changed_cb_page_scan_direction_changed, self);
+#line 85 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return self;
+#line 292 "page-view.c"
+}
+
+
+PageView* page_view_new (Page* page) {
+#line 85 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return page_view_construct (TYPE_PAGE_VIEW, page);
+#line 299 "page-view.c"
+}
+
+
+static guchar page_view_get_sample (PageView* self, guchar* pixels, int pixels_length1, gint offset, gint x, gint depth, gint sample) {
+ guchar result = '\0';
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, '\0');
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = (guchar) 0xFF;
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 311 "page-view.c"
+}
+
+
+static void page_view_get_pixel (PageView* self, Page* page, gint x, gint y, guchar* pixel, int pixel_length1) {
+ Page* _tmp0_ = NULL;
+ ScanDirection _tmp1_ = 0;
+ ScanDirection _tmp2_ = 0;
+ gint depth = 0;
+ Page* _tmp23_ = NULL;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+ gint n_channels = 0;
+ Page* _tmp26_ = NULL;
+ gint _tmp27_ = 0;
+ gint _tmp28_ = 0;
+ guchar* pixels = NULL;
+ Page* _tmp29_ = NULL;
+ gint _tmp30_ = 0;
+ guchar* _tmp31_ = NULL;
+ gint pixels_length1 = 0;
+ gint _pixels_size_ = 0;
+ gint offset = 0;
+ Page* _tmp32_ = NULL;
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+ gint _tmp35_ = 0;
+ gboolean _tmp36_ = FALSE;
+ gint _tmp37_ = 0;
+ guchar* _tmp105_ = NULL;
+ gint _tmp105__length1 = 0;
+ guchar* _tmp106_ = NULL;
+ gint _tmp106__length1 = 0;
+ gint _tmp107_ = 0;
+ gint _tmp108_ = 0;
+ gint _tmp109_ = 0;
+ gint _tmp110_ = 0;
+ gint _tmp111_ = 0;
+ guchar _tmp112_ = '\0';
+ guchar _tmp113_ = '\0';
+ guchar* _tmp114_ = NULL;
+ gint _tmp114__length1 = 0;
+ guchar* _tmp115_ = NULL;
+ gint _tmp115__length1 = 0;
+ gint _tmp116_ = 0;
+ gint _tmp117_ = 0;
+ gint _tmp118_ = 0;
+ gint _tmp119_ = 0;
+ gint _tmp120_ = 0;
+ guchar _tmp121_ = '\0';
+ guchar _tmp122_ = '\0';
+ guchar* _tmp123_ = NULL;
+ gint _tmp123__length1 = 0;
+ guchar* _tmp124_ = NULL;
+ gint _tmp124__length1 = 0;
+ gint _tmp125_ = 0;
+ gint _tmp126_ = 0;
+ gint _tmp127_ = 0;
+ gint _tmp128_ = 0;
+ gint _tmp129_ = 0;
+ guchar _tmp130_ = '\0';
+ guchar _tmp131_ = '\0';
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (page != NULL);
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = page;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = page_get_scan_direction (_tmp0_);
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = _tmp1_;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ switch (_tmp2_) {
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_TOP_TO_BOTTOM:
+#line 387 "page-view.c"
+ {
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 391 "page-view.c"
+ }
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_BOTTOM_TO_TOP:
+#line 395 "page-view.c"
+ {
+ Page* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ Page* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = page;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = page_get_scan_width (_tmp3_);
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = _tmp4_;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = x;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = (_tmp5_ - _tmp6_) - 1;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = page;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = page_get_scan_height (_tmp7_);
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = _tmp8_;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = y;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = (_tmp9_ - _tmp10_) - 1;
+#line 119 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 427 "page-view.c"
+ }
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_LEFT_TO_RIGHT:
+#line 431 "page-view.c"
+ {
+ gint t = 0;
+ gint _tmp11_ = 0;
+ Page* _tmp12_ = NULL;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+#line 121 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = x;
+#line 121 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ t = _tmp11_;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = page;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = page_get_scan_width (_tmp12_);
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp14_ = _tmp13_;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp15_ = y;
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = (_tmp14_ - _tmp15_) - 1;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp16_ = t;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp16_;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 460 "page-view.c"
+ }
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_RIGHT_TO_LEFT:
+#line 464 "page-view.c"
+ {
+ gint t = 0;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+ Page* _tmp19_ = NULL;
+ gint _tmp20_ = 0;
+ gint _tmp21_ = 0;
+ gint _tmp22_ = 0;
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp17_ = x;
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ t = _tmp17_;
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp18_ = y;
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp18_;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp19_ = page;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp20_ = page_get_scan_height (_tmp19_);
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp21_ = _tmp20_;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp22_ = t;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = (_tmp21_ - _tmp22_) - 1;
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 493 "page-view.c"
+ }
+ default:
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 498 "page-view.c"
+ }
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp23_ = page;
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp24_ = page_get_depth (_tmp23_);
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp25_ = _tmp24_;
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ depth = _tmp25_;
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp26_ = page;
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp27_ = page_get_n_channels (_tmp26_);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp28_ = _tmp27_;
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ n_channels = _tmp28_;
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29_ = page;
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp31_ = page_get_pixels (_tmp29_, &_tmp30_);
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ pixels = _tmp31_;
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ pixels_length1 = _tmp30_;
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _pixels_size_ = pixels_length1;
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp32_ = page;
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp33_ = page_get_rowstride (_tmp32_);
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp34_ = _tmp33_;
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp35_ = y;
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ offset = _tmp34_ * _tmp35_;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp37_ = depth;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp37_ == 8) {
+#line 540 "page-view.c"
+ gint _tmp38_ = 0;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp38_ = n_channels;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp36_ = _tmp38_ == 3;
+#line 546 "page-view.c"
+ } else {
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp36_ = FALSE;
+#line 550 "page-view.c"
+ }
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp36_) {
+#line 554 "page-view.c"
+ gint o = 0;
+ gint _tmp39_ = 0;
+ gint _tmp40_ = 0;
+ gint _tmp41_ = 0;
+ guchar* _tmp42_ = NULL;
+ gint _tmp42__length1 = 0;
+ guchar* _tmp43_ = NULL;
+ gint _tmp43__length1 = 0;
+ gint _tmp44_ = 0;
+ guchar _tmp45_ = '\0';
+ guchar _tmp46_ = '\0';
+ guchar* _tmp47_ = NULL;
+ gint _tmp47__length1 = 0;
+ guchar* _tmp48_ = NULL;
+ gint _tmp48__length1 = 0;
+ gint _tmp49_ = 0;
+ guchar _tmp50_ = '\0';
+ guchar _tmp51_ = '\0';
+ guchar* _tmp52_ = NULL;
+ gint _tmp52__length1 = 0;
+ guchar* _tmp53_ = NULL;
+ gint _tmp53__length1 = 0;
+ gint _tmp54_ = 0;
+ guchar _tmp55_ = '\0';
+ guchar _tmp56_ = '\0';
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp39_ = offset;
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp40_ = x;
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp41_ = n_channels;
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ o = _tmp39_ + (_tmp40_ * _tmp41_);
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp42_ = pixel;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp42__length1 = pixel_length1;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp43_ = pixels;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp43__length1 = pixels_length1;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp44_ = o;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp45_ = _tmp43_[_tmp44_];
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp42_[0] = _tmp45_;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp46_ = _tmp42_[0];
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp47_ = pixel;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp47__length1 = pixel_length1;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp48_ = pixels;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp48__length1 = pixels_length1;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp49_ = o;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp50_ = _tmp48_[_tmp49_ + 1];
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp47_[1] = _tmp50_;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp51_ = _tmp47_[1];
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp52_ = pixel;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp52__length1 = pixel_length1;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp53_ = pixels;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp53__length1 = pixels_length1;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp54_ = o;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp55_ = _tmp53_[_tmp54_ + 2];
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp52_[2] = _tmp55_;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp56_ = _tmp52_[2];
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 638 "page-view.c"
+ } else {
+ gboolean _tmp57_ = FALSE;
+ gint _tmp58_ = 0;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp58_ = depth;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp58_ == 8) {
+#line 646 "page-view.c"
+ gint _tmp59_ = 0;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp59_ = n_channels;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp57_ = _tmp59_ == 1;
+#line 652 "page-view.c"
+ } else {
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp57_ = FALSE;
+#line 656 "page-view.c"
+ }
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp57_) {
+#line 660 "page-view.c"
+ guchar* _tmp60_ = NULL;
+ gint _tmp60__length1 = 0;
+ guchar* _tmp61_ = NULL;
+ gint _tmp61__length1 = 0;
+ guchar* _tmp62_ = NULL;
+ gint _tmp62__length1 = 0;
+ guchar* _tmp63_ = NULL;
+ gint _tmp63__length1 = 0;
+ gint _tmp64_ = 0;
+ gint _tmp65_ = 0;
+ guchar _tmp66_ = '\0';
+ guchar _tmp67_ = '\0';
+ guchar _tmp68_ = '\0';
+ guchar _tmp69_ = '\0';
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp60_ = pixel;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp60__length1 = pixel_length1;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp61_ = pixel;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp61__length1 = pixel_length1;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp62_ = pixel;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp62__length1 = pixel_length1;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp63_ = pixels;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp63__length1 = pixels_length1;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp64_ = offset;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp65_ = x;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp66_ = _tmp63_[_tmp64_ + _tmp65_];
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp62_[2] = _tmp66_;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp67_ = _tmp62_[2];
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp61_[1] = _tmp67_;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp68_ = _tmp61_[1];
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp60_[0] = _tmp68_;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp69_ = _tmp60_[0];
+#line 149 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 711 "page-view.c"
+ } else {
+ gboolean _tmp70_ = FALSE;
+ gint _tmp71_ = 0;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp71_ = depth;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp71_ == 1) {
+#line 719 "page-view.c"
+ gint _tmp72_ = 0;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp72_ = n_channels;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp70_ = _tmp72_ == 1;
+#line 725 "page-view.c"
+ } else {
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp70_ = FALSE;
+#line 729 "page-view.c"
+ }
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp70_) {
+#line 733 "page-view.c"
+ gint o = 0;
+ gint _tmp73_ = 0;
+ gint _tmp74_ = 0;
+ gint _tmp75_ = 0;
+ guchar* _tmp76_ = NULL;
+ gint _tmp76__length1 = 0;
+ gint _tmp77_ = 0;
+ guchar _tmp78_ = '\0';
+ gint _tmp79_ = 0;
+ guchar* _tmp80_ = NULL;
+ gint _tmp80__length1 = 0;
+ guchar* _tmp81_ = NULL;
+ gint _tmp81__length1 = 0;
+ guchar* _tmp82_ = NULL;
+ gint _tmp82__length1 = 0;
+ guchar _tmp83_ = '\0';
+ guchar _tmp84_ = '\0';
+ guchar _tmp85_ = '\0';
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp73_ = offset;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp74_ = x;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ o = _tmp73_ + (_tmp74_ / 8);
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp76_ = pixels;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp76__length1 = pixels_length1;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp77_ = o;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp78_ = _tmp76_[_tmp77_];
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp79_ = x;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (((gint) (_tmp78_ & (0x80 >> (_tmp79_ % 8)))) != 0) {
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp75_ = 0x00;
+#line 772 "page-view.c"
+ } else {
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp75_ = 0xFF;
+#line 776 "page-view.c"
+ }
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp80_ = pixel;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp80__length1 = pixel_length1;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp81_ = pixel;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp81__length1 = pixel_length1;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp82_ = pixel;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp82__length1 = pixel_length1;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp82_[2] = (guchar) _tmp75_;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp83_ = _tmp82_[2];
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp81_[1] = _tmp83_;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp84_ = _tmp81_[1];
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp80_[0] = _tmp84_;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp85_ = _tmp80_[0];
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 804 "page-view.c"
+ } else {
+ gboolean _tmp86_ = FALSE;
+ gint _tmp87_ = 0;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp87_ = depth;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp87_ == 2) {
+#line 812 "page-view.c"
+ gint _tmp88_ = 0;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp88_ = n_channels;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp86_ = _tmp88_ == 1;
+#line 818 "page-view.c"
+ } else {
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp86_ = FALSE;
+#line 822 "page-view.c"
+ }
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp86_) {
+#line 826 "page-view.c"
+ gint block_shift[4] = {0};
+ gint _tmp89_[4] = {0};
+ gint o = 0;
+ gint _tmp90_ = 0;
+ gint _tmp91_ = 0;
+ gint sample = 0;
+ guchar* _tmp92_ = NULL;
+ gint _tmp92__length1 = 0;
+ gint _tmp93_ = 0;
+ guchar _tmp94_ = '\0';
+ gint _tmp95_ = 0;
+ gint _tmp96_ = 0;
+ gint _tmp97_ = 0;
+ guchar* _tmp98_ = NULL;
+ gint _tmp98__length1 = 0;
+ guchar* _tmp99_ = NULL;
+ gint _tmp99__length1 = 0;
+ guchar* _tmp100_ = NULL;
+ gint _tmp100__length1 = 0;
+ gint _tmp101_ = 0;
+ guchar _tmp102_ = '\0';
+ guchar _tmp103_ = '\0';
+ guchar _tmp104_ = '\0';
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp89_[0] = 6;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp89_[1] = 4;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp89_[2] = 2;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp89_[3] = 0;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ memcpy (block_shift, _tmp89_, 4 * sizeof (gint));
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp90_ = offset;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp91_ = x;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ o = _tmp90_ + (_tmp91_ / 4);
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp92_ = pixels;
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp92__length1 = pixels_length1;
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp93_ = o;
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp94_ = _tmp92_[_tmp93_];
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp95_ = x;
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp96_ = block_shift[_tmp95_ % 4];
+#line 166 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ sample = (_tmp94_ >> _tmp96_) & 0x3;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp97_ = sample;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ sample = (_tmp97_ * 255) / 3;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp98_ = pixel;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp98__length1 = pixel_length1;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp99_ = pixel;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp99__length1 = pixel_length1;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp100_ = pixel;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp100__length1 = pixel_length1;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp101_ = sample;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp100_[2] = (guchar) _tmp101_;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp102_ = _tmp100_[2];
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp99_[1] = _tmp102_;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp103_ = _tmp99_[1];
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp98_[0] = _tmp103_;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp104_ = _tmp98_[0];
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 912 "page-view.c"
+ }
+ }
+ }
+ }
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp105_ = pixel;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp105__length1 = pixel_length1;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp106_ = pixels;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp106__length1 = pixels_length1;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp107_ = offset;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp108_ = x;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp109_ = depth;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp110_ = x;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp111_ = n_channels;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp112_ = page_view_get_sample (self, _tmp106_, _tmp106__length1, _tmp107_, _tmp108_, _tmp109_, _tmp110_ * _tmp111_);
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp105_[0] = _tmp112_;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp113_ = _tmp105_[0];
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp114_ = pixel;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp114__length1 = pixel_length1;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp115_ = pixels;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp115__length1 = pixels_length1;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp116_ = offset;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp117_ = x;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp118_ = depth;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp119_ = x;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp120_ = n_channels;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp121_ = page_view_get_sample (self, _tmp115_, _tmp115__length1, _tmp116_, _tmp117_, _tmp118_, (_tmp119_ * _tmp120_) + 1);
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp114_[1] = _tmp121_;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp122_ = _tmp114_[1];
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp123_ = pixel;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp123__length1 = pixel_length1;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp124_ = pixels;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp124__length1 = pixels_length1;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp125_ = offset;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp126_ = x;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp127_ = depth;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp128_ = x;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp129_ = n_channels;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp130_ = page_view_get_sample (self, _tmp124_, _tmp124__length1, _tmp125_, _tmp126_, _tmp127_, (_tmp128_ * _tmp129_) + 2);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp123_[2] = _tmp130_;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp131_ = _tmp123_[2];
+#line 989 "page-view.c"
+}
+
+
+static void page_view_set_pixel (PageView* self, Page* page, gdouble l, gdouble r, gdouble t, gdouble b, guchar* output, int output_length1, gint offset) {
+ gint L = 0;
+ gdouble _tmp0_ = 0.0;
+ gint _tmp1_ = 0;
+ gdouble _tmp2_ = 0.0;
+ gint R = 0;
+ gdouble _tmp4_ = 0.0;
+ gint T = 0;
+ gdouble _tmp5_ = 0.0;
+ gint _tmp6_ = 0;
+ gdouble _tmp7_ = 0.0;
+ gint B = 0;
+ gdouble _tmp9_ = 0.0;
+ gdouble red = 0.0;
+ gdouble green = 0.0;
+ gdouble blue = 0.0;
+ gboolean _tmp10_ = FALSE;
+ gboolean _tmp11_ = FALSE;
+ gdouble _tmp12_ = 0.0;
+ gdouble _tmp13_ = 0.0;
+ gboolean _tmp283_ = FALSE;
+ gdouble _tmp284_ = 0.0;
+ gint _tmp285_ = 0;
+ gboolean _tmp309_ = FALSE;
+ gdouble _tmp310_ = 0.0;
+ gint _tmp311_ = 0;
+ gboolean _tmp335_ = FALSE;
+ gdouble _tmp336_ = 0.0;
+ gint _tmp337_ = 0;
+ gboolean _tmp361_ = FALSE;
+ gdouble _tmp362_ = 0.0;
+ gint _tmp363_ = 0;
+ gdouble scale = 0.0;
+ gdouble _tmp387_ = 0.0;
+ gdouble _tmp388_ = 0.0;
+ gdouble _tmp389_ = 0.0;
+ gdouble _tmp390_ = 0.0;
+ guchar* _tmp391_ = NULL;
+ gint _tmp391__length1 = 0;
+ gint _tmp392_ = 0;
+ gdouble _tmp393_ = 0.0;
+ gdouble _tmp394_ = 0.0;
+ guchar _tmp395_ = '\0';
+ guchar* _tmp396_ = NULL;
+ gint _tmp396__length1 = 0;
+ gint _tmp397_ = 0;
+ gdouble _tmp398_ = 0.0;
+ gdouble _tmp399_ = 0.0;
+ guchar _tmp400_ = '\0';
+ guchar* _tmp401_ = NULL;
+ gint _tmp401__length1 = 0;
+ gint _tmp402_ = 0;
+ gdouble _tmp403_ = 0.0;
+ gdouble _tmp404_ = 0.0;
+ guchar _tmp405_ = '\0';
+#line 179 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 179 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (page != NULL);
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = l;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ L = (gint) _tmp0_;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = L;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = l;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (((gdouble) _tmp1_) != _tmp2_) {
+#line 1062 "page-view.c"
+ gint _tmp3_ = 0;
+#line 227 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = L;
+#line 227 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ L = _tmp3_ + 1;
+#line 1068 "page-view.c"
+ }
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = r;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ R = (gint) _tmp4_;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = t;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ T = (gint) _tmp5_;
+#line 230 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = T;
+#line 230 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = t;
+#line 230 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (((gdouble) _tmp6_) != _tmp7_) {
+#line 1084 "page-view.c"
+ gint _tmp8_ = 0;
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = T;
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ T = _tmp8_ + 1;
+#line 1090 "page-view.c"
+ }
+#line 232 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = b;
+#line 232 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ B = (gint) _tmp9_;
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = 0.0;
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = 0.0;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = 0.0;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = r;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = l;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if ((_tmp12_ - _tmp13_) <= 1.0) {
+#line 1108 "page-view.c"
+ gdouble _tmp14_ = 0.0;
+ gdouble _tmp15_ = 0.0;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp14_ = r;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp15_ = l;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = ((gint) _tmp14_) == ((gint) _tmp15_);
+#line 1117 "page-view.c"
+ } else {
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = FALSE;
+#line 1121 "page-view.c"
+ }
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp11_) {
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = TRUE;
+#line 1127 "page-view.c"
+ } else {
+ gboolean _tmp16_ = FALSE;
+ gdouble _tmp17_ = 0.0;
+ gdouble _tmp18_ = 0.0;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp17_ = b;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp18_ = t;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if ((_tmp17_ - _tmp18_) <= 1.0) {
+#line 1138 "page-view.c"
+ gdouble _tmp19_ = 0.0;
+ gdouble _tmp20_ = 0.0;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp19_ = b;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp20_ = t;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp16_ = ((gint) _tmp19_) == ((gint) _tmp20_);
+#line 1147 "page-view.c"
+ } else {
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp16_ = FALSE;
+#line 1151 "page-view.c"
+ }
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = _tmp16_;
+#line 1155 "page-view.c"
+ }
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp10_) {
+#line 1159 "page-view.c"
+ gboolean _tmp21_ = FALSE;
+ gdouble _tmp22_ = 0.0;
+ gdouble _tmp23_ = 0.0;
+ gint _tmp41_ = 0;
+ gint _tmp42_ = 0;
+ gdouble scale = 0.0;
+ gdouble _tmp167_ = 0.0;
+ gdouble _tmp168_ = 0.0;
+ gdouble _tmp169_ = 0.0;
+ gdouble _tmp170_ = 0.0;
+ guchar* _tmp171_ = NULL;
+ gint _tmp171__length1 = 0;
+ gint _tmp172_ = 0;
+ gdouble _tmp173_ = 0.0;
+ gdouble _tmp174_ = 0.0;
+ guchar _tmp175_ = '\0';
+ guchar* _tmp176_ = NULL;
+ gint _tmp176__length1 = 0;
+ gint _tmp177_ = 0;
+ gdouble _tmp178_ = 0.0;
+ gdouble _tmp179_ = 0.0;
+ guchar _tmp180_ = '\0';
+ guchar* _tmp181_ = NULL;
+ gint _tmp181__length1 = 0;
+ gint _tmp182_ = 0;
+ gdouble _tmp183_ = 0.0;
+ gdouble _tmp184_ = 0.0;
+ guchar _tmp185_ = '\0';
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp22_ = l;
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp23_ = r;
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (((gint) _tmp22_) == ((gint) _tmp23_)) {
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp21_ = TRUE;
+#line 1196 "page-view.c"
+ } else {
+ gdouble _tmp24_ = 0.0;
+ gdouble _tmp25_ = 0.0;
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp24_ = t;
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp25_ = b;
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp21_ = ((gint) _tmp24_) == ((gint) _tmp25_);
+#line 1206 "page-view.c"
+ }
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp21_) {
+#line 1210 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp26_ = NULL;
+ gdouble _tmp27_ = 0.0;
+ gdouble _tmp28_ = 0.0;
+ guchar* _tmp29_ = NULL;
+ gint _tmp29__length1 = 0;
+ gint _tmp30_ = 0;
+ guchar _tmp31_ = '\0';
+ guchar _tmp32_ = '\0';
+ guchar* _tmp33_ = NULL;
+ gint _tmp33__length1 = 0;
+ gint _tmp34_ = 0;
+ guchar _tmp35_ = '\0';
+ guchar _tmp36_ = '\0';
+ guchar* _tmp37_ = NULL;
+ gint _tmp37__length1 = 0;
+ gint _tmp38_ = 0;
+ guchar _tmp39_ = '\0';
+ guchar _tmp40_ = '\0';
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp26_ = page;
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp27_ = l;
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp28_ = t;
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp26_, (gint) _tmp27_, (gint) _tmp28_, p, 3);
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29_ = output;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29__length1 = output_length1;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp30_ = offset;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp31_ = p[0];
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29_[_tmp30_] = _tmp31_;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp32_ = _tmp29_[_tmp30_];
+#line 255 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp33_ = output;
+#line 255 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp33__length1 = output_length1;
+#line 255 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp34_ = offset;
+#line 255 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp35_ = p[1];
+#line 255 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp33_[_tmp34_ + 1] = _tmp35_;
+#line 255 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp36_ = _tmp33_[_tmp34_ + 1];
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp37_ = output;
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp37__length1 = output_length1;
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp38_ = offset;
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp39_ = p[2];
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp37_[_tmp38_ + 2] = _tmp39_;
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp40_ = _tmp37_[_tmp38_ + 2];
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 1276 "page-view.c"
+ }
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp41_ = L;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp42_ = R;
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp41_ > _tmp42_) {
+#line 1284 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp43_ = NULL;
+ gint _tmp44_ = 0;
+ gint _tmp45_ = 0;
+ gdouble _tmp46_ = 0.0;
+ guchar _tmp47_ = '\0';
+ gdouble _tmp48_ = 0.0;
+ gdouble _tmp49_ = 0.0;
+ gint _tmp50_ = 0;
+ gdouble _tmp51_ = 0.0;
+ gdouble _tmp52_ = 0.0;
+ guchar _tmp53_ = '\0';
+ gdouble _tmp54_ = 0.0;
+ gdouble _tmp55_ = 0.0;
+ gint _tmp56_ = 0;
+ gdouble _tmp57_ = 0.0;
+ gdouble _tmp58_ = 0.0;
+ guchar _tmp59_ = '\0';
+ gdouble _tmp60_ = 0.0;
+ gdouble _tmp61_ = 0.0;
+ gint _tmp62_ = 0;
+ gdouble _tmp63_ = 0.0;
+ Page* _tmp84_ = NULL;
+ gint _tmp85_ = 0;
+ gint _tmp86_ = 0;
+ gdouble _tmp87_ = 0.0;
+ guchar _tmp88_ = '\0';
+ gdouble _tmp89_ = 0.0;
+ gdouble _tmp90_ = 0.0;
+ gdouble _tmp91_ = 0.0;
+ gint _tmp92_ = 0;
+ gdouble _tmp93_ = 0.0;
+ guchar _tmp94_ = '\0';
+ gdouble _tmp95_ = 0.0;
+ gdouble _tmp96_ = 0.0;
+ gdouble _tmp97_ = 0.0;
+ gint _tmp98_ = 0;
+ gdouble _tmp99_ = 0.0;
+ guchar _tmp100_ = '\0';
+ gdouble _tmp101_ = 0.0;
+ gdouble _tmp102_ = 0.0;
+ gdouble _tmp103_ = 0.0;
+ gint _tmp104_ = 0;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp43_ = page;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp44_ = R;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp45_ = T;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp43_, _tmp44_, _tmp45_ - 1, p, 3);
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp46_ = red;
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp47_ = p[0];
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp48_ = r;
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp49_ = l;
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp50_ = T;
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp51_ = t;
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp46_ + ((_tmp47_ * (_tmp48_ - _tmp49_)) * (_tmp50_ - _tmp51_));
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp52_ = green;
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp53_ = p[1];
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp54_ = r;
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp55_ = l;
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp56_ = T;
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp57_ = t;
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp52_ + ((_tmp53_ * (_tmp54_ - _tmp55_)) * (_tmp56_ - _tmp57_));
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp58_ = blue;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp59_ = p[2];
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp60_ = r;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp61_ = l;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp62_ = T;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp63_ = t;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp58_ + ((_tmp59_ * (_tmp60_ - _tmp61_)) * (_tmp62_ - _tmp63_));
+#line 1378 "page-view.c"
+ {
+ gint y = 0;
+ gint _tmp64_ = 0;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp64_ = T;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp64_;
+#line 1386 "page-view.c"
+ {
+ gboolean _tmp65_ = FALSE;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp65_ = TRUE;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 1393 "page-view.c"
+ gint _tmp67_ = 0;
+ gint _tmp68_ = 0;
+ Page* _tmp69_ = NULL;
+ gint _tmp70_ = 0;
+ gint _tmp71_ = 0;
+ gdouble _tmp72_ = 0.0;
+ guchar _tmp73_ = '\0';
+ gdouble _tmp74_ = 0.0;
+ gdouble _tmp75_ = 0.0;
+ gdouble _tmp76_ = 0.0;
+ guchar _tmp77_ = '\0';
+ gdouble _tmp78_ = 0.0;
+ gdouble _tmp79_ = 0.0;
+ gdouble _tmp80_ = 0.0;
+ guchar _tmp81_ = '\0';
+ gdouble _tmp82_ = 0.0;
+ gdouble _tmp83_ = 0.0;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp65_) {
+#line 1413 "page-view.c"
+ gint _tmp66_ = 0;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp66_ = y;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp66_ + 1;
+#line 1419 "page-view.c"
+ }
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp65_ = FALSE;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp67_ = y;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp68_ = B;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp67_ < _tmp68_)) {
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 1431 "page-view.c"
+ }
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp69_ = page;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp70_ = R;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp71_ = y;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp69_, _tmp70_, _tmp71_, p, 3);
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp72_ = red;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp73_ = p[0];
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp74_ = r;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp75_ = l;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp72_ + (_tmp73_ * (_tmp74_ - _tmp75_));
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp76_ = green;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp77_ = p[1];
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp78_ = r;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp79_ = l;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp76_ + (_tmp77_ * (_tmp78_ - _tmp79_));
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp80_ = blue;
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp81_ = p[2];
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp82_ = r;
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp83_ = l;
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp80_ + (_tmp81_ * (_tmp82_ - _tmp83_));
+#line 1471 "page-view.c"
+ }
+ }
+ }
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp84_ = page;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp85_ = R;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp86_ = B;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp84_, _tmp85_, _tmp86_, p, 3);
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp87_ = red;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp88_ = p[0];
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp89_ = r;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp90_ = l;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp91_ = b;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp92_ = B;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp87_ + ((_tmp88_ * (_tmp89_ - _tmp90_)) * (_tmp91_ - _tmp92_));
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp93_ = green;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp94_ = p[1];
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp95_ = r;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp96_ = l;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp97_ = b;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp98_ = B;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp93_ + ((_tmp94_ * (_tmp95_ - _tmp96_)) * (_tmp97_ - _tmp98_));
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp99_ = blue;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp100_ = p[2];
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp101_ = r;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp102_ = l;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp103_ = b;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp104_ = B;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp99_ + ((_tmp100_ * (_tmp101_ - _tmp102_)) * (_tmp103_ - _tmp104_));
+#line 1525 "page-view.c"
+ } else {
+ guchar p[3] = {0};
+ Page* _tmp105_ = NULL;
+ gint _tmp106_ = 0;
+ gint _tmp107_ = 0;
+ gdouble _tmp108_ = 0.0;
+ guchar _tmp109_ = '\0';
+ gdouble _tmp110_ = 0.0;
+ gdouble _tmp111_ = 0.0;
+ gint _tmp112_ = 0;
+ gdouble _tmp113_ = 0.0;
+ gdouble _tmp114_ = 0.0;
+ guchar _tmp115_ = '\0';
+ gdouble _tmp116_ = 0.0;
+ gdouble _tmp117_ = 0.0;
+ gint _tmp118_ = 0;
+ gdouble _tmp119_ = 0.0;
+ gdouble _tmp120_ = 0.0;
+ guchar _tmp121_ = '\0';
+ gdouble _tmp122_ = 0.0;
+ gdouble _tmp123_ = 0.0;
+ gint _tmp124_ = 0;
+ gdouble _tmp125_ = 0.0;
+ Page* _tmp146_ = NULL;
+ gint _tmp147_ = 0;
+ gint _tmp148_ = 0;
+ gdouble _tmp149_ = 0.0;
+ guchar _tmp150_ = '\0';
+ gdouble _tmp151_ = 0.0;
+ gdouble _tmp152_ = 0.0;
+ gdouble _tmp153_ = 0.0;
+ gint _tmp154_ = 0;
+ gdouble _tmp155_ = 0.0;
+ guchar _tmp156_ = '\0';
+ gdouble _tmp157_ = 0.0;
+ gdouble _tmp158_ = 0.0;
+ gdouble _tmp159_ = 0.0;
+ gint _tmp160_ = 0;
+ gdouble _tmp161_ = 0.0;
+ guchar _tmp162_ = '\0';
+ gdouble _tmp163_ = 0.0;
+ gdouble _tmp164_ = 0.0;
+ gdouble _tmp165_ = 0.0;
+ gint _tmp166_ = 0;
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp105_ = page;
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp106_ = L;
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp107_ = B;
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp105_, _tmp106_ - 1, _tmp107_, p, 3);
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp108_ = red;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp109_ = p[0];
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp110_ = b;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp111_ = t;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp112_ = L;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp113_ = l;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp108_ + ((_tmp109_ * (_tmp110_ - _tmp111_)) * (_tmp112_ - _tmp113_));
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp114_ = green;
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp115_ = p[1];
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp116_ = b;
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp117_ = t;
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp118_ = L;
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp119_ = l;
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp114_ + ((_tmp115_ * (_tmp116_ - _tmp117_)) * (_tmp118_ - _tmp119_));
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp120_ = blue;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp121_ = p[2];
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp122_ = b;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp123_ = t;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp124_ = L;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp125_ = l;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp120_ + ((_tmp121_ * (_tmp122_ - _tmp123_)) * (_tmp124_ - _tmp125_));
+#line 1620 "page-view.c"
+ {
+ gint x = 0;
+ gint _tmp126_ = 0;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp126_ = L;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp126_;
+#line 1628 "page-view.c"
+ {
+ gboolean _tmp127_ = FALSE;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp127_ = TRUE;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 1635 "page-view.c"
+ gint _tmp129_ = 0;
+ gint _tmp130_ = 0;
+ Page* _tmp131_ = NULL;
+ gint _tmp132_ = 0;
+ gint _tmp133_ = 0;
+ gdouble _tmp134_ = 0.0;
+ guchar _tmp135_ = '\0';
+ gdouble _tmp136_ = 0.0;
+ gdouble _tmp137_ = 0.0;
+ gdouble _tmp138_ = 0.0;
+ guchar _tmp139_ = '\0';
+ gdouble _tmp140_ = 0.0;
+ gdouble _tmp141_ = 0.0;
+ gdouble _tmp142_ = 0.0;
+ guchar _tmp143_ = '\0';
+ gdouble _tmp144_ = 0.0;
+ gdouble _tmp145_ = 0.0;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp127_) {
+#line 1655 "page-view.c"
+ gint _tmp128_ = 0;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp128_ = x;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp128_ + 1;
+#line 1661 "page-view.c"
+ }
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp127_ = FALSE;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp129_ = x;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp130_ = R;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp129_ < _tmp130_)) {
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 1673 "page-view.c"
+ }
+#line 289 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp131_ = page;
+#line 289 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp132_ = x;
+#line 289 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp133_ = B;
+#line 289 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp131_, _tmp132_, _tmp133_, p, 3);
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp134_ = red;
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp135_ = p[0];
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp136_ = b;
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp137_ = t;
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp134_ + (_tmp135_ * (_tmp136_ - _tmp137_));
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp138_ = green;
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp139_ = p[1];
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp140_ = b;
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp141_ = t;
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp138_ + (_tmp139_ * (_tmp140_ - _tmp141_));
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp142_ = blue;
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp143_ = p[2];
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp144_ = b;
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp145_ = t;
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp142_ + (_tmp143_ * (_tmp144_ - _tmp145_));
+#line 1713 "page-view.c"
+ }
+ }
+ }
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp146_ = page;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp147_ = R;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp148_ = B;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp146_, _tmp147_, _tmp148_, p, 3);
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp149_ = red;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp150_ = p[0];
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp151_ = b;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp152_ = t;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp153_ = r;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp154_ = R;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp149_ + ((_tmp150_ * (_tmp151_ - _tmp152_)) * (_tmp153_ - _tmp154_));
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp155_ = green;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp156_ = p[1];
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp157_ = b;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp158_ = t;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp159_ = r;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp160_ = R;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp155_ + ((_tmp156_ * (_tmp157_ - _tmp158_)) * (_tmp159_ - _tmp160_));
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp161_ = blue;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp162_ = p[2];
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp163_ = b;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp164_ = t;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp165_ = r;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp166_ = R;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp161_ + ((_tmp162_ * (_tmp163_ - _tmp164_)) * (_tmp165_ - _tmp166_));
+#line 1767 "page-view.c"
+ }
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp167_ = r;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp168_ = l;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp169_ = b;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp170_ = t;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ scale = 1.0 / ((_tmp167_ - _tmp168_) * (_tmp169_ - _tmp170_));
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp171_ = output;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp171__length1 = output_length1;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp172_ = offset;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp173_ = red;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp174_ = scale;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp171_[_tmp172_] = (guchar) ((_tmp173_ * _tmp174_) + 0.5);
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp175_ = _tmp171_[_tmp172_];
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp176_ = output;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp176__length1 = output_length1;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp177_ = offset;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp178_ = green;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp179_ = scale;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp176_[_tmp177_ + 1] = (guchar) ((_tmp178_ * _tmp179_) + 0.5);
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp180_ = _tmp176_[_tmp177_ + 1];
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp181_ = output;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp181__length1 = output_length1;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp182_ = offset;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp183_ = blue;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp184_ = scale;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp181_[_tmp182_ + 2] = (guchar) ((_tmp183_ * _tmp184_) + 0.5);
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp185_ = _tmp181_[_tmp182_ + 2];
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 1823 "page-view.c"
+ }
+ {
+ gint x = 0;
+ gint _tmp186_ = 0;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp186_ = L;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp186_;
+#line 1832 "page-view.c"
+ {
+ gboolean _tmp187_ = FALSE;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp187_ = TRUE;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 1839 "page-view.c"
+ gint _tmp189_ = 0;
+ gint _tmp190_ = 0;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp187_) {
+#line 1844 "page-view.c"
+ gint _tmp188_ = 0;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp188_ = x;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp188_ + 1;
+#line 1850 "page-view.c"
+ }
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp187_ = FALSE;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp189_ = x;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp190_ = R;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp189_ < _tmp190_)) {
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 1862 "page-view.c"
+ }
+ {
+ gint y = 0;
+ gint _tmp191_ = 0;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp191_ = T;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp191_;
+#line 1871 "page-view.c"
+ {
+ gboolean _tmp192_ = FALSE;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp192_ = TRUE;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 1878 "page-view.c"
+ gint _tmp194_ = 0;
+ gint _tmp195_ = 0;
+ guchar p[3] = {0};
+ Page* _tmp196_ = NULL;
+ gint _tmp197_ = 0;
+ gint _tmp198_ = 0;
+ gdouble _tmp199_ = 0.0;
+ guchar _tmp200_ = '\0';
+ gdouble _tmp201_ = 0.0;
+ guchar _tmp202_ = '\0';
+ gdouble _tmp203_ = 0.0;
+ guchar _tmp204_ = '\0';
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp192_) {
+#line 1893 "page-view.c"
+ gint _tmp193_ = 0;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp193_ = y;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp193_ + 1;
+#line 1899 "page-view.c"
+ }
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp192_ = FALSE;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp194_ = y;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp195_ = B;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp194_ < _tmp195_)) {
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 1911 "page-view.c"
+ }
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp196_ = page;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp197_ = x;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp198_ = y;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp196_, _tmp197_, _tmp198_, p, 3);
+#line 314 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp199_ = red;
+#line 314 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp200_ = p[0];
+#line 314 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp199_ + _tmp200_;
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp201_ = green;
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp202_ = p[1];
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp201_ + _tmp202_;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp203_ = blue;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp204_ = p[2];
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp203_ + _tmp204_;
+#line 1939 "page-view.c"
+ }
+ }
+ }
+ }
+ }
+ }
+ {
+ gint x = 0;
+ gint _tmp205_ = 0;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp205_ = L;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp205_;
+#line 1953 "page-view.c"
+ {
+ gboolean _tmp206_ = FALSE;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp206_ = TRUE;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 1960 "page-view.c"
+ gint _tmp208_ = 0;
+ gint _tmp209_ = 0;
+ gdouble _tmp210_ = 0.0;
+ gint _tmp211_ = 0;
+ gdouble _tmp227_ = 0.0;
+ gint _tmp228_ = 0;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp206_) {
+#line 1969 "page-view.c"
+ gint _tmp207_ = 0;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp207_ = x;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp207_ + 1;
+#line 1975 "page-view.c"
+ }
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp206_ = FALSE;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp208_ = x;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp209_ = R;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp208_ < _tmp209_)) {
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 1987 "page-view.c"
+ }
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp210_ = t;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp211_ = T;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp210_ != ((gdouble) _tmp211_)) {
+#line 1995 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp212_ = NULL;
+ gint _tmp213_ = 0;
+ gint _tmp214_ = 0;
+ gdouble _tmp215_ = 0.0;
+ guchar _tmp216_ = '\0';
+ gint _tmp217_ = 0;
+ gdouble _tmp218_ = 0.0;
+ gdouble _tmp219_ = 0.0;
+ guchar _tmp220_ = '\0';
+ gint _tmp221_ = 0;
+ gdouble _tmp222_ = 0.0;
+ gdouble _tmp223_ = 0.0;
+ guchar _tmp224_ = '\0';
+ gint _tmp225_ = 0;
+ gdouble _tmp226_ = 0.0;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp212_ = page;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp213_ = x;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp214_ = T;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp212_, _tmp213_, _tmp214_ - 1, p, 3);
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp215_ = red;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp216_ = p[0];
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp217_ = T;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp218_ = t;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp215_ + (_tmp216_ * (_tmp217_ - _tmp218_));
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp219_ = green;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp220_ = p[1];
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp221_ = T;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp222_ = t;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp219_ + (_tmp220_ * (_tmp221_ - _tmp222_));
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp223_ = blue;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp224_ = p[2];
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp225_ = T;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp226_ = t;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp223_ + (_tmp224_ * (_tmp225_ - _tmp226_));
+#line 2050 "page-view.c"
+ }
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp227_ = b;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp228_ = B;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp227_ != ((gdouble) _tmp228_)) {
+#line 2058 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp229_ = NULL;
+ gint _tmp230_ = 0;
+ gint _tmp231_ = 0;
+ gdouble _tmp232_ = 0.0;
+ guchar _tmp233_ = '\0';
+ gdouble _tmp234_ = 0.0;
+ gint _tmp235_ = 0;
+ gdouble _tmp236_ = 0.0;
+ guchar _tmp237_ = '\0';
+ gdouble _tmp238_ = 0.0;
+ gint _tmp239_ = 0;
+ gdouble _tmp240_ = 0.0;
+ guchar _tmp241_ = '\0';
+ gdouble _tmp242_ = 0.0;
+ gint _tmp243_ = 0;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp229_ = page;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp230_ = x;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp231_ = B;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp229_, _tmp230_, _tmp231_, p, 3);
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp232_ = red;
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp233_ = p[0];
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp234_ = b;
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp235_ = B;
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp232_ + (_tmp233_ * (_tmp234_ - _tmp235_));
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp236_ = green;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp237_ = p[1];
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp238_ = b;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp239_ = B;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp236_ + (_tmp237_ * (_tmp238_ - _tmp239_));
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp240_ = blue;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp241_ = p[2];
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp242_ = b;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp243_ = B;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp240_ + (_tmp241_ * (_tmp242_ - _tmp243_));
+#line 2113 "page-view.c"
+ }
+ }
+ }
+ }
+ {
+ gint y = 0;
+ gint _tmp244_ = 0;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp244_ = T;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp244_;
+#line 2125 "page-view.c"
+ {
+ gboolean _tmp245_ = FALSE;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp245_ = TRUE;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 2132 "page-view.c"
+ gint _tmp247_ = 0;
+ gint _tmp248_ = 0;
+ gdouble _tmp249_ = 0.0;
+ gint _tmp250_ = 0;
+ gdouble _tmp266_ = 0.0;
+ gint _tmp267_ = 0;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp245_) {
+#line 2141 "page-view.c"
+ gint _tmp246_ = 0;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp246_ = y;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp246_ + 1;
+#line 2147 "page-view.c"
+ }
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp245_ = FALSE;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp247_ = y;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp248_ = B;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp247_ < _tmp248_)) {
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 2159 "page-view.c"
+ }
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp249_ = l;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp250_ = L;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp249_ != ((gdouble) _tmp250_)) {
+#line 2167 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp251_ = NULL;
+ gint _tmp252_ = 0;
+ gint _tmp253_ = 0;
+ gdouble _tmp254_ = 0.0;
+ guchar _tmp255_ = '\0';
+ gint _tmp256_ = 0;
+ gdouble _tmp257_ = 0.0;
+ gdouble _tmp258_ = 0.0;
+ guchar _tmp259_ = '\0';
+ gint _tmp260_ = 0;
+ gdouble _tmp261_ = 0.0;
+ gdouble _tmp262_ = 0.0;
+ guchar _tmp263_ = '\0';
+ gint _tmp264_ = 0;
+ gdouble _tmp265_ = 0.0;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp251_ = page;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp252_ = L;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp253_ = y;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp251_, _tmp252_ - 1, _tmp253_, p, 3);
+#line 349 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp254_ = red;
+#line 349 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp255_ = p[0];
+#line 349 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp256_ = L;
+#line 349 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp257_ = l;
+#line 349 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp254_ + (_tmp255_ * (_tmp256_ - _tmp257_));
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp258_ = green;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp259_ = p[1];
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp260_ = L;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp261_ = l;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp258_ + (_tmp259_ * (_tmp260_ - _tmp261_));
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp262_ = blue;
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp263_ = p[2];
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp264_ = L;
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp265_ = l;
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp262_ + (_tmp263_ * (_tmp264_ - _tmp265_));
+#line 2222 "page-view.c"
+ }
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp266_ = r;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp267_ = R;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp266_ != ((gdouble) _tmp267_)) {
+#line 2230 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp268_ = NULL;
+ gint _tmp269_ = 0;
+ gint _tmp270_ = 0;
+ gdouble _tmp271_ = 0.0;
+ guchar _tmp272_ = '\0';
+ gdouble _tmp273_ = 0.0;
+ gint _tmp274_ = 0;
+ gdouble _tmp275_ = 0.0;
+ guchar _tmp276_ = '\0';
+ gdouble _tmp277_ = 0.0;
+ gint _tmp278_ = 0;
+ gdouble _tmp279_ = 0.0;
+ guchar _tmp280_ = '\0';
+ gdouble _tmp281_ = 0.0;
+ gint _tmp282_ = 0;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp268_ = page;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp269_ = R;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp270_ = y;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp268_, _tmp269_, _tmp270_, p, 3);
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp271_ = red;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp272_ = p[0];
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp273_ = r;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp274_ = R;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp271_ + (_tmp272_ * (_tmp273_ - _tmp274_));
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp275_ = green;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp276_ = p[1];
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp277_ = r;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp278_ = R;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp275_ + (_tmp276_ * (_tmp277_ - _tmp278_));
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp279_ = blue;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp280_ = p[2];
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp281_ = r;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp282_ = R;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp279_ + (_tmp280_ * (_tmp281_ - _tmp282_));
+#line 2285 "page-view.c"
+ }
+ }
+ }
+ }
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp284_ = l;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp285_ = L;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp284_ != ((gdouble) _tmp285_)) {
+#line 2296 "page-view.c"
+ gdouble _tmp286_ = 0.0;
+ gint _tmp287_ = 0;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp286_ = t;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp287_ = T;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp283_ = _tmp286_ != ((gdouble) _tmp287_);
+#line 2305 "page-view.c"
+ } else {
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp283_ = FALSE;
+#line 2309 "page-view.c"
+ }
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp283_) {
+#line 2313 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp288_ = NULL;
+ gint _tmp289_ = 0;
+ gint _tmp290_ = 0;
+ gdouble _tmp291_ = 0.0;
+ guchar _tmp292_ = '\0';
+ gint _tmp293_ = 0;
+ gdouble _tmp294_ = 0.0;
+ gint _tmp295_ = 0;
+ gdouble _tmp296_ = 0.0;
+ gdouble _tmp297_ = 0.0;
+ guchar _tmp298_ = '\0';
+ gint _tmp299_ = 0;
+ gdouble _tmp300_ = 0.0;
+ gint _tmp301_ = 0;
+ gdouble _tmp302_ = 0.0;
+ gdouble _tmp303_ = 0.0;
+ guchar _tmp304_ = '\0';
+ gint _tmp305_ = 0;
+ gdouble _tmp306_ = 0.0;
+ gint _tmp307_ = 0;
+ gdouble _tmp308_ = 0.0;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp288_ = page;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp289_ = L;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp290_ = T;
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp288_, _tmp289_ - 1, _tmp290_ - 1, p, 3);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp291_ = red;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp292_ = p[0];
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp293_ = L;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp294_ = l;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp295_ = T;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp296_ = t;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp291_ + ((_tmp292_ * (_tmp293_ - _tmp294_)) * (_tmp295_ - _tmp296_));
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp297_ = green;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp298_ = p[1];
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp299_ = L;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp300_ = l;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp301_ = T;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp302_ = t;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp297_ + ((_tmp298_ * (_tmp299_ - _tmp300_)) * (_tmp301_ - _tmp302_));
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp303_ = blue;
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp304_ = p[2];
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp305_ = L;
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp306_ = l;
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp307_ = T;
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp308_ = t;
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp303_ + ((_tmp304_ * (_tmp305_ - _tmp306_)) * (_tmp307_ - _tmp308_));
+#line 2386 "page-view.c"
+ }
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp310_ = r;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp311_ = R;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp310_ != ((gdouble) _tmp311_)) {
+#line 2394 "page-view.c"
+ gdouble _tmp312_ = 0.0;
+ gint _tmp313_ = 0;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp312_ = t;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp313_ = T;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp309_ = _tmp312_ != ((gdouble) _tmp313_);
+#line 2403 "page-view.c"
+ } else {
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp309_ = FALSE;
+#line 2407 "page-view.c"
+ }
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp309_) {
+#line 2411 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp314_ = NULL;
+ gint _tmp315_ = 0;
+ gint _tmp316_ = 0;
+ gdouble _tmp317_ = 0.0;
+ guchar _tmp318_ = '\0';
+ gdouble _tmp319_ = 0.0;
+ gint _tmp320_ = 0;
+ gint _tmp321_ = 0;
+ gdouble _tmp322_ = 0.0;
+ gdouble _tmp323_ = 0.0;
+ guchar _tmp324_ = '\0';
+ gdouble _tmp325_ = 0.0;
+ gint _tmp326_ = 0;
+ gint _tmp327_ = 0;
+ gdouble _tmp328_ = 0.0;
+ gdouble _tmp329_ = 0.0;
+ guchar _tmp330_ = '\0';
+ gdouble _tmp331_ = 0.0;
+ gint _tmp332_ = 0;
+ gint _tmp333_ = 0;
+ gdouble _tmp334_ = 0.0;
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp314_ = page;
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp315_ = R;
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp316_ = T;
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp314_, _tmp315_, _tmp316_ - 1, p, 3);
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp317_ = red;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp318_ = p[0];
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp319_ = r;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp320_ = R;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp321_ = T;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp322_ = t;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp317_ + ((_tmp318_ * (_tmp319_ - _tmp320_)) * (_tmp321_ - _tmp322_));
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp323_ = green;
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp324_ = p[1];
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp325_ = r;
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp326_ = R;
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp327_ = T;
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp328_ = t;
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp323_ + ((_tmp324_ * (_tmp325_ - _tmp326_)) * (_tmp327_ - _tmp328_));
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp329_ = blue;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp330_ = p[2];
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp331_ = r;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp332_ = R;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp333_ = T;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp334_ = t;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp329_ + ((_tmp330_ * (_tmp331_ - _tmp332_)) * (_tmp333_ - _tmp334_));
+#line 2484 "page-view.c"
+ }
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp336_ = r;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp337_ = R;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp336_ != ((gdouble) _tmp337_)) {
+#line 2492 "page-view.c"
+ gdouble _tmp338_ = 0.0;
+ gint _tmp339_ = 0;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp338_ = b;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp339_ = B;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp335_ = _tmp338_ != ((gdouble) _tmp339_);
+#line 2501 "page-view.c"
+ } else {
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp335_ = FALSE;
+#line 2505 "page-view.c"
+ }
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp335_) {
+#line 2509 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp340_ = NULL;
+ gint _tmp341_ = 0;
+ gint _tmp342_ = 0;
+ gdouble _tmp343_ = 0.0;
+ guchar _tmp344_ = '\0';
+ gdouble _tmp345_ = 0.0;
+ gint _tmp346_ = 0;
+ gdouble _tmp347_ = 0.0;
+ gint _tmp348_ = 0;
+ gdouble _tmp349_ = 0.0;
+ guchar _tmp350_ = '\0';
+ gdouble _tmp351_ = 0.0;
+ gint _tmp352_ = 0;
+ gdouble _tmp353_ = 0.0;
+ gint _tmp354_ = 0;
+ gdouble _tmp355_ = 0.0;
+ guchar _tmp356_ = '\0';
+ gdouble _tmp357_ = 0.0;
+ gint _tmp358_ = 0;
+ gdouble _tmp359_ = 0.0;
+ gint _tmp360_ = 0;
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp340_ = page;
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp341_ = R;
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp342_ = B;
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp340_, _tmp341_, _tmp342_, p, 3);
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp343_ = red;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp344_ = p[0];
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp345_ = r;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp346_ = R;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp347_ = b;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp348_ = B;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp343_ + ((_tmp344_ * (_tmp345_ - _tmp346_)) * (_tmp347_ - _tmp348_));
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp349_ = green;
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp350_ = p[1];
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp351_ = r;
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp352_ = R;
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp353_ = b;
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp354_ = B;
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp349_ + ((_tmp350_ * (_tmp351_ - _tmp352_)) * (_tmp353_ - _tmp354_));
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp355_ = blue;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp356_ = p[2];
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp357_ = r;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp358_ = R;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp359_ = b;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp360_ = B;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp355_ + ((_tmp356_ * (_tmp357_ - _tmp358_)) * (_tmp359_ - _tmp360_));
+#line 2582 "page-view.c"
+ }
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp362_ = l;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp363_ = L;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp362_ != ((gdouble) _tmp363_)) {
+#line 2590 "page-view.c"
+ gdouble _tmp364_ = 0.0;
+ gint _tmp365_ = 0;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp364_ = b;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp365_ = B;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp361_ = _tmp364_ != ((gdouble) _tmp365_);
+#line 2599 "page-view.c"
+ } else {
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp361_ = FALSE;
+#line 2603 "page-view.c"
+ }
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp361_) {
+#line 2607 "page-view.c"
+ guchar p[3] = {0};
+ Page* _tmp366_ = NULL;
+ gint _tmp367_ = 0;
+ gint _tmp368_ = 0;
+ gdouble _tmp369_ = 0.0;
+ guchar _tmp370_ = '\0';
+ gint _tmp371_ = 0;
+ gdouble _tmp372_ = 0.0;
+ gdouble _tmp373_ = 0.0;
+ gint _tmp374_ = 0;
+ gdouble _tmp375_ = 0.0;
+ guchar _tmp376_ = '\0';
+ gint _tmp377_ = 0;
+ gdouble _tmp378_ = 0.0;
+ gdouble _tmp379_ = 0.0;
+ gint _tmp380_ = 0;
+ gdouble _tmp381_ = 0.0;
+ guchar _tmp382_ = '\0';
+ gint _tmp383_ = 0;
+ gdouble _tmp384_ = 0.0;
+ gdouble _tmp385_ = 0.0;
+ gint _tmp386_ = 0;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp366_ = page;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp367_ = L;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp368_ = B;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_get_pixel (self, _tmp366_, _tmp367_ - 1, _tmp368_, p, 3);
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp369_ = red;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp370_ = p[0];
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp371_ = L;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp372_ = l;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp373_ = b;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp374_ = B;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ red = _tmp369_ + ((_tmp370_ * (_tmp371_ - _tmp372_)) * (_tmp373_ - _tmp374_));
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp375_ = green;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp376_ = p[1];
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp377_ = L;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp378_ = l;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp379_ = b;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp380_ = B;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ green = _tmp375_ + ((_tmp376_ * (_tmp377_ - _tmp378_)) * (_tmp379_ - _tmp380_));
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp381_ = blue;
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp382_ = p[2];
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp383_ = L;
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp384_ = l;
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp385_ = b;
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp386_ = B;
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ blue = _tmp381_ + ((_tmp382_ * (_tmp383_ - _tmp384_)) * (_tmp385_ - _tmp386_));
+#line 2680 "page-view.c"
+ }
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp387_ = r;
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp388_ = l;
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp389_ = b;
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp390_ = t;
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ scale = 1.0 / ((_tmp387_ - _tmp388_) * (_tmp389_ - _tmp390_));
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp391_ = output;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp391__length1 = output_length1;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp392_ = offset;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp393_ = red;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp394_ = scale;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp391_[_tmp392_] = (guchar) ((_tmp393_ * _tmp394_) + 0.5);
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp395_ = _tmp391_[_tmp392_];
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp396_ = output;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp396__length1 = output_length1;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp397_ = offset;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp398_ = green;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp399_ = scale;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp396_[_tmp397_ + 1] = (guchar) ((_tmp398_ * _tmp399_) + 0.5);
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp400_ = _tmp396_[_tmp397_ + 1];
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp401_ = output;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp401__length1 = output_length1;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp402_ = offset;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp403_ = blue;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp404_ = scale;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp401_[_tmp402_ + 2] = (guchar) ((_tmp403_ * _tmp404_) + 0.5);
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp405_ = _tmp401_[_tmp402_ + 2];
+#line 2734 "page-view.c"
+}
+
+
+static void page_view_update_preview (PageView* self, Page* page, GdkPixbuf** output_image, gint output_width, gint output_height, ScanDirection scan_direction, gint old_scan_line, gint scan_line) {
+ gint input_width = 0;
+ Page* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ gint input_height = 0;
+ Page* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gint L = 0;
+ gint R = 0;
+ gint T = 0;
+ gint B = 0;
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_ = FALSE;
+ GdkPixbuf* _tmp8_ = NULL;
+ gint _tmp58_ = 0;
+ gint _tmp59_ = 0;
+ gint _tmp61_ = 0;
+ gint _tmp62_ = 0;
+ gint _tmp64_ = 0;
+ gint _tmp65_ = 0;
+ gint _tmp66_ = 0;
+ gint _tmp67_ = 0;
+ gint _tmp68_ = 0;
+ gint _tmp69_ = 0;
+ GdkPixbuf* _tmp70_ = NULL;
+ guchar* output = NULL;
+ GdkPixbuf* _tmp71_ = NULL;
+ guint8* _tmp72_ = NULL;
+ gint output_length1 = 0;
+ gint _output_size_ = 0;
+ gint output_rowstride = 0;
+ GdkPixbuf* _tmp73_ = NULL;
+ gint _tmp74_ = 0;
+ gint _tmp75_ = 0;
+ gint output_n_channels = 0;
+ GdkPixbuf* _tmp76_ = NULL;
+ gint _tmp77_ = 0;
+ gint _tmp78_ = 0;
+ Page* _tmp79_ = NULL;
+ gboolean _tmp80_ = FALSE;
+ gboolean _tmp81_ = FALSE;
+#line 405 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 405 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (page != NULL);
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = page;
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = page_get_width (_tmp0_);
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = _tmp1_;
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ input_width = _tmp2_;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = page;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = page_get_height (_tmp3_);
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = _tmp4_;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ input_height = _tmp5_;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = *output_image;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp8_ == NULL) {
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = TRUE;
+#line 2807 "page-view.c"
+ } else {
+ GdkPixbuf* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = *output_image;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = gdk_pixbuf_get_width (_tmp9_);
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = _tmp10_;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = output_width;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = _tmp11_ != _tmp12_;
+#line 2823 "page-view.c"
+ }
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp7_) {
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = TRUE;
+#line 2829 "page-view.c"
+ } else {
+ GdkPixbuf* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = *output_image;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp14_ = gdk_pixbuf_get_height (_tmp13_);
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp15_ = _tmp14_;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp16_ = output_height;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = _tmp15_ != _tmp16_;
+#line 2845 "page-view.c"
+ }
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp6_) {
+#line 2849 "page-view.c"
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+ GdkPixbuf* _tmp19_ = NULL;
+ gint _tmp20_ = 0;
+ gint _tmp21_ = 0;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp17_ = output_width;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp18_ = output_height;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp19_ = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, _tmp17_, _tmp18_);
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_object_unref0 (*output_image);
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ *output_image = _tmp19_;
+#line 424 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ L = 0;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp20_ = output_width;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ R = _tmp20_ - 1;
+#line 426 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ T = 0;
+#line 427 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp21_ = output_height;
+#line 427 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ B = _tmp21_ - 1;
+#line 2877 "page-view.c"
+ } else {
+ ScanDirection _tmp22_ = 0;
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp22_ = scan_direction;
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ switch (_tmp22_) {
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_TOP_TO_BOTTOM:
+#line 2886 "page-view.c"
+ {
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+ gint _tmp28_ = 0;
+ gint _tmp29_ = 0;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ L = 0;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp23_ = output_width;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ R = _tmp23_ - 1;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp24_ = old_scan_line;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp25_ = output_height;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp26_ = input_height;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ T = (gint) ((((gdouble) _tmp24_) * _tmp25_) / _tmp26_);
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp27_ = scan_line;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp28_ = output_height;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29_ = input_height;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ B = (gint) (((((gdouble) _tmp27_) * _tmp28_) / _tmp29_) + 0.5);
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 2919 "page-view.c"
+ }
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_LEFT_TO_RIGHT:
+#line 2923 "page-view.c"
+ {
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+ gint _tmp32_ = 0;
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+ gint _tmp35_ = 0;
+ gint _tmp36_ = 0;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp30_ = old_scan_line;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp31_ = output_width;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp32_ = input_width;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ L = (gint) ((((gdouble) _tmp30_) * _tmp31_) / _tmp32_);
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp33_ = scan_line;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp34_ = output_width;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp35_ = input_width;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ R = (gint) (((((gdouble) _tmp33_) * _tmp34_) / _tmp35_) + 0.5);
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ T = 0;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp36_ = output_height;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ B = _tmp36_ - 1;
+#line 445 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 2956 "page-view.c"
+ }
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_BOTTOM_TO_TOP:
+#line 2960 "page-view.c"
+ {
+ gint _tmp37_ = 0;
+ gint _tmp38_ = 0;
+ gint _tmp39_ = 0;
+ gint _tmp40_ = 0;
+ gint _tmp41_ = 0;
+ gint _tmp42_ = 0;
+ gint _tmp43_ = 0;
+ gint _tmp44_ = 0;
+ gint _tmp45_ = 0;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ L = 0;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp37_ = output_width;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ R = _tmp37_ - 1;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp38_ = input_height;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp39_ = scan_line;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp40_ = output_height;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp41_ = input_height;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ T = (gint) ((((gdouble) (_tmp38_ - _tmp39_)) * _tmp40_) / _tmp41_);
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp42_ = input_height;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp43_ = old_scan_line;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp44_ = output_height;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp45_ = input_height;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ B = (gint) (((((gdouble) (_tmp42_ - _tmp43_)) * _tmp44_) / _tmp45_) + 0.5);
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 2999 "page-view.c"
+ }
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_RIGHT_TO_LEFT:
+#line 3003 "page-view.c"
+ {
+ gint _tmp46_ = 0;
+ gint _tmp47_ = 0;
+ gint _tmp48_ = 0;
+ gint _tmp49_ = 0;
+ gint _tmp50_ = 0;
+ gint _tmp51_ = 0;
+ gint _tmp52_ = 0;
+ gint _tmp53_ = 0;
+ gint _tmp54_ = 0;
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp46_ = input_width;
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp47_ = scan_line;
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp48_ = output_width;
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp49_ = input_width;
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ L = (gint) ((((gdouble) (_tmp46_ - _tmp47_)) * _tmp48_) / _tmp49_);
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp50_ = input_width;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp51_ = old_scan_line;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp52_ = output_width;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp53_ = input_width;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ R = (gint) (((((gdouble) (_tmp50_ - _tmp51_)) * _tmp52_) / _tmp53_) + 0.5);
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ T = 0;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp54_ = output_height;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ B = _tmp54_ - 1;
+#line 457 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 3042 "page-view.c"
+ }
+ default:
+ {
+ gint _tmp55_ = 0;
+ gint _tmp56_ = 0;
+ gint _tmp57_ = 0;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ T = 0;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp55_ = T;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ B = _tmp55_;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp56_ = B;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ R = _tmp56_;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp57_ = R;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ L = _tmp57_;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 3065 "page-view.c"
+ }
+ }
+ }
+#line 465 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp58_ = R;
+#line 465 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp59_ = output_width;
+#line 465 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp58_ >= _tmp59_) {
+#line 3075 "page-view.c"
+ gint _tmp60_ = 0;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp60_ = output_width;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ R = _tmp60_ - 1;
+#line 3081 "page-view.c"
+ }
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp61_ = B;
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp62_ = output_height;
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp61_ >= _tmp62_) {
+#line 3089 "page-view.c"
+ gint _tmp63_ = 0;
+#line 468 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp63_ = output_height;
+#line 468 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ B = _tmp63_ - 1;
+#line 3095 "page-view.c"
+ }
+#line 470 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp64_ = L;
+#line 470 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (_tmp64_ >= 0);
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp65_ = R;
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp66_ = output_width;
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (_tmp65_ < _tmp66_);
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp67_ = T;
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (_tmp67_ >= 0);
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp68_ = B;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp69_ = output_height;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (_tmp68_ < _tmp69_);
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp70_ = *output_image;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (_tmp70_ != NULL);
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp71_ = *output_image;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp72_ = gdk_pixbuf_get_pixels (_tmp71_);
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ output = _tmp72_;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ output_length1 = -1;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _output_size_ = output_length1;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp73_ = *output_image;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp74_ = gdk_pixbuf_get_rowstride (_tmp73_);
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp75_ = _tmp74_;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ output_rowstride = _tmp75_;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp76_ = *output_image;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp77_ = gdk_pixbuf_get_n_channels (_tmp76_);
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp78_ = _tmp77_;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ output_n_channels = _tmp78_;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp79_ = page;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp80_ = page_get_has_data (_tmp79_);
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp81_ = _tmp80_;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp81_) {
+#line 3155 "page-view.c"
+ {
+ gint x = 0;
+ gint _tmp82_ = 0;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp82_ = L;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp82_;
+#line 3163 "page-view.c"
+ {
+ gboolean _tmp83_ = FALSE;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp83_ = TRUE;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 3170 "page-view.c"
+ gint _tmp85_ = 0;
+ gint _tmp86_ = 0;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp83_) {
+#line 3175 "page-view.c"
+ gint _tmp84_ = 0;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp84_ = x;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp84_ + 1;
+#line 3181 "page-view.c"
+ }
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp83_ = FALSE;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp85_ = x;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp86_ = R;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp85_ <= _tmp86_)) {
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 3193 "page-view.c"
+ }
+ {
+ gint y = 0;
+ gint _tmp87_ = 0;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp87_ = T;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp87_;
+#line 3202 "page-view.c"
+ {
+ gboolean _tmp88_ = FALSE;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp88_ = TRUE;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 3209 "page-view.c"
+ gint _tmp90_ = 0;
+ gint _tmp91_ = 0;
+ gint o = 0;
+ gint _tmp92_ = 0;
+ gint _tmp93_ = 0;
+ gint _tmp94_ = 0;
+ gint _tmp95_ = 0;
+ guchar* _tmp96_ = NULL;
+ gint _tmp96__length1 = 0;
+ gint _tmp97_ = 0;
+ guchar* _tmp98_ = NULL;
+ gint _tmp98__length1 = 0;
+ gint _tmp99_ = 0;
+ guchar* _tmp100_ = NULL;
+ gint _tmp100__length1 = 0;
+ gint _tmp101_ = 0;
+ guchar _tmp102_ = '\0';
+ guchar _tmp103_ = '\0';
+ guchar _tmp104_ = '\0';
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp88_) {
+#line 3231 "page-view.c"
+ gint _tmp89_ = 0;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp89_ = y;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp89_ + 1;
+#line 3237 "page-view.c"
+ }
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp88_ = FALSE;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp90_ = y;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp91_ = B;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp90_ <= _tmp91_)) {
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 3249 "page-view.c"
+ }
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp92_ = output_rowstride;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp93_ = y;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp94_ = x;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp95_ = output_n_channels;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ o = (_tmp92_ * _tmp93_) + (_tmp94_ * _tmp95_);
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp96_ = output;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp96__length1 = output_length1;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp97_ = o;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp98_ = output;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp98__length1 = output_length1;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp99_ = o;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp100_ = output;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp100__length1 = output_length1;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp101_ = o;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp100_[_tmp101_ + 2] = (guchar) 0xFF;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp102_ = _tmp100_[_tmp101_ + 2];
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp98_[_tmp99_ + 1] = _tmp102_;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp103_ = _tmp98_[_tmp99_ + 1];
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp96_[_tmp97_] = _tmp103_;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp104_ = _tmp96_[_tmp97_];
+#line 3291 "page-view.c"
+ }
+ }
+ }
+ }
+ }
+ }
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 3300 "page-view.c"
+ }
+ {
+ gint x = 0;
+ gint _tmp105_ = 0;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp105_ = L;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp105_;
+#line 3309 "page-view.c"
+ {
+ gboolean _tmp106_ = FALSE;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp106_ = TRUE;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 3316 "page-view.c"
+ gint _tmp108_ = 0;
+ gint _tmp109_ = 0;
+ gdouble l = 0.0;
+ gint _tmp110_ = 0;
+ gint _tmp111_ = 0;
+ gint _tmp112_ = 0;
+ gdouble r = 0.0;
+ gint _tmp113_ = 0;
+ gint _tmp114_ = 0;
+ gint _tmp115_ = 0;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp106_) {
+#line 3329 "page-view.c"
+ gint _tmp107_ = 0;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp107_ = x;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp107_ + 1;
+#line 3335 "page-view.c"
+ }
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp106_ = FALSE;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp108_ = x;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp109_ = R;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp108_ <= _tmp109_)) {
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 3347 "page-view.c"
+ }
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp110_ = x;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp111_ = input_width;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp112_ = output_width;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ l = (((gdouble) _tmp110_) * _tmp111_) / _tmp112_;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp113_ = x;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp114_ = input_width;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp115_ = output_width;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ r = (((gdouble) (_tmp113_ + 1)) * _tmp114_) / _tmp115_;
+#line 3365 "page-view.c"
+ {
+ gint y = 0;
+ gint _tmp116_ = 0;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp116_ = T;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp116_;
+#line 3373 "page-view.c"
+ {
+ gboolean _tmp117_ = FALSE;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp117_ = TRUE;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 3380 "page-view.c"
+ gint _tmp119_ = 0;
+ gint _tmp120_ = 0;
+ gdouble t = 0.0;
+ gint _tmp121_ = 0;
+ gint _tmp122_ = 0;
+ gint _tmp123_ = 0;
+ gdouble b = 0.0;
+ gint _tmp124_ = 0;
+ gint _tmp125_ = 0;
+ gint _tmp126_ = 0;
+ Page* _tmp127_ = NULL;
+ gdouble _tmp128_ = 0.0;
+ gdouble _tmp129_ = 0.0;
+ gdouble _tmp130_ = 0.0;
+ gdouble _tmp131_ = 0.0;
+ guchar* _tmp132_ = NULL;
+ gint _tmp132__length1 = 0;
+ gint _tmp133_ = 0;
+ gint _tmp134_ = 0;
+ gint _tmp135_ = 0;
+ gint _tmp136_ = 0;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp117_) {
+#line 3404 "page-view.c"
+ gint _tmp118_ = 0;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp118_ = y;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp118_ + 1;
+#line 3410 "page-view.c"
+ }
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp117_ = FALSE;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp119_ = y;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp120_ = B;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp119_ <= _tmp120_)) {
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 3422 "page-view.c"
+ }
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp121_ = y;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp122_ = input_height;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp123_ = output_height;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ t = (((gdouble) _tmp121_) * _tmp122_) / _tmp123_;
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp124_ = y;
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp125_ = input_height;
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp126_ = output_height;
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ b = (((gdouble) (_tmp124_ + 1)) * _tmp125_) / _tmp126_;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp127_ = page;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp128_ = l;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp129_ = r;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp130_ = t;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp131_ = b;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp132_ = output;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp132__length1 = output_length1;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp133_ = output_rowstride;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp134_ = y;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp135_ = x;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp136_ = output_n_channels;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_set_pixel (self, _tmp127_, _tmp128_, _tmp129_, _tmp130_, _tmp131_, _tmp132_, _tmp132__length1, (_tmp133_ * _tmp134_) + (_tmp135_ * _tmp136_));
+#line 3464 "page-view.c"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+static gint page_view_get_preview_width (PageView* self) {
+ gint result = 0;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->width_;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = self->priv->border_width;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = _tmp0_ - (_tmp1_ * 2);
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 3488 "page-view.c"
+}
+
+
+static gint page_view_get_preview_height (PageView* self) {
+ gint result = 0;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->height_;
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = self->priv->border_width;
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = _tmp0_ - (_tmp1_ * 2);
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 3506 "page-view.c"
+}
+
+
+static void page_view_update_page_view (PageView* self) {
+ gboolean _tmp0_ = FALSE;
+ gint old_scan_line = 0;
+ gint _tmp1_ = 0;
+ gint scan_line = 0;
+ Page* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ ScanDirection left_steps = 0;
+ ScanDirection _tmp5_ = 0;
+ Page* _tmp6_ = NULL;
+ ScanDirection _tmp7_ = 0;
+ ScanDirection _tmp8_ = 0;
+ gboolean _tmp9_ = FALSE;
+ ScanDirection _tmp10_ = 0;
+ Page* _tmp12_ = NULL;
+ ScanDirection _tmp13_ = 0;
+ ScanDirection _tmp14_ = 0;
+ Page* _tmp15_ = NULL;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+ Page* _tmp18_ = NULL;
+ ScanDirection _tmp19_ = 0;
+ ScanDirection _tmp20_ = 0;
+ gint _tmp21_ = 0;
+ gint _tmp22_ = 0;
+ gint _tmp23_ = 0;
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->update_image;
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp0_) {
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 3545 "page-view.c"
+ }
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = self->priv->scan_line;
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ old_scan_line = _tmp1_;
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = self->priv->_page;
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = page_get_scan_line (_tmp2_);
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = _tmp3_;
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ scan_line = _tmp4_;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = self->priv->scan_direction;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = self->priv->_page;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = page_get_scan_direction (_tmp6_);
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = _tmp7_;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ left_steps = _tmp5_ - _tmp8_;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = left_steps;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp10_ != 0) {
+#line 3573 "page-view.c"
+ GdkPixbuf* _tmp11_ = NULL;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = self->priv->image;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = _tmp11_ != NULL;
+#line 3579 "page-view.c"
+ } else {
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = FALSE;
+#line 3583 "page-view.c"
+ }
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp9_) {
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_object_unref0 (self->priv->image);
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->image = NULL;
+#line 3591 "page-view.c"
+ }
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = self->priv->_page;
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = page_get_scan_direction (_tmp12_);
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp14_ = _tmp13_;
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->scan_direction = _tmp14_;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp15_ = self->priv->_page;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp16_ = page_view_get_preview_width (self);
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp17_ = page_view_get_preview_height (self);
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp18_ = self->priv->_page;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp19_ = page_get_scan_direction (_tmp18_);
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp20_ = _tmp19_;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp21_ = old_scan_line;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp22_ = scan_line;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_update_preview (self, _tmp15_, &self->priv->image, _tmp16_, _tmp17_, _tmp20_, _tmp21_, _tmp22_);
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->update_image = FALSE;
+#line 540 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp23_ = scan_line;
+#line 540 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->scan_line = _tmp23_;
+#line 3625 "page-view.c"
+}
+
+
+static gint page_view_page_to_screen_x (PageView* self, gint x) {
+ gint result = 0;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ Page* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = x;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = page_view_get_preview_width (self);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = self->priv->_page;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = page_get_width (_tmp2_);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = _tmp3_;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = (gint) (((((gdouble) _tmp0_) * _tmp1_) / _tmp4_) + 0.5);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 3652 "page-view.c"
+}
+
+
+static gint page_view_page_to_screen_y (PageView* self, gint y) {
+ gint result = 0;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ Page* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = y;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = page_view_get_preview_height (self);
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = self->priv->_page;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = page_get_height (_tmp2_);
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = _tmp3_;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = (gint) (((((gdouble) _tmp0_) * _tmp1_) / _tmp4_) + 0.5);
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 3679 "page-view.c"
+}
+
+
+static gint page_view_screen_to_page_x (PageView* self, gint x) {
+ gint result = 0;
+ gint _tmp0_ = 0;
+ Page* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = x;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = self->priv->_page;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = page_get_width (_tmp1_);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = _tmp2_;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = page_view_get_preview_width (self);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = (gint) (((((gdouble) _tmp0_) * _tmp3_) / _tmp4_) + 0.5);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 3706 "page-view.c"
+}
+
+
+static gint page_view_screen_to_page_y (PageView* self, gint y) {
+ gint result = 0;
+ gint _tmp0_ = 0;
+ Page* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+#line 558 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = y;
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = self->priv->_page;
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = page_get_height (_tmp1_);
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = _tmp2_;
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = page_view_get_preview_height (self);
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = (gint) (((((gdouble) _tmp0_) * _tmp3_) / _tmp4_) + 0.5);
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 3733 "page-view.c"
+}
+
+
+static CropLocation page_view_get_crop_location (PageView* self, gint x, gint y) {
+ CropLocation result = 0;
+ Page* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+ gint cx = 0;
+ Page* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gint cy = 0;
+ Page* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ gint cw = 0;
+ Page* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint ch = 0;
+ Page* _tmp12_ = NULL;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint dx = 0;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gint dy = 0;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+ gint dw = 0;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ gint dh = 0;
+ gint _tmp21_ = 0;
+ gint _tmp22_ = 0;
+ gint ix = 0;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ gint iy = 0;
+ gint _tmp25_ = 0;
+ gint _tmp26_ = 0;
+ gboolean _tmp27_ = FALSE;
+ gboolean _tmp28_ = FALSE;
+ gboolean _tmp29_ = FALSE;
+ gint _tmp30_ = 0;
+ gchar* name = NULL;
+ Page* _tmp36_ = NULL;
+ const gchar* _tmp37_ = NULL;
+ const gchar* _tmp38_ = NULL;
+ gchar* _tmp39_ = NULL;
+ const gchar* _tmp40_ = NULL;
+ gint crop_border = 0;
+ gint _tmp41_ = 0;
+ gint _tmp42_ = 0;
+ gint _tmp44_ = 0;
+ gint _tmp45_ = 0;
+ gboolean _tmp47_ = FALSE;
+ gint _tmp48_ = 0;
+ gint _tmp49_ = 0;
+ gboolean _tmp52_ = FALSE;
+ gint _tmp53_ = 0;
+ gint _tmp54_ = 0;
+ gint _tmp55_ = 0;
+ gboolean _tmp58_ = FALSE;
+ gint _tmp59_ = 0;
+ gint _tmp60_ = 0;
+ gboolean _tmp64_ = FALSE;
+ gint _tmp65_ = 0;
+ gint _tmp66_ = 0;
+ gint _tmp67_ = 0;
+ gint _tmp71_ = 0;
+ gint _tmp72_ = 0;
+ gint _tmp73_ = 0;
+ gint _tmp74_ = 0;
+ gint _tmp75_ = 0;
+ gint _tmp76_ = 0;
+ gint _tmp77_ = 0;
+ gint _tmp78_ = 0;
+ gint _tmp79_ = 0;
+ gint _tmp80_ = 0;
+#line 563 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->_page;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = page_get_has_crop (_tmp0_);
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = _tmp1_;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp2_) {
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = 0;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 3829 "page-view.c"
+ }
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = self->priv->_page;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = page_get_crop_x (_tmp3_);
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = _tmp4_;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cx = _tmp5_;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = self->priv->_page;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = page_get_crop_y (_tmp6_);
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = _tmp7_;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cy = _tmp8_;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = self->priv->_page;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = page_get_crop_width (_tmp9_);
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = _tmp10_;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cw = _tmp11_;
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = self->priv->_page;
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = page_get_crop_height (_tmp12_);
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp14_ = _tmp13_;
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ ch = _tmp14_;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp15_ = cx;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp16_ = page_view_page_to_screen_x (self, _tmp15_);
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dx = _tmp16_;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp17_ = cy;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp18_ = page_view_page_to_screen_y (self, _tmp17_);
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dy = _tmp18_;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp19_ = cw;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp20_ = page_view_page_to_screen_x (self, _tmp19_);
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dw = _tmp20_;
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp21_ = ch;
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp22_ = page_view_page_to_screen_y (self, _tmp21_);
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dh = _tmp22_;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp23_ = x;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp24_ = dx;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ ix = _tmp23_ - _tmp24_;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp25_ = y;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp26_ = dy;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ iy = _tmp25_ - _tmp26_;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp30_ = ix;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp30_ < 0) {
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29_ = TRUE;
+#line 3905 "page-view.c"
+ } else {
+ gint _tmp31_ = 0;
+ gint _tmp32_ = 0;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp31_ = ix;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp32_ = dw;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29_ = _tmp31_ > _tmp32_;
+#line 3915 "page-view.c"
+ }
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp29_) {
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp28_ = TRUE;
+#line 3921 "page-view.c"
+ } else {
+ gint _tmp33_ = 0;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp33_ = iy;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp28_ = _tmp33_ < 0;
+#line 3928 "page-view.c"
+ }
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp28_) {
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp27_ = TRUE;
+#line 3934 "page-view.c"
+ } else {
+ gint _tmp34_ = 0;
+ gint _tmp35_ = 0;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp34_ = iy;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp35_ = dh;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp27_ = _tmp34_ > _tmp35_;
+#line 3944 "page-view.c"
+ }
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp27_) {
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_NONE;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 3952 "page-view.c"
+ }
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp36_ = self->priv->_page;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp37_ = page_get_crop_name (_tmp36_);
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp38_ = _tmp37_;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp39_ = g_strdup (_tmp38_);
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ name = _tmp39_;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp40_ = name;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp40_ != NULL) {
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_MIDDLE;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 3974 "page-view.c"
+ }
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ crop_border = 20;
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp41_ = dw;
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp42_ = crop_border;
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp41_ < (_tmp42_ * 3)) {
+#line 3984 "page-view.c"
+ gint _tmp43_ = 0;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp43_ = dw;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ crop_border = _tmp43_ / 3;
+#line 3990 "page-view.c"
+ }
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp44_ = dh;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp45_ = crop_border;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp44_ < (_tmp45_ * 3)) {
+#line 3998 "page-view.c"
+ gint _tmp46_ = 0;
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp46_ = dh;
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ crop_border = _tmp46_ / 3;
+#line 4004 "page-view.c"
+ }
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp48_ = ix;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp49_ = crop_border;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp48_ < _tmp49_) {
+#line 4012 "page-view.c"
+ gint _tmp50_ = 0;
+ gint _tmp51_ = 0;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp50_ = iy;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp51_ = crop_border;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp47_ = _tmp50_ < _tmp51_;
+#line 4021 "page-view.c"
+ } else {
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp47_ = FALSE;
+#line 4025 "page-view.c"
+ }
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp47_) {
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_TOP_LEFT;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 4035 "page-view.c"
+ }
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp53_ = ix;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp54_ = dw;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp55_ = crop_border;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp53_ > (_tmp54_ - _tmp55_)) {
+#line 4045 "page-view.c"
+ gint _tmp56_ = 0;
+ gint _tmp57_ = 0;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp56_ = iy;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp57_ = crop_border;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp52_ = _tmp56_ < _tmp57_;
+#line 4054 "page-view.c"
+ } else {
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp52_ = FALSE;
+#line 4058 "page-view.c"
+ }
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp52_) {
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_TOP_RIGHT;
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 4068 "page-view.c"
+ }
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp59_ = ix;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp60_ = crop_border;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp59_ < _tmp60_) {
+#line 4076 "page-view.c"
+ gint _tmp61_ = 0;
+ gint _tmp62_ = 0;
+ gint _tmp63_ = 0;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp61_ = iy;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp62_ = dh;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp63_ = crop_border;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp58_ = _tmp61_ > (_tmp62_ - _tmp63_);
+#line 4088 "page-view.c"
+ } else {
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp58_ = FALSE;
+#line 4092 "page-view.c"
+ }
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp58_) {
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_BOTTOM_LEFT;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 4102 "page-view.c"
+ }
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp65_ = ix;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp66_ = dw;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp67_ = crop_border;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp65_ > (_tmp66_ - _tmp67_)) {
+#line 4112 "page-view.c"
+ gint _tmp68_ = 0;
+ gint _tmp69_ = 0;
+ gint _tmp70_ = 0;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp68_ = iy;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp69_ = dh;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp70_ = crop_border;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp64_ = _tmp68_ > (_tmp69_ - _tmp70_);
+#line 4124 "page-view.c"
+ } else {
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp64_ = FALSE;
+#line 4128 "page-view.c"
+ }
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp64_) {
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_BOTTOM_RIGHT;
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 4138 "page-view.c"
+ }
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp71_ = ix;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp72_ = crop_border;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp71_ < _tmp72_) {
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_LEFT;
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 4152 "page-view.c"
+ }
+#line 611 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp73_ = ix;
+#line 611 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp74_ = dw;
+#line 611 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp75_ = crop_border;
+#line 611 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp73_ > (_tmp74_ - _tmp75_)) {
+#line 612 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_RIGHT;
+#line 612 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 612 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 4168 "page-view.c"
+ }
+#line 614 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp76_ = iy;
+#line 614 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp77_ = crop_border;
+#line 614 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp76_ < _tmp77_) {
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_TOP;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 4182 "page-view.c"
+ }
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp78_ = iy;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp79_ = dh;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp80_ = crop_border;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp78_ > (_tmp79_ - _tmp80_)) {
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_BOTTOM;
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 4198 "page-view.c"
+ }
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = CROP_LOCATION_MIDDLE;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_free0 (name);
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 4206 "page-view.c"
+}
+
+
+void page_view_button_press (PageView* self, gint x, gint y) {
+ CropLocation location = 0;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ CropLocation _tmp2_ = 0;
+ CropLocation _tmp3_ = 0;
+#line 624 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = x;
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = y;
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = page_view_get_crop_location (self, _tmp0_, _tmp1_);
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ location = _tmp2_;
+#line 628 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = location;
+#line 628 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp3_ != CROP_LOCATION_NONE) {
+#line 4230 "page-view.c"
+ CropLocation _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ Page* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ Page* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ Page* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ Page* _tmp16_ = NULL;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = location;
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->crop_location = _tmp4_;
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = x;
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->selected_crop_px = (gdouble) _tmp5_;
+#line 632 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = y;
+#line 632 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->selected_crop_py = (gdouble) _tmp6_;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = self->priv->_page;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = page_get_crop_x (_tmp7_);
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = _tmp8_;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->selected_crop_x = _tmp9_;
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = self->priv->_page;
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = page_get_crop_y (_tmp10_);
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = _tmp11_;
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->selected_crop_y = _tmp12_;
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = self->priv->_page;
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp14_ = page_get_crop_width (_tmp13_);
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp15_ = _tmp14_;
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->selected_crop_w = _tmp15_;
+#line 636 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp16_ = self->priv->_page;
+#line 636 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp17_ = page_get_crop_height (_tmp16_);
+#line 636 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp18_ = _tmp17_;
+#line 636 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->selected_crop_h = _tmp18_;
+#line 4290 "page-view.c"
+ }
+}
+
+
+void page_view_motion (PageView* self, gint x, gint y) {
+ CropLocation location = 0;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ CropLocation _tmp2_ = 0;
+ GdkCursorType cursor = 0;
+ CropLocation _tmp3_ = 0;
+ CropLocation _tmp4_ = 0;
+ gint pw = 0;
+ Page* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ gint ph = 0;
+ Page* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint cw = 0;
+ Page* _tmp12_ = NULL;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint ch = 0;
+ Page* _tmp15_ = NULL;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+ gint dx = 0;
+ gint _tmp18_ = 0;
+ gdouble _tmp19_ = 0.0;
+ gint _tmp20_ = 0;
+ gint dy = 0;
+ gint _tmp21_ = 0;
+ gdouble _tmp22_ = 0.0;
+ gint _tmp23_ = 0;
+ gint new_x = 0;
+ gint _tmp24_ = 0;
+ gint new_y = 0;
+ gint _tmp25_ = 0;
+ gint new_w = 0;
+ gint _tmp26_ = 0;
+ gint new_h = 0;
+ gint _tmp27_ = 0;
+ gint min_size = 0;
+ gint _tmp28_ = 0;
+ gboolean _tmp29_ = FALSE;
+ gboolean _tmp30_ = FALSE;
+ CropLocation _tmp31_ = 0;
+ gboolean _tmp42_ = FALSE;
+ gboolean _tmp43_ = FALSE;
+ CropLocation _tmp44_ = 0;
+ gboolean _tmp55_ = FALSE;
+ gboolean _tmp56_ = FALSE;
+ CropLocation _tmp57_ = 0;
+ gboolean _tmp72_ = FALSE;
+ gboolean _tmp73_ = FALSE;
+ CropLocation _tmp74_ = 0;
+ CropLocation _tmp89_ = 0;
+ CropLocation _tmp110_ = 0;
+ gboolean _tmp115_ = FALSE;
+ gboolean _tmp116_ = FALSE;
+ CropLocation _tmp117_ = 0;
+ gboolean _tmp124_ = FALSE;
+ gboolean _tmp125_ = FALSE;
+ CropLocation _tmp126_ = 0;
+ gboolean _tmp133_ = FALSE;
+ gboolean _tmp134_ = FALSE;
+ CropLocation _tmp135_ = 0;
+ gboolean _tmp140_ = FALSE;
+ gboolean _tmp141_ = FALSE;
+ CropLocation _tmp142_ = 0;
+ Page* _tmp147_ = NULL;
+ gint _tmp148_ = 0;
+ gint _tmp149_ = 0;
+ gboolean _tmp150_ = FALSE;
+ gint _tmp151_ = 0;
+ gint _tmp152_ = 0;
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = x;
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = y;
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = page_view_get_crop_location (self, _tmp0_, _tmp1_);
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ location = _tmp2_;
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = location;
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ switch (_tmp3_) {
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case CROP_LOCATION_MIDDLE:
+#line 4385 "page-view.c"
+ {
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_HAND1;
+#line 648 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4391 "page-view.c"
+ }
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case CROP_LOCATION_TOP:
+#line 4395 "page-view.c"
+ {
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_TOP_SIDE;
+#line 651 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4401 "page-view.c"
+ }
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case CROP_LOCATION_BOTTOM:
+#line 4405 "page-view.c"
+ {
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_BOTTOM_SIDE;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4411 "page-view.c"
+ }
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case CROP_LOCATION_LEFT:
+#line 4415 "page-view.c"
+ {
+#line 656 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_LEFT_SIDE;
+#line 657 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4421 "page-view.c"
+ }
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case CROP_LOCATION_RIGHT:
+#line 4425 "page-view.c"
+ {
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_RIGHT_SIDE;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4431 "page-view.c"
+ }
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case CROP_LOCATION_TOP_LEFT:
+#line 4435 "page-view.c"
+ {
+#line 662 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_TOP_LEFT_CORNER;
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4441 "page-view.c"
+ }
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case CROP_LOCATION_TOP_RIGHT:
+#line 4445 "page-view.c"
+ {
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_TOP_RIGHT_CORNER;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4451 "page-view.c"
+ }
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case CROP_LOCATION_BOTTOM_LEFT:
+#line 4455 "page-view.c"
+ {
+#line 668 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_BOTTOM_LEFT_CORNER;
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4461 "page-view.c"
+ }
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case CROP_LOCATION_BOTTOM_RIGHT:
+#line 4465 "page-view.c"
+ {
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_BOTTOM_RIGHT_CORNER;
+#line 672 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4471 "page-view.c"
+ }
+ default:
+ {
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cursor = GDK_ARROW;
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 4479 "page-view.c"
+ }
+ }
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = self->priv->crop_location;
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp4_ == CROP_LOCATION_NONE) {
+#line 4486 "page-view.c"
+ GdkCursorType _tmp5_ = 0;
+#line 680 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = cursor;
+#line 680 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_set_cursor (self, _tmp5_);
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 4494 "page-view.c"
+ }
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = self->priv->_page;
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = page_get_width (_tmp6_);
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = _tmp7_;
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ pw = _tmp8_;
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = self->priv->_page;
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = page_get_height (_tmp9_);
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = _tmp10_;
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ ph = _tmp11_;
+#line 687 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = self->priv->_page;
+#line 687 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = page_get_crop_width (_tmp12_);
+#line 687 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp14_ = _tmp13_;
+#line 687 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cw = _tmp14_;
+#line 688 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp15_ = self->priv->_page;
+#line 688 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp16_ = page_get_crop_height (_tmp15_);
+#line 688 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp17_ = _tmp16_;
+#line 688 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ ch = _tmp17_;
+#line 690 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp18_ = x;
+#line 690 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp19_ = self->priv->selected_crop_px;
+#line 690 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp20_ = page_view_screen_to_page_x (self, _tmp18_ - ((gint) _tmp19_));
+#line 690 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dx = _tmp20_;
+#line 691 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp21_ = y;
+#line 691 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp22_ = self->priv->selected_crop_py;
+#line 691 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp23_ = page_view_screen_to_page_y (self, _tmp21_ - ((gint) _tmp22_));
+#line 691 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dy = _tmp23_;
+#line 693 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp24_ = self->priv->selected_crop_x;
+#line 693 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_x = _tmp24_;
+#line 694 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp25_ = self->priv->selected_crop_y;
+#line 694 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_y = _tmp25_;
+#line 695 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp26_ = self->priv->selected_crop_w;
+#line 695 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_w = _tmp26_;
+#line 696 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp27_ = self->priv->selected_crop_h;
+#line 696 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_h = _tmp27_;
+#line 699 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp28_ = page_view_screen_to_page_x (self, 15);
+#line 699 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ min_size = _tmp28_;
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp31_ = self->priv->crop_location;
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp31_ == CROP_LOCATION_TOP_LEFT) {
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp30_ = TRUE;
+#line 4570 "page-view.c"
+ } else {
+ CropLocation _tmp32_ = 0;
+#line 701 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp32_ = self->priv->crop_location;
+#line 701 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp30_ = _tmp32_ == CROP_LOCATION_LEFT;
+#line 4577 "page-view.c"
+ }
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp30_) {
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29_ = TRUE;
+#line 4583 "page-view.c"
+ } else {
+ CropLocation _tmp33_ = 0;
+#line 702 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp33_ = self->priv->crop_location;
+#line 702 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29_ = _tmp33_ == CROP_LOCATION_BOTTOM_LEFT;
+#line 4590 "page-view.c"
+ }
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp29_) {
+#line 4594 "page-view.c"
+ gint _tmp34_ = 0;
+ gint _tmp35_ = 0;
+ gint _tmp36_ = 0;
+ gint _tmp39_ = 0;
+ gint _tmp40_ = 0;
+#line 704 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp34_ = dx;
+#line 704 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp35_ = new_w;
+#line 704 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp36_ = min_size;
+#line 704 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp34_ > (_tmp35_ - _tmp36_)) {
+#line 4608 "page-view.c"
+ gint _tmp37_ = 0;
+ gint _tmp38_ = 0;
+#line 705 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp37_ = new_w;
+#line 705 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp38_ = min_size;
+#line 705 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dx = _tmp37_ - _tmp38_;
+#line 4617 "page-view.c"
+ }
+#line 706 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp39_ = new_x;
+#line 706 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp40_ = dx;
+#line 706 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if ((_tmp39_ + _tmp40_) < 0) {
+#line 4625 "page-view.c"
+ gint _tmp41_ = 0;
+#line 707 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp41_ = new_x;
+#line 707 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dx = -_tmp41_;
+#line 4631 "page-view.c"
+ }
+ }
+#line 709 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp44_ = self->priv->crop_location;
+#line 709 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp44_ == CROP_LOCATION_TOP_LEFT) {
+#line 709 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp43_ = TRUE;
+#line 4640 "page-view.c"
+ } else {
+ CropLocation _tmp45_ = 0;
+#line 710 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp45_ = self->priv->crop_location;
+#line 710 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp43_ = _tmp45_ == CROP_LOCATION_TOP;
+#line 4647 "page-view.c"
+ }
+#line 709 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp43_) {
+#line 709 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp42_ = TRUE;
+#line 4653 "page-view.c"
+ } else {
+ CropLocation _tmp46_ = 0;
+#line 711 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp46_ = self->priv->crop_location;
+#line 711 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp42_ = _tmp46_ == CROP_LOCATION_TOP_RIGHT;
+#line 4660 "page-view.c"
+ }
+#line 709 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp42_) {
+#line 4664 "page-view.c"
+ gint _tmp47_ = 0;
+ gint _tmp48_ = 0;
+ gint _tmp49_ = 0;
+ gint _tmp52_ = 0;
+ gint _tmp53_ = 0;
+#line 713 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp47_ = dy;
+#line 713 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp48_ = new_h;
+#line 713 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp49_ = min_size;
+#line 713 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp47_ > (_tmp48_ - _tmp49_)) {
+#line 4678 "page-view.c"
+ gint _tmp50_ = 0;
+ gint _tmp51_ = 0;
+#line 714 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp50_ = new_h;
+#line 714 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp51_ = min_size;
+#line 714 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dy = _tmp50_ - _tmp51_;
+#line 4687 "page-view.c"
+ }
+#line 715 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp52_ = new_y;
+#line 715 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp53_ = dy;
+#line 715 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if ((_tmp52_ + _tmp53_) < 0) {
+#line 4695 "page-view.c"
+ gint _tmp54_ = 0;
+#line 716 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp54_ = new_y;
+#line 716 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dy = -_tmp54_;
+#line 4701 "page-view.c"
+ }
+ }
+#line 719 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp57_ = self->priv->crop_location;
+#line 719 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp57_ == CROP_LOCATION_TOP_RIGHT) {
+#line 719 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp56_ = TRUE;
+#line 4710 "page-view.c"
+ } else {
+ CropLocation _tmp58_ = 0;
+#line 720 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp58_ = self->priv->crop_location;
+#line 720 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp56_ = _tmp58_ == CROP_LOCATION_RIGHT;
+#line 4717 "page-view.c"
+ }
+#line 719 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp56_) {
+#line 719 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp55_ = TRUE;
+#line 4723 "page-view.c"
+ } else {
+ CropLocation _tmp59_ = 0;
+#line 721 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp59_ = self->priv->crop_location;
+#line 721 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp55_ = _tmp59_ == CROP_LOCATION_BOTTOM_RIGHT;
+#line 4730 "page-view.c"
+ }
+#line 719 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp55_) {
+#line 4734 "page-view.c"
+ gint _tmp60_ = 0;
+ gint _tmp61_ = 0;
+ gint _tmp62_ = 0;
+ gint _tmp65_ = 0;
+ gint _tmp66_ = 0;
+ gint _tmp67_ = 0;
+ gint _tmp68_ = 0;
+#line 723 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp60_ = dx;
+#line 723 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp61_ = min_size;
+#line 723 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp62_ = new_w;
+#line 723 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp60_ < (_tmp61_ - _tmp62_)) {
+#line 4750 "page-view.c"
+ gint _tmp63_ = 0;
+ gint _tmp64_ = 0;
+#line 724 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp63_ = min_size;
+#line 724 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp64_ = new_w;
+#line 724 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dx = _tmp63_ - _tmp64_;
+#line 4759 "page-view.c"
+ }
+#line 725 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp65_ = new_x;
+#line 725 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp66_ = new_w;
+#line 725 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp67_ = dx;
+#line 725 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp68_ = pw;
+#line 725 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (((_tmp65_ + _tmp66_) + _tmp67_) > _tmp68_) {
+#line 4771 "page-view.c"
+ gint _tmp69_ = 0;
+ gint _tmp70_ = 0;
+ gint _tmp71_ = 0;
+#line 726 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp69_ = pw;
+#line 726 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp70_ = new_x;
+#line 726 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp71_ = new_w;
+#line 726 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dx = (_tmp69_ - _tmp70_) - _tmp71_;
+#line 4783 "page-view.c"
+ }
+ }
+#line 728 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp74_ = self->priv->crop_location;
+#line 728 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp74_ == CROP_LOCATION_BOTTOM_LEFT) {
+#line 728 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp73_ = TRUE;
+#line 4792 "page-view.c"
+ } else {
+ CropLocation _tmp75_ = 0;
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp75_ = self->priv->crop_location;
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp73_ = _tmp75_ == CROP_LOCATION_BOTTOM;
+#line 4799 "page-view.c"
+ }
+#line 728 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp73_) {
+#line 728 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp72_ = TRUE;
+#line 4805 "page-view.c"
+ } else {
+ CropLocation _tmp76_ = 0;
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp76_ = self->priv->crop_location;
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp72_ = _tmp76_ == CROP_LOCATION_BOTTOM_RIGHT;
+#line 4812 "page-view.c"
+ }
+#line 728 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp72_) {
+#line 4816 "page-view.c"
+ gint _tmp77_ = 0;
+ gint _tmp78_ = 0;
+ gint _tmp79_ = 0;
+ gint _tmp82_ = 0;
+ gint _tmp83_ = 0;
+ gint _tmp84_ = 0;
+ gint _tmp85_ = 0;
+#line 732 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp77_ = dy;
+#line 732 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp78_ = min_size;
+#line 732 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp79_ = new_h;
+#line 732 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp77_ < (_tmp78_ - _tmp79_)) {
+#line 4832 "page-view.c"
+ gint _tmp80_ = 0;
+ gint _tmp81_ = 0;
+#line 733 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp80_ = min_size;
+#line 733 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp81_ = new_h;
+#line 733 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dy = _tmp80_ - _tmp81_;
+#line 4841 "page-view.c"
+ }
+#line 734 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp82_ = new_y;
+#line 734 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp83_ = new_h;
+#line 734 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp84_ = dy;
+#line 734 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp85_ = ph;
+#line 734 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (((_tmp82_ + _tmp83_) + _tmp84_) > _tmp85_) {
+#line 4853 "page-view.c"
+ gint _tmp86_ = 0;
+ gint _tmp87_ = 0;
+ gint _tmp88_ = 0;
+#line 735 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp86_ = ph;
+#line 735 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp87_ = new_y;
+#line 735 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp88_ = new_h;
+#line 735 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dy = (_tmp86_ - _tmp87_) - _tmp88_;
+#line 4865 "page-view.c"
+ }
+ }
+#line 737 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp89_ = self->priv->crop_location;
+#line 737 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp89_ == CROP_LOCATION_MIDDLE) {
+#line 4872 "page-view.c"
+ gint _tmp90_ = 0;
+ gint _tmp91_ = 0;
+ gint _tmp92_ = 0;
+ gint _tmp93_ = 0;
+ gint _tmp97_ = 0;
+ gint _tmp98_ = 0;
+ gint _tmp100_ = 0;
+ gint _tmp101_ = 0;
+ gint _tmp102_ = 0;
+ gint _tmp103_ = 0;
+ gint _tmp107_ = 0;
+ gint _tmp108_ = 0;
+#line 739 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp90_ = new_x;
+#line 739 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp91_ = dx;
+#line 739 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp92_ = new_w;
+#line 739 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp93_ = pw;
+#line 739 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (((_tmp90_ + _tmp91_) + _tmp92_) > _tmp93_) {
+#line 4895 "page-view.c"
+ gint _tmp94_ = 0;
+ gint _tmp95_ = 0;
+ gint _tmp96_ = 0;
+#line 740 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp94_ = pw;
+#line 740 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp95_ = new_x;
+#line 740 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp96_ = new_w;
+#line 740 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dx = (_tmp94_ - _tmp95_) - _tmp96_;
+#line 4907 "page-view.c"
+ }
+#line 741 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp97_ = new_x;
+#line 741 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp98_ = dx;
+#line 741 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if ((_tmp97_ + _tmp98_) < 0) {
+#line 4915 "page-view.c"
+ gint _tmp99_ = 0;
+#line 742 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp99_ = new_x;
+#line 742 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dx = -_tmp99_;
+#line 4921 "page-view.c"
+ }
+#line 743 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp100_ = new_y;
+#line 743 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp101_ = dy;
+#line 743 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp102_ = new_h;
+#line 743 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp103_ = ph;
+#line 743 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (((_tmp100_ + _tmp101_) + _tmp102_) > _tmp103_) {
+#line 4933 "page-view.c"
+ gint _tmp104_ = 0;
+ gint _tmp105_ = 0;
+ gint _tmp106_ = 0;
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp104_ = ph;
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp105_ = new_y;
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp106_ = new_h;
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dy = (_tmp104_ - _tmp105_) - _tmp106_;
+#line 4945 "page-view.c"
+ }
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp107_ = new_y;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp108_ = dy;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if ((_tmp107_ + _tmp108_) < 0) {
+#line 4953 "page-view.c"
+ gint _tmp109_ = 0;
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp109_ = new_y;
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dy = -_tmp109_;
+#line 4959 "page-view.c"
+ }
+ }
+#line 750 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp110_ = self->priv->crop_location;
+#line 750 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp110_ == CROP_LOCATION_MIDDLE) {
+#line 4966 "page-view.c"
+ gint _tmp111_ = 0;
+ gint _tmp112_ = 0;
+ gint _tmp113_ = 0;
+ gint _tmp114_ = 0;
+#line 752 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp111_ = new_x;
+#line 752 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp112_ = dx;
+#line 752 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_x = _tmp111_ + _tmp112_;
+#line 753 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp113_ = new_y;
+#line 753 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp114_ = dy;
+#line 753 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_y = _tmp113_ + _tmp114_;
+#line 4983 "page-view.c"
+ }
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp117_ = self->priv->crop_location;
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp117_ == CROP_LOCATION_TOP_LEFT) {
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp116_ = TRUE;
+#line 4991 "page-view.c"
+ } else {
+ CropLocation _tmp118_ = 0;
+#line 756 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp118_ = self->priv->crop_location;
+#line 756 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp116_ = _tmp118_ == CROP_LOCATION_LEFT;
+#line 4998 "page-view.c"
+ }
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp116_) {
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp115_ = TRUE;
+#line 5004 "page-view.c"
+ } else {
+ CropLocation _tmp119_ = 0;
+#line 757 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp119_ = self->priv->crop_location;
+#line 757 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp115_ = _tmp119_ == CROP_LOCATION_BOTTOM_LEFT;
+#line 5011 "page-view.c"
+ }
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp115_) {
+#line 5015 "page-view.c"
+ gint _tmp120_ = 0;
+ gint _tmp121_ = 0;
+ gint _tmp122_ = 0;
+ gint _tmp123_ = 0;
+#line 759 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp120_ = new_x;
+#line 759 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp121_ = dx;
+#line 759 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_x = _tmp120_ + _tmp121_;
+#line 760 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp122_ = new_w;
+#line 760 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp123_ = dx;
+#line 760 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_w = _tmp122_ - _tmp123_;
+#line 5032 "page-view.c"
+ }
+#line 762 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp126_ = self->priv->crop_location;
+#line 762 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp126_ == CROP_LOCATION_TOP_LEFT) {
+#line 762 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp125_ = TRUE;
+#line 5040 "page-view.c"
+ } else {
+ CropLocation _tmp127_ = 0;
+#line 763 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp127_ = self->priv->crop_location;
+#line 763 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp125_ = _tmp127_ == CROP_LOCATION_TOP;
+#line 5047 "page-view.c"
+ }
+#line 762 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp125_) {
+#line 762 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp124_ = TRUE;
+#line 5053 "page-view.c"
+ } else {
+ CropLocation _tmp128_ = 0;
+#line 764 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp128_ = self->priv->crop_location;
+#line 764 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp124_ = _tmp128_ == CROP_LOCATION_TOP_RIGHT;
+#line 5060 "page-view.c"
+ }
+#line 762 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp124_) {
+#line 5064 "page-view.c"
+ gint _tmp129_ = 0;
+ gint _tmp130_ = 0;
+ gint _tmp131_ = 0;
+ gint _tmp132_ = 0;
+#line 766 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp129_ = new_y;
+#line 766 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp130_ = dy;
+#line 766 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_y = _tmp129_ + _tmp130_;
+#line 767 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp131_ = new_h;
+#line 767 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp132_ = dy;
+#line 767 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_h = _tmp131_ - _tmp132_;
+#line 5081 "page-view.c"
+ }
+#line 770 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp135_ = self->priv->crop_location;
+#line 770 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp135_ == CROP_LOCATION_TOP_RIGHT) {
+#line 770 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp134_ = TRUE;
+#line 5089 "page-view.c"
+ } else {
+ CropLocation _tmp136_ = 0;
+#line 771 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp136_ = self->priv->crop_location;
+#line 771 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp134_ = _tmp136_ == CROP_LOCATION_RIGHT;
+#line 5096 "page-view.c"
+ }
+#line 770 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp134_) {
+#line 770 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp133_ = TRUE;
+#line 5102 "page-view.c"
+ } else {
+ CropLocation _tmp137_ = 0;
+#line 772 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp137_ = self->priv->crop_location;
+#line 772 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp133_ = _tmp137_ == CROP_LOCATION_BOTTOM_RIGHT;
+#line 5109 "page-view.c"
+ }
+#line 770 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp133_) {
+#line 5113 "page-view.c"
+ gint _tmp138_ = 0;
+ gint _tmp139_ = 0;
+#line 773 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp138_ = new_w;
+#line 773 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp139_ = dx;
+#line 773 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_w = _tmp138_ + _tmp139_;
+#line 5122 "page-view.c"
+ }
+#line 774 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp142_ = self->priv->crop_location;
+#line 774 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp142_ == CROP_LOCATION_BOTTOM_LEFT) {
+#line 774 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp141_ = TRUE;
+#line 5130 "page-view.c"
+ } else {
+ CropLocation _tmp143_ = 0;
+#line 775 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp143_ = self->priv->crop_location;
+#line 775 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp141_ = _tmp143_ == CROP_LOCATION_BOTTOM;
+#line 5137 "page-view.c"
+ }
+#line 774 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp141_) {
+#line 774 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp140_ = TRUE;
+#line 5143 "page-view.c"
+ } else {
+ CropLocation _tmp144_ = 0;
+#line 776 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp144_ = self->priv->crop_location;
+#line 776 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp140_ = _tmp144_ == CROP_LOCATION_BOTTOM_RIGHT;
+#line 5150 "page-view.c"
+ }
+#line 774 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp140_) {
+#line 5154 "page-view.c"
+ gint _tmp145_ = 0;
+ gint _tmp146_ = 0;
+#line 777 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp145_ = new_h;
+#line 777 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp146_ = dy;
+#line 777 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ new_h = _tmp145_ + _tmp146_;
+#line 5163 "page-view.c"
+ }
+#line 779 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp147_ = self->priv->_page;
+#line 779 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp148_ = new_x;
+#line 779 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp149_ = new_y;
+#line 779 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_move_crop (_tmp147_, _tmp148_, _tmp149_);
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp151_ = new_w;
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp152_ = cw;
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp151_ != _tmp152_) {
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp150_ = TRUE;
+#line 5181 "page-view.c"
+ } else {
+ gint _tmp153_ = 0;
+ gint _tmp154_ = 0;
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp153_ = new_h;
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp154_ = ch;
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp150_ = _tmp153_ != _tmp154_;
+#line 5191 "page-view.c"
+ }
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp150_) {
+#line 5195 "page-view.c"
+ Page* _tmp155_ = NULL;
+ gint _tmp156_ = 0;
+ gint _tmp157_ = 0;
+#line 783 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp155_ = self->priv->_page;
+#line 783 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp156_ = new_w;
+#line 783 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp157_ = new_h;
+#line 783 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_set_custom_crop (_tmp155_, _tmp156_, _tmp157_);
+#line 5207 "page-view.c"
+ }
+}
+
+
+void page_view_button_release (PageView* self, gint x, gint y) {
+#line 786 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 789 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->crop_location = CROP_LOCATION_NONE;
+#line 790 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "changed");
+#line 5219 "page-view.c"
+}
+
+
+static gboolean page_view_animation_cb (PageView* self) {
+ gboolean result = FALSE;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+#line 793 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 795 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->animate_segment;
+#line 795 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = self->priv->animate_n_segments;
+#line 795 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->animate_segment = (_tmp0_ + 1) % _tmp1_;
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "changed");
+#line 797 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = TRUE;
+#line 797 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 5241 "page-view.c"
+}
+
+
+static gboolean _page_view_animation_cb_gsource_func (gpointer self) {
+ gboolean result;
+ result = page_view_animation_cb ((PageView*) self);
+#line 813 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 5250 "page-view.c"
+}
+
+
+static void page_view_update_animation (PageView* self) {
+ gboolean animate = FALSE;
+ gboolean is_animating = FALSE;
+ gboolean _tmp0_ = FALSE;
+ Page* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+ guint _tmp7_ = 0U;
+ gboolean _tmp8_ = FALSE;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp10_ = FALSE;
+#line 800 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = self->priv->_page;
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = page_get_is_scanning (_tmp1_);
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = _tmp2_;
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp3_) {
+#line 5275 "page-view.c"
+ Page* _tmp4_ = NULL;
+ gboolean _tmp5_ = FALSE;
+ gboolean _tmp6_ = FALSE;
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = self->priv->_page;
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = page_get_has_data (_tmp4_);
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = _tmp5_;
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = !_tmp6_;
+#line 5287 "page-view.c"
+ } else {
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = FALSE;
+#line 5291 "page-view.c"
+ }
+#line 804 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ animate = _tmp0_;
+#line 805 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = self->priv->animate_timeout;
+#line 805 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ is_animating = _tmp7_ != ((guint) 0);
+#line 806 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = animate;
+#line 806 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = is_animating;
+#line 806 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp8_ == _tmp9_) {
+#line 807 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 5307 "page-view.c"
+ }
+#line 809 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = animate;
+#line 809 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp10_) {
+#line 5313 "page-view.c"
+ guint _tmp11_ = 0U;
+#line 811 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->animate_segment = 0;
+#line 812 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = self->priv->animate_timeout;
+#line 812 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp11_ == ((guint) 0)) {
+#line 5321 "page-view.c"
+ guint _tmp12_ = 0U;
+#line 813 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 150, _page_view_animation_cb_gsource_func, page_view_ref (self), page_view_unref);
+#line 813 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->animate_timeout = _tmp12_;
+#line 5327 "page-view.c"
+ }
+ } else {
+ guint _tmp13_ = 0U;
+#line 817 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = self->priv->animate_timeout;
+#line 817 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp13_ != ((guint) 0)) {
+#line 5335 "page-view.c"
+ guint _tmp14_ = 0U;
+#line 818 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp14_ = self->priv->animate_timeout;
+#line 818 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_source_remove (_tmp14_);
+#line 5341 "page-view.c"
+ }
+#line 819 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->animate_timeout = (guint) 0;
+#line 5345 "page-view.c"
+ }
+}
+
+
+void page_view_render (PageView* self, cairo_t* context) {
+ gint w = 0;
+ gint _tmp0_ = 0;
+ gint h = 0;
+ gint _tmp1_ = 0;
+ cairo_t* _tmp2_ = NULL;
+ cairo_t* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ cairo_t* _tmp6_ = NULL;
+ cairo_t* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ cairo_t* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ cairo_t* _tmp16_ = NULL;
+ cairo_t* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+ gint _tmp19_ = 0;
+ cairo_t* _tmp20_ = NULL;
+ GdkPixbuf* _tmp21_ = NULL;
+ cairo_t* _tmp22_ = NULL;
+ gboolean _tmp23_ = FALSE;
+ Page* _tmp24_ = NULL;
+ gboolean _tmp25_ = FALSE;
+ gboolean _tmp26_ = FALSE;
+ gboolean _tmp70_ = FALSE;
+ Page* _tmp71_ = NULL;
+ gboolean _tmp72_ = FALSE;
+ gboolean _tmp73_ = FALSE;
+ Page* _tmp118_ = NULL;
+ gboolean _tmp119_ = FALSE;
+ gboolean _tmp120_ = FALSE;
+#line 823 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 823 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (context != NULL);
+#line 825 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_update_animation (self);
+#line 826 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_update_page_view (self);
+#line 828 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = page_view_get_preview_width (self);
+#line 828 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ w = _tmp0_;
+#line 829 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = page_view_get_preview_height (self);
+#line 829 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ h = _tmp1_;
+#line 831 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = context;
+#line 831 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_line_width (_tmp2_, (gdouble) 1);
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = context;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = self->priv->_x_offset;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = self->priv->_y_offset;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_translate (_tmp3_, (gdouble) _tmp4_, (gdouble) _tmp5_);
+#line 835 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = context;
+#line 835 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_source_rgb (_tmp6_, (gdouble) 0, (gdouble) 0, (gdouble) 0);
+#line 836 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = context;
+#line 836 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = self->priv->border_width;
+#line 836 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_line_width (_tmp7_, (gdouble) _tmp8_);
+#line 837 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = context;
+#line 837 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = self->priv->border_width;
+#line 837 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = self->priv->border_width;
+#line 837 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = self->priv->width_;
+#line 837 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = self->priv->border_width;
+#line 837 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp14_ = self->priv->height_;
+#line 837 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp15_ = self->priv->border_width;
+#line 837 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_rectangle (_tmp9_, ((gdouble) _tmp10_) / 2, ((gdouble) _tmp11_) / 2, (gdouble) (_tmp12_ - _tmp13_), (gdouble) (_tmp14_ - _tmp15_));
+#line 841 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp16_ = context;
+#line 841 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_stroke (_tmp16_);
+#line 844 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp17_ = context;
+#line 844 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp18_ = self->priv->border_width;
+#line 844 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp19_ = self->priv->border_width;
+#line 844 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_translate (_tmp17_, (gdouble) _tmp18_, (gdouble) _tmp19_);
+#line 845 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp20_ = context;
+#line 845 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp21_ = self->priv->image;
+#line 845 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ gdk_cairo_set_source_pixbuf (_tmp20_, _tmp21_, (gdouble) 0, (gdouble) 0);
+#line 846 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp22_ = context;
+#line 846 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_paint (_tmp22_);
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp24_ = self->priv->_page;
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp25_ = page_get_is_scanning (_tmp24_);
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp26_ = _tmp25_;
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp26_) {
+#line 5471 "page-view.c"
+ Page* _tmp27_ = NULL;
+ gboolean _tmp28_ = FALSE;
+ gboolean _tmp29_ = FALSE;
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp27_ = self->priv->_page;
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp28_ = page_get_has_data (_tmp27_);
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp29_ = _tmp28_;
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp23_ = !_tmp29_;
+#line 5483 "page-view.c"
+ } else {
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp23_ = FALSE;
+#line 5487 "page-view.c"
+ }
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp23_) {
+#line 5491 "page-view.c"
+ gdouble outer_radius = 0.0;
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+ gdouble arc = 0.0;
+ gint _tmp34_ = 0;
+ gdouble x = 0.0;
+ gdouble _tmp35_ = 0.0;
+ gdouble _tmp36_ = 0.0;
+ gdouble _tmp37_ = 0.0;
+ gdouble y = 0.0;
+ gdouble _tmp38_ = 0.0;
+ gdouble _tmp39_ = 0.0;
+ gdouble _tmp40_ = 0.0;
+ gdouble inner_radius = 0.0;
+ gdouble _tmp41_ = 0.0;
+ gdouble _tmp42_ = 0.0;
+ gdouble _tmp43_ = 0.0;
+ gdouble _tmp44_ = 0.0;
+ gdouble _tmp45_ = 0.0;
+ gdouble offset = 0.0;
+#line 852 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp30_ = w;
+#line 852 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp31_ = h;
+#line 852 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp30_ > _tmp31_) {
+#line 5518 "page-view.c"
+ gint _tmp32_ = 0;
+#line 853 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp32_ = w;
+#line 853 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ outer_radius = 0.15 * _tmp32_;
+#line 5524 "page-view.c"
+ } else {
+ gint _tmp33_ = 0;
+#line 855 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp33_ = h;
+#line 855 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ outer_radius = 0.15 * _tmp33_;
+#line 5531 "page-view.c"
+ }
+#line 856 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp34_ = self->priv->animate_n_segments;
+#line 856 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ arc = G_PI / _tmp34_;
+#line 859 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp35_ = outer_radius;
+#line 859 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp36_ = arc;
+#line 859 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp37_ = sin (_tmp36_);
+#line 859 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp35_ * _tmp37_;
+#line 860 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp38_ = outer_radius;
+#line 860 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp39_ = arc;
+#line 860 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp40_ = cos (_tmp39_);
+#line 860 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp38_ * (_tmp40_ - 1.0);
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp41_ = x;
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp42_ = x;
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp43_ = y;
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp44_ = y;
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp45_ = sqrt ((_tmp41_ * _tmp42_) + (_tmp43_ * _tmp44_));
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ inner_radius = 0.6 * _tmp45_;
+#line 863 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ offset = 0.0;
+#line 5567 "page-view.c"
+ {
+ gint i = 0;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ i = 0;
+#line 5572 "page-view.c"
+ {
+ gboolean _tmp46_ = FALSE;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp46_ = TRUE;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ while (TRUE) {
+#line 5579 "page-view.c"
+ gint _tmp50_ = 0;
+ gint _tmp51_ = 0;
+ gint _tmp52_ = 0;
+ gdouble _tmp53_ = 0.0;
+ gdouble _tmp54_ = 0.0;
+ gdouble _tmp55_ = 0.0;
+ gint _tmp56_ = 0;
+ gdouble _tmp57_ = 0.0;
+ gdouble _tmp58_ = 0.0;
+ gdouble _tmp59_ = 0.0;
+ cairo_t* _tmp60_ = NULL;
+ gdouble _tmp61_ = 0.0;
+ gdouble _tmp62_ = 0.0;
+ gdouble _tmp63_ = 0.0;
+ gint _tmp64_ = 0;
+ gint _tmp65_ = 0;
+ cairo_t* _tmp68_ = NULL;
+ cairo_t* _tmp69_ = NULL;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp46_) {
+#line 5600 "page-view.c"
+ gint _tmp47_ = 0;
+ gdouble _tmp48_ = 0.0;
+ gdouble _tmp49_ = 0.0;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp47_ = i;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ i = _tmp47_ + 1;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp48_ = offset;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp49_ = arc;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ offset = _tmp48_ + (_tmp49_ * 2);
+#line 5614 "page-view.c"
+ }
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp46_ = FALSE;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp50_ = i;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp51_ = self->priv->animate_n_segments;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!(_tmp50_ < _tmp51_)) {
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 5626 "page-view.c"
+ }
+#line 866 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp52_ = w;
+#line 866 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp53_ = outer_radius;
+#line 866 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp54_ = offset;
+#line 866 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp55_ = sin (_tmp54_);
+#line 866 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = (_tmp52_ / 2) + (_tmp53_ * _tmp55_);
+#line 867 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp56_ = h;
+#line 867 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp57_ = outer_radius;
+#line 867 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp58_ = offset;
+#line 867 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp59_ = cos (_tmp58_);
+#line 867 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = (_tmp56_ / 2) - (_tmp57_ * _tmp59_);
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp60_ = context;
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp61_ = x;
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp62_ = y;
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp63_ = inner_radius;
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_arc (_tmp60_, _tmp61_, _tmp62_, _tmp63_, (gdouble) 0, 2 * G_PI);
+#line 870 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp64_ = i;
+#line 870 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp65_ = self->priv->animate_segment;
+#line 870 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp64_ == _tmp65_) {
+#line 5664 "page-view.c"
+ cairo_t* _tmp66_ = NULL;
+ cairo_t* _tmp67_ = NULL;
+#line 872 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp66_ = context;
+#line 872 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_source_rgb (_tmp66_, 0.75, 0.75, 0.75);
+#line 873 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp67_ = context;
+#line 873 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_fill_preserve (_tmp67_);
+#line 5675 "page-view.c"
+ }
+#line 876 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp68_ = context;
+#line 876 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_source_rgb (_tmp68_, 0.5, 0.5, 0.5);
+#line 877 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp69_ = context;
+#line 877 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_stroke (_tmp69_);
+#line 5685 "page-view.c"
+ }
+ }
+ }
+ }
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp71_ = self->priv->_page;
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp72_ = page_get_is_scanning (_tmp71_);
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp73_ = _tmp72_;
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp73_) {
+#line 5698 "page-view.c"
+ Page* _tmp74_ = NULL;
+ gint _tmp75_ = 0;
+ gint _tmp76_ = 0;
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp74_ = self->priv->_page;
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp75_ = page_get_scan_line (_tmp74_);
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp76_ = _tmp75_;
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp70_ = _tmp76_ > 0;
+#line 5710 "page-view.c"
+ } else {
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp70_ = FALSE;
+#line 5714 "page-view.c"
+ }
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp70_) {
+#line 5718 "page-view.c"
+ gint scan_line = 0;
+ Page* _tmp77_ = NULL;
+ gint _tmp78_ = 0;
+ gint _tmp79_ = 0;
+ gdouble s = 0.0;
+ gdouble x1 = 0.0;
+ gdouble y1 = 0.0;
+ gdouble x2 = 0.0;
+ gdouble y2 = 0.0;
+ Page* _tmp80_ = NULL;
+ ScanDirection _tmp81_ = 0;
+ ScanDirection _tmp82_ = 0;
+ cairo_t* _tmp110_ = NULL;
+ gdouble _tmp111_ = 0.0;
+ gdouble _tmp112_ = 0.0;
+ cairo_t* _tmp113_ = NULL;
+ gdouble _tmp114_ = 0.0;
+ gdouble _tmp115_ = 0.0;
+ cairo_t* _tmp116_ = NULL;
+ cairo_t* _tmp117_ = NULL;
+#line 884 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp77_ = self->priv->_page;
+#line 884 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp78_ = page_get_scan_line (_tmp77_);
+#line 884 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp79_ = _tmp78_;
+#line 884 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ scan_line = _tmp79_;
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp80_ = self->priv->_page;
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp81_ = page_get_scan_direction (_tmp80_);
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp82_ = _tmp81_;
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ switch (_tmp82_) {
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_TOP_TO_BOTTOM:
+#line 5757 "page-view.c"
+ {
+ gint _tmp83_ = 0;
+ gint _tmp84_ = 0;
+ gdouble _tmp85_ = 0.0;
+ gint _tmp86_ = 0;
+ gdouble _tmp87_ = 0.0;
+#line 891 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp83_ = scan_line;
+#line 891 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp84_ = page_view_page_to_screen_y (self, _tmp83_);
+#line 891 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ s = (gdouble) _tmp84_;
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x1 = (gdouble) 0;
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp85_ = s;
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y1 = _tmp85_ + 0.5;
+#line 893 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp86_ = w;
+#line 893 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x2 = (gdouble) _tmp86_;
+#line 893 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp87_ = s;
+#line 893 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y2 = _tmp87_ + 0.5;
+#line 894 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 5786 "page-view.c"
+ }
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_BOTTOM_TO_TOP:
+#line 5790 "page-view.c"
+ {
+ gint _tmp88_ = 0;
+ gint _tmp89_ = 0;
+ gint _tmp90_ = 0;
+ gdouble _tmp91_ = 0.0;
+ gint _tmp92_ = 0;
+ gint _tmp93_ = 0;
+ gdouble _tmp94_ = 0.0;
+#line 896 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp88_ = scan_line;
+#line 896 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp89_ = page_view_page_to_screen_y (self, _tmp88_);
+#line 896 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ s = (gdouble) _tmp89_;
+#line 897 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x1 = (gdouble) 0;
+#line 897 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp90_ = h;
+#line 897 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp91_ = s;
+#line 897 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y1 = (_tmp90_ - _tmp91_) + 0.5;
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp92_ = w;
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x2 = (gdouble) _tmp92_;
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp93_ = h;
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp94_ = s;
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y2 = (_tmp93_ - _tmp94_) + 0.5;
+#line 899 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 5825 "page-view.c"
+ }
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_LEFT_TO_RIGHT:
+#line 5829 "page-view.c"
+ {
+ gint _tmp95_ = 0;
+ gint _tmp96_ = 0;
+ gdouble _tmp97_ = 0.0;
+ gdouble _tmp98_ = 0.0;
+ gint _tmp99_ = 0;
+#line 901 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp95_ = scan_line;
+#line 901 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp96_ = page_view_page_to_screen_x (self, _tmp95_);
+#line 901 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ s = (gdouble) _tmp96_;
+#line 902 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp97_ = s;
+#line 902 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x1 = _tmp97_ + 0.5;
+#line 902 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y1 = (gdouble) 0;
+#line 903 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp98_ = s;
+#line 903 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x2 = _tmp98_ + 0.5;
+#line 903 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp99_ = h;
+#line 903 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y2 = (gdouble) _tmp99_;
+#line 904 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 5858 "page-view.c"
+ }
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ case SCAN_DIRECTION_RIGHT_TO_LEFT:
+#line 5862 "page-view.c"
+ {
+ gint _tmp100_ = 0;
+ gint _tmp101_ = 0;
+ gint _tmp102_ = 0;
+ gdouble _tmp103_ = 0.0;
+ gint _tmp104_ = 0;
+ gdouble _tmp105_ = 0.0;
+ gint _tmp106_ = 0;
+#line 906 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp100_ = scan_line;
+#line 906 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp101_ = page_view_page_to_screen_x (self, _tmp100_);
+#line 906 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ s = (gdouble) _tmp101_;
+#line 907 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp102_ = w;
+#line 907 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp103_ = s;
+#line 907 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x1 = (_tmp102_ - _tmp103_) + 0.5;
+#line 907 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y1 = (gdouble) 0;
+#line 908 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp104_ = w;
+#line 908 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp105_ = s;
+#line 908 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x2 = (_tmp104_ - _tmp105_) + 0.5;
+#line 908 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp106_ = h;
+#line 908 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y2 = (gdouble) _tmp106_;
+#line 909 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 5897 "page-view.c"
+ }
+ default:
+ {
+ gdouble _tmp107_ = 0.0;
+ gdouble _tmp108_ = 0.0;
+ gdouble _tmp109_ = 0.0;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y2 = (gdouble) 0;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp107_ = y2;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x2 = _tmp107_;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp108_ = x2;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y1 = _tmp108_;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp109_ = y1;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x1 = _tmp109_;
+#line 912 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ break;
+#line 5920 "page-view.c"
+ }
+ }
+#line 915 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp110_ = context;
+#line 915 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp111_ = x1;
+#line 915 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp112_ = y1;
+#line 915 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_move_to (_tmp110_, _tmp111_, _tmp112_);
+#line 916 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp113_ = context;
+#line 916 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp114_ = x2;
+#line 916 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp115_ = y2;
+#line 916 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_line_to (_tmp113_, _tmp114_, _tmp115_);
+#line 917 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp116_ = context;
+#line 917 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_source_rgb (_tmp116_, 1.0, 0.0, 0.0);
+#line 918 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp117_ = context;
+#line 918 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_stroke (_tmp117_);
+#line 5947 "page-view.c"
+ }
+#line 922 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp118_ = self->priv->_page;
+#line 922 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp119_ = page_get_has_crop (_tmp118_);
+#line 922 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp120_ = _tmp119_;
+#line 922 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp120_) {
+#line 5957 "page-view.c"
+ gint x = 0;
+ Page* _tmp121_ = NULL;
+ gint _tmp122_ = 0;
+ gint _tmp123_ = 0;
+ gint y = 0;
+ Page* _tmp124_ = NULL;
+ gint _tmp125_ = 0;
+ gint _tmp126_ = 0;
+ gint crop_width = 0;
+ Page* _tmp127_ = NULL;
+ gint _tmp128_ = 0;
+ gint _tmp129_ = 0;
+ gint crop_height = 0;
+ Page* _tmp130_ = NULL;
+ gint _tmp131_ = 0;
+ gint _tmp132_ = 0;
+ gint dx = 0;
+ gint _tmp133_ = 0;
+ gint _tmp134_ = 0;
+ gint dy = 0;
+ gint _tmp135_ = 0;
+ gint _tmp136_ = 0;
+ gint dw = 0;
+ gint _tmp137_ = 0;
+ gint _tmp138_ = 0;
+ gint dh = 0;
+ gint _tmp139_ = 0;
+ gint _tmp140_ = 0;
+ cairo_t* _tmp141_ = NULL;
+ gint _tmp142_ = 0;
+ gint _tmp143_ = 0;
+ cairo_t* _tmp144_ = NULL;
+ cairo_t* _tmp145_ = NULL;
+ gint _tmp146_ = 0;
+ gint _tmp147_ = 0;
+ gint _tmp148_ = 0;
+ gint _tmp149_ = 0;
+ cairo_t* _tmp150_ = NULL;
+ cairo_t* _tmp151_ = NULL;
+ cairo_t* _tmp152_ = NULL;
+ cairo_t* _tmp153_ = NULL;
+ gint _tmp154_ = 0;
+ gint _tmp155_ = 0;
+ gint _tmp156_ = 0;
+ gint _tmp157_ = 0;
+ cairo_t* _tmp158_ = NULL;
+ cairo_t* _tmp159_ = NULL;
+ cairo_t* _tmp160_ = NULL;
+ gint _tmp161_ = 0;
+ gint _tmp162_ = 0;
+ gint _tmp163_ = 0;
+ gint _tmp164_ = 0;
+ cairo_t* _tmp165_ = NULL;
+ cairo_t* _tmp166_ = NULL;
+#line 924 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp121_ = self->priv->_page;
+#line 924 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp122_ = page_get_crop_x (_tmp121_);
+#line 924 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp123_ = _tmp122_;
+#line 924 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ x = _tmp123_;
+#line 925 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp124_ = self->priv->_page;
+#line 925 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp125_ = page_get_crop_y (_tmp124_);
+#line 925 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp126_ = _tmp125_;
+#line 925 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ y = _tmp126_;
+#line 926 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp127_ = self->priv->_page;
+#line 926 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp128_ = page_get_crop_width (_tmp127_);
+#line 926 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp129_ = _tmp128_;
+#line 926 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ crop_width = _tmp129_;
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp130_ = self->priv->_page;
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp131_ = page_get_crop_height (_tmp130_);
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp132_ = _tmp131_;
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ crop_height = _tmp132_;
+#line 929 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp133_ = x;
+#line 929 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp134_ = page_view_page_to_screen_x (self, _tmp133_);
+#line 929 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dx = _tmp134_;
+#line 930 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp135_ = y;
+#line 930 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp136_ = page_view_page_to_screen_y (self, _tmp135_);
+#line 930 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dy = _tmp136_;
+#line 931 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp137_ = crop_width;
+#line 931 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp138_ = page_view_page_to_screen_x (self, _tmp137_);
+#line 931 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dw = _tmp138_;
+#line 932 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp139_ = crop_height;
+#line 932 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp140_ = page_view_page_to_screen_y (self, _tmp139_);
+#line 932 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dh = _tmp140_;
+#line 935 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp141_ = context;
+#line 935 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp142_ = w;
+#line 935 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp143_ = h;
+#line 935 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_rectangle (_tmp141_, (gdouble) 0, (gdouble) 0, (gdouble) _tmp142_, (gdouble) _tmp143_);
+#line 936 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp144_ = context;
+#line 936 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_new_sub_path (_tmp144_);
+#line 937 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp145_ = context;
+#line 937 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp146_ = dx;
+#line 937 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp147_ = dy;
+#line 937 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp148_ = dw;
+#line 937 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp149_ = dh;
+#line 937 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_rectangle (_tmp145_, (gdouble) _tmp146_, (gdouble) _tmp147_, (gdouble) _tmp148_, (gdouble) _tmp149_);
+#line 938 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp150_ = context;
+#line 938 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_fill_rule (_tmp150_, CAIRO_FILL_RULE_EVEN_ODD);
+#line 939 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp151_ = context;
+#line 939 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_source_rgba (_tmp151_, 0.25, 0.25, 0.25, 0.2);
+#line 940 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp152_ = context;
+#line 940 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_fill (_tmp152_);
+#line 943 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp153_ = context;
+#line 943 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp154_ = dx;
+#line 943 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp155_ = dy;
+#line 943 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp156_ = dw;
+#line 943 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp157_ = dh;
+#line 943 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_rectangle (_tmp153_, _tmp154_ - 1.5, _tmp155_ - 1.5, (gdouble) (_tmp156_ + 3), (gdouble) (_tmp157_ + 3));
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp158_ = context;
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_source_rgb (_tmp158_, 1.0, 1.0, 1.0);
+#line 945 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp159_ = context;
+#line 945 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_stroke (_tmp159_);
+#line 946 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp160_ = context;
+#line 946 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp161_ = dx;
+#line 946 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp162_ = dy;
+#line 946 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp163_ = dw;
+#line 946 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp164_ = dh;
+#line 946 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_rectangle (_tmp160_, _tmp161_ - 0.5, _tmp162_ - 0.5, (gdouble) (_tmp163_ + 1), (gdouble) (_tmp164_ + 1));
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp165_ = context;
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_set_source_rgb (_tmp165_, 0.0, 0.0, 0.0);
+#line 948 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp166_ = context;
+#line 948 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ cairo_stroke (_tmp166_);
+#line 6144 "page-view.c"
+ }
+}
+
+
+static void page_view_page_pixels_changed_cb (PageView* self, Page* p) {
+#line 994 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 994 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (p != NULL);
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->update_image = TRUE;
+#line 998 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "changed");
+#line 6158 "page-view.c"
+}
+
+
+static void page_view_page_size_changed_cb (PageView* self, Page* p) {
+#line 1001 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 1001 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (p != NULL);
+#line 1004 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->update_image = TRUE;
+#line 1005 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "size-changed");
+#line 1006 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "changed");
+#line 6173 "page-view.c"
+}
+
+
+static void page_view_page_overlay_changed_cb (PageView* self, Page* p) {
+#line 1009 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 1009 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (p != NULL);
+#line 1011 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "changed");
+#line 6184 "page-view.c"
+}
+
+
+static void page_view_scan_direction_changed_cb (PageView* self, Page* p) {
+#line 1014 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 1014 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (p != NULL);
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->update_image = TRUE;
+#line 1018 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "size-changed");
+#line 1019 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "changed");
+#line 6199 "page-view.c"
+}
+
+
+Page* page_view_get_page (PageView* self) {
+ Page* result;
+ Page* _tmp0_ = NULL;
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->_page;
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = _tmp0_;
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 6214 "page-view.c"
+}
+
+
+static gpointer _page_ref0 (gpointer self) {
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return self ? page_ref (self) : NULL;
+#line 6221 "page-view.c"
+}
+
+
+static void page_view_set_page (PageView* self, Page* value) {
+ Page* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = value;
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = _page_ref0 (_tmp0_);
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _page_unref0 (self->priv->_page);
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->_page = _tmp1_;
+#line 6238 "page-view.c"
+}
+
+
+gboolean page_view_get_selected (PageView* self) {
+ gboolean result;
+ gboolean _tmp0_ = FALSE;
+#line 38 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 38 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->selected_;
+#line 38 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = _tmp0_;
+#line 38 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 6253 "page-view.c"
+}
+
+
+void page_view_set_selected (PageView* self, gboolean value) {
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+ gboolean _tmp11_ = FALSE;
+ gboolean _tmp12_ = FALSE;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = page_view_get_selected (self);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = _tmp2_;
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp3_) {
+#line 6272 "page-view.c"
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = page_view_get_selected (self);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = _tmp4_;
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = _tmp5_;
+#line 6281 "page-view.c"
+ } else {
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = FALSE;
+#line 6285 "page-view.c"
+ }
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp1_) {
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = TRUE;
+#line 6291 "page-view.c"
+ } else {
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_ = FALSE;
+ gboolean _tmp8_ = FALSE;
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = page_view_get_selected (self);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = _tmp7_;
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!_tmp8_) {
+#line 6302 "page-view.c"
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp10_ = FALSE;
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = page_view_get_selected (self);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = _tmp9_;
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = !_tmp10_;
+#line 6311 "page-view.c"
+ } else {
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = FALSE;
+#line 6315 "page-view.c"
+ }
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = _tmp6_;
+#line 6319 "page-view.c"
+ }
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp0_) {
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 6325 "page-view.c"
+ }
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = page_view_get_selected (self);
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = _tmp11_;
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_set_selected (self, _tmp12_);
+#line 44 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "changed");
+#line 6335 "page-view.c"
+}
+
+
+gint page_view_get_x_offset (PageView* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->_x_offset;
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = _tmp0_;
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 6350 "page-view.c"
+}
+
+
+void page_view_set_x_offset (PageView* self, gint value) {
+ gint _tmp0_ = 0;
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = value;
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->_x_offset = _tmp0_;
+#line 6362 "page-view.c"
+}
+
+
+gint page_view_get_y_offset (PageView* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->_y_offset;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = _tmp0_;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 6377 "page-view.c"
+}
+
+
+void page_view_set_y_offset (PageView* self, gint value) {
+ gint _tmp0_ = 0;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = value;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->_y_offset = _tmp0_;
+#line 6389 "page-view.c"
+}
+
+
+GdkCursorType page_view_get_cursor (PageView* self) {
+ GdkCursorType result;
+ GdkCursorType _tmp0_ = 0;
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->_cursor;
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = _tmp0_;
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 6404 "page-view.c"
+}
+
+
+static void page_view_set_cursor (PageView* self, GdkCursorType value) {
+ GdkCursorType _tmp0_ = 0;
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = value;
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->_cursor = _tmp0_;
+#line 6416 "page-view.c"
+}
+
+
+gint page_view_get_width (PageView* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 954 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 954 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->width_;
+#line 954 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = _tmp0_;
+#line 954 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 6431 "page-view.c"
+}
+
+
+void page_view_set_width (PageView* self, gint value) {
+ gint h = 0;
+ gint _tmp0_ = 0;
+ Page* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ Page* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gboolean _tmp7_ = FALSE;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+#line 955 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = value;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = self->priv->_page;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = page_get_height (_tmp1_);
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = _tmp2_;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = self->priv->_page;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = page_get_width (_tmp4_);
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = _tmp5_;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ h = (gint) ((((gdouble) _tmp0_) * _tmp3_) / _tmp6_);
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = self->priv->width_;
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = value;
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp8_ == _tmp9_) {
+#line 6473 "page-view.c"
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = self->priv->height_;
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = h;
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = _tmp10_ == _tmp11_;
+#line 6482 "page-view.c"
+ } else {
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = FALSE;
+#line 6486 "page-view.c"
+ }
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp7_) {
+#line 960 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 6492 "page-view.c"
+ }
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = value;
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->width_ = _tmp12_;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = h;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->height_ = _tmp13_;
+#line 966 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->update_image = TRUE;
+#line 968 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "size-changed");
+#line 969 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "changed");
+#line 6508 "page-view.c"
+}
+
+
+gint page_view_get_height (PageView* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 975 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 975 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->height_;
+#line 975 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ result = _tmp0_;
+#line 975 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return result;
+#line 6523 "page-view.c"
+}
+
+
+void page_view_set_height (PageView* self, gint value) {
+ gint w = 0;
+ gint _tmp0_ = 0;
+ Page* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ Page* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gboolean _tmp7_ = FALSE;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+#line 976 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (self != NULL);
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = value;
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp1_ = self->priv->_page;
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = page_get_width (_tmp1_);
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp3_ = _tmp2_;
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = self->priv->_page;
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp5_ = page_get_height (_tmp4_);
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = _tmp5_;
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ w = (gint) ((((gdouble) _tmp0_) * _tmp3_) / _tmp6_);
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = self->priv->width_;
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp9_ = w;
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp8_ == _tmp9_) {
+#line 6565 "page-view.c"
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp10_ = self->priv->height_;
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp11_ = value;
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = _tmp10_ == _tmp11_;
+#line 6574 "page-view.c"
+ } else {
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp7_ = FALSE;
+#line 6578 "page-view.c"
+ }
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (_tmp7_) {
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return;
+#line 6584 "page-view.c"
+ }
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp12_ = w;
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->width_ = _tmp12_;
+#line 984 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp13_ = value;
+#line 984 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->height_ = _tmp13_;
+#line 987 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->update_image = TRUE;
+#line 989 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "size-changed");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_emit_by_name (self, "changed");
+#line 6600 "page-view.c"
+}
+
+
+static void value_page_view_init (GValue* value) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ value->data[0].v_pointer = NULL;
+#line 6607 "page-view.c"
+}
+
+
+static void value_page_view_free_value (GValue* value) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (value->data[0].v_pointer) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_unref (value->data[0].v_pointer);
+#line 6616 "page-view.c"
+ }
+}
+
+
+static void value_page_view_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (src_value->data[0].v_pointer) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dest_value->data[0].v_pointer = page_view_ref (src_value->data[0].v_pointer);
+#line 6626 "page-view.c"
+ } else {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 6630 "page-view.c"
+ }
+}
+
+
+static gpointer value_page_view_peek_pointer (const GValue* value) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return value->data[0].v_pointer;
+#line 6638 "page-view.c"
+}
+
+
+static gchar* value_page_view_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (collect_values[0].v_pointer) {
+#line 6645 "page-view.c"
+ PageView* object;
+ object = collect_values[0].v_pointer;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 6652 "page-view.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.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 6656 "page-view.c"
+ }
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ value->data[0].v_pointer = page_view_ref (object);
+#line 6660 "page-view.c"
+ } else {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ value->data[0].v_pointer = NULL;
+#line 6664 "page-view.c"
+ }
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return NULL;
+#line 6668 "page-view.c"
+}
+
+
+static gchar* value_page_view_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PageView** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!object_p) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 6679 "page-view.c"
+ }
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (!value->data[0].v_pointer) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ *object_p = NULL;
+#line 6685 "page-view.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ *object_p = value->data[0].v_pointer;
+#line 6689 "page-view.c"
+ } else {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ *object_p = page_view_ref (value->data[0].v_pointer);
+#line 6693 "page-view.c"
+ }
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return NULL;
+#line 6697 "page-view.c"
+}
+
+
+GParamSpec* param_spec_page_view (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPageView* spec;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PAGE_VIEW), NULL);
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return G_PARAM_SPEC (spec);
+#line 6711 "page-view.c"
+}
+
+
+gpointer value_get_page_view (const GValue* value) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PAGE_VIEW), NULL);
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return value->data[0].v_pointer;
+#line 6720 "page-view.c"
+}
+
+
+void value_set_page_view (GValue* value, gpointer v_object) {
+ PageView* old;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PAGE_VIEW));
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ old = value->data[0].v_pointer;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (v_object) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PAGE_VIEW));
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ value->data[0].v_pointer = v_object;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_ref (value->data[0].v_pointer);
+#line 6740 "page-view.c"
+ } else {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ value->data[0].v_pointer = NULL;
+#line 6744 "page-view.c"
+ }
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (old) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_unref (old);
+#line 6750 "page-view.c"
+ }
+}
+
+
+void value_take_page_view (GValue* value, gpointer v_object) {
+ PageView* old;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PAGE_VIEW));
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ old = value->data[0].v_pointer;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (v_object) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PAGE_VIEW));
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ value->data[0].v_pointer = v_object;
+#line 6769 "page-view.c"
+ } else {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ value->data[0].v_pointer = NULL;
+#line 6773 "page-view.c"
+ }
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (old) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_unref (old);
+#line 6779 "page-view.c"
+ }
+}
+
+
+static void page_view_class_init (PageViewClass * klass) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ page_view_parent_class = g_type_class_peek_parent (klass);
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ PAGE_VIEW_CLASS (klass)->finalize = page_view_finalize;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_type_class_add_private (klass, sizeof (PageViewPrivate));
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_new ("size_changed", TYPE_PAGE_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_new ("changed", TYPE_PAGE_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 6795 "page-view.c"
+}
+
+
+static void page_view_instance_init (PageView * self) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv = PAGE_VIEW_GET_PRIVATE (self);
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->image = NULL;
+#line 35 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->selected_ = FALSE;
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->border_width = 1;
+#line 51 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->update_image = TRUE;
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->_cursor = GDK_ARROW;
+#line 78 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->priv->animate_n_segments = 7;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self->ref_count = 1;
+#line 6816 "page-view.c"
+}
+
+
+static void page_view_finalize (PageView* obj) {
+ PageView * self;
+ Page* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+ Page* _tmp2_ = NULL;
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+ Page* _tmp6_ = NULL;
+ guint _tmp7_ = 0U;
+ Page* _tmp8_ = NULL;
+ guint _tmp9_ = 0U;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PAGE_VIEW, PageView);
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp0_ = self->priv->_page;
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_parse_name ("pixels-changed", TYPE_PAGE, &_tmp1_, NULL, FALSE);
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _page_view_page_pixels_changed_cb_page_pixels_changed, self);
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp2_ = self->priv->_page;
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_parse_name ("size-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE);
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _page_view_page_size_changed_cb_page_size_changed, self);
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp4_ = self->priv->_page;
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_parse_name ("crop-changed", TYPE_PAGE, &_tmp5_, NULL, FALSE);
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _page_view_page_overlay_changed_cb_page_crop_changed, self);
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp6_ = self->priv->_page;
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_parse_name ("scan-line-changed", TYPE_PAGE, &_tmp7_, NULL, FALSE);
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _page_view_page_overlay_changed_cb_page_scan_line_changed, self);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _tmp8_ = self->priv->_page;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_parse_name ("scan-direction-changed", TYPE_PAGE, &_tmp9_, NULL, FALSE);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_signal_handlers_disconnect_matched (_tmp8_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp9_, 0, NULL, (GCallback) _page_view_scan_direction_changed_cb_page_scan_direction_changed, self);
+#line 29 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _page_unref0 (self->priv->_page);
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ _g_object_unref0 (self->priv->image);
+#line 6868 "page-view.c"
+}
+
+
+GType page_view_get_type (void) {
+ static volatile gsize page_view_type_id__volatile = 0;
+ if (g_once_init_enter (&page_view_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_page_view_init, value_page_view_free_value, value_page_view_copy_value, value_page_view_peek_pointer, "p", value_page_view_collect_value, "p", value_page_view_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PageViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) page_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PageView), 0, (GInstanceInitFunc) page_view_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType page_view_type_id;
+ page_view_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PageView", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&page_view_type_id__volatile, page_view_type_id);
+ }
+ return page_view_type_id__volatile;
+}
+
+
+gpointer page_view_ref (gpointer instance) {
+ PageView* self;
+ self = instance;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ return instance;
+#line 6893 "page-view.c"
+}
+
+
+void page_view_unref (gpointer instance) {
+ PageView* self;
+ self = instance;
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ PAGE_VIEW_GET_CLASS (self)->finalize (self);
+#line 26 "/home/bob/bzr/simple-scan/trunk/src/page-view.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 6906 "page-view.c"
+ }
+}
+
+
+
diff --git a/src/page-view.vala b/src/page-view.vala
new file mode 100644
index 0000000..c982c4b
--- /dev/null
+++ b/src/page-view.vala
@@ -0,0 +1,1021 @@
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+public enum CropLocation
+{
+ NONE = 0,
+ MIDDLE,
+ TOP,
+ BOTTOM,
+ LEFT,
+ RIGHT,
+ TOP_LEFT,
+ TOP_RIGHT,
+ BOTTOM_LEFT,
+ BOTTOM_RIGHT
+}
+
+public class PageView
+{
+ /* Page being rendered */
+ public Page page { get; private set; }
+
+ /* Image to render at current resolution */
+ private Gdk.Pixbuf? image = null;
+
+ /* Border around image */
+ private bool selected_ = false;
+ public bool selected
+ {
+ get { return selected_; }
+ set
+ {
+ if ((this.selected && selected) || (!this.selected && !selected))
+ return;
+ this.selected = selected;
+ changed ();
+ }
+ }
+
+ private int border_width = 1;
+
+ /* True if image needs to be regenerated */
+ private bool update_image = true;
+
+ /* Direction of currently scanned image */
+ private ScanDirection scan_direction;
+
+ /* Next scan line to render */
+ private int scan_line;
+
+ /* Dimensions of image to generate */
+ private int width_;
+ private int height_;
+
+ /* Location to place this page */
+ public int x_offset { get; set; }
+ public int y_offset { get; set; }
+
+ private CropLocation crop_location;
+ private double selected_crop_px;
+ private double selected_crop_py;
+ private int selected_crop_x;
+ private int selected_crop_y;
+ private int selected_crop_w;
+ private int selected_crop_h;
+
+ /* Cursor over this page */
+ public Gdk.CursorType cursor { get; private set; default = Gdk.CursorType.ARROW; }
+
+ private int animate_n_segments = 7;
+ private int animate_segment;
+ private uint animate_timeout;
+
+ public signal void size_changed ();
+ public signal void changed ();
+
+ public PageView (Page page)
+ {
+ this.page = page;
+ page.pixels_changed.connect (page_pixels_changed_cb);
+ page.size_changed.connect (page_size_changed_cb);
+ page.crop_changed.connect (page_overlay_changed_cb);
+ page.scan_line_changed.connect (page_overlay_changed_cb);
+ page.scan_direction_changed.connect (scan_direction_changed_cb);
+ }
+
+ ~PageView ()
+ {
+ page.pixels_changed.disconnect (page_pixels_changed_cb);
+ page.size_changed.disconnect (page_size_changed_cb);
+ page.crop_changed.disconnect (page_overlay_changed_cb);
+ page.scan_line_changed.disconnect (page_overlay_changed_cb);
+ page.scan_direction_changed.disconnect (scan_direction_changed_cb);
+ }
+
+ private uchar get_sample (uchar[] pixels, int offset, int x, int depth, int sample)
+ {
+ // FIXME
+ return 0xFF;
+ }
+
+ private void get_pixel (Page page, int x, int y, uchar[] pixel)
+ {
+ switch (page.scan_direction)
+ {
+ case ScanDirection.TOP_TO_BOTTOM:
+ break;
+ case ScanDirection.BOTTOM_TO_TOP:
+ x = page.scan_width - x - 1;
+ y = page.scan_height - y - 1;
+ break;
+ case ScanDirection.LEFT_TO_RIGHT:
+ var t = x;
+ x = page.scan_width - y - 1;
+ y = t;
+ break;
+ case ScanDirection.RIGHT_TO_LEFT:
+ var t = x;
+ x = y;
+ y = page.scan_height - t - 1;
+ break;
+ }
+
+ var depth = page.depth;
+ var n_channels = page.n_channels;
+ unowned uchar[] pixels = page.get_pixels ();
+ var offset = page.rowstride * y;
+
+ /* Optimise for 8 bit images */
+ if (depth == 8 && n_channels == 3)
+ {
+ var o = offset + x * n_channels;
+ pixel[0] = pixels[o];
+ pixel[1] = pixels[o+1];
+ pixel[2] = pixels[o+2];
+ return;
+ }
+ else if (depth == 8 && n_channels == 1)
+ {
+ pixel[0] = pixel[1] = pixel[2] = pixels[offset + x];
+ return;
+ }
+
+ /* Optimise for bitmaps */
+ else if (depth == 1 && n_channels == 1)
+ {
+ var o = offset + (x / 8);
+ pixel[0] = pixel[1] = pixel[2] = (pixels[o] & (0x80 >> (x % 8))) != 0 ? 0x00 : 0xFF;
+ return;
+ }
+
+ /* Optimise for 2 bit images */
+ else if (depth == 2 && n_channels == 1)
+ {
+ int block_shift[4] = { 6, 4, 2, 0 };
+
+ var o = offset + (x / 4);
+ var sample = (pixels[o] >> block_shift[x % 4]) & 0x3;
+ sample = sample * 255 / 3;
+
+ pixel[0] = pixel[1] = pixel[2] = (uchar) sample;
+ return;
+ }
+
+ /* Use slow method */
+ pixel[0] = get_sample (pixels, offset, x, depth, x * n_channels);
+ pixel[1] = get_sample (pixels, offset, x, depth, x * n_channels + 1);
+ pixel[2] = get_sample (pixels, offset, x, depth, x * n_channels + 2);
+ }
+
+ private void set_pixel (Page page, double l, double r, double t, double b, uchar[] output, int offset)
+ {
+ /* Decimation:
+ *
+ * Target pixel is defined by (t,l)-(b,r)
+ * It touches 16 pixels in original image
+ * It completely covers 4 pixels in original image (T,L)-(B,R)
+ * Add covered pixels and add weighted partially covered pixels.
+ * Divide by total area.
+ *
+ * l L R r
+ * +-----+-----+-----+-----+
+ * | | | | |
+ * t | +--+-----+-----+---+ |
+ * T +--+--+-----+-----+---+-+
+ * | | | | | | |
+ * | | | | | | |
+ * +--+--+-----+-----+---+-+
+ * | | | | | | |
+ * | | | | | | |
+ * B +--+--+-----+-----+---+-+
+ * | | | | | | |
+ * b | +--+-----+-----+---+ |
+ * +-----+-----+-----+-----+
+ *
+ *
+ * Interpolation:
+ *
+ * l r
+ * +-----+-----+-----+-----+
+ * | | | | |
+ * | | | | |
+ * +-----+-----+-----+-----+
+ * t | | +-+--+ | |
+ * | | | | | | |
+ * +-----+---+-+--+--+-----+
+ * b | | +-+--+ | |
+ * | | | | |
+ * +-----+-----+-----+-----+
+ * | | | | |
+ * | | | | |
+ * +-----+-----+-----+-----+
+ *
+ * Same again, just no completely covered pixels.
+ */
+
+ var L = (int) l;
+ if (L != l)
+ L++;
+ var R = (int) r;
+ var T = (int) t;
+ if (T != t)
+ T++;
+ var B = (int) b;
+
+ var red = 0.0;
+ var green = 0.0;
+ var blue = 0.0;
+
+ /* Target can fit inside one source pixel
+ * +-----+
+ * | |
+ * | +--+| +-----+-----+ +-----+ +-----+ +-----+
+ * +-+--++ or | +-++ | or | +-+ | or | +--+| or | +--+
+ * | +--+| | +-++ | | +-+ | | | || | | |
+ * | | +-----+-----+ +-----+ +-+--++ +--+--+
+ * +-----+
+ */
+ if ((r - l <= 1.0 && (int)r == (int)l) || (b - t <= 1.0 && (int)b == (int)t))
+ {
+ /* Inside */
+ if ((int)l == (int)r || (int)t == (int)b)
+ {
+ uchar p[3];
+ get_pixel (page, (int)l, (int)t, p);
+ output[offset] = p[0];
+ output[offset+1] = p[1];
+ output[offset+2] = p[2];
+ return;
+ }
+
+ /* Stradling horizontal edge */
+ if (L > R)
+ {
+ uchar p[3];
+ get_pixel (page, R, T-1, p);
+ red += p[0] * (r-l)*(T-t);
+ green += p[1] * (r-l)*(T-t);
+ blue += p[2] * (r-l)*(T-t);
+ for (var y = T; y < B; y++)
+ {
+ get_pixel (page, R, y, p);
+ red += p[0] * (r-l);
+ green += p[1] * (r-l);
+ blue += p[2] * (r-l);
+ }
+ get_pixel (page, R, B, p);
+ red += p[0] * (r-l)*(b-B);
+ green += p[1] * (r-l)*(b-B);
+ blue += p[2] * (r-l)*(b-B);
+ }
+ /* Stradling vertical edge */
+ else
+ {
+ uchar p[3];
+ get_pixel (page, L - 1, B, p);
+ red += p[0] * (b-t)*(L-l);
+ green += p[1] * (b-t)*(L-l);
+ blue += p[2] * (b-t)*(L-l);
+ for (var x = L; x < R; x++) {
+ get_pixel (page, x, B, p);
+ red += p[0] * (b-t);
+ green += p[1] * (b-t);
+ blue += p[2] * (b-t);
+ }
+ get_pixel (page, R, B, p);
+ red += p[0] * (b-t)*(r-R);
+ green += p[1] * (b-t)*(r-R);
+ blue += p[2] * (b-t)*(r-R);
+ }
+
+ var scale = 1.0 / ((r - l) * (b - t));
+ output[offset] = (uchar)(red * scale + 0.5);
+ output[offset+1] = (uchar)(green * scale + 0.5);
+ output[offset+2] = (uchar)(blue * scale + 0.5);
+ return;
+ }
+
+ /* Add the middle pixels */
+ for (var x = L; x < R; x++)
+ {
+ for (var y = T; y < B; y++)
+ {
+ uchar p[3];
+ get_pixel (page, x, y, p);
+ red += p[0];
+ green += p[1];
+ blue += p[2];
+ }
+ }
+
+ /* Add the weighted top and bottom pixels */
+ for (var x = L; x < R; x++)
+ {
+ if (t != T)
+ {
+ uchar p[3];
+ get_pixel (page, x, T - 1, p);
+ red += p[0] * (T - t);
+ green += p[1] * (T - t);
+ blue += p[2] * (T - t);
+ }
+
+ if (b != B)
+ {
+ uchar p[3];
+ get_pixel (page, x, B, p);
+ red += p[0] * (b - B);
+ green += p[1] * (b - B);
+ blue += p[2] * (b - B);
+ }
+ }
+
+ /* Add the left and right pixels */
+ for (var y = T; y < B; y++)
+ {
+ if (l != L)
+ {
+ uchar p[3];
+ get_pixel (page, L - 1, y, p);
+ red += p[0] * (L - l);
+ green += p[1] * (L - l);
+ blue += p[2] * (L - l);
+ }
+
+ if (r != R)
+ {
+ uchar p[3];
+ get_pixel (page, R, y, p);
+ red += p[0] * (r - R);
+ green += p[1] * (r - R);
+ blue += p[2] * (r - R);
+ }
+ }
+
+ /* Add the corner pixels */
+ if (l != L && t != T)
+ {
+ uchar p[3];
+ get_pixel (page, L - 1, T - 1, p);
+ red += p[0] * (L - l)*(T - t);
+ green += p[1] * (L - l)*(T - t);
+ blue += p[2] * (L - l)*(T - t);
+ }
+ if (r != R && t != T)
+ {
+ uchar p[3];
+ get_pixel (page, R, T - 1, p);
+ red += p[0] * (r - R)*(T - t);
+ green += p[1] * (r - R)*(T - t);
+ blue += p[2] * (r - R)*(T - t);
+ }
+ if (r != R && b != B)
+ {
+ uchar p[3];
+ get_pixel (page, R, B, p);
+ red += p[0] * (r - R)*(b - B);
+ green += p[1] * (r - R)*(b - B);
+ blue += p[2] * (r - R)*(b - B);
+ }
+ if (l != L && b != B)
+ {
+ uchar p[3];
+ get_pixel (page, L - 1, B, p);
+ red += p[0] * (L - l)*(b - B);
+ green += p[1] * (L - l)*(b - B);
+ blue += p[2] * (L - l)*(b - B);
+ }
+
+ /* Scale pixel values and clamp in range [0, 255] */
+ var scale = 1.0 / ((r - l) * (b - t));
+ output[offset] = (uchar)(red * scale + 0.5);
+ output[offset+1] = (uchar)(green * scale + 0.5);
+ output[offset+2] = (uchar)(blue * scale + 0.5);
+ }
+
+ private void update_preview (Page page, ref Gdk.Pixbuf? output_image, int output_width, int output_height,
+ ScanDirection scan_direction, int old_scan_line, int scan_line)
+ {
+ var input_width = page.width;
+ var input_height = page.height;
+
+ /* Create new image if one does not exist or has changed size */
+ int L, R, T, B;
+ if (output_image == null ||
+ output_image.width != output_width ||
+ output_image.height != output_height)
+ {
+ output_image = new Gdk.Pixbuf (Gdk.Colorspace.RGB,
+ false,
+ 8,
+ output_width,
+ output_height);
+
+ /* Update entire image */
+ L = 0;
+ R = output_width - 1;
+ T = 0;
+ B = output_height - 1;
+ }
+ /* Otherwise only update changed area */
+ else
+ {
+ switch (scan_direction)
+ {
+ case ScanDirection.TOP_TO_BOTTOM:
+ L = 0;
+ R = output_width - 1;
+ T = (int)((double)old_scan_line * output_height / input_height);
+ B = (int)((double)scan_line * output_height / input_height + 0.5);
+ break;
+ case ScanDirection.LEFT_TO_RIGHT:
+ L = (int)((double)old_scan_line * output_width / input_width);
+ R = (int)((double)scan_line * output_width / input_width + 0.5);
+ T = 0;
+ B = output_height - 1;
+ break;
+ case ScanDirection.BOTTOM_TO_TOP:
+ L = 0;
+ R = output_width - 1;
+ T = (int)((double)(input_height - scan_line) * output_height / input_height);
+ B = (int)((double)(input_height - old_scan_line) * output_height / input_height + 0.5);
+ break;
+ case ScanDirection.RIGHT_TO_LEFT:
+ L = (int)((double)(input_width - scan_line) * output_width / input_width);
+ R = (int)((double)(input_width - old_scan_line) * output_width / input_width + 0.5);
+ T = 0;
+ B = output_height - 1;
+ break;
+ default:
+ L = R = B = T = 0;
+ break;
+ }
+ }
+
+ /* FIXME: There's an off by one error in there somewhere... */
+ if (R >= output_width)
+ R = output_width - 1;
+ if (B >= output_height)
+ B = output_height - 1;
+
+ return_if_fail (L >= 0);
+ return_if_fail (R < output_width);
+ return_if_fail (T >= 0);
+ return_if_fail (B < output_height);
+ return_if_fail (output_image != null);
+
+ unowned uchar[] output = output_image.get_pixels ();
+ var output_rowstride = output_image.rowstride;
+ var output_n_channels = output_image.n_channels;
+
+ if (!page.has_data)
+ {
+ for (var x = L; x <= R; x++)
+ for (var y = T; y <= B; y++)
+ {
+ var o = output_rowstride * y + x * output_n_channels;
+ output[o] = output[o+1] = output[o+2] = 0xFF;
+ }
+ return;
+ }
+
+ /* Update changed area */
+ for (var x = L; x <= R; x++)
+ {
+ var l = (double)x * input_width / output_width;
+ var r = (double)(x + 1) * input_width / output_width;
+
+ for (var y = T; y <= B; y++)
+ {
+ var t = (double)y * input_height / output_height;
+ var b = (double)(y + 1) * input_height / output_height;
+
+ set_pixel (page,
+ l, r, t, b,
+ output, output_rowstride * y + x * output_n_channels);
+ }
+ }
+ }
+
+ private int get_preview_width ()
+ {
+ return width_ - border_width * 2;
+ }
+
+ private int get_preview_height ()
+ {
+ return height_ - border_width * 2;
+ }
+
+ private void update_page_view ()
+ {
+ if (!update_image)
+ return;
+
+ var old_scan_line = scan_line;
+ var scan_line = page.scan_line;
+
+ /* Delete old image if scan direction changed */
+ var left_steps = scan_direction - page.scan_direction;
+ if (left_steps != 0 && image != null)
+ image = null;
+ scan_direction = page.scan_direction;
+
+ update_preview (page,
+ ref image,
+ get_preview_width (),
+ get_preview_height (),
+ page.scan_direction, old_scan_line, scan_line);
+
+ update_image = false;
+ this.scan_line = scan_line;
+ }
+
+ private int page_to_screen_x (int x)
+ {
+ return (int) ((double)x * get_preview_width () / page.width + 0.5);
+ }
+
+ private int page_to_screen_y (int y)
+ {
+ return (int) ((double)y * get_preview_height () / page.height + 0.5);
+ }
+
+ private int screen_to_page_x (int x)
+ {
+ return (int) ((double)x * page.width / get_preview_width () + 0.5);
+ }
+
+ private int screen_to_page_y (int y)
+ {
+ return (int) ((double)y * page.height / get_preview_height () + 0.5);
+ }
+
+ private CropLocation get_crop_location (int x, int y)
+ {
+ if (!page.has_crop)
+ return 0;
+
+ var cx = page.crop_x;
+ var cy = page.crop_y;
+ var cw = page.crop_width;
+ var ch = page.crop_height;
+ var dx = page_to_screen_x (cx);
+ var dy = page_to_screen_y (cy);
+ var dw = page_to_screen_x (cw);
+ var dh = page_to_screen_y (ch);
+ var ix = x - dx;
+ var iy = y - dy;
+
+ if (ix < 0 || ix > dw || iy < 0 || iy > dh)
+ return CropLocation.NONE;
+
+ /* Can't resize named crops */
+ var name = page.crop_name;
+ if (name != null)
+ return CropLocation.MIDDLE;
+
+ /* Adjust borders so can select */
+ int crop_border = 20;
+ if (dw < crop_border * 3)
+ crop_border = dw / 3;
+ if (dh < crop_border * 3)
+ crop_border = dh / 3;
+
+ /* Top left */
+ if (ix < crop_border && iy < crop_border)
+ return CropLocation.TOP_LEFT;
+ /* Top right */
+ if (ix > dw - crop_border && iy < crop_border)
+ return CropLocation.TOP_RIGHT;
+ /* Bottom left */
+ if (ix < crop_border && iy > dh - crop_border)
+ return CropLocation.BOTTOM_LEFT;
+ /* Bottom right */
+ if (ix > dw - crop_border && iy > dh - crop_border)
+ return CropLocation.BOTTOM_RIGHT;
+
+ /* Left */
+ if (ix < crop_border)
+ return CropLocation.LEFT;
+ /* Right */
+ if (ix > dw - crop_border)
+ return CropLocation.RIGHT;
+ /* Top */
+ if (iy < crop_border)
+ return CropLocation.TOP;
+ /* Bottom */
+ if (iy > dh - crop_border)
+ return CropLocation.BOTTOM;
+
+ /* In the middle */
+ return CropLocation.MIDDLE;
+ }
+
+ public void button_press (int x, int y)
+ {
+ /* See if selecting crop */
+ var location = get_crop_location (x, y);
+ if (location != CropLocation.NONE)
+ {
+ crop_location = location;
+ selected_crop_px = x;
+ selected_crop_py = y;
+ selected_crop_x = page.crop_x;
+ selected_crop_y = page.crop_y;
+ selected_crop_w = page.crop_width;
+ selected_crop_h = page.crop_height;;
+ }
+ }
+
+ public void motion (int x, int y)
+ {
+ var location = get_crop_location (x, y);
+ Gdk.CursorType cursor;
+ switch (location)
+ {
+ case CropLocation.MIDDLE:
+ cursor = Gdk.CursorType.HAND1;
+ break;
+ case CropLocation.TOP:
+ cursor = Gdk.CursorType.TOP_SIDE;
+ break;
+ case CropLocation.BOTTOM:
+ cursor = Gdk.CursorType.BOTTOM_SIDE;
+ break;
+ case CropLocation.LEFT:
+ cursor = Gdk.CursorType.LEFT_SIDE;
+ break;
+ case CropLocation.RIGHT:
+ cursor = Gdk.CursorType.RIGHT_SIDE;
+ break;
+ case CropLocation.TOP_LEFT:
+ cursor = Gdk.CursorType.TOP_LEFT_CORNER;
+ break;
+ case CropLocation.TOP_RIGHT:
+ cursor = Gdk.CursorType.TOP_RIGHT_CORNER;
+ break;
+ case CropLocation.BOTTOM_LEFT:
+ cursor = Gdk.CursorType.BOTTOM_LEFT_CORNER;
+ break;
+ case CropLocation.BOTTOM_RIGHT:
+ cursor = Gdk.CursorType.BOTTOM_RIGHT_CORNER;
+ break;
+ default:
+ cursor = Gdk.CursorType.ARROW;
+ break;
+ }
+
+ if (crop_location == CropLocation.NONE)
+ {
+ this.cursor = cursor;
+ return;
+ }
+
+ /* Move the crop */
+ var pw = page.width;
+ var ph = page.height;
+ var cw = page.crop_width;
+ var ch = page.crop_height;
+
+ var dx = screen_to_page_x (x - (int) selected_crop_px);
+ var dy = screen_to_page_y (y - (int) selected_crop_py);
+
+ var new_x = selected_crop_x;
+ var new_y = selected_crop_y;
+ var new_w = selected_crop_w;
+ var new_h = selected_crop_h;
+
+ /* Limit motion to remain within page and minimum crop size */
+ var min_size = screen_to_page_x (15);
+ if (crop_location == CropLocation.TOP_LEFT ||
+ crop_location == CropLocation.LEFT ||
+ crop_location == CropLocation.BOTTOM_LEFT)
+ {
+ if (dx > new_w - min_size)
+ dx = new_w - min_size;
+ if (new_x + dx < 0)
+ dx = -new_x;
+ }
+ if (crop_location == CropLocation.TOP_LEFT ||
+ crop_location == CropLocation.TOP ||
+ crop_location == CropLocation.TOP_RIGHT)
+ {
+ if (dy > new_h - min_size)
+ dy = new_h - min_size;
+ if (new_y + dy < 0)
+ dy = -new_y;
+ }
+
+ if (crop_location == CropLocation.TOP_RIGHT ||
+ crop_location == CropLocation.RIGHT ||
+ crop_location == CropLocation.BOTTOM_RIGHT)
+ {
+ if (dx < min_size - new_w)
+ dx = min_size - new_w;
+ if (new_x + new_w + dx > pw)
+ dx = pw - new_x - new_w;
+ }
+ if (crop_location == CropLocation.BOTTOM_LEFT ||
+ crop_location == CropLocation.BOTTOM ||
+ crop_location == CropLocation.BOTTOM_RIGHT)
+ {
+ if (dy < min_size - new_h)
+ dy = min_size - new_h;
+ if (new_y + new_h + dy > ph)
+ dy = ph - new_y - new_h;
+ }
+ if (crop_location == CropLocation.MIDDLE)
+ {
+ if (new_x + dx + new_w > pw)
+ dx = pw - new_x - new_w;
+ if (new_x + dx < 0)
+ dx = -new_x;
+ if (new_y + dy + new_h > ph)
+ dy = ph - new_y - new_h;
+ if (new_y + dy < 0)
+ dy = -new_y;
+ }
+
+ /* Move crop */
+ if (crop_location == CropLocation.MIDDLE)
+ {
+ new_x += dx;
+ new_y += dy;
+ }
+ if (crop_location == CropLocation.TOP_LEFT ||
+ crop_location == CropLocation.LEFT ||
+ crop_location == CropLocation.BOTTOM_LEFT)
+ {
+ new_x += dx;
+ new_w -= dx;
+ }
+ if (crop_location == CropLocation.TOP_LEFT ||
+ crop_location == CropLocation.TOP ||
+ crop_location == CropLocation.TOP_RIGHT)
+ {
+ new_y += dy;
+ new_h -= dy;
+ }
+
+ if (crop_location == CropLocation.TOP_RIGHT ||
+ crop_location == CropLocation.RIGHT ||
+ crop_location == CropLocation.BOTTOM_RIGHT)
+ new_w += dx;
+ if (crop_location == CropLocation.BOTTOM_LEFT ||
+ crop_location == CropLocation.BOTTOM ||
+ crop_location == CropLocation.BOTTOM_RIGHT)
+ new_h += dy;
+
+ page.move_crop (new_x, new_y);
+
+ /* If reshaped crop, must be a custom crop */
+ if (new_w != cw || new_h != ch)
+ page.set_custom_crop (new_w, new_h);
+ }
+
+ public void button_release (int x, int y)
+ {
+ /* Complete crop */
+ crop_location = CropLocation.NONE;
+ changed ();
+ }
+
+ private bool animation_cb ()
+ {
+ animate_segment = (animate_segment + 1) % animate_n_segments;
+ changed ();
+ return true;
+ }
+
+ private void update_animation ()
+ {
+ bool animate, is_animating;
+
+ animate = page.is_scanning && !page.has_data;
+ is_animating = animate_timeout != 0;
+ if (animate == is_animating)
+ return;
+
+ if (animate)
+ {
+ animate_segment = 0;
+ if (animate_timeout == 0)
+ animate_timeout = Timeout.add (150, animation_cb);
+ }
+ else
+ {
+ if (animate_timeout != 0)
+ Source.remove (animate_timeout);
+ animate_timeout = 0;
+ }
+ }
+
+ public void render (Cairo.Context context)
+ {
+ update_animation ();
+ update_page_view ();
+
+ var w = get_preview_width ();
+ var h = get_preview_height ();
+
+ context.set_line_width (1);
+ context.translate (x_offset, y_offset);
+
+ /* Draw page border */
+ context.set_source_rgb (0, 0, 0);
+ context.set_line_width (border_width);
+ context.rectangle ((double)border_width / 2,
+ (double)border_width / 2,
+ width_ - border_width,
+ height_ - border_width);
+ context.stroke ();
+
+ /* Draw image */
+ context.translate (border_width, border_width);
+ Gdk.cairo_set_source_pixbuf (context, image, 0, 0);
+ context.paint ();
+
+ /* Draw throbber */
+ if (page.is_scanning && !page.has_data)
+ {
+ double outer_radius;
+ if (w > h)
+ outer_radius = 0.15 * w;
+ else
+ outer_radius = 0.15 * h;
+ var arc = Math.PI / animate_n_segments;
+
+ /* Space circles */
+ var x = outer_radius * Math.sin (arc);
+ var y = outer_radius * (Math.cos (arc) - 1.0);
+ var inner_radius = 0.6 * Math.sqrt (x*x + y*y);
+
+ double offset = 0.0;
+ for (var i = 0; i < animate_n_segments; i++, offset += arc * 2)
+ {
+ x = w / 2 + outer_radius * Math.sin (offset);
+ y = h / 2 - outer_radius * Math.cos (offset);
+ context.arc (x, y, inner_radius, 0, 2 * Math.PI);
+
+ if (i == animate_segment)
+ {
+ context.set_source_rgb (0.75, 0.75, 0.75);
+ context.fill_preserve ();
+ }
+
+ context.set_source_rgb (0.5, 0.5, 0.5);
+ context.stroke ();
+ }
+ }
+
+ /* Draw scan line */
+ if (page.is_scanning && page.scan_line > 0)
+ {
+ var scan_line = page.scan_line;
+
+ double s;
+ double x1, y1, x2, y2;
+ switch (page.scan_direction)
+ {
+ case ScanDirection.TOP_TO_BOTTOM:
+ s = page_to_screen_y (scan_line);
+ x1 = 0; y1 = s + 0.5;
+ x2 = w; y2 = s + 0.5;
+ break;
+ case ScanDirection.BOTTOM_TO_TOP:
+ s = page_to_screen_y (scan_line);
+ x1 = 0; y1 = h - s + 0.5;
+ x2 = w; y2 = h - s + 0.5;
+ break;
+ case ScanDirection.LEFT_TO_RIGHT:
+ s = page_to_screen_x (scan_line);
+ x1 = s + 0.5; y1 = 0;
+ x2 = s + 0.5; y2 = h;
+ break;
+ case ScanDirection.RIGHT_TO_LEFT:
+ s = page_to_screen_x (scan_line);
+ x1 = w - s + 0.5; y1 = 0;
+ x2 = w - s + 0.5; y2 = h;
+ break;
+ default:
+ x1 = y1 = x2 = y2 = 0;
+ break;
+ }
+
+ context.move_to (x1, y1);
+ context.line_to (x2, y2);
+ context.set_source_rgb (1.0, 0.0, 0.0);
+ context.stroke ();
+ }
+
+ /* Draw crop */
+ if (page.has_crop)
+ {
+ var x = page.crop_x;
+ var y = page.crop_y;
+ var crop_width = page.crop_width;
+ var crop_height = page.crop_height;
+
+ var dx = page_to_screen_x (x);
+ var dy = page_to_screen_y (y);
+ var dw = page_to_screen_x (crop_width);
+ var dh = page_to_screen_y (crop_height);
+
+ /* Shade out cropped area */
+ context.rectangle (0, 0, w, h);
+ context.new_sub_path ();
+ context.rectangle (dx, dy, dw, dh);
+ context.set_fill_rule (Cairo.FillRule.EVEN_ODD);
+ context.set_source_rgba (0.25, 0.25, 0.25, 0.2);
+ context.fill ();
+
+ /* Show new edge */
+ context.rectangle (dx - 1.5, dy - 1.5, dw + 3, dh + 3);
+ context.set_source_rgb (1.0, 1.0, 1.0);
+ context.stroke ();
+ context.rectangle (dx - 0.5, dy - 0.5, dw + 1, dh + 1);
+ context.set_source_rgb (0.0, 0.0, 0.0);
+ context.stroke ();
+ }
+ }
+
+ public int width
+ {
+ get { return width_; }
+ set
+ {
+ // FIXME: Automatically update when get updated image
+ var h = (int) ((double) value * page.height / page.width);
+ if (width_ == value && height_ == h)
+ return;
+
+ width_ = value;
+ height_ = h;
+
+ /* Regenerate image */
+ update_image = true;
+
+ size_changed ();
+ changed ();
+ }
+ }
+
+ public int height
+ {
+ get { return height_; }
+ set
+ {
+ // FIXME: Automatically update when get updated image
+ var w = (int) ((double) value * page.width / page.height);
+ if (width_ == w && height_ == value)
+ return;
+
+ width_ = w;
+ height_ = value;
+
+ /* Regenerate image */
+ update_image = true;
+
+ size_changed ();
+ changed ();
+ }
+ }
+
+ private void page_pixels_changed_cb (Page p)
+ {
+ /* Regenerate image */
+ update_image = true;
+ changed ();
+ }
+
+ private void page_size_changed_cb (Page p)
+ {
+ /* Regenerate image */
+ update_image = true;
+ size_changed ();
+ changed ();
+ }
+
+ private void page_overlay_changed_cb (Page p)
+ {
+ changed ();
+ }
+
+ private void scan_direction_changed_cb (Page p)
+ {
+ /* Regenerate image */
+ update_image = true;
+ size_changed ();
+ changed ();
+ }
+}
diff --git a/src/page.c b/src/page.c
new file mode 100644
index 0000000..9f5a9f2
--- /dev/null
+++ b/src/page.c
@@ -0,0 +1,4863 @@
+/* page.c generated by valac 0.24.0, the Vala compiler
+ * generated from page.vala, do not modify */
+
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <float.h>
+#include <math.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib/gstdio.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <gio/gio.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_SCAN_DIRECTION (scan_direction_get_type ())
+
+#define TYPE_PAGE (page_get_type ())
+#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
+#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
+#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
+#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
+#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))
+
+typedef struct _Page Page;
+typedef struct _PageClass PageClass;
+typedef struct _PagePrivate PagePrivate;
+#define _g_free0(var) (var = (g_free (var), NULL))
+
+#define TYPE_SCAN_PAGE_INFO (scan_page_info_get_type ())
+#define SCAN_PAGE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_PAGE_INFO, ScanPageInfo))
+#define SCAN_PAGE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_PAGE_INFO, ScanPageInfoClass))
+#define IS_SCAN_PAGE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_PAGE_INFO))
+#define IS_SCAN_PAGE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_PAGE_INFO))
+#define SCAN_PAGE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_PAGE_INFO, ScanPageInfoClass))
+
+typedef struct _ScanPageInfo ScanPageInfo;
+typedef struct _ScanPageInfoClass ScanPageInfoClass;
+typedef struct _ScanPageInfoPrivate ScanPageInfoPrivate;
+
+#define TYPE_SCAN_LINE (scan_line_get_type ())
+#define SCAN_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_LINE, ScanLine))
+#define SCAN_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_LINE, ScanLineClass))
+#define IS_SCAN_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_LINE))
+#define IS_SCAN_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_LINE))
+#define SCAN_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_LINE, ScanLineClass))
+
+typedef struct _ScanLine ScanLine;
+typedef struct _ScanLineClass ScanLineClass;
+typedef struct _ScanLinePrivate ScanLinePrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+
+#define TYPE_PIXBUF_WRITER (pixbuf_writer_get_type ())
+#define PIXBUF_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIXBUF_WRITER, PixbufWriter))
+#define PIXBUF_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIXBUF_WRITER, PixbufWriterClass))
+#define IS_PIXBUF_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIXBUF_WRITER))
+#define IS_PIXBUF_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIXBUF_WRITER))
+#define PIXBUF_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIXBUF_WRITER, PixbufWriterClass))
+
+typedef struct _PixbufWriter PixbufWriter;
+typedef struct _PixbufWriterClass PixbufWriterClass;
+#define _pixbuf_writer_unref0(var) ((var == NULL) ? NULL : (var = (pixbuf_writer_unref (var), NULL)))
+typedef struct _ParamSpecPage ParamSpecPage;
+typedef struct _PixbufWriterPrivate PixbufWriterPrivate;
+typedef struct _ParamSpecPixbufWriter ParamSpecPixbufWriter;
+
+typedef enum {
+ SCAN_DIRECTION_TOP_TO_BOTTOM,
+ SCAN_DIRECTION_LEFT_TO_RIGHT,
+ SCAN_DIRECTION_BOTTOM_TO_TOP,
+ SCAN_DIRECTION_RIGHT_TO_LEFT
+} ScanDirection;
+
+struct _Page {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PagePrivate * priv;
+};
+
+struct _PageClass {
+ GTypeClass parent_class;
+ void (*finalize) (Page *self);
+};
+
+struct _PagePrivate {
+ gint _dpi;
+ gint expected_rows;
+ gint _depth;
+ gchar* _color_profile;
+ gint _scan_width;
+ gint _scan_height;
+ gint _rowstride;
+ gint _n_channels;
+ guchar* pixels;
+ gint pixels_length1;
+ gint _pixels_size_;
+ gboolean _is_scanning;
+ gboolean _has_data;
+ gint _scan_line;
+ ScanDirection scan_direction_;
+ gboolean _has_crop;
+ gchar* _crop_name;
+ gint _crop_x;
+ gint _crop_y;
+ gint _crop_width;
+ gint _crop_height;
+};
+
+struct _ScanPageInfo {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanPageInfoPrivate * priv;
+ gint width;
+ gint height;
+ gint depth;
+ gint n_channels;
+ gdouble dpi;
+ gchar* device;
+};
+
+struct _ScanPageInfoClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanPageInfo *self);
+};
+
+struct _ScanLine {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanLinePrivate * priv;
+ gint number;
+ gint n_lines;
+ gint width;
+ gint depth;
+ gint channel;
+ guchar* data;
+ gint data_length1;
+ gint data_length;
+};
+
+struct _ScanLineClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanLine *self);
+};
+
+struct _ParamSpecPage {
+ GParamSpec parent_instance;
+};
+
+struct _PixbufWriter {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ PixbufWriterPrivate * priv;
+ GFileOutputStream* stream;
+};
+
+struct _PixbufWriterClass {
+ GTypeClass parent_class;
+ void (*finalize) (PixbufWriter *self);
+};
+
+struct _ParamSpecPixbufWriter {
+ GParamSpec parent_instance;
+};
+
+
+static gpointer page_parent_class = NULL;
+static gpointer pixbuf_writer_parent_class = NULL;
+
+GType scan_direction_get_type (void) G_GNUC_CONST;
+gpointer page_ref (gpointer instance);
+void page_unref (gpointer instance);
+GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_page (GValue* value, gpointer v_object);
+void value_take_page (GValue* value, gpointer v_object);
+gpointer value_get_page (const GValue* value);
+GType page_get_type (void) G_GNUC_CONST;
+#define PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PAGE, PagePrivate))
+enum {
+ PAGE_DUMMY_PROPERTY
+};
+Page* page_new (gint width, gint height, gint dpi, ScanDirection scan_direction);
+Page* page_construct (GType object_type, gint width, gint height, gint dpi, ScanDirection scan_direction);
+static void page_set_scan_width (Page* self, gint value);
+static void page_set_scan_height (Page* self, gint value);
+static void page_set_dpi (Page* self, gint value);
+void page_set_scan_direction (Page* self, ScanDirection value);
+Page* page_new_from_data (gint scan_width, gint scan_height, gint rowstride, gint n_channels, gint depth, gint dpi, ScanDirection scan_direction, const gchar* color_profile, guchar* pixels, int pixels_length1, gboolean has_crop, const gchar* crop_name, gint crop_x, gint crop_y, gint crop_width, gint crop_height);
+Page* page_construct_from_data (GType object_type, gint scan_width, gint scan_height, gint rowstride, gint n_channels, gint depth, gint dpi, ScanDirection scan_direction, const gchar* color_profile, guchar* pixels, int pixels_length1, gboolean has_crop, const gchar* crop_name, gint crop_x, gint crop_y, gint crop_width, gint crop_height);
+static void page_set_rowstride (Page* self, gint value);
+static void page_set_n_channels (Page* self, gint value);
+static void page_set_depth (Page* self, gint value);
+void page_set_color_profile (Page* self, const gchar* value);
+static guchar* _vala_array_dup3 (guchar* self, int length);
+static void page_set_has_data (Page* self, gboolean value);
+static void page_set_has_crop (Page* self, gboolean value);
+static void page_set_crop_name (Page* self, const gchar* value);
+static void page_set_crop_x (Page* self, gint value);
+static void page_set_crop_y (Page* self, gint value);
+static void page_set_crop_width (Page* self, gint value);
+static void page_set_crop_height (Page* self, gint value);
+gpointer scan_page_info_ref (gpointer instance);
+void scan_page_info_unref (gpointer instance);
+GParamSpec* param_spec_scan_page_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_page_info (GValue* value, gpointer v_object);
+void value_take_scan_page_info (GValue* value, gpointer v_object);
+gpointer value_get_scan_page_info (const GValue* value);
+GType scan_page_info_get_type (void) G_GNUC_CONST;
+void page_set_page_info (Page* self, ScanPageInfo* info);
+gint page_get_scan_height (Page* self);
+gint page_get_scan_width (Page* self);
+gint page_get_depth (Page* self);
+gint page_get_n_channels (Page* self);
+gint page_get_rowstride (Page* self);
+void page_start (Page* self);
+static void page_set_is_scanning (Page* self, gboolean value);
+gpointer scan_line_ref (gpointer instance);
+void scan_line_unref (gpointer instance);
+GParamSpec* param_spec_scan_line (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_line (GValue* value, gpointer v_object);
+void value_take_scan_line (GValue* value, gpointer v_object);
+gpointer value_get_scan_line (const GValue* value);
+GType scan_line_get_type (void) G_GNUC_CONST;
+static void page_parse_line (Page* self, ScanLine* line, gint n, gboolean* size_changed);
+static void page_set_scan_line (Page* self, gint value);
+void page_parse_scan_line (Page* self, ScanLine* line);
+void page_finish (Page* self);
+gint page_get_scan_line (Page* self);
+void page_rotate_left (Page* self);
+ScanDirection page_get_scan_direction (Page* self);
+void page_rotate_right (Page* self);
+void page_set_no_crop (Page* self);
+gboolean page_get_has_crop (Page* self);
+void page_set_custom_crop (Page* self, gint width, gint height);
+const gchar* page_get_crop_name (Page* self);
+gint page_get_crop_width (Page* self);
+gint page_get_crop_height (Page* self);
+void page_set_named_crop (Page* self, const gchar* name);
+gint page_get_width (Page* self);
+gint page_get_height (Page* self);
+gint page_get_dpi (Page* self);
+void page_move_crop (Page* self, gint x, gint y);
+void page_rotate_crop (Page* self);
+gint page_get_crop_x (Page* self);
+gint page_get_crop_y (Page* self);
+guchar* page_get_pixels (Page* self, int* result_length1);
+static guchar page_get_sample (Page* self, guchar* pixels, int pixels_length1, gint offset, gint x, gint depth, gint n_channels, gint channel);
+static void page_get_pixel (Page* self, gint x, gint y, guchar* pixel, int pixel_length1, gint offset);
+GdkPixbuf* page_get_image (Page* self, gboolean apply_crop);
+static gchar* page_get_icc_data_encoded (Page* self, const gchar* icc_profile_filename);
+void page_copy_to_clipboard (Page* self, GtkWindow* window);
+void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError** error);
+gpointer pixbuf_writer_ref (gpointer instance);
+void pixbuf_writer_unref (gpointer instance);
+GParamSpec* param_spec_pixbuf_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_pixbuf_writer (GValue* value, gpointer v_object);
+void value_take_pixbuf_writer (GValue* value, gpointer v_object);
+gpointer value_get_pixbuf_writer (const GValue* value);
+GType pixbuf_writer_get_type (void) G_GNUC_CONST;
+PixbufWriter* pixbuf_writer_new (GFileOutputStream* stream);
+PixbufWriter* pixbuf_writer_construct (GType object_type, GFileOutputStream* stream);
+const gchar* page_get_color_profile (Page* self);
+void pixbuf_writer_save (PixbufWriter* self, GdkPixbuf* image, const gchar* type, gchar** option_keys, int option_keys_length1, gchar** option_values, int option_values_length1, GError** error);
+gboolean page_get_is_landscape (Page* self);
+gboolean page_get_is_scanning (Page* self);
+gboolean page_get_has_data (Page* self);
+gboolean page_get_is_color (Page* self);
+static void page_finalize (Page* obj);
+enum {
+ PIXBUF_WRITER_DUMMY_PROPERTY
+};
+static gboolean pixbuf_writer_write_pixbuf_data (PixbufWriter* self, guint8* buf, int buf_length1, GError** error);
+static gboolean _pixbuf_writer_write_pixbuf_data_gdk_pixbuf_save_func (guint8* buf, gsize buf_length1, GError** error, gpointer self);
+static void pixbuf_writer_finalize (PixbufWriter* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+
+GType scan_direction_get_type (void) {
+ static volatile gsize scan_direction_type_id__volatile = 0;
+ if (g_once_init_enter (&scan_direction_type_id__volatile)) {
+ static const GEnumValue values[] = {{SCAN_DIRECTION_TOP_TO_BOTTOM, "SCAN_DIRECTION_TOP_TO_BOTTOM", "top-to-bottom"}, {SCAN_DIRECTION_LEFT_TO_RIGHT, "SCAN_DIRECTION_LEFT_TO_RIGHT", "left-to-right"}, {SCAN_DIRECTION_BOTTOM_TO_TOP, "SCAN_DIRECTION_BOTTOM_TO_TOP", "bottom-to-top"}, {SCAN_DIRECTION_RIGHT_TO_LEFT, "SCAN_DIRECTION_RIGHT_TO_LEFT", "right-to-left"}, {0, NULL, NULL}};
+ GType scan_direction_type_id;
+ scan_direction_type_id = g_enum_register_static ("ScanDirection", values);
+ g_once_init_leave (&scan_direction_type_id__volatile, scan_direction_type_id);
+ }
+ return scan_direction_type_id__volatile;
+}
+
+
+Page* page_construct (GType object_type, gint width, gint height, gint dpi, ScanDirection scan_direction) {
+ Page* self = NULL;
+ gboolean _tmp0_ = FALSE;
+ ScanDirection _tmp1_ = 0;
+ gint _tmp7_ = 0;
+ ScanDirection _tmp8_ = 0;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self = (Page*) g_type_create_instance (object_type);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = scan_direction;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp1_ == SCAN_DIRECTION_TOP_TO_BOTTOM) {
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = TRUE;
+#line 319 "page.c"
+ } else {
+ ScanDirection _tmp2_ = 0;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = scan_direction;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = _tmp2_ == SCAN_DIRECTION_BOTTOM_TO_TOP;
+#line 326 "page.c"
+ }
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp0_) {
+#line 330 "page.c"
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+#line 178 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = width;
+#line 178 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_width (self, _tmp3_);
+#line 179 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = height;
+#line 179 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_height (self, _tmp4_);
+#line 341 "page.c"
+ } else {
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = height;
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_width (self, _tmp5_);
+#line 184 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = width;
+#line 184 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_height (self, _tmp6_);
+#line 353 "page.c"
+ }
+#line 186 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = dpi;
+#line 186 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_dpi (self, _tmp7_);
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = scan_direction;
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, _tmp8_);
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return self;
+#line 365 "page.c"
+}
+
+
+Page* page_new (gint width, gint height, gint dpi, ScanDirection scan_direction) {
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return page_construct (TYPE_PAGE, width, height, dpi, scan_direction);
+#line 372 "page.c"
+}
+
+
+static guchar* _vala_array_dup3 (guchar* self, int length) {
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return g_memdup (self, length * sizeof (guchar));
+#line 379 "page.c"
+}
+
+
+Page* page_construct_from_data (GType object_type, gint scan_width, gint scan_height, gint rowstride, gint n_channels, gint depth, gint dpi, ScanDirection scan_direction, const gchar* color_profile, guchar* pixels, int pixels_length1, gboolean has_crop, const gchar* crop_name, gint crop_x, gint crop_y, gint crop_width, gint crop_height) {
+ Page* self = NULL;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ ScanDirection _tmp7_ = 0;
+ const gchar* _tmp8_ = NULL;
+ guchar* _tmp9_ = NULL;
+ gint _tmp9__length1 = 0;
+ guchar* _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+ guchar* _tmp11_ = NULL;
+ gint _tmp11__length1 = 0;
+ gboolean _tmp12_ = FALSE;
+ const gchar* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self = (Page*) g_type_create_instance (object_type);
+#line 206 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = scan_width;
+#line 206 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_width (self, _tmp0_);
+#line 207 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = scan_height;
+#line 207 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_height (self, _tmp1_);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = scan_height;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->expected_rows = _tmp2_;
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = rowstride;
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_rowstride (self, _tmp3_);
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = n_channels;
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_n_channels (self, _tmp4_);
+#line 211 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = depth;
+#line 211 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_depth (self, _tmp5_);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = dpi;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_dpi (self, _tmp6_);
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = scan_direction;
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, _tmp7_);
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = color_profile;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_color_profile (self, _tmp8_);
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = pixels;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9__length1 = pixels_length1;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = (_tmp9_ != NULL) ? _vala_array_dup3 (_tmp9_, _tmp9__length1) : ((gpointer) _tmp9_);
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10__length1 = _tmp9__length1;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->pixels = (g_free (self->priv->pixels), NULL);
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->pixels = _tmp10_;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->pixels_length1 = _tmp10__length1;
+#line 215 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_pixels_size_ = self->priv->pixels_length1;
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = pixels;
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11__length1 = pixels_length1;
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_has_data (self, _tmp11_ != NULL);
+#line 217 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = has_crop;
+#line 217 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_has_crop (self, _tmp12_);
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp13_ = crop_name;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_name (self, _tmp13_);
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp14_ = crop_x;
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, _tmp14_);
+#line 220 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp15_ = crop_y;
+#line 220 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, _tmp15_);
+#line 221 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = crop_width;
+#line 221 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_width (self, _tmp16_);
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp17_ = crop_height;
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_height (self, _tmp17_);
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return self;
+#line 492 "page.c"
+}
+
+
+Page* page_new_from_data (gint scan_width, gint scan_height, gint rowstride, gint n_channels, gint depth, gint dpi, ScanDirection scan_direction, const gchar* color_profile, guchar* pixels, int pixels_length1, gboolean has_crop, const gchar* crop_name, gint crop_x, gint crop_y, gint crop_width, gint crop_height) {
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return page_construct_from_data (TYPE_PAGE, scan_width, scan_height, rowstride, n_channels, depth, dpi, scan_direction, color_profile, pixels, pixels_length1, has_crop, crop_name, crop_x, crop_y, crop_width, crop_height);
+#line 499 "page.c"
+}
+
+
+void page_set_page_info (Page* self, ScanPageInfo* info) {
+ ScanPageInfo* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ ScanPageInfo* _tmp2_ = NULL;
+ gdouble _tmp3_ = 0.0;
+ ScanPageInfo* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ ScanPageInfo* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ ScanPageInfo* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ ScanPageInfo* _tmp12_ = NULL;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+ gint _tmp19_ = 0;
+ guchar* _tmp20_ = NULL;
+ gint _tmp20__length1 = 0;
+ gint _tmp21_ = 0;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (info != NULL);
+#line 227 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = info;
+#line 227 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = _tmp0_->height;
+#line 227 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->expected_rows = _tmp1_;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = info;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = _tmp2_->dpi;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_dpi (self, (gint) _tmp3_);
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = info;
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = _tmp4_->width;
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_width (self, _tmp5_);
+#line 232 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = info;
+#line 232 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = _tmp6_->height;
+#line 232 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_height (self, _tmp7_);
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = self->priv->_scan_height;
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp8_ < 0) {
+#line 558 "page.c"
+ gint _tmp9_ = 0;
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = self->priv->_scan_width;
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_height (self, _tmp9_ / 2);
+#line 564 "page.c"
+ }
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = info;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = _tmp10_->depth;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_depth (self, _tmp11_);
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = info;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp13_ = _tmp12_->n_channels;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_n_channels (self, _tmp13_);
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp14_ = self->priv->_scan_width;
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp15_ = self->priv->_depth;
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = self->priv->_n_channels;
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_rowstride (self, (((_tmp14_ * _tmp15_) * _tmp16_) + 7) / 8);
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp17_ = self->priv->_scan_height;
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp18_ = self->priv->_rowstride;
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp19_ = _tmp17_ * _tmp18_;
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->pixels = g_renew (guchar, self->priv->pixels, _tmp17_ * _tmp18_);
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ (_tmp19_ > self->priv->pixels_length1) ? memset (self->priv->pixels + self->priv->pixels_length1, 0, sizeof (guchar) * (_tmp19_ - self->priv->pixels_length1)) : NULL;
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->pixels_length1 = _tmp19_;
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_pixels_size_ = _tmp19_;
+#line 240 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp20_ = self->priv->pixels;
+#line 240 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp20__length1 = self->priv->pixels_length1;
+#line 240 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (_tmp20_ != NULL);
+#line 243 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp21_ = self->priv->_depth;
+#line 243 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp21_ == 1) {
+#line 610 "page.c"
+ guchar* _tmp22_ = NULL;
+ gint _tmp22__length1 = 0;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22_ = self->priv->pixels;
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22__length1 = self->priv->pixels_length1;
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp23_ = self->priv->_scan_height;
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp24_ = self->priv->_rowstride;
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ memset (_tmp22_, 0x00, (gsize) (_tmp23_ * _tmp24_));
+#line 625 "page.c"
+ } else {
+ guchar* _tmp25_ = NULL;
+ gint _tmp25__length1 = 0;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp25_ = self->priv->pixels;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp25__length1 = self->priv->pixels_length1;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_ = self->priv->_scan_height;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp27_ = self->priv->_rowstride;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ memset (_tmp25_, 0xFF, (gsize) (_tmp26_ * _tmp27_));
+#line 641 "page.c"
+ }
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "size-changed");
+#line 249 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "pixels-changed");
+#line 647 "page.c"
+}
+
+
+void page_start (Page* self) {
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_is_scanning (self, TRUE);
+#line 255 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "scan-line-changed");
+#line 658 "page.c"
+}
+
+
+static void page_parse_line (Page* self, ScanLine* line, gint n, gboolean* size_changed) {
+ gboolean _vala_size_changed = FALSE;
+ gint line_number = 0;
+ ScanLine* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ gint offset = 0;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint line_offset = 0;
+ gint _tmp15_ = 0;
+ ScanLine* _tmp16_ = NULL;
+ gint _tmp17_ = 0;
+ gint _tmp32_ = 0;
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (line != NULL);
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = line;
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = _tmp0_->number;
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = n;
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ line_number = _tmp1_ + _tmp2_;
+#line 263 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _vala_size_changed = FALSE;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ while (TRUE) {
+#line 692 "page.c"
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gint rows = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = line_number;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = self->priv->_scan_height;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!(_tmp3_ >= _tmp4_)) {
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 712 "page.c"
+ }
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = self->priv->_scan_height;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ rows = _tmp5_;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = rows;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = self->priv->_scan_width;
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_height (self, _tmp6_ + (_tmp7_ / 2));
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = rows;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = self->priv->_scan_height;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_debug ("page.vala:269: Extending image from %d lines to %d lines", _tmp8_, _tmp9_);
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = self->priv->_scan_height;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = self->priv->_rowstride;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = _tmp10_ * _tmp11_;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->pixels = g_renew (guchar, self->priv->pixels, _tmp10_ * _tmp11_);
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ (_tmp12_ > self->priv->pixels_length1) ? memset (self->priv->pixels + self->priv->pixels_length1, 0, sizeof (guchar) * (_tmp12_ - self->priv->pixels_length1)) : NULL;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->pixels_length1 = _tmp12_;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_pixels_size_ = _tmp12_;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _vala_size_changed = TRUE;
+#line 746 "page.c"
+ }
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp13_ = line_number;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp14_ = self->priv->_rowstride;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ offset = _tmp13_ * _tmp14_;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp15_ = n;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = line;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp17_ = _tmp16_->data_length;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ line_offset = _tmp15_ * _tmp17_;
+#line 762 "page.c"
+ {
+ gint i = 0;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ i = 0;
+#line 767 "page.c"
+ {
+ gboolean _tmp18_ = FALSE;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp18_ = TRUE;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ while (TRUE) {
+#line 774 "page.c"
+ gint _tmp20_ = 0;
+ ScanLine* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ guchar* _tmp23_ = NULL;
+ gint _tmp23__length1 = 0;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+ ScanLine* _tmp26_ = NULL;
+ guchar* _tmp27_ = NULL;
+ gint _tmp27__length1 = 0;
+ gint _tmp28_ = 0;
+ gint _tmp29_ = 0;
+ guchar _tmp30_ = '\0';
+ guchar _tmp31_ = '\0';
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!_tmp18_) {
+#line 791 "page.c"
+ gint _tmp19_ = 0;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp19_ = i;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ i = _tmp19_ + 1;
+#line 797 "page.c"
+ }
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp18_ = FALSE;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp20_ = i;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp21_ = line;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22_ = _tmp21_->data_length;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!(_tmp20_ < _tmp22_)) {
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 811 "page.c"
+ }
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp23_ = self->priv->pixels;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp23__length1 = self->priv->pixels_length1;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp24_ = offset;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp25_ = i;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_ = line;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp27_ = _tmp26_->data;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp27__length1 = _tmp26_->data_length1;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp28_ = line_offset;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp29_ = i;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp30_ = _tmp27_[_tmp28_ + _tmp29_];
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp23_[_tmp24_ + _tmp25_] = _tmp30_;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp31_ = _tmp23_[_tmp24_ + _tmp25_];
+#line 837 "page.c"
+ }
+ }
+ }
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp32_ = line_number;
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_line (self, _tmp32_);
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (size_changed) {
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ *size_changed = _vala_size_changed;
+#line 849 "page.c"
+ }
+}
+
+
+void page_parse_scan_line (Page* self, ScanLine* line) {
+ gboolean size_has_changed = FALSE;
+ gboolean _tmp8_ = FALSE;
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (line != NULL);
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ size_has_changed = FALSE;
+#line 863 "page.c"
+ {
+ gint i = 0;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ i = 0;
+#line 868 "page.c"
+ {
+ gboolean _tmp0_ = FALSE;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = TRUE;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ while (TRUE) {
+#line 875 "page.c"
+ gint _tmp2_ = 0;
+ ScanLine* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ ScanLine* _tmp5_ = NULL;
+ gint _tmp6_ = 0;
+ gboolean _tmp7_ = FALSE;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!_tmp0_) {
+#line 884 "page.c"
+ gint _tmp1_ = 0;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = i;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ i = _tmp1_ + 1;
+#line 890 "page.c"
+ }
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = FALSE;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = i;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = line;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = _tmp3_->n_lines;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!(_tmp2_ < _tmp4_)) {
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 904 "page.c"
+ }
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = line;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = i;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_parse_line (self, _tmp5_, _tmp6_, &_tmp7_);
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ size_has_changed = _tmp7_;
+#line 914 "page.c"
+ }
+ }
+ }
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_has_data (self, TRUE);
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = size_has_changed;
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp8_) {
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "size-changed");
+#line 926 "page.c"
+ }
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "scan-line-changed");
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "pixels-changed");
+#line 932 "page.c"
+}
+
+
+void page_finish (Page* self) {
+ gboolean size_has_changed = FALSE;
+ gboolean _tmp0_ = FALSE;
+ gint _tmp1_ = 0;
+ gboolean _tmp11_ = FALSE;
+#line 298 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ size_has_changed = FALSE;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = self->priv->expected_rows;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp1_ < 0) {
+#line 949 "page.c"
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = self->priv->_scan_line;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = self->priv->_scan_height;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = _tmp2_ != _tmp3_;
+#line 958 "page.c"
+ } else {
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = FALSE;
+#line 962 "page.c"
+ }
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp0_) {
+#line 966 "page.c"
+ gint rows = 0;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = self->priv->_scan_height;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ rows = _tmp4_;
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = self->priv->_scan_line;
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_height (self, _tmp5_);
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = self->priv->_scan_height;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = self->priv->_rowstride;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = _tmp6_ * _tmp7_;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->pixels = g_renew (guchar, self->priv->pixels, _tmp6_ * _tmp7_);
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ (_tmp8_ > self->priv->pixels_length1) ? memset (self->priv->pixels + self->priv->pixels_length1, 0, sizeof (guchar) * (_tmp8_ - self->priv->pixels_length1)) : NULL;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->pixels_length1 = _tmp8_;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_pixels_size_ = _tmp8_;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = rows;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = self->priv->_scan_height;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_debug ("page.vala:309: Trimming page from %d lines to %d lines", _tmp9_, _tmp10_);
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ size_has_changed = TRUE;
+#line 1005 "page.c"
+ }
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_is_scanning (self, FALSE);
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = size_has_changed;
+#line 315 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp11_) {
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "size-changed");
+#line 1015 "page.c"
+ }
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "scan-line-changed");
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "scan-finished");
+#line 1021 "page.c"
+}
+
+
+void page_rotate_left (Page* self) {
+ ScanDirection _tmp0_ = 0;
+ ScanDirection _tmp1_ = 0;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = page_get_scan_direction (self);
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = _tmp0_;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (_tmp1_) {
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_TOP_TO_BOTTOM:
+#line 1038 "page.c"
+ {
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, SCAN_DIRECTION_LEFT_TO_RIGHT);
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1044 "page.c"
+ }
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_LEFT_TO_RIGHT:
+#line 1048 "page.c"
+ {
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, SCAN_DIRECTION_BOTTOM_TO_TOP);
+#line 330 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1054 "page.c"
+ }
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_BOTTOM_TO_TOP:
+#line 1058 "page.c"
+ {
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, SCAN_DIRECTION_RIGHT_TO_LEFT);
+#line 333 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1064 "page.c"
+ }
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_RIGHT_TO_LEFT:
+#line 1068 "page.c"
+ {
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, SCAN_DIRECTION_TOP_TO_BOTTOM);
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1074 "page.c"
+ }
+ default:
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1079 "page.c"
+ }
+}
+
+
+void page_rotate_right (Page* self) {
+ ScanDirection _tmp0_ = 0;
+ ScanDirection _tmp1_ = 0;
+#line 340 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = page_get_scan_direction (self);
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = _tmp0_;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (_tmp1_) {
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_TOP_TO_BOTTOM:
+#line 1097 "page.c"
+ {
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, SCAN_DIRECTION_RIGHT_TO_LEFT);
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1103 "page.c"
+ }
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_LEFT_TO_RIGHT:
+#line 1107 "page.c"
+ {
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, SCAN_DIRECTION_TOP_TO_BOTTOM);
+#line 349 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1113 "page.c"
+ }
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_BOTTOM_TO_TOP:
+#line 1117 "page.c"
+ {
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, SCAN_DIRECTION_LEFT_TO_RIGHT);
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1123 "page.c"
+ }
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_RIGHT_TO_LEFT:
+#line 1127 "page.c"
+ {
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_scan_direction (self, SCAN_DIRECTION_BOTTOM_TO_TOP);
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1133 "page.c"
+ }
+ default:
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1138 "page.c"
+ }
+}
+
+
+void page_set_no_crop (Page* self) {
+ gboolean _tmp0_ = FALSE;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_has_crop;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!_tmp0_) {
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 1153 "page.c"
+ }
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_has_crop (self, FALSE);
+#line 364 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_name (self, NULL);
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, 0);
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, 0);
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_width (self, 0);
+#line 368 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_height (self, 0);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "crop-changed");
+#line 1169 "page.c"
+}
+
+
+void page_set_custom_crop (Page* self, gint width, gint height) {
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+ gboolean _tmp4_ = FALSE;
+ const gchar* _tmp5_ = NULL;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+#line 372 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = width;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (_tmp0_ >= 1);
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = height;
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (_tmp1_ >= 1);
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = self->priv->_crop_name;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp5_ == NULL) {
+#line 1196 "page.c"
+ gboolean _tmp6_ = FALSE;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = self->priv->_has_crop;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = _tmp6_;
+#line 1202 "page.c"
+ } else {
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = FALSE;
+#line 1206 "page.c"
+ }
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp4_) {
+#line 1210 "page.c"
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = self->priv->_crop_width;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = width;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = _tmp7_ == _tmp8_;
+#line 1219 "page.c"
+ } else {
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = FALSE;
+#line 1223 "page.c"
+ }
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp3_) {
+#line 1227 "page.c"
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = self->priv->_crop_height;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = height;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = _tmp9_ == _tmp10_;
+#line 1236 "page.c"
+ } else {
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = FALSE;
+#line 1240 "page.c"
+ }
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp2_) {
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 1246 "page.c"
+ }
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_name (self, NULL);
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_has_crop (self, TRUE);
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = width;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_width (self, _tmp11_);
+#line 383 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = height;
+#line 383 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_height (self, _tmp12_);
+#line 396 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "crop-changed");
+#line 1262 "page.c"
+}
+
+
+void page_set_named_crop (Page* self, const gchar* name) {
+ gdouble w = 0.0;
+ gdouble h = 0.0;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ GQuark _tmp3_ = 0U;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ static GQuark _tmp2_label0 = 0;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ static GQuark _tmp2_label1 = 0;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ static GQuark _tmp2_label2 = 0;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ static GQuark _tmp2_label3 = 0;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ static GQuark _tmp2_label4 = 0;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ static GQuark _tmp2_label5 = 0;
+#line 1284 "page.c"
+ const gchar* _tmp5_ = NULL;
+ gint pw = 0;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+ gint ph = 0;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gdouble _tmp15_ = 0.0;
+ gint _tmp16_ = 0;
+ gdouble _tmp17_ = 0.0;
+ gint _tmp18_ = 0;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (name != NULL);
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = name;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = _tmp0_;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("A4")))) {
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (0) {
+#line 1316 "page.c"
+ default:
+ {
+#line 405 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ w = 8.3;
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ h = 11.7;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1325 "page.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("A5")))) {
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (0) {
+#line 1331 "page.c"
+ default:
+ {
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ w = 5.8;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ h = 8.3;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1340 "page.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("A6")))) {
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (0) {
+#line 1346 "page.c"
+ default:
+ {
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ w = 4.1;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ h = 5.8;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1355 "page.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("letter")))) {
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (0) {
+#line 1361 "page.c"
+ default:
+ {
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ w = 8.5;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ h = (gdouble) 11;
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1370 "page.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("legal")))) {
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (0) {
+#line 1376 "page.c"
+ default:
+ {
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ w = 8.5;
+#line 422 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ h = (gdouble) 14;
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1385 "page.c"
+ }
+ }
+ } else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("4x6")))) {
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (0) {
+#line 1391 "page.c"
+ default:
+ {
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ w = (gdouble) 4;
+#line 426 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ h = (gdouble) 6;
+#line 427 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1400 "page.c"
+ }
+ }
+ } else {
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (0) {
+#line 1406 "page.c"
+ default:
+ {
+ const gchar* _tmp4_ = NULL;
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = name;
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_warning ("page.vala:429: Unknown paper size '%s'", _tmp4_);
+#line 430 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 1416 "page.c"
+ }
+ }
+ }
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = name;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_name (self, _tmp5_);
+#line 434 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_has_crop (self, TRUE);
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = page_get_width (self);
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = _tmp6_;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ pw = _tmp7_;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = page_get_height (self);
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = _tmp8_;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ ph = _tmp9_;
+#line 440 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = pw;
+#line 440 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = ph;
+#line 440 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp10_ > _tmp11_) {
+#line 1444 "page.c"
+ gdouble t = 0.0;
+ gdouble _tmp12_ = 0.0;
+ gdouble _tmp13_ = 0.0;
+ gdouble _tmp14_ = 0.0;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = w;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = _tmp12_;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp13_ = h;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ w = _tmp13_;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp14_ = t;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ h = _tmp14_;
+#line 1461 "page.c"
+ }
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp15_ = w;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = self->priv->_dpi;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_width (self, (gint) ((_tmp15_ * _tmp16_) + 0.5));
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp17_ = h;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp18_ = self->priv->_dpi;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_height (self, (gint) ((_tmp17_ * _tmp18_) + 0.5));
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp19_ = self->priv->_crop_width;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp20_ = pw;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp19_ < _tmp20_) {
+#line 1481 "page.c"
+ gint _tmp21_ = 0;
+ gint _tmp22_ = 0;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp21_ = pw;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22_ = self->priv->_crop_width;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, (_tmp21_ - _tmp22_) / 2);
+#line 1490 "page.c"
+ } else {
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, 0);
+#line 1494 "page.c"
+ }
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp23_ = self->priv->_crop_height;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp24_ = ph;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp23_ < _tmp24_) {
+#line 1502 "page.c"
+ gint _tmp25_ = 0;
+ gint _tmp26_ = 0;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp25_ = ph;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_ = self->priv->_crop_height;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, (_tmp25_ - _tmp26_) / 2);
+#line 1511 "page.c"
+ } else {
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, 0);
+#line 1515 "page.c"
+ }
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "crop-changed");
+#line 1519 "page.c"
+}
+
+
+void page_move_crop (Page* self, gint x, gint y) {
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 464 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = x;
+#line 464 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (_tmp0_ >= 0);
+#line 465 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = y;
+#line 465 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (_tmp1_ >= 0);
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = x;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = page_get_width (self);
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = _tmp3_;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (_tmp2_ < _tmp4_);
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = y;
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = page_get_height (self);
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = _tmp6_;
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (_tmp5_ < _tmp7_);
+#line 469 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = x;
+#line 469 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, _tmp8_);
+#line 470 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = y;
+#line 470 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, _tmp9_);
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "crop-changed");
+#line 1570 "page.c"
+}
+
+
+void page_rotate_crop (Page* self) {
+ gboolean _tmp0_ = FALSE;
+ gint t = 0;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ const gchar* _tmp4_ = NULL;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_has_crop;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!_tmp0_) {
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 1589 "page.c"
+ }
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = self->priv->_crop_width;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = _tmp1_;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = self->priv->_crop_height;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_width (self, _tmp2_);
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = t;
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_height (self, _tmp3_);
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = self->priv->_crop_name;
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp4_ == NULL) {
+#line 1607 "page.c"
+ gint w = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gint h = 0;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint _tmp14_ = 0;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+ gint _tmp21_ = 0;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = page_get_width (self);
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = _tmp5_;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ w = _tmp6_;
+#line 487 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = page_get_height (self);
+#line 487 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = _tmp7_;
+#line 487 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ h = _tmp8_;
+#line 489 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = self->priv->_crop_x;
+#line 489 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = self->priv->_crop_width;
+#line 489 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = w;
+#line 489 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if ((_tmp9_ + _tmp10_) > _tmp11_) {
+#line 1642 "page.c"
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = w;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp13_ = self->priv->_crop_width;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, _tmp12_ - _tmp13_);
+#line 1651 "page.c"
+ }
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp14_ = self->priv->_crop_x;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp14_ < 0) {
+#line 1657 "page.c"
+ gint _tmp15_ = 0;
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, 0);
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp15_ = w;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_width (self, _tmp15_);
+#line 1665 "page.c"
+ }
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = self->priv->_crop_y;
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp17_ = self->priv->_crop_height;
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp18_ = h;
+#line 496 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if ((_tmp16_ + _tmp17_) > _tmp18_) {
+#line 1675 "page.c"
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp19_ = h;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp20_ = self->priv->_crop_height;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, _tmp19_ - _tmp20_);
+#line 1684 "page.c"
+ }
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp21_ = self->priv->_crop_y;
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp21_ < 0) {
+#line 1690 "page.c"
+ gint _tmp22_ = 0;
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, 0);
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22_ = h;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_height (self, _tmp22_);
+#line 1698 "page.c"
+ }
+ }
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "crop-changed");
+#line 1703 "page.c"
+}
+
+
+guchar* page_get_pixels (Page* self, int* result_length1) {
+ guchar* result = NULL;
+ guchar* _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ guchar* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->pixels;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0__length1 = self->priv->pixels_length1;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = _tmp0_;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1__length1 = _tmp0__length1;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (result_length1) {
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ *result_length1 = _tmp1__length1;
+#line 1727 "page.c"
+ }
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp1_;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 1733 "page.c"
+}
+
+
+static guchar page_get_sample (Page* self, guchar* pixels, int pixels_length1, gint offset, gint x, gint depth, gint n_channels, gint channel) {
+ guchar result = '\0';
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, '\0');
+#line 517 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = (guchar) 0xFF;
+#line 517 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 1745 "page.c"
+}
+
+
+static void page_get_pixel (Page* self, gint x, gint y, guchar* pixel, int pixel_length1, gint offset) {
+ ScanDirection _tmp0_ = 0;
+ ScanDirection _tmp1_ = 0;
+ gint line_offset = 0;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ gboolean _tmp16_ = FALSE;
+ gint _tmp17_ = 0;
+ guchar* _tmp98_ = NULL;
+ gint _tmp98__length1 = 0;
+ gint _tmp99_ = 0;
+ guchar* _tmp100_ = NULL;
+ gint _tmp100__length1 = 0;
+ gint _tmp101_ = 0;
+ gint _tmp102_ = 0;
+ gint _tmp103_ = 0;
+ gint _tmp104_ = 0;
+ guchar _tmp105_ = '\0';
+ guchar _tmp106_ = '\0';
+ guchar* _tmp107_ = NULL;
+ gint _tmp107__length1 = 0;
+ gint _tmp108_ = 0;
+ guchar* _tmp109_ = NULL;
+ gint _tmp109__length1 = 0;
+ gint _tmp110_ = 0;
+ gint _tmp111_ = 0;
+ gint _tmp112_ = 0;
+ gint _tmp113_ = 0;
+ guchar _tmp114_ = '\0';
+ guchar _tmp115_ = '\0';
+ guchar* _tmp116_ = NULL;
+ gint _tmp116__length1 = 0;
+ gint _tmp117_ = 0;
+ guchar* _tmp118_ = NULL;
+ gint _tmp118__length1 = 0;
+ gint _tmp119_ = 0;
+ gint _tmp120_ = 0;
+ gint _tmp121_ = 0;
+ gint _tmp122_ = 0;
+ guchar _tmp123_ = '\0';
+ guchar _tmp124_ = '\0';
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = page_get_scan_direction (self);
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = _tmp0_;
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (_tmp1_) {
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_TOP_TO_BOTTOM:
+#line 1800 "page.c"
+ {
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1804 "page.c"
+ }
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_BOTTOM_TO_TOP:
+#line 1808 "page.c"
+ {
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = self->priv->_scan_width;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = x;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ x = (_tmp2_ - _tmp3_) - 1;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = self->priv->_scan_height;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = y;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ y = (_tmp4_ - _tmp5_) - 1;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1828 "page.c"
+ }
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_LEFT_TO_RIGHT:
+#line 1832 "page.c"
+ {
+ gint t = 0;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+#line 532 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = x;
+#line 532 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = _tmp6_;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = self->priv->_scan_width;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = y;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ x = (_tmp7_ - _tmp8_) - 1;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = t;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ y = _tmp9_;
+#line 535 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1855 "page.c"
+ }
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case SCAN_DIRECTION_RIGHT_TO_LEFT:
+#line 1859 "page.c"
+ {
+ gint t = 0;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = x;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = _tmp10_;
+#line 538 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = y;
+#line 538 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ x = _tmp11_;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = self->priv->_scan_height;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp13_ = t;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ y = (_tmp12_ - _tmp13_) - 1;
+#line 540 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1882 "page.c"
+ }
+ default:
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 1887 "page.c"
+ }
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp14_ = self->priv->_rowstride;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp15_ = y;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ line_offset = _tmp14_ * _tmp15_;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp17_ = self->priv->_depth;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp17_ == 8) {
+#line 1899 "page.c"
+ gint _tmp18_ = 0;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp18_ = self->priv->_n_channels;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = _tmp18_ == 3;
+#line 1905 "page.c"
+ } else {
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = FALSE;
+#line 1909 "page.c"
+ }
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp16_) {
+#line 1913 "page.c"
+ gint o = 0;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ gint _tmp21_ = 0;
+ guchar* _tmp22_ = NULL;
+ gint _tmp22__length1 = 0;
+ gint _tmp23_ = 0;
+ guchar* _tmp24_ = NULL;
+ gint _tmp24__length1 = 0;
+ gint _tmp25_ = 0;
+ guchar _tmp26_ = '\0';
+ guchar _tmp27_ = '\0';
+ guchar* _tmp28_ = NULL;
+ gint _tmp28__length1 = 0;
+ gint _tmp29_ = 0;
+ guchar* _tmp30_ = NULL;
+ gint _tmp30__length1 = 0;
+ gint _tmp31_ = 0;
+ guchar _tmp32_ = '\0';
+ guchar _tmp33_ = '\0';
+ guchar* _tmp34_ = NULL;
+ gint _tmp34__length1 = 0;
+ gint _tmp35_ = 0;
+ guchar* _tmp36_ = NULL;
+ gint _tmp36__length1 = 0;
+ gint _tmp37_ = 0;
+ guchar _tmp38_ = '\0';
+ guchar _tmp39_ = '\0';
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp19_ = line_offset;
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp20_ = x;
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp21_ = self->priv->_n_channels;
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ o = _tmp19_ + (_tmp20_ * _tmp21_);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22_ = pixel;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22__length1 = pixel_length1;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp23_ = offset;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp24_ = self->priv->pixels;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp24__length1 = self->priv->pixels_length1;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp25_ = o;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_ = _tmp24_[_tmp25_];
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22_[_tmp23_ + 0] = _tmp26_;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp27_ = _tmp22_[_tmp23_ + 0];
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp28_ = pixel;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp28__length1 = pixel_length1;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp29_ = offset;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp30_ = self->priv->pixels;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp30__length1 = self->priv->pixels_length1;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp31_ = o;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp32_ = _tmp30_[_tmp31_ + 1];
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp28_[_tmp29_ + 1] = _tmp32_;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp33_ = _tmp28_[_tmp29_ + 1];
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp34_ = pixel;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp34__length1 = pixel_length1;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp35_ = offset;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp36_ = self->priv->pixels;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp36__length1 = self->priv->pixels_length1;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp37_ = o;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp38_ = _tmp36_[_tmp37_ + 2];
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp34_[_tmp35_ + 2] = _tmp38_;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp39_ = _tmp34_[_tmp35_ + 2];
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 2006 "page.c"
+ } else {
+ gboolean _tmp40_ = FALSE;
+ gint _tmp41_ = 0;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp41_ = self->priv->_depth;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp41_ == 8) {
+#line 2014 "page.c"
+ gint _tmp42_ = 0;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp42_ = self->priv->_n_channels;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp40_ = _tmp42_ == 1;
+#line 2020 "page.c"
+ } else {
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp40_ = FALSE;
+#line 2024 "page.c"
+ }
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp40_) {
+#line 2028 "page.c"
+ guchar p = '\0';
+ guchar* _tmp43_ = NULL;
+ gint _tmp43__length1 = 0;
+ gint _tmp44_ = 0;
+ gint _tmp45_ = 0;
+ guchar _tmp46_ = '\0';
+ guchar* _tmp47_ = NULL;
+ gint _tmp47__length1 = 0;
+ gint _tmp48_ = 0;
+ guchar* _tmp49_ = NULL;
+ gint _tmp49__length1 = 0;
+ gint _tmp50_ = 0;
+ guchar* _tmp51_ = NULL;
+ gint _tmp51__length1 = 0;
+ gint _tmp52_ = 0;
+ guchar _tmp53_ = '\0';
+ guchar _tmp54_ = '\0';
+ guchar _tmp55_ = '\0';
+ guchar _tmp56_ = '\0';
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp43_ = self->priv->pixels;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp43__length1 = self->priv->pixels_length1;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp44_ = line_offset;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp45_ = x;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp46_ = _tmp43_[_tmp44_ + _tmp45_];
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ p = _tmp46_;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp47_ = pixel;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp47__length1 = pixel_length1;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp48_ = offset;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp49_ = pixel;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp49__length1 = pixel_length1;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp50_ = offset;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp51_ = pixel;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp51__length1 = pixel_length1;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp52_ = offset;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp53_ = p;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp51_[_tmp52_ + 2] = _tmp53_;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp54_ = _tmp51_[_tmp52_ + 2];
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp49_[_tmp50_ + 1] = _tmp54_;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp55_ = _tmp49_[_tmp50_ + 1];
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp47_[_tmp48_ + 0] = _tmp55_;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp56_ = _tmp47_[_tmp48_ + 0];
+#line 558 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 2094 "page.c"
+ } else {
+ gboolean _tmp57_ = FALSE;
+ gint _tmp58_ = 0;
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp58_ = self->priv->_depth;
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp58_ == 1) {
+#line 2102 "page.c"
+ gint _tmp59_ = 0;
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp59_ = self->priv->_n_channels;
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp57_ = _tmp59_ == 1;
+#line 2108 "page.c"
+ } else {
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp57_ = FALSE;
+#line 2112 "page.c"
+ }
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp57_) {
+#line 2116 "page.c"
+ guchar p = '\0';
+ guchar* _tmp60_ = NULL;
+ gint _tmp60__length1 = 0;
+ gint _tmp61_ = 0;
+ gint _tmp62_ = 0;
+ guchar _tmp63_ = '\0';
+ gint _tmp64_ = 0;
+ guchar _tmp65_ = '\0';
+ gint _tmp66_ = 0;
+ guchar* _tmp67_ = NULL;
+ gint _tmp67__length1 = 0;
+ gint _tmp68_ = 0;
+ guchar* _tmp69_ = NULL;
+ gint _tmp69__length1 = 0;
+ gint _tmp70_ = 0;
+ guchar* _tmp71_ = NULL;
+ gint _tmp71__length1 = 0;
+ gint _tmp72_ = 0;
+ guchar _tmp73_ = '\0';
+ guchar _tmp74_ = '\0';
+ guchar _tmp75_ = '\0';
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp60_ = self->priv->pixels;
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp60__length1 = self->priv->pixels_length1;
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp61_ = line_offset;
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp62_ = x;
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp63_ = _tmp60_[_tmp61_ + (_tmp62_ / 8)];
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ p = _tmp63_;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp65_ = p;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp66_ = x;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (((gint) (_tmp65_ & (0x80 >> (_tmp66_ % 8)))) != 0) {
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp64_ = 0x00;
+#line 2158 "page.c"
+ } else {
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp64_ = 0xFF;
+#line 2162 "page.c"
+ }
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp67_ = pixel;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp67__length1 = pixel_length1;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp68_ = offset;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp69_ = pixel;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp69__length1 = pixel_length1;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp70_ = offset;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp71_ = pixel;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp71__length1 = pixel_length1;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp72_ = offset;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp71_[_tmp72_ + 2] = (guchar) _tmp64_;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp73_ = _tmp71_[_tmp72_ + 2];
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp69_[_tmp70_ + 1] = _tmp73_;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp74_ = _tmp69_[_tmp70_ + 1];
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp67_[_tmp68_ + 0] = _tmp74_;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp75_ = _tmp67_[_tmp68_ + 0];
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 2196 "page.c"
+ } else {
+ gboolean _tmp76_ = FALSE;
+ gint _tmp77_ = 0;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp77_ = self->priv->_depth;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp77_ == 2) {
+#line 2204 "page.c"
+ gint _tmp78_ = 0;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp78_ = self->priv->_n_channels;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp76_ = _tmp78_ == 1;
+#line 2210 "page.c"
+ } else {
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp76_ = FALSE;
+#line 2214 "page.c"
+ }
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp76_) {
+#line 2218 "page.c"
+ gint block_shift[4] = {0};
+ gint _tmp79_[4] = {0};
+ guchar p = '\0';
+ guchar* _tmp80_ = NULL;
+ gint _tmp80__length1 = 0;
+ gint _tmp81_ = 0;
+ gint _tmp82_ = 0;
+ guchar _tmp83_ = '\0';
+ gint sample = 0;
+ guchar _tmp84_ = '\0';
+ gint _tmp85_ = 0;
+ gint _tmp86_ = 0;
+ gint _tmp87_ = 0;
+ guchar* _tmp88_ = NULL;
+ gint _tmp88__length1 = 0;
+ gint _tmp89_ = 0;
+ guchar* _tmp90_ = NULL;
+ gint _tmp90__length1 = 0;
+ gint _tmp91_ = 0;
+ guchar* _tmp92_ = NULL;
+ gint _tmp92__length1 = 0;
+ gint _tmp93_ = 0;
+ gint _tmp94_ = 0;
+ guchar _tmp95_ = '\0';
+ guchar _tmp96_ = '\0';
+ guchar _tmp97_ = '\0';
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp79_[0] = 6;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp79_[1] = 4;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp79_[2] = 2;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp79_[3] = 0;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ memcpy (block_shift, _tmp79_, 4 * sizeof (gint));
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp80_ = self->priv->pixels;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp80__length1 = self->priv->pixels_length1;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp81_ = line_offset;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp82_ = x;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp83_ = _tmp80_[_tmp81_ + (_tmp82_ / 4)];
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ p = _tmp83_;
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp84_ = p;
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp85_ = x;
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp86_ = block_shift[_tmp85_ % 4];
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ sample = (_tmp84_ >> _tmp86_) & 0x3;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp87_ = sample;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ sample = (_tmp87_ * 255) / 3;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp88_ = pixel;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp88__length1 = pixel_length1;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp89_ = offset;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp90_ = pixel;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp90__length1 = pixel_length1;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp91_ = offset;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp92_ = pixel;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp92__length1 = pixel_length1;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp93_ = offset;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp94_ = sample;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp92_[_tmp93_ + 2] = (guchar) _tmp94_;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp95_ = _tmp92_[_tmp93_ + 2];
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp90_[_tmp91_ + 1] = _tmp95_;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp96_ = _tmp90_[_tmp91_ + 1];
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp88_[_tmp89_ + 0] = _tmp96_;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp97_ = _tmp88_[_tmp89_ + 0];
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 2313 "page.c"
+ }
+ }
+ }
+ }
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp98_ = pixel;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp98__length1 = pixel_length1;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp99_ = offset;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp100_ = self->priv->pixels;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp100__length1 = self->priv->pixels_length1;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp101_ = line_offset;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp102_ = x;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp103_ = self->priv->_depth;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp104_ = self->priv->_n_channels;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp105_ = page_get_sample (self, _tmp100_, _tmp100__length1, _tmp101_, _tmp102_, _tmp103_, _tmp104_, 0);
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp98_[_tmp99_ + 0] = _tmp105_;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp106_ = _tmp98_[_tmp99_ + 0];
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp107_ = pixel;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp107__length1 = pixel_length1;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp108_ = offset;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp109_ = self->priv->pixels;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp109__length1 = self->priv->pixels_length1;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp110_ = line_offset;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp111_ = x;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp112_ = self->priv->_depth;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp113_ = self->priv->_n_channels;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp114_ = page_get_sample (self, _tmp109_, _tmp109__length1, _tmp110_, _tmp111_, _tmp112_, _tmp113_, 1);
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp107_[_tmp108_ + 1] = _tmp114_;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp115_ = _tmp107_[_tmp108_ + 1];
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp116_ = pixel;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp116__length1 = pixel_length1;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp117_ = offset;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp118_ = self->priv->pixels;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp118__length1 = self->priv->pixels_length1;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp119_ = line_offset;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp120_ = x;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp121_ = self->priv->_depth;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp122_ = self->priv->_n_channels;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp123_ = page_get_sample (self, _tmp118_, _tmp118__length1, _tmp119_, _tmp120_, _tmp121_, _tmp122_, 2);
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp116_[_tmp117_ + 2] = _tmp123_;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp124_ = _tmp116_[_tmp117_ + 2];
+#line 2390 "page.c"
+}
+
+
+GdkPixbuf* page_get_image (Page* self, gboolean apply_crop) {
+ GdkPixbuf* result = NULL;
+ gint l = 0;
+ gint r = 0;
+ gint t = 0;
+ gint b = 0;
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ GdkPixbuf* image = NULL;
+ gint _tmp25_ = 0;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+ gint _tmp28_ = 0;
+ GdkPixbuf* _tmp29_ = NULL;
+ guint8* image_pixels = NULL;
+ GdkPixbuf* _tmp30_ = NULL;
+ guint8* _tmp31_ = NULL;
+ gint image_pixels_length1 = 0;
+ gint _image_pixels_size_ = 0;
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = apply_crop;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp1_) {
+#line 2419 "page.c"
+ gboolean _tmp2_ = FALSE;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = self->priv->_has_crop;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = _tmp2_;
+#line 2425 "page.c"
+ } else {
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = FALSE;
+#line 2429 "page.c"
+ }
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp0_) {
+#line 2433 "page.c"
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+ gint _tmp18_ = 0;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = self->priv->_crop_x;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ l = _tmp3_;
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = l;
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = self->priv->_crop_width;
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ r = _tmp4_ + _tmp5_;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = self->priv->_crop_y;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = _tmp6_;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = t;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = self->priv->_crop_height;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ b = _tmp7_ + _tmp8_;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = l;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp9_ < 0) {
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ l = 0;
+#line 2474 "page.c"
+ }
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = r;
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = page_get_width (self);
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = _tmp11_;
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp10_ > _tmp12_) {
+#line 2484 "page.c"
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp13_ = page_get_width (self);
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp14_ = _tmp13_;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ r = _tmp14_;
+#line 2493 "page.c"
+ }
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp15_ = t;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp15_ < 0) {
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = 0;
+#line 2501 "page.c"
+ }
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = b;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp17_ = page_get_height (self);
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp18_ = _tmp17_;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp16_ > _tmp18_) {
+#line 2511 "page.c"
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp19_ = page_get_height (self);
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp20_ = _tmp19_;
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ b = _tmp20_;
+#line 2520 "page.c"
+ }
+ } else {
+ gint _tmp21_ = 0;
+ gint _tmp22_ = 0;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ l = 0;
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp21_ = page_get_width (self);
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22_ = _tmp21_;
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ r = _tmp22_;
+#line 611 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = 0;
+#line 612 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp23_ = page_get_height (self);
+#line 612 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp24_ = _tmp23_;
+#line 612 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ b = _tmp24_;
+#line 2543 "page.c"
+ }
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp25_ = r;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_ = l;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp27_ = b;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp28_ = t;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp29_ = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, _tmp25_ - _tmp26_, _tmp27_ - _tmp28_);
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ image = _tmp29_;
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp30_ = image;
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp31_ = gdk_pixbuf_get_pixels (_tmp30_);
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ image_pixels = _tmp31_;
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ image_pixels_length1 = -1;
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _image_pixels_size_ = image_pixels_length1;
+#line 2567 "page.c"
+ {
+ gint y = 0;
+ gint _tmp32_ = 0;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp32_ = t;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ y = _tmp32_;
+#line 2575 "page.c"
+ {
+ gboolean _tmp33_ = FALSE;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp33_ = TRUE;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ while (TRUE) {
+#line 2582 "page.c"
+ gint _tmp35_ = 0;
+ gint _tmp36_ = 0;
+ gint offset = 0;
+ GdkPixbuf* _tmp37_ = NULL;
+ gint _tmp38_ = 0;
+ gint _tmp39_ = 0;
+ gint _tmp40_ = 0;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!_tmp33_) {
+#line 2592 "page.c"
+ gint _tmp34_ = 0;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp34_ = y;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ y = _tmp34_ + 1;
+#line 2598 "page.c"
+ }
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp33_ = FALSE;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp35_ = y;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp36_ = b;
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!(_tmp35_ < _tmp36_)) {
+#line 617 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 2610 "page.c"
+ }
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp37_ = image;
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp38_ = gdk_pixbuf_get_rowstride (_tmp37_);
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp39_ = y;
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp40_ = t;
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ offset = _tmp38_ * (_tmp39_ - _tmp40_);
+#line 2622 "page.c"
+ {
+ gint x = 0;
+ gint _tmp41_ = 0;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp41_ = l;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ x = _tmp41_;
+#line 2630 "page.c"
+ {
+ gboolean _tmp42_ = FALSE;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp42_ = TRUE;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ while (TRUE) {
+#line 2637 "page.c"
+ gint _tmp44_ = 0;
+ gint _tmp45_ = 0;
+ gint _tmp46_ = 0;
+ gint _tmp47_ = 0;
+ guint8* _tmp48_ = NULL;
+ gint _tmp48__length1 = 0;
+ gint _tmp49_ = 0;
+ gint _tmp50_ = 0;
+ gint _tmp51_ = 0;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!_tmp42_) {
+#line 2649 "page.c"
+ gint _tmp43_ = 0;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp43_ = x;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ x = _tmp43_ + 1;
+#line 2655 "page.c"
+ }
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp42_ = FALSE;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp44_ = x;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp45_ = r;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (!(_tmp44_ < _tmp45_)) {
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 2667 "page.c"
+ }
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp46_ = x;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp47_ = y;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp48_ = image_pixels;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp48__length1 = image_pixels_length1;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp49_ = offset;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp50_ = x;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp51_ = l;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_get_pixel (self, _tmp46_, _tmp47_, _tmp48_, _tmp48__length1, _tmp49_ + ((_tmp50_ - _tmp51_) * 3));
+#line 2685 "page.c"
+ }
+ }
+ }
+ }
+ }
+ }
+#line 624 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = image;
+#line 624 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 2696 "page.c"
+}
+
+
+static gchar* string_to_utf8 (const gchar* self, int* result_length1) {
+ gchar* result = NULL;
+ gchar* _result_ = NULL;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ gchar* _tmp2_ = NULL;
+ gint _result__length1 = 0;
+ gint __result__size_ = 0;
+ gint _tmp3_ = 0;
+ gchar* _tmp4_ = NULL;
+ gint _tmp4__length1 = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gchar* _tmp7_ = NULL;
+ gint _tmp7__length1 = 0;
+#line 1303 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = strlen (self);
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = _tmp0_;
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = g_new0 (gchar, _tmp1_ + 1);
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _result_ = _tmp2_;
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _result__length1 = _tmp1_ + 1;
+#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ __result__size_ = _result__length1;
+#line 1305 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = _result__length1;
+#line 1305 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _result__length1 = _tmp3_ - 1;
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = _result_;
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4__length1 = _result__length1;
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = strlen (self);
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp6_ = _tmp5_;
+#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ memcpy (_tmp4_, self, (gsize) _tmp6_);
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp7_ = _result_;
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp7__length1 = _result__length1;
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (result_length1) {
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ *result_length1 = _tmp7__length1;
+#line 2751 "page.c"
+ }
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp7_;
+#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 2757 "page.c"
+}
+
+
+static gchar* page_get_icc_data_encoded (Page* self, const gchar* icc_profile_filename) {
+ gchar* result = NULL;
+ gchar* contents = NULL;
+ const gchar* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gchar* _tmp6_ = NULL;
+ guchar* _tmp7_ = NULL;
+ gint _tmp7__length1 = 0;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (icc_profile_filename != NULL, NULL);
+#line 2776 "page.c"
+ {
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = icc_profile_filename;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_file_get_contents (_tmp0_, &_tmp1_, NULL, &_inner_error_);
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (contents);
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ contents = _tmp1_;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_inner_error_ != NULL) {
+#line 2790 "page.c"
+ goto __catch3_g_error;
+ }
+ }
+ goto __finally3;
+ __catch3_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ e = _inner_error_;
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _inner_error_ = NULL;
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = e;
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = _tmp2_->message;
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_warning ("page.vala:637: failed to get icc profile data: %s", _tmp3_);
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = NULL;
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_error_free0 (e);
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (contents);
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 2818 "page.c"
+ }
+ __finally3:
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_inner_error_ != NULL) {
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (contents);
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_clear_error (&_inner_error_);
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return NULL;
+#line 2831 "page.c"
+ }
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = contents;
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = string_to_utf8 (_tmp4_, &_tmp5_);
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = (guchar*) _tmp6_;
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7__length1 = (_tmp5_ * sizeof (gchar)) / sizeof (guchar);
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = g_base64_encode (_tmp7_, (_tmp5_ * sizeof (gchar)) / sizeof (guchar));
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = _tmp8_;
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = (g_free (_tmp7_), NULL);
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp9_;
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (contents);
+#line 642 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 2853 "page.c"
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 2860 "page.c"
+}
+
+
+void page_copy_to_clipboard (Page* self, GtkWindow* window) {
+ GdkDisplay* display = NULL;
+ GtkWindow* _tmp0_ = NULL;
+ GdkDisplay* _tmp1_ = NULL;
+ GdkDisplay* _tmp2_ = NULL;
+ GtkClipboard* clipboard = NULL;
+ GtkClipboard* _tmp3_ = NULL;
+ GtkClipboard* _tmp4_ = NULL;
+ GdkPixbuf* image = NULL;
+ GdkPixbuf* _tmp5_ = NULL;
+#line 645 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 645 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (window != NULL);
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = window;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = gtk_widget_get_display ((GtkWidget*) _tmp0_);
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = _g_object_ref0 (_tmp1_);
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ display = _tmp2_;
+#line 648 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = gtk_clipboard_get_for_display (display, GDK_SELECTION_CLIPBOARD);
+#line 648 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = _g_object_ref0 (_tmp3_);
+#line 648 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ clipboard = _tmp4_;
+#line 649 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = page_get_image (self, TRUE);
+#line 649 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ image = _tmp5_;
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ gtk_clipboard_set_image (clipboard, image);
+#line 645 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (image);
+#line 645 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (clipboard);
+#line 645 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (display);
+#line 2904 "page.c"
+}
+
+
+void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError** error) {
+ GFileOutputStream* stream = NULL;
+ GFile* _tmp0_ = NULL;
+ GFileOutputStream* _tmp1_ = NULL;
+ PixbufWriter* writer = NULL;
+ GFileOutputStream* _tmp2_ = NULL;
+ PixbufWriter* _tmp3_ = NULL;
+ GdkPixbuf* image = NULL;
+ GdkPixbuf* _tmp4_ = NULL;
+ gchar* icc_profile_data = NULL;
+ const gchar* _tmp5_ = NULL;
+ GCompareFunc _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ GError * _inner_error_ = NULL;
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (type != NULL);
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (file != NULL);
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = file;
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = g_file_replace (_tmp0_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &_inner_error_);
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ stream = _tmp1_;
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_inner_error_ != NULL) {
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_propagate_error (error, _inner_error_);
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 2941 "page.c"
+ }
+#line 656 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = stream;
+#line 656 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = pixbuf_writer_new (_tmp2_);
+#line 656 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ writer = _tmp3_;
+#line 657 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = page_get_image (self, TRUE);
+#line 657 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ image = _tmp4_;
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ icc_profile_data = NULL;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = self->priv->_color_profile;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp5_ != NULL) {
+#line 2959 "page.c"
+ const gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = self->priv->_color_profile;
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp7_ = page_get_icc_data_encoded (self, _tmp6_);
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (icc_profile_data);
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ icc_profile_data = _tmp7_;
+#line 2970 "page.c"
+ }
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = g_strcmp0;
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = type;
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = _tmp8_ (_tmp9_, "jpeg");
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp10_ == 0) {
+#line 2980 "page.c"
+ gchar** keys = NULL;
+ gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+ gchar** _tmp16_ = NULL;
+ gint keys_length1 = 0;
+ gint _keys_size_ = 0;
+ gchar** values = NULL;
+ gint _tmp17_ = 0;
+ gchar* _tmp18_ = NULL;
+ gchar* _tmp19_ = NULL;
+ gint _tmp20_ = 0;
+ gchar* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ gchar* _tmp23_ = NULL;
+ const gchar* _tmp24_ = NULL;
+ gchar* _tmp25_ = NULL;
+ gchar** _tmp26_ = NULL;
+ gint values_length1 = 0;
+ gint _values_size_ = 0;
+ const gchar* _tmp27_ = NULL;
+ PixbufWriter* _tmp30_ = NULL;
+ GdkPixbuf* _tmp31_ = NULL;
+ gchar** _tmp32_ = NULL;
+ gint _tmp32__length1 = 0;
+ gchar** _tmp33_ = NULL;
+ gint _tmp33__length1 = 0;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = g_strdup ("quality");
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = g_strdup ("density-unit");
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp13_ = g_strdup ("x-density");
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp14_ = g_strdup ("y-density");
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp15_ = g_strdup ("icc-profile");
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = g_new0 (gchar*, 6 + 1);
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_[0] = _tmp11_;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_[1] = _tmp12_;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_[2] = _tmp13_;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_[3] = _tmp14_;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_[4] = _tmp15_;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_[5] = NULL;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys = _tmp16_;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys_length1 = 6;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _keys_size_ = keys_length1;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp17_ = quality;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp18_ = g_strdup_printf ("%d", _tmp17_);
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp19_ = g_strdup ("dots-per-inch");
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp20_ = self->priv->_dpi;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp21_ = g_strdup_printf ("%d", _tmp20_);
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22_ = self->priv->_dpi;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp23_ = g_strdup_printf ("%d", _tmp22_);
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp24_ = icc_profile_data;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp25_ = g_strdup (_tmp24_);
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_ = g_new0 (gchar*, 6 + 1);
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_[0] = _tmp18_;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_[1] = _tmp19_;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_[2] = _tmp21_;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_[3] = _tmp23_;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_[4] = _tmp25_;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_[5] = NULL;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values = _tmp26_;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values_length1 = 6;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _values_size_ = values_length1;
+#line 667 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp27_ = icc_profile_data;
+#line 667 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp27_ == NULL) {
+#line 3082 "page.c"
+ gchar** _tmp28_ = NULL;
+ gint _tmp28__length1 = 0;
+ gchar* _tmp29_ = NULL;
+#line 668 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp28_ = keys;
+#line 668 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp28__length1 = keys_length1;
+#line 668 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (_tmp28_[4]);
+#line 668 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp28_[4] = NULL;
+#line 668 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp29_ = _tmp28_[4];
+#line 3096 "page.c"
+ }
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp30_ = writer;
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp31_ = image;
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp32_ = keys;
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp32__length1 = keys_length1;
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp33_ = values;
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp33__length1 = values_length1;
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ pixbuf_writer_save (_tmp30_, _tmp31_, "jpeg", _tmp32_, _tmp32__length1, _tmp33_, _tmp33__length1, &_inner_error_);
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_inner_error_ != NULL) {
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_propagate_error (error, _inner_error_);
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (icc_profile_data);
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (image);
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _pixbuf_writer_unref0 (writer);
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (stream);
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 3130 "page.c"
+ }
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
+#line 3136 "page.c"
+ } else {
+ GCompareFunc _tmp34_ = NULL;
+ const gchar* _tmp35_ = NULL;
+ gint _tmp36_ = 0;
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp34_ = g_strcmp0;
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp35_ = type;
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp36_ = _tmp34_ (_tmp35_, "png");
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp36_ == 0) {
+#line 3149 "page.c"
+ gchar** keys = NULL;
+ gchar* _tmp37_ = NULL;
+ gchar** _tmp38_ = NULL;
+ gint keys_length1 = 0;
+ gint _keys_size_ = 0;
+ gchar** values = NULL;
+ const gchar* _tmp39_ = NULL;
+ gchar* _tmp40_ = NULL;
+ gchar** _tmp41_ = NULL;
+ gint values_length1 = 0;
+ gint _values_size_ = 0;
+ const gchar* _tmp42_ = NULL;
+ PixbufWriter* _tmp45_ = NULL;
+ GdkPixbuf* _tmp46_ = NULL;
+ gchar** _tmp47_ = NULL;
+ gint _tmp47__length1 = 0;
+ gchar** _tmp48_ = NULL;
+ gint _tmp48__length1 = 0;
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp37_ = g_strdup ("icc-profile");
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp38_ = g_new0 (gchar*, 2 + 1);
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp38_[0] = _tmp37_;
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp38_[1] = NULL;
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys = _tmp38_;
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys_length1 = 2;
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _keys_size_ = keys_length1;
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp39_ = icc_profile_data;
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp40_ = g_strdup (_tmp39_);
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp41_ = g_new0 (gchar*, 2 + 1);
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp41_[0] = _tmp40_;
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp41_[1] = NULL;
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values = _tmp41_;
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values_length1 = 2;
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _values_size_ = values_length1;
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp42_ = icc_profile_data;
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp42_ == NULL) {
+#line 3202 "page.c"
+ gchar** _tmp43_ = NULL;
+ gint _tmp43__length1 = 0;
+ gchar* _tmp44_ = NULL;
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp43_ = keys;
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp43__length1 = keys_length1;
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (_tmp43_[0]);
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp43_[0] = NULL;
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp44_ = _tmp43_[0];
+#line 3216 "page.c"
+ }
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp45_ = writer;
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp46_ = image;
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp47_ = keys;
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp47__length1 = keys_length1;
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp48_ = values;
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp48__length1 = values_length1;
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ pixbuf_writer_save (_tmp45_, _tmp46_, "png", _tmp47_, _tmp47__length1, _tmp48_, _tmp48__length1, &_inner_error_);
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_inner_error_ != NULL) {
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_propagate_error (error, _inner_error_);
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (icc_profile_data);
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (image);
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _pixbuf_writer_unref0 (writer);
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (stream);
+#line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 3250 "page.c"
+ }
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
+#line 3256 "page.c"
+ } else {
+ GCompareFunc _tmp49_ = NULL;
+ const gchar* _tmp50_ = NULL;
+ gint _tmp51_ = 0;
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp49_ = g_strcmp0;
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp50_ = type;
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp51_ = _tmp49_ (_tmp50_, "tiff");
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp51_ == 0) {
+#line 3269 "page.c"
+ gchar** keys = NULL;
+ gchar* _tmp52_ = NULL;
+ gchar* _tmp53_ = NULL;
+ gchar** _tmp54_ = NULL;
+ gint keys_length1 = 0;
+ gint _keys_size_ = 0;
+ gchar** values = NULL;
+ gchar* _tmp55_ = NULL;
+ const gchar* _tmp56_ = NULL;
+ gchar* _tmp57_ = NULL;
+ gchar** _tmp58_ = NULL;
+ gint values_length1 = 0;
+ gint _values_size_ = 0;
+ const gchar* _tmp59_ = NULL;
+ PixbufWriter* _tmp62_ = NULL;
+ GdkPixbuf* _tmp63_ = NULL;
+ gchar** _tmp64_ = NULL;
+ gint _tmp64__length1 = 0;
+ gchar** _tmp65_ = NULL;
+ gint _tmp65__length1 = 0;
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp52_ = g_strdup ("compression");
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp53_ = g_strdup ("icc-profile");
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp54_ = g_new0 (gchar*, 3 + 1);
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp54_[0] = _tmp52_;
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp54_[1] = _tmp53_;
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp54_[2] = NULL;
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys = _tmp54_;
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys_length1 = 3;
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _keys_size_ = keys_length1;
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp55_ = g_strdup ("8");
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp56_ = icc_profile_data;
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp57_ = g_strdup (_tmp56_);
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp58_ = g_new0 (gchar*, 3 + 1);
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp58_[0] = _tmp55_;
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp58_[1] = _tmp57_;
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp58_[2] = NULL;
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values = _tmp58_;
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values_length1 = 3;
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _values_size_ = values_length1;
+#line 683 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp59_ = icc_profile_data;
+#line 683 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp59_ == NULL) {
+#line 3332 "page.c"
+ gchar** _tmp60_ = NULL;
+ gint _tmp60__length1 = 0;
+ gchar* _tmp61_ = NULL;
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp60_ = keys;
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp60__length1 = keys_length1;
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (_tmp60_[1]);
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp60_[1] = NULL;
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp61_ = _tmp60_[1];
+#line 3346 "page.c"
+ }
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp62_ = writer;
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp63_ = image;
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp64_ = keys;
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp64__length1 = keys_length1;
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp65_ = values;
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp65__length1 = values_length1;
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ pixbuf_writer_save (_tmp62_, _tmp63_, "tiff", _tmp64_, _tmp64__length1, _tmp65_, _tmp65__length1, &_inner_error_);
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_inner_error_ != NULL) {
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_propagate_error (error, _inner_error_);
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (icc_profile_data);
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (image);
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _pixbuf_writer_unref0 (writer);
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (stream);
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 3380 "page.c"
+ }
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
+#line 3386 "page.c"
+ } else {
+ }
+ }
+ }
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (icc_profile_data);
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (image);
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _pixbuf_writer_unref0 (writer);
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (stream);
+#line 3399 "page.c"
+}
+
+
+gint page_get_width (Page* self) {
+ gint result;
+ gboolean _tmp0_ = FALSE;
+ ScanDirection _tmp1_ = 0;
+ ScanDirection _tmp2_ = 0;
+#line 25 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = page_get_scan_direction (self);
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = _tmp1_;
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp2_ == SCAN_DIRECTION_TOP_TO_BOTTOM) {
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = TRUE;
+#line 3418 "page.c"
+ } else {
+ ScanDirection _tmp3_ = 0;
+ ScanDirection _tmp4_ = 0;
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = page_get_scan_direction (self);
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = _tmp3_;
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = _tmp4_ == SCAN_DIRECTION_BOTTOM_TO_TOP;
+#line 3428 "page.c"
+ }
+#line 27 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp0_) {
+#line 3432 "page.c"
+ gint _tmp5_ = 0;
+#line 28 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = self->priv->_scan_width;
+#line 28 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp5_;
+#line 28 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3440 "page.c"
+ } else {
+ gint _tmp6_ = 0;
+#line 30 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = self->priv->_scan_height;
+#line 30 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp6_;
+#line 30 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3449 "page.c"
+ }
+}
+
+
+gint page_get_height (Page* self) {
+ gint result;
+ gboolean _tmp0_ = FALSE;
+ ScanDirection _tmp1_ = 0;
+ ScanDirection _tmp2_ = 0;
+#line 37 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = page_get_scan_direction (self);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = _tmp1_;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp2_ == SCAN_DIRECTION_TOP_TO_BOTTOM) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = TRUE;
+#line 3469 "page.c"
+ } else {
+ ScanDirection _tmp3_ = 0;
+ ScanDirection _tmp4_ = 0;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = page_get_scan_direction (self);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = _tmp3_;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = _tmp4_ == SCAN_DIRECTION_BOTTOM_TO_TOP;
+#line 3479 "page.c"
+ }
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp0_) {
+#line 3483 "page.c"
+ gint _tmp5_ = 0;
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp5_ = self->priv->_scan_height;
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp5_;
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3491 "page.c"
+ } else {
+ gint _tmp6_ = 0;
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = self->priv->_scan_width;
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp6_;
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3500 "page.c"
+ }
+}
+
+
+gboolean page_get_is_landscape (Page* self) {
+ gboolean result;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = page_get_width (self);
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = _tmp0_;
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = page_get_height (self);
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = _tmp2_;
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp1_ > _tmp3_;
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3525 "page.c"
+}
+
+
+gint page_get_dpi (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_dpi;
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3540 "page.c"
+}
+
+
+static void page_set_dpi (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_dpi = _tmp0_;
+#line 3552 "page.c"
+}
+
+
+gint page_get_depth (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_depth;
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3567 "page.c"
+}
+
+
+static void page_set_depth (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_depth = _tmp0_;
+#line 3579 "page.c"
+}
+
+
+const gchar* page_get_color_profile (Page* self) {
+ const gchar* result;
+ const gchar* _tmp0_ = NULL;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_color_profile;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3594 "page.c"
+}
+
+
+void page_set_color_profile (Page* self, const gchar* value) {
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (self->priv->_color_profile);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_color_profile = _tmp1_;
+#line 3611 "page.c"
+}
+
+
+gint page_get_scan_width (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_scan_width;
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3626 "page.c"
+}
+
+
+static void page_set_scan_width (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_scan_width = _tmp0_;
+#line 3638 "page.c"
+}
+
+
+gint page_get_scan_height (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_scan_height;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3653 "page.c"
+}
+
+
+static void page_set_scan_height (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_scan_height = _tmp0_;
+#line 3665 "page.c"
+}
+
+
+gint page_get_rowstride (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_rowstride;
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3680 "page.c"
+}
+
+
+static void page_set_rowstride (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_rowstride = _tmp0_;
+#line 3692 "page.c"
+}
+
+
+gint page_get_n_channels (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_n_channels;
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3707 "page.c"
+}
+
+
+static void page_set_n_channels (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_n_channels = _tmp0_;
+#line 3719 "page.c"
+}
+
+
+gboolean page_get_is_scanning (Page* self) {
+ gboolean result;
+ gboolean _tmp0_ = FALSE;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_is_scanning;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3734 "page.c"
+}
+
+
+static void page_set_is_scanning (Page* self, gboolean value) {
+ gboolean _tmp0_ = FALSE;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_is_scanning = _tmp0_;
+#line 3746 "page.c"
+}
+
+
+gboolean page_get_has_data (Page* self) {
+ gboolean result;
+ gboolean _tmp0_ = FALSE;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_has_data;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3761 "page.c"
+}
+
+
+static void page_set_has_data (Page* self, gboolean value) {
+ gboolean _tmp0_ = FALSE;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_has_data = _tmp0_;
+#line 3773 "page.c"
+}
+
+
+gint page_get_scan_line (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_scan_line;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3788 "page.c"
+}
+
+
+static void page_set_scan_line (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_scan_line = _tmp0_;
+#line 3800 "page.c"
+}
+
+
+gboolean page_get_is_color (Page* self) {
+ gboolean result;
+ gint _tmp0_ = 0;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_n_channels;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_ > 1;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3815 "page.c"
+}
+
+
+ScanDirection page_get_scan_direction (Page* self) {
+ ScanDirection result;
+ ScanDirection _tmp0_ = 0;
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->scan_direction_;
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 3830 "page.c"
+}
+
+
+void page_set_scan_direction (Page* self, ScanDirection value) {
+ ScanDirection _tmp0_ = 0;
+ ScanDirection _tmp1_ = 0;
+ gboolean size_has_changed = FALSE;
+ gint left_steps = 0;
+ ScanDirection _tmp2_ = 0;
+ ScanDirection _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gint _tmp6_ = 0;
+ gboolean _tmp7_ = FALSE;
+ ScanDirection _tmp35_ = 0;
+ gboolean _tmp36_ = FALSE;
+ gboolean _tmp37_ = FALSE;
+#line 94 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 96 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->scan_direction_;
+#line 96 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = value;
+#line 96 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp0_ == _tmp1_) {
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 3857 "page.c"
+ }
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ size_has_changed = FALSE;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = value;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = self->priv->scan_direction_;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ left_steps = (gint) (_tmp2_ - _tmp3_);
+#line 102 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp4_ = left_steps;
+#line 102 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp4_ < 0) {
+#line 3871 "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 3877 "page.c"
+ }
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp6_ = left_steps;
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp6_ != 2) {
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ size_has_changed = TRUE;
+#line 3885 "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 3891 "page.c"
+ gint _tmp8_ = 0;
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp8_ = left_steps;
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ switch (_tmp8_) {
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case 1:
+#line 3899 "page.c"
+ {
+ gint t = 0;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp9_ = self->priv->_crop_x;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = _tmp9_;
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp10_ = self->priv->_crop_y;
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, _tmp10_);
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp11_ = page_get_width (self);
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp12_ = _tmp11_;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp13_ = t;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp14_ = self->priv->_crop_width;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, _tmp12_ - (_tmp13_ + _tmp14_));
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp15_ = self->priv->_crop_width;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = _tmp15_;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp16_ = self->priv->_crop_height;
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_width (self, _tmp16_);
+#line 119 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp17_ = t;
+#line 119 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_height (self, _tmp17_);
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 3943 "page.c"
+ }
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case 2:
+#line 3947 "page.c"
+ {
+ gint _tmp18_ = 0;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ gint _tmp21_ = 0;
+ gint _tmp22_ = 0;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp18_ = page_get_width (self);
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp19_ = _tmp18_;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp20_ = self->priv->_crop_x;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp21_ = self->priv->_crop_width;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, _tmp19_ - (_tmp20_ + _tmp21_));
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp22_ = page_get_width (self);
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp23_ = _tmp22_;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp24_ = self->priv->_crop_y;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp25_ = self->priv->_crop_height;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, _tmp23_ - (_tmp24_ + _tmp25_));
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 3979 "page.c"
+ }
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ case 3:
+#line 3983 "page.c"
+ {
+ gint t = 0;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+ gint _tmp28_ = 0;
+ gint _tmp29_ = 0;
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+ gint _tmp32_ = 0;
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp26_ = self->priv->_crop_y;
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = _tmp26_;
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp27_ = self->priv->_crop_x;
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_y (self, _tmp27_);
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp28_ = page_get_height (self);
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp29_ = _tmp28_;
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp30_ = t;
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp31_ = self->priv->_crop_height;
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_x (self, _tmp29_ - (_tmp30_ + _tmp31_));
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp32_ = self->priv->_crop_width;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ t = _tmp32_;
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp33_ = self->priv->_crop_height;
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_width (self, _tmp33_);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp34_ = t;
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_set_crop_height (self, _tmp34_);
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 4027 "page.c"
+ }
+ default:
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ break;
+#line 4032 "page.c"
+ }
+ }
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp35_ = value;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->scan_direction_ = _tmp35_;
+#line 139 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp36_ = size_has_changed;
+#line 139 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp36_) {
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "size-changed");
+#line 4045 "page.c"
+ }
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "scan-direction-changed");
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp37_ = self->priv->_has_crop;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_tmp37_) {
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_emit_by_name (self, "crop-changed");
+#line 4055 "page.c"
+ }
+}
+
+
+gboolean page_get_has_crop (Page* self) {
+ gboolean result;
+ gboolean _tmp0_ = FALSE;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_has_crop;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 4071 "page.c"
+}
+
+
+static void page_set_has_crop (Page* self, gboolean value) {
+ gboolean _tmp0_ = FALSE;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_has_crop = _tmp0_;
+#line 4083 "page.c"
+}
+
+
+const gchar* page_get_crop_name (Page* self) {
+ const gchar* result;
+ const gchar* _tmp0_ = NULL;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_crop_name;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 4098 "page.c"
+}
+
+
+static void page_set_crop_name (Page* self, const gchar* value) {
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (self->priv->_crop_name);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_crop_name = _tmp1_;
+#line 4115 "page.c"
+}
+
+
+gint page_get_crop_x (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_crop_x;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 4130 "page.c"
+}
+
+
+static void page_set_crop_x (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_crop_x = _tmp0_;
+#line 4142 "page.c"
+}
+
+
+gint page_get_crop_y (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_crop_y;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 4157 "page.c"
+}
+
+
+static void page_set_crop_y (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_crop_y = _tmp0_;
+#line 4169 "page.c"
+}
+
+
+gint page_get_crop_width (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_crop_width;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 4184 "page.c"
+}
+
+
+static void page_set_crop_width (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_crop_width = _tmp0_;
+#line 4196 "page.c"
+}
+
+
+gint page_get_crop_height (Page* self) {
+ gint result;
+ gint _tmp0_ = 0;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->priv->_crop_height;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ result = _tmp0_;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return result;
+#line 4211 "page.c"
+}
+
+
+static void page_set_crop_height (Page* self, gint value) {
+ gint _tmp0_ = 0;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = value;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv->_crop_height = _tmp0_;
+#line 4223 "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 4230 "page.c"
+}
+
+
+static void value_page_free_value (GValue* value) {
+#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"
+ page_unref (value->data[0].v_pointer);
+#line 4239 "page.c"
+ }
+}
+
+
+static void value_page_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4249 "page.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 4253 "page.c"
+ }
+}
+
+
+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 4261 "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 4268 "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 4275 "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 4279 "page.c"
+ }
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ value->data[0].v_pointer = page_ref (object);
+#line 4283 "page.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ value->data[0].v_pointer = NULL;
+#line 4287 "page.c"
+ }
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return NULL;
+#line 4291 "page.c"
+}
+
+
+static gchar* value_page_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ Page** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4302 "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 4308 "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 4312 "page.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ *object_p = page_ref (value->data[0].v_pointer);
+#line 4316 "page.c"
+ }
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return NULL;
+#line 4320 "page.c"
+}
+
+
+GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPage* spec;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PAGE), NULL);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4334 "page.c"
+}
+
+
+gpointer value_get_page (const GValue* value) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4343 "page.c"
+}
+
+
+void value_set_page (GValue* value, gpointer v_object) {
+ Page* old;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PAGE));
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ old = value->data[0].v_pointer;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (v_object) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PAGE));
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_ref (value->data[0].v_pointer);
+#line 4363 "page.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ value->data[0].v_pointer = NULL;
+#line 4367 "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 4373 "page.c"
+ }
+}
+
+
+void value_take_page (GValue* value, gpointer v_object) {
+ Page* old;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PAGE));
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ old = value->data[0].v_pointer;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (v_object) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PAGE));
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4392 "page.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ value->data[0].v_pointer = NULL;
+#line 4396 "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 4402 "page.c"
+ }
+}
+
+
+static void page_class_init (PageClass * klass) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ page_parent_class = g_type_class_peek_parent (klass);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ PAGE_CLASS (klass)->finalize = page_finalize;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_type_class_add_private (klass, sizeof (PagePrivate));
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_signal_new ("pixels_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 ("size_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_line_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_direction_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 ("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 4426 "page.c"
+}
+
+
+static void page_instance_init (Page * self) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->priv = PAGE_GET_PRIVATE (self);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->ref_count = 1;
+#line 4435 "page.c"
+}
+
+
+static void page_finalize (Page* obj) {
+ Page * self;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PAGE, Page);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_free0 (self->priv->_color_profile);
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4449 "page.c"
+}
+
+
+GType page_get_type (void) {
+ static volatile gsize page_type_id__volatile = 0;
+ if (g_once_init_enter (&page_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_page_init, value_page_free_value, value_page_copy_value, value_page_peek_pointer, "p", value_page_collect_value, "p", value_page_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Page), 0, (GInstanceInitFunc) page_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType page_type_id;
+ page_type_id = g_type_register_fundamental (g_type_fundamental_next (), "Page", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&page_type_id__volatile, page_type_id);
+ }
+ return page_type_id__volatile;
+}
+
+
+gpointer page_ref (gpointer instance) {
+ Page* self;
+ self = instance;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return instance;
+#line 4474 "page.c"
+}
+
+
+void page_unref (gpointer instance) {
+ Page* self;
+ self = instance;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ PAGE_GET_CLASS (self)->finalize (self);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 4487 "page.c"
+ }
+}
+
+
+PixbufWriter* pixbuf_writer_construct (GType object_type, GFileOutputStream* stream) {
+ PixbufWriter* self = NULL;
+ GFileOutputStream* _tmp0_ = NULL;
+ GFileOutputStream* _tmp1_ = NULL;
+#line 696 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (stream != NULL, NULL);
+#line 696 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self = (PixbufWriter*) g_type_create_instance (object_type);
+#line 698 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = stream;
+#line 698 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#line 698 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (self->stream);
+#line 698 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self->stream = _tmp1_;
+#line 696 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return self;
+#line 4510 "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 4517 "page.c"
+}
+
+
+static gboolean _pixbuf_writer_write_pixbuf_data_gdk_pixbuf_save_func (guint8* buf, gsize buf_length1, GError** error, gpointer self) {
+ gboolean result;
+ 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 4526 "page.c"
+}
+
+
+void pixbuf_writer_save (PixbufWriter* self, GdkPixbuf* image, const gchar* type, gchar** option_keys, int option_keys_length1, gchar** option_values, int option_values_length1, GError** error) {
+ GdkPixbuf* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar** _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+ gchar** _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ GError * _inner_error_ = NULL;
+#line 701 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (self != NULL);
+#line 701 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (image != NULL);
+#line 701 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (type != NULL);
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = image;
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = type;
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2_ = option_keys;
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp2__length1 = option_keys_length1;
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3_ = option_values;
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp3__length1 = option_values_length1;
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ gdk_pixbuf_save_to_callbackv (_tmp0_, _pixbuf_writer_write_pixbuf_data_gdk_pixbuf_save_func, self, _tmp1_, _tmp2_, _tmp3_, &_inner_error_);
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_inner_error_ != NULL) {
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_propagate_error (error, _inner_error_);
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return;
+#line 4564 "page.c"
+ }
+}
+
+
+static gboolean pixbuf_writer_write_pixbuf_data (PixbufWriter* self, guint8* buf, int buf_length1, GError** error) {
+ gboolean result = FALSE;
+ GFileOutputStream* _tmp0_ = NULL;
+ guint8* _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ GError * _inner_error_ = NULL;
+#line 706 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp0_ = self->stream;
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1_ = buf;
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _tmp1__length1 = buf_length1;
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_output_stream_write_all ((GOutputStream*) _tmp0_, _tmp1_, (gsize) _tmp1__length1, NULL, NULL, &_inner_error_);
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (_inner_error_ != NULL) {
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_propagate_error (error, _inner_error_);
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return FALSE;
+#line 4591 "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 4597 "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 4604 "page.c"
+}
+
+
+static void value_pixbuf_writer_free_value (GValue* value) {
+#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"
+ pixbuf_writer_unref (value->data[0].v_pointer);
+#line 4613 "page.c"
+ }
+}
+
+
+static void value_pixbuf_writer_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4623 "page.c"
+ } else {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 4627 "page.c"
+ }
+}
+
+
+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 4635 "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 4642 "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 4649 "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 4653 "page.c"
+ }
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ value->data[0].v_pointer = pixbuf_writer_ref (object);
+#line 4657 "page.c"
+ } else {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ value->data[0].v_pointer = NULL;
+#line 4661 "page.c"
+ }
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return NULL;
+#line 4665 "page.c"
+}
+
+
+static gchar* value_pixbuf_writer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ PixbufWriter** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4676 "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 4682 "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 4686 "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 4690 "page.c"
+ }
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return NULL;
+#line 4694 "page.c"
+}
+
+
+GParamSpec* param_spec_pixbuf_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecPixbufWriter* spec;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_PIXBUF_WRITER), NULL);
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4708 "page.c"
+}
+
+
+gpointer value_get_pixbuf_writer (const GValue* value) {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4717 "page.c"
+}
+
+
+void value_set_pixbuf_writer (GValue* value, gpointer v_object) {
+ PixbufWriter* old;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PIXBUF_WRITER));
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ old = value->data[0].v_pointer;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (v_object) {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PIXBUF_WRITER));
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ pixbuf_writer_ref (value->data[0].v_pointer);
+#line 4737 "page.c"
+ } else {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ value->data[0].v_pointer = NULL;
+#line 4741 "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 4747 "page.c"
+ }
+}
+
+
+void value_take_pixbuf_writer (GValue* value, gpointer v_object) {
+ PixbufWriter* old;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PIXBUF_WRITER));
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ old = value->data[0].v_pointer;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (v_object) {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PIXBUF_WRITER));
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4766 "page.c"
+ } else {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ value->data[0].v_pointer = NULL;
+#line 4770 "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 4776 "page.c"
+ }
+}
+
+
+static void pixbuf_writer_class_init (PixbufWriterClass * klass) {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ pixbuf_writer_parent_class = g_type_class_peek_parent (klass);
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ PIXBUF_WRITER_CLASS (klass)->finalize = pixbuf_writer_finalize;
+#line 4786 "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 4793 "page.c"
+}
+
+
+static void pixbuf_writer_finalize (PixbufWriter* obj) {
+ PixbufWriter * self;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PIXBUF_WRITER, PixbufWriter);
+#line 694 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ _g_object_unref0 (self->stream);
+#line 4803 "page.c"
+}
+
+
+GType pixbuf_writer_get_type (void) {
+ static volatile gsize pixbuf_writer_type_id__volatile = 0;
+ if (g_once_init_enter (&pixbuf_writer_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_pixbuf_writer_init, value_pixbuf_writer_free_value, value_pixbuf_writer_copy_value, value_pixbuf_writer_peek_pointer, "p", value_pixbuf_writer_collect_value, "p", value_pixbuf_writer_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (PixbufWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pixbuf_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PixbufWriter), 0, (GInstanceInitFunc) pixbuf_writer_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType pixbuf_writer_type_id;
+ pixbuf_writer_type_id = g_type_register_fundamental (g_type_fundamental_next (), "PixbufWriter", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&pixbuf_writer_type_id__volatile, pixbuf_writer_type_id);
+ }
+ return pixbuf_writer_type_id__volatile;
+}
+
+
+gpointer pixbuf_writer_ref (gpointer instance) {
+ PixbufWriter* self;
+ self = instance;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ return instance;
+#line 4828 "page.c"
+}
+
+
+void pixbuf_writer_unref (gpointer instance) {
+ PixbufWriter* self;
+ self = instance;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala"
+ 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 4841 "page.c"
+ }
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/src/page.vala b/src/page.vala
new file mode 100644
index 0000000..b375723
--- /dev/null
+++ b/src/page.vala
@@ -0,0 +1,711 @@
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+public enum ScanDirection
+{
+ TOP_TO_BOTTOM,
+ LEFT_TO_RIGHT,
+ BOTTOM_TO_TOP,
+ RIGHT_TO_LEFT
+}
+
+public class Page
+{
+ /* Width of the page in pixels after rotation applied */
+ public int width
+ {
+ get
+ {
+ if (scan_direction == ScanDirection.TOP_TO_BOTTOM || scan_direction == ScanDirection.BOTTOM_TO_TOP)
+ return scan_width;
+ else
+ return scan_height;
+ }
+ }
+
+ /* Height of the page in pixels after rotation applied */
+ public int height
+ {
+ get
+ {
+ if (scan_direction == ScanDirection.TOP_TO_BOTTOM || scan_direction == ScanDirection.BOTTOM_TO_TOP)
+ return scan_height;
+ else
+ return scan_width;
+ }
+ }
+
+ /* true if the page is landscape (wider than the height) */
+ public bool is_landscape { get { return width > height; } }
+
+ /* Resolution of page */
+ public int dpi { get; private set; }
+
+ /* Number of rows in this page or -1 if currently unknown */
+ private int expected_rows;
+
+ /* Bit depth */
+ public int depth { get; private set; }
+
+ /* Color profile */
+ public string? color_profile { get; set; }
+
+ /* Width of raw scan data in pixels */
+ public int scan_width { get; private set; }
+
+ /* Height of raw scan data in pixels */
+ public int scan_height { get; private set; }
+
+ /* Offset between rows in scan data */
+ public int rowstride { get; private set; }
+
+ /* Number of color channels */
+ public int n_channels { get; private set; }
+
+ /* Pixel data */
+ private uchar[] pixels;
+
+ /* Page is getting data */
+ public bool is_scanning { get; private set; }
+
+ /* true if have some page data */
+ public bool has_data { get; private set; }
+
+ /* Expected next scan row */
+ public int scan_line { get; private set; }
+
+ /* true if scan contains color information */
+ public bool is_color { get { return n_channels > 1; } }
+
+ /* Rotation of scanned data */
+ private ScanDirection scan_direction_;
+ public ScanDirection scan_direction
+ {
+ get { return scan_direction_; }
+
+ set
+ {
+ if (scan_direction_ == value)
+ return;
+
+ /* Work out how many times it has been rotated to the left */
+ var size_has_changed = false;
+ var left_steps = (int) (value - scan_direction_);
+ if (left_steps < 0)
+ left_steps += 4;
+ if (left_steps != 2)
+ size_has_changed = true;
+
+ /* Rotate crop */
+ if (has_crop)
+ {
+ switch (left_steps)
+ {
+ /* 90 degrees counter-clockwise */
+ case 1:
+ var t = crop_x;
+ crop_x = crop_y;
+ crop_y = width - (t + crop_width);
+ t = crop_width;
+ crop_width = crop_height;
+ crop_height = t;
+ break;
+ /* 180 degrees */
+ case 2:
+ crop_x = width - (crop_x + crop_width);
+ crop_y = width - (crop_y + crop_height);
+ break;
+ /* 90 degrees clockwise */
+ case 3:
+ var t = crop_y;
+ crop_y = crop_x;
+ crop_x = height - (t + crop_height);
+ t = crop_width;
+ crop_width = crop_height;
+ crop_height = t;
+ break;
+ }
+ }
+
+ scan_direction_ = value;
+ if (size_has_changed)
+ size_changed ();
+ scan_direction_changed ();
+ if (has_crop)
+ crop_changed ();
+ }
+
+ default = ScanDirection.TOP_TO_BOTTOM;
+ }
+
+ /* True if the page has a crop set */
+ public bool has_crop { get; private set; }
+
+ /* Name of the crop if using a named crop */
+ public string? crop_name { get; private set; }
+
+ /* X co-ordinate of top left crop corner */
+ public int crop_x { get; private set; }
+
+ /* Y co-ordinate of top left crop corner */
+ public int crop_y { get; private set; }
+
+ /* Width of crop in pixels */
+ public int crop_width { get; private set; }
+
+ /* Height of crop in pixels*/
+ public int crop_height { get; private set; }
+
+ public signal void pixels_changed ();
+ public signal void size_changed ();
+ public signal void scan_line_changed ();
+ public signal void scan_direction_changed ();
+ public signal void crop_changed ();
+ public signal void scan_finished ();
+
+ public Page (int width, int height, int dpi, ScanDirection scan_direction)
+ {
+ if (scan_direction == ScanDirection.TOP_TO_BOTTOM || scan_direction == ScanDirection.BOTTOM_TO_TOP)
+ {
+ scan_width = width;
+ scan_height = height;
+ }
+ else
+ {
+ scan_width = height;
+ scan_height = width;
+ }
+ this.dpi = dpi;
+ this.scan_direction = scan_direction;
+ }
+
+ public Page.from_data (int scan_width,
+ int scan_height,
+ int rowstride,
+ int n_channels,
+ int depth,
+ int dpi,
+ ScanDirection scan_direction,
+ string? color_profile,
+ uchar[]? pixels,
+ bool has_crop,
+ string? crop_name,
+ int crop_x,
+ int crop_y,
+ int crop_width,
+ int crop_height)
+ {
+ this.scan_width = scan_width;
+ this.scan_height = scan_height;
+ this.expected_rows = scan_height;
+ this.rowstride = rowstride;
+ this.n_channels = n_channels;
+ this.depth = depth;
+ this.dpi = dpi;
+ this.scan_direction = scan_direction;
+ this.color_profile = color_profile;
+ this.pixels = pixels;
+ has_data = pixels != null;
+ this.has_crop = has_crop;
+ this.crop_name = crop_name;
+ this.crop_x = crop_x;
+ this.crop_y = crop_y;
+ this.crop_width = crop_width;
+ this.crop_height = crop_height;
+ }
+
+ public void set_page_info (ScanPageInfo info)
+ {
+ expected_rows = info.height;
+ dpi = (int) info.dpi;
+
+ /* Create a white page */
+ scan_width = info.width;
+ scan_height = info.height;
+ /* Variable height, try 50% of the width for now */
+ if (scan_height < 0)
+ scan_height = scan_width / 2;
+ depth = info.depth;
+ n_channels = info.n_channels;
+ rowstride = (scan_width * depth * n_channels + 7) / 8;
+ pixels.resize (scan_height * rowstride);
+ return_if_fail (pixels != null);
+
+ /* Fill with white */
+ if (depth == 1)
+ Memory.set (pixels, 0x00, scan_height * rowstride);
+ else
+ Memory.set (pixels, 0xFF, scan_height * rowstride);
+
+ size_changed ();
+ pixels_changed ();
+ }
+
+ public void start ()
+ {
+ is_scanning = true;
+ scan_line_changed ();
+ }
+
+ private void parse_line (ScanLine line, int n, out bool size_changed)
+ {
+ var line_number = line.number + n;
+
+ /* Extend image if necessary */
+ size_changed = false;
+ while (line_number >= scan_height)
+ {
+ /* Extend image */
+ var rows = scan_height;
+ scan_height = rows + scan_width / 2;
+ debug ("Extending image from %d lines to %d lines", rows, scan_height);
+ pixels.resize (scan_height * rowstride);
+
+ size_changed = true;
+ }
+
+ /* Copy in new row */
+ var offset = line_number * rowstride;
+ var line_offset = n * line.data_length;
+ for (var i = 0; i < line.data_length; i++)
+ pixels[offset+i] = line.data[line_offset+i];
+
+ scan_line = line_number;
+ }
+
+ public void parse_scan_line (ScanLine line)
+ {
+ bool size_has_changed = false;
+ for (var i = 0; i < line.n_lines; i++)
+ parse_line (line, i, out size_has_changed);
+
+ has_data = true;
+
+ if (size_has_changed)
+ size_changed ();
+ scan_line_changed ();
+ pixels_changed ();
+ }
+
+ public void finish ()
+ {
+ bool size_has_changed = false;
+
+ /* Trim page */
+ if (expected_rows < 0 &&
+ scan_line != scan_height)
+ {
+ var rows = scan_height;
+ scan_height = scan_line;
+ pixels.resize (scan_height * rowstride);
+ debug ("Trimming page from %d lines to %d lines", rows, scan_height);
+
+ size_has_changed = true;
+ }
+ is_scanning = false;
+
+ if (size_has_changed)
+ size_changed ();
+ scan_line_changed ();
+ scan_finished ();
+ }
+
+ public void rotate_left ()
+ {
+ switch (scan_direction)
+ {
+ case ScanDirection.TOP_TO_BOTTOM:
+ scan_direction = ScanDirection.LEFT_TO_RIGHT;
+ break;
+ case ScanDirection.LEFT_TO_RIGHT:
+ scan_direction = ScanDirection.BOTTOM_TO_TOP;
+ break;
+ case ScanDirection.BOTTOM_TO_TOP:
+ scan_direction = ScanDirection.RIGHT_TO_LEFT;
+ break;
+ case ScanDirection.RIGHT_TO_LEFT:
+ scan_direction = ScanDirection.TOP_TO_BOTTOM;
+ break;
+ }
+ }
+
+ public void rotate_right ()
+ {
+ switch (scan_direction)
+ {
+ case ScanDirection.TOP_TO_BOTTOM:
+ scan_direction = ScanDirection.RIGHT_TO_LEFT;
+ break;
+ case ScanDirection.LEFT_TO_RIGHT:
+ scan_direction = ScanDirection.TOP_TO_BOTTOM;
+ break;
+ case ScanDirection.BOTTOM_TO_TOP:
+ scan_direction = ScanDirection.LEFT_TO_RIGHT;
+ break;
+ case ScanDirection.RIGHT_TO_LEFT:
+ scan_direction = ScanDirection.BOTTOM_TO_TOP;
+ break;
+ }
+ }
+
+ public void set_no_crop ()
+ {
+ if (!has_crop)
+ return;
+ has_crop = false;
+ crop_name = null;
+ crop_x = 0;
+ crop_y = 0;
+ crop_width = 0;
+ crop_height = 0;
+ crop_changed ();
+ }
+
+ public void set_custom_crop (int width, int height)
+ {
+ return_if_fail (width >= 1);
+ return_if_fail (height >= 1);
+
+ if (crop_name == null && has_crop && crop_width == width && crop_height == height)
+ return;
+ crop_name = null;
+ has_crop = true;
+
+ crop_width = width;
+ crop_height = height;
+
+ /*var pw = width;
+ var ph = height;
+ if (crop_width < pw)
+ crop_x = (pw - crop_width) / 2;
+ else
+ crop_x = 0;
+ if (crop_height < ph)
+ crop_y = (ph - crop_height) / 2;
+ else
+ crop_y = 0;*/
+
+ crop_changed ();
+ }
+
+ public void set_named_crop (string name)
+ {
+ double w, h;
+ switch (name)
+ {
+ case "A4":
+ w = 8.3;
+ h = 11.7;
+ break;
+ case "A5":
+ w = 5.8;
+ h = 8.3;
+ break;
+ case "A6":
+ w = 4.1;
+ h = 5.8;
+ break;
+ case "letter":
+ w = 8.5;
+ h = 11;
+ break;
+ case "legal":
+ w = 8.5;
+ h = 14;
+ break;
+ case "4x6":
+ w = 4;
+ h = 6;
+ break;
+ default:
+ warning ("Unknown paper size '%s'", name);
+ return;
+ }
+
+ crop_name = name;
+ has_crop = true;
+
+ var pw = width;
+ var ph = height;
+
+ /* Rotate to match original aspect */
+ if (pw > ph)
+ {
+ var t = w;
+ w = h;
+ h = t;
+ }
+
+ /* Custom crop, make slightly smaller than original */
+ crop_width = (int) (w * dpi + 0.5);
+ crop_height = (int) (h * dpi + 0.5);
+
+ if (crop_width < pw)
+ crop_x = (pw - crop_width) / 2;
+ else
+ crop_x = 0;
+ if (crop_height < ph)
+ crop_y = (ph - crop_height) / 2;
+ else
+ crop_y = 0;
+ crop_changed ();
+ }
+
+ public void move_crop (int x, int y)
+ {
+ return_if_fail (x >= 0);
+ return_if_fail (y >= 0);
+ return_if_fail (x < width);
+ return_if_fail (y < height);
+
+ crop_x = x;
+ crop_y = y;
+ crop_changed ();
+ }
+
+ public void rotate_crop ()
+ {
+ if (!has_crop)
+ return;
+
+ var t = crop_width;
+ crop_width = crop_height;
+ crop_height = t;
+
+ /* Clip custom crops */
+ if (crop_name == null)
+ {
+ var w = width;
+ var h = height;
+
+ if (crop_x + crop_width > w)
+ crop_x = w - crop_width;
+ if (crop_x < 0)
+ {
+ crop_x = 0;
+ crop_width = w;
+ }
+ if (crop_y + crop_height > h)
+ crop_y = h - crop_height;
+ if (crop_y < 0)
+ {
+ crop_y = 0;
+ crop_height = h;
+ }
+ }
+
+ crop_changed ();
+ }
+
+ public unowned uchar[] get_pixels ()
+ {
+ return pixels;
+ }
+
+ // FIXME: Copied from page-view, should be shared code
+ private uchar get_sample (uchar[] pixels, int offset, int x, int depth, int n_channels, int channel)
+ {
+ // FIXME
+ return 0xFF;
+ }
+
+ // FIXME: Copied from page-view, should be shared code
+ private void get_pixel (int x, int y, uchar[] pixel, int offset)
+ {
+ switch (scan_direction)
+ {
+ case ScanDirection.TOP_TO_BOTTOM:
+ break;
+ case ScanDirection.BOTTOM_TO_TOP:
+ x = scan_width - x - 1;
+ y = scan_height - y - 1;
+ break;
+ case ScanDirection.LEFT_TO_RIGHT:
+ var t = x;
+ x = scan_width - y - 1;
+ y = t;
+ break;
+ case ScanDirection.RIGHT_TO_LEFT:
+ var t = x;
+ x = y;
+ y = scan_height - t - 1;
+ break;
+ }
+
+ var line_offset = rowstride * y;
+
+ /* Optimise for 8 bit images */
+ if (depth == 8 && n_channels == 3)
+ {
+ var o = line_offset + x * n_channels;
+ pixel[offset+0] = pixels[o];
+ pixel[offset+1] = pixels[o+1];
+ pixel[offset+2] = pixels[o+2];
+ return;
+ }
+ else if (depth == 8 && n_channels == 1)
+ {
+ var p = pixels[line_offset + x];
+ pixel[offset+0] = pixel[offset+1] = pixel[offset+2] = p;
+ return;
+ }
+
+ /* Optimise for bitmaps */
+ else if (depth == 1 && n_channels == 1)
+ {
+ var p = pixels[line_offset + (x / 8)];
+ pixel[offset+0] = pixel[offset+1] = pixel[offset+2] = (p & (0x80 >> (x % 8))) != 0 ? 0x00 : 0xFF;
+ return;
+ }
+
+ /* Optimise for 2 bit images */
+ else if (depth == 2 && n_channels == 1)
+ {
+ int block_shift[4] = { 6, 4, 2, 0 };
+
+ var p = pixels[line_offset + (x / 4)];
+ var sample = (p >> block_shift[x % 4]) & 0x3;
+ sample = sample * 255 / 3;
+
+ pixel[offset+0] = pixel[offset+1] = pixel[offset+2] = (uchar) sample;
+ return;
+ }
+
+ /* Use slow method */
+ pixel[offset+0] = get_sample (pixels, line_offset, x, depth, n_channels, 0);
+ pixel[offset+1] = get_sample (pixels, line_offset, x, depth, n_channels, 1);
+ pixel[offset+2] = get_sample (pixels, line_offset, x, depth, n_channels, 2);
+ }
+
+ public Gdk.Pixbuf get_image (bool apply_crop)
+ {
+ int l, r, t, b;
+ if (apply_crop && has_crop)
+ {
+ l = crop_x;
+ r = l + crop_width;
+ t = crop_y;
+ b = t + crop_height;
+
+ if (l < 0)
+ l = 0;
+ if (r > width)
+ r = width;
+ if (t < 0)
+ t = 0;
+ if (b > height)
+ b = height;
+ }
+ else
+ {
+ l = 0;
+ r = width;
+ t = 0;
+ b = height;
+ }
+
+ var image = new Gdk.Pixbuf (Gdk.Colorspace.RGB, false, 8, r - l, b - t);
+ unowned uint8[] image_pixels = image.get_pixels ();
+ for (var y = t; y < b; y++)
+ {
+ var offset = image.get_rowstride () * (y - t);
+ for (var x = l; x < r; x++)
+ get_pixel (x, y, image_pixels, offset + (x - l) * 3);
+ }
+
+ return image;
+ }
+
+ private string? get_icc_data_encoded (string icc_profile_filename)
+ {
+ /* Get binary data */
+ string contents;
+ try
+ {
+ FileUtils.get_contents (icc_profile_filename, out contents);
+ }
+ catch (Error e)
+ {
+ warning ("failed to get icc profile data: %s", e.message);
+ return null;
+ }
+
+ /* Encode into base64 */
+ return Base64.encode ((uchar[]) contents.to_utf8 ());
+ }
+
+ public void copy_to_clipboard (Gtk.Window window)
+ {
+ var display = window.get_display ();
+ var clipboard = Gtk.Clipboard.get_for_display (display, Gdk.SELECTION_CLIPBOARD);
+ var image = get_image (true);
+ clipboard.set_image (image);
+ }
+
+ public void save (string type, int quality, File file) throws Error
+ {
+ var stream = file.replace (null, false, FileCreateFlags.NONE, null);
+ var writer = new PixbufWriter (stream);
+ var image = get_image (true);
+
+ string? icc_profile_data = null;
+ if (color_profile != null)
+ icc_profile_data = get_icc_data_encoded (color_profile);
+
+ if (strcmp (type, "jpeg") == 0)
+ {
+ string[] keys = { "quality", "density-unit", "x-density", "y-density", "icc-profile", null };
+ string[] values = { "%d".printf (quality), "dots-per-inch", "%d".printf (dpi), "%d".printf (dpi), icc_profile_data, null };
+ if (icc_profile_data == null)
+ keys[4] = null;
+ writer.save (image, "jpeg", keys, values);
+ }
+ else if (strcmp (type, "png") == 0)
+ {
+ string[] keys = { "icc-profile", null };
+ string[] values = { icc_profile_data, null };
+ if (icc_profile_data == null)
+ keys[0] = null;
+ writer.save (image, "png", keys, values);
+ }
+ else if (strcmp (type, "tiff") == 0)
+ {
+ string[] keys = { "compression", "icc-profile", null };
+ string[] values = { "8" /* Deflate compression */, icc_profile_data, null };
+ if (icc_profile_data == null)
+ keys[1] = null;
+ writer.save (image, "tiff", keys, values);
+ }
+ else
+ ; // FIXME: Throw Error
+ }
+}
+
+public class PixbufWriter
+{
+ public FileOutputStream stream;
+
+ public PixbufWriter (FileOutputStream stream)
+ {
+ this.stream = stream;
+ }
+
+ public void save (Gdk.Pixbuf image, string type, string[] option_keys, string[] option_values) throws Error
+ {
+ image.save_to_callbackv (write_pixbuf_data, type, option_keys, option_values);
+ }
+
+ private bool write_pixbuf_data (uint8[] buf) throws Error
+ {
+ stream.write_all (buf, null, null);
+ return true;
+ }
+}
diff --git a/src/resources.c b/src/resources.c
new file mode 100644
index 0000000..124a8cd
--- /dev/null
+++ b/src/resources.c
@@ -0,0 +1,6477 @@
+#include <gio/gio.h>
+
+#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
+# define SECTION __attribute__ ((section (".gresource.simple_scan"), aligned (8)))
+#else
+# define SECTION
+#endif
+
+static const SECTION union { const guint8 data[50751]; const double alignment; void * const ptr;} simple_scan_resource_data = { {
+ 0x47, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x28, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x00, 0xd4, 0xb5, 0x02, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xac, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x4c, 0x00, 0xb0, 0x00, 0x00, 0x00,
+ 0xb4, 0x00, 0x00, 0x00, 0x4b, 0x50, 0x90, 0x0b,
+ 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x4c, 0x00, 0xb8, 0x00, 0x00, 0x00,
+ 0xbc, 0x00, 0x00, 0x00, 0x6e, 0xa3, 0x22, 0x37,
+ 0x03, 0x00, 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x4c, 0x00, 0xc8, 0x00, 0x00, 0x00,
+ 0xcc, 0x00, 0x00, 0x00, 0xb0, 0xb7, 0x24, 0x30,
+ 0x01, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x4c, 0x00, 0xd4, 0x00, 0x00, 0x00,
+ 0xd8, 0x00, 0x00, 0x00, 0x76, 0x8d, 0xc8, 0xbd,
+ 0x02, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00,
+ 0x0e, 0x00, 0x76, 0x00, 0xe8, 0x00, 0x00, 0x00,
+ 0x3f, 0xc6, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x67, 0x2f,
+ 0x03, 0x00, 0x00, 0x00, 0x53, 0x69, 0x6d, 0x70,
+ 0x6c, 0x65, 0x53, 0x63, 0x61, 0x6e, 0x2f, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x67, 0x6e, 0x6f, 0x6d,
+ 0x65, 0x2f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2d, 0x73,
+ 0x63, 0x61, 0x6e, 0x2e, 0x75, 0x69, 0x00, 0x00,
+ 0x47, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65,
+ 0x72, 0x73, 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 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73,
+ 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64,
+ 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e,
+ 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e,
+ 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x22,
+ 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x22, 0x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0x22, 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65,
+ 0x6c, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
+ 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75,
+ 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x3d, 0x22, 0x54, 0x68, 0x69, 0x73,
+ 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x69,
+ 0x73, 0x20, 0x73, 0x65, 0x74, 0x20, 0x64, 0x79,
+ 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x6c,
+ 0x79, 0x20, 0x61, 0x6e, 0x64,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0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73,
+ 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e,
+ 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e,
+ 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x68,
+ 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e,
+ 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76,
+ 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
+ 0x79, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x69, 0x6e, 0x76, 0x69, 0x73,
+ 0x69, 0x62, 0x6c, 0x65, 0x5f, 0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6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d,
+ 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22,
+ 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x62, 0x65,
+ 0x73, 0x69, 0x64, 0x65, 0x20, 0x75, 0x73, 0x65,
+ 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x65, 0x6e,
+ 0x74, 0x72, 0x79, 0x22, 0x3e, 0x5f, 0x55, 0x73,
+ 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x66,
+ 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x3a, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
+ 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72,
+ 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x6e, 0x65,
+ 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x77, 0x69,
+ 0x64, 0x67, 0x65, 0x74, 0x22, 0x3e, 0x75, 0x73,
+ 0x65,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x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22,
+ 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79,
+ 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x4c, 0x61,
+ 0x62, 0x65, 0x6c, 0x20, 0x62, 0x65, 0x73, 0x69,
+ 0x64, 0x65, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77,
+ 0x6f, 0x72, 0x64, 0x20, 0x65, 0x6e, 0x74, 0x72,
+ 0x79, 0x22, 0x3e, 0x5f, 0x50, 0x61, 0x73, 0x73,
+ 0x77, 0x6f, 0x72, 0x64, 0x3a, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65,
+ 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x6e,
+ 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x77,
+ 0x69, 0x64, 0x67, 0x65, 0x74, 0x22, 0x3e, 0x70,
+ 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f,
+ 0x65, 0x6e, 0x74, 0x72, 0x79, 0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75, 0x73,
+ 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
+ 0x70, 0x70, 0x65, 0x72, 0x22, 0x3e, 0x31, 0x30,
+ 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x65, 0x70,
+ 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x22, 0x3e, 0x31, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x63,
+ 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x3e,
+ 0x31, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x74,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20,
+ 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x55,
+ 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x72,
+ 0x66, 0x61, 0x63, 0x65, 0x22, 0x20, 0x70, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x47, 0x74,
+ 0x6b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x6e, 0x64,
+ 0x6f, 0x77, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f,
+ 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46,
+ 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74,
+ 0x69, 0x74, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62,
+ 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22,
+ 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x3d, 0x22, 0x54, 0x69, 0x74, 0x6c, 0x65,
+ 0x20, 0x6f, 0x66, 0x20, 0x73, 0x63, 0x61, 0x6e,
+ 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22,
+ 0x3e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20,
+ 0x53, 0x63, 0x61, 0x6e, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x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 0x73, 0x22, 0x20, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d,
+ 0x22, 0x53, 0x63, 0x61, 0x6e, 0x20, 0x6d, 0x65,
+ 0x6e, 0x75, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x20,
+ 0x74, 0x6f, 0x20, 0x73, 0x63, 0x61, 0x6e, 0x20,
+ 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65,
+ 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72,
+ 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73,
+ 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x3e,
+ 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x5f,
+ 0x50, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
+ 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72,
+ 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x61, 0x63,
+ 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f,
+ 0x72, 0x20, 0x6b, 0x65, 0x79, 0x3d, 0x22, 0x31,
+ 0x22, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c,
+ 0x3d, 0x22, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61,
+ 0x74, 0x65, 0x22, 0x20, 0x6d, 0x6f, 0x64, 0x69,
+ 0x66, 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x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69,
+ 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f,
+ 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46,
+ 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c,
+ 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62,
+ 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22,
+ 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x3d, 0x22, 0x53, 0x63, 0x61, 0x6e, 0x20,
+ 0x6d, 0x65, 0x6e, 0x75, 0x20, 0x69, 0x74, 0x65,
+ 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x63, 0x61,
+ 0x6e, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x70, 0x61,
+ 0x67, 0x65, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d,
+ 0x20, 0x61, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,
+ 0x65, 0x6e, 0x74, 0x20, 0x66, 0x65, 0x65, 0x64,
+ 0x65, 0x72, 0x22, 0x3e, 0x41, 0x6c, 0x6c, 0x20,
+ 0x50, 0x61, 0x67, 0x65, 0x73, 0x20, 0x46, 0x72,
+ 0x6f, 0x6d, 0x20, 0x5f, 0x46, 0x65, 0x65, 0x64,
+ 0x65, 0x72, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65,
+ 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69,
+ 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x61, 0x63, 0x63, 0x65,
+ 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20,
+ 0x6b, 0x65, 0x79, 0x3d, 0x22, 0x66, 0x22, 0x20,
+ 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3d, 0x22,
+ 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x22, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,
+ 0x65, 0x72, 0x73, 0x3d, 0x22, 0x47, 0x44, 0x4b,
+ 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c,
+ 0x5f, 0x4d, 0x41, 0x53, 0x4b, 0x22, 0x2f, 0x3e,
+ 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x63,
+ 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x20,
+ 0x68, 0x61, 0x6e, 0x64, 0x6c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
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x65,
+ 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22,
+ 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63,
+ 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d,
+ 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22,
+ 0x4d, 0x65, 0x6e, 0x75, 0x20, 0x65, 0x6e, 0x74,
+ 0x72, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x74,
+ 0x6f, 0x70, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65,
+ 0x6e, 0x74, 0x20, 0x73, 0x63, 0x61, 0x6e, 0x22,
+ 0x3e, 0x5f, 0x53, 0x74, 0x6f, 0x70, 0x20, 0x53,
+ 0x63, 0x61, 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 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20, 0x63, 0x6c, 0x61, 0x73,
+ 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x52, 0x61,
+ 0x64, 0x69, 0x6f, 0x4d, 0x65, 0x6e, 0x75, 0x49,
+ 0x74, 0x65, 0x6d, 0x22, 0x20, 0x69, 0x64, 0x3d,
+ 0x22, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x65,
+ 0x6e, 0x75, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75,
+ 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c,
+ 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22,
+ 0x79, 0x65, 0x73, 0x22, 0x3e, 0x54, 0x65, 0x78,
+ 0x74, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+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
+ 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
+ 0x22, 0x3e, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e,
+ 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x3e,
+ 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x64,
+ 0x72, 0x61, 0x77, 0x5f, 0x61, 0x73, 0x5f, 0x72,
+ 0x61, 0x64, 0x69, 0x6f, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x67, 0x72, 0x6f,
+ 0x75, 0x70, 0x22, 0x3e, 0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49, 0x74, 0x65,
+ 0x6d, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x72,
+ 0x65, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d,
+ 0x65, 0x6e, 0x75, 0x69, 0x74, 0x65, 0x6d, 0x22,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63,
+ 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d,
+ 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22,
+ 0x4d, 0x65, 0x6e, 0x75, 0x20, 0x69, 0x74, 0x65,
+ 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x6f,
+ 0x72, 0x64, 0x65, 0x72, 0x20, 0x70, 0x61, 0x67,
+ 0x65, 0x73, 0x22, 0x3e, 0x52, 0x65, 0x6f, 0x72,
+ 0x64, 0x65, 0x72, 0x20, 0x50, 0x61, 0x67, 0x65,
+ 0x73, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f,
+ 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e,
+ 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x22, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65,
+ 0x72, 0x3d, 0x22, 0x72, 0x65, 0x6f, 0x72, 0x64,
+ 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x6e, 0x75, 0x69,
+ 0x74, 0x65, 0x6d, 0x5f, 0x61, 0x63, 0x74, 0x69,
+ 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x62, 0x22,
+ 0x20, 0x73, 0x77, 0x61, 0x70, 0x70, 0x65, 0x64,
+ 0x3d, 0x22, 0x6e, 0x6f, 0x22, 0x2f, 0x3e, 0x3c,
+ 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e,
+ 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e,
+ 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c,
+ 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63,
+ 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74,
+ 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x65,
+ 0x6e, 0x75, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x20,
+ 0x69, 0x64, 0x3d, 0x22, 0x73, 0x61, 0x76, 0x65,
+ 0x5f, 0x6d, 0x65, 0x6e, 0x75, 0x69, 0x74, 0x65,
+ 0x6d, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x22, 0x3e, 0x67, 0x74, 0x6b, 0x2d, 0x73, 0x61,
+ 0x76, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73,
+ 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x65, 0x6e,
+ 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x3e,
+ 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75,
+ 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75,
+ 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x6f,
+ 0x63, 0x6b, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x61, 0x63, 0x63, 0x65,
+ 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20,
+ 0x6b, 0x65, 0x79, 0x3d, 0x22, 0x73, 0x22, 0x20,
+ 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3d, 0x22,
+ 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x22, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,
+ 0x65, 0x72, 0x73, 0x3d, 0x22, 0x47, 0x44, 0x4b,
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x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x22, 0x3e, 0x67, 0x74, 0x6b, 0x2d, 0x73, 0x61,
+ 0x76, 0x65, 0x2d, 0x61, 0x73, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76,
+ 0x65, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66,
+ 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61,
+ 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,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 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73,
+ 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e,
+ 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e,
+ 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65,
+ 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73,
+ 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72,
+ 0x61, 0x74, 0x6f, 0x72, 0x20, 0x6b, 0x65, 0x79,
+ 0x3d, 0x22, 0x70, 0x22, 0x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x65, 0x6e, 0x63, 0x65, 0x73,
+ 0x5f, 0x6d, 0x65, 0x6e, 0x75, 0x69, 0x74, 0x65,
+ 0x6d, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x22, 0x3e, 0x67, 0x74, 0x6b, 0x2d, 0x70, 0x72,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
+ 0x73, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69,
+ 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f,
+ 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46,
+ 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
+ 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72,
+ 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72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0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f,
+ 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x61,
+ 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74,
+ 0x6f, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x3d, 0x22,
+ 0x77, 0x22, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x3d, 0x22, 0x61, 0x63, 0x74, 0x69, 0x76,
+ 0x61, 0x74, 0x65, 0x22, 0x20, 0x6d, 0x6f, 0x64,
+ 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x3d, 0x22,
+ 0x47, 0x44, 0x4b, 0x5f, 0x43, 0x4f, 0x4e, 0x54,
+ 0x52, 0x4f, 0x4c, 0x5f, 0x4d, 0x41, 0x53, 0x4b,
+ 0x22, 0x2f, 0x3e, 0x3c, 0x61, 0x63, 0x63, 0x65,
+ 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20,
+ 0x6b, 0x65, 0x79, 0x3d, 0x22, 0x71, 0x22, 0x20,
+ 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3d, 0x22,
+ 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x22, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,
+ 0x65, 0x72, 0x73, 0x3d, 0x22, 0x47, 0x44, 0x4b,
+ 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c,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d, 0x65, 0x6e, 0x75, 0x69, 0x74, 0x65,
+ 0x6d, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62,
+ 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66,
+ 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61,
+ 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61,
+ 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x3d, 0x22, 0x50, 0x61, 0x67, 0x65, 0x20, 0x6d,
+ 0x65, 0x6e, 0x75, 0x20, 0x28, 0x63, 0x6f, 0x6e,
+ 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72,
+ 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x70, 0x61,
+ 0x67, 0x65, 0x2c, 0x20, 0x65, 0x2e, 0x67, 0x2e,
+ 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x2c,
+ 0x20, 0x63, 0x72, 0x6f, 0x70, 0x29, 0x22, 0x3e,
+ 0x5f, 0x50, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65,
+ 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63,
+ 0x68, 0x69, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70,
+ 0x65, 0x3d, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x65,
+ 0x6e, 0x75, 0x22, 0x3e, 0x3c, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73,
+ 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4d, 0x65,
+ 0x6e, 0x75, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x65, 0x6e,
+ 0x75, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62,
+ 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
+ 0x3c, 0x2f, 0x70,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0x61,
+ 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61,
+ 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x3d, 0x22, 0x4d, 0x65, 0x6e, 0x75, 0x20, 0x69,
+ 0x74, 0x65, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x72,
+ 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x70, 0x61,
+ 0x67, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x65,
+ 0x66, 0x74, 0x20, 0x28, 0x61, 0x6e, 0x74, 0x69,
+ 0x2d, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x77, 0x69,
+ 0x73, 0x65, 0x29, 0x22, 0x3e, 0x52, 0x6f, 0x74,
+ 0x61, 0x74, 0x65, 0x20, 0x5f, 0x4c, 0x65, 0x66,
+ 0x74, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f,
+ 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e,
+ 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x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75,
+ 0x49, 0x74, 0x65, 0x6d, 0x22, 0x20, 0x69, 0x64,
+ 0x3d, 0x22, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65,
+ 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x6d,
+ 0x65, 0x6e, 0x75, 0x69, 0x74, 0x65, 0x6d, 0x22,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63,
+ 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d,
+ 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22,
+ 0x4d, 0x65, 0x6e, 0x75, 0x20, 0x69, 0x74, 0x65,
+ 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x6f, 0x74,
+ 0x61, 0x74, 0x65, 0x20, 0x70, 0x61, 0x67, 0x65,
+ 0x20, 0x74, 0x6f, 0x20, 0x72, 0x69, 0x67, 0x68,
+ 0x74, 0x20, 0x28, 0x63, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x77, 0x69, 0x73, 0x65, 0x29, 0x22, 0x3e, 0x52,
+ 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x5f, 0x52,
+ 0x69, 0x67, 0x68, 0x74, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
+ 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72,
+ 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x61, 0x63,
+ 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f,
+ 0x72, 0x20, 0x6b, 0x65, 0x79, 0x3d, 0x22, 0x62,
+ 0x72, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x72, 0x69,
+ 0x67, 0x68, 0x74, 0x22, 0x20, 0x73, 0x69, 0x67,
+ 0x6e, 0x61, 0x6c, 0x3d, 0x22, 0x61, 0x63, 0x74,
+ 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x2f, 0x3e,
+ 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x63,
+ 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x20,
+ 0x68, 0x61, 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22, 0x63, 0x61,
+ 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22,
+ 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
+ 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65,
+ 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x4c, 0x61, 0x62,
+ 0x65, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70,
+ 0x61, 0x67, 0x65, 0x20, 0x63, 0x72, 0x6f, 0x70,
+ 0x20, 0x73, 0x75, 0x62, 0x6d, 0x65, 0x6e, 0x75,
+ 0x22, 0x3e, 0x5f, 0x43, 0x72, 0x6f, 0x70, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e,
+ 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x20, 0x74,
+ 0x79, 0x70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 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22,
+ 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79,
+ 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x52, 0x61,
+ 0x64, 0x69, 0x6f, 0x20, 0x62, 0x75, 0x74, 0x74,
+ 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63,
+ 0x72, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x20,
+ 0x70, 0x61, 0x67, 0x65, 0x20, 0x74, 0x6f, 0x20,
+ 0x41, 0x34, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x22,
+ 0x3e, 0x41, 0x5f, 0x34, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
+ 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72,
+ 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 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 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x3d, 0x22, 0x52, 0x61, 0x64, 0x69,
+ 0x6f, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
+ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x72, 0x6f,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61,
+ 0x67, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x41, 0x35,
+ 0x20, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3e, 0x41,
+ 0x5f, 0x35, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65,
+ 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69,
+ 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x64, 0x72, 0x61, 0x77, 0x5f,
+ 0x61, 0x73, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x6f,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x3e,
+ 0x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 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62,
+ 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66,
+ 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61,
+ 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61,
+ 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x3d, 0x22, 0x52, 0x61, 0x64, 0x69, 0x6f, 0x20,
+ 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x20, 0x66,
+ 0x6f, 0x72, 0x20, 0x63, 0x72, 0x6f, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61, 0x67, 0x65,
+ 0x20, 0x74, 0x6f, 0x20, 0x41, 0x36, 0x20, 0x73,
+ 0x69, 0x7a, 0x65, 0x22, 0x3e, 0x41, 0x5f, 0x36,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
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 0x3e,
+ 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61,
+ 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
+ 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x3d, 0x22, 0x52, 0x61, 0x64, 0x69,
+ 0x6f, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
+ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x72, 0x6f,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61,
+ 0x67, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x55, 0x53,
+ 0x20, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x20,
+ 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3e, 0x5f, 0x4c,
+ 0x65, 0x74, 0x74, 0x65, 0x72, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65,
+ 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74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x6e, 0x73, 0x6c, 0x61, 0x74, 0x61,
+ 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
+ 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x3d, 0x22, 0x52, 0x61, 0x64, 0x69,
+ 0x6f, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
+ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x72, 0x6f,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f,
+ 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x74, 0x6f,
+ 0x20, 0x55, 0x53, 0x20, 0x6c, 0x65, 0x67, 0x61,
+ 0x6c, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3e,
+ 0x4c, 0x65, 0x5f, 0x67, 0x61, 0x6c, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64,
+ 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e,
+ 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x64,
+ 0x72, 0x61, 0x77, 0x5f, 0x61, 0x73, 0x5f, 0x72,
+ 0x61, 0x64, 0x69, 0x6f, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 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 0x6e, 0x75, 0x49, 0x74, 0x65, 0x6d, 0x22,
+ 0x20, 0x69, 0x64, 0x3d, 0x22, 0x66, 0x6f, 0x75,
+ 0x72, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x69, 0x78,
+ 0x5f, 0x6d, 0x65, 0x6e, 0x75, 0x69, 0x74, 0x65,
+ 0x6d, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62,
+ 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66,
+ 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61,
+ 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61,
+ 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x3d, 0x22, 0x52, 0x61, 0x64, 0x69, 0x6f, 0x20,
+ 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6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74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73,
+ 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e,
+ 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e,
+ 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61,
+ 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
+ 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x3d, 0x22, 0x52, 0x61, 0x64, 0x69,
+ 0x6f, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
+ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x72, 0x6f,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f,
+ 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20,
+ 0x70, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69, 0x7a,
+ 0x65, 0x22, 0x3e, 0x5f, 0x43, 0x75, 0x73, 0x74,
+ 0x6f, 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0x69, 0x74, 0x69, 0x76, 0x65,
+ 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f,
+ 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c,
+ 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62,
+ 0x65, 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65,
+ 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d,
+ 0x22, 0x4d, 0x65, 0x6e, 0x75, 0x20, 0x69, 0x74,
+ 0x65, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x6f,
+ 0x74, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x63, 0x72, 0x6f, 0x70, 0x20, 0x61, 0x72,
+ 0x65, 0x61, 0x22, 0x3e, 0x5f, 0x52, 0x6f, 0x74,
+ 0x61, 0x74, 0x65, 0x20, 0x43, 0x72, 0x6f, 0x70,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+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, 0x73,
+ 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x3d, 0x22, 0x4d, 0x65, 0x6e, 0x75,
+ 0x20, 0x69, 0x74, 0x65, 0x6d, 0x20, 0x74, 0x6f,
+ 0x20, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74,
+ 0x65, 0x64, 0x20, 0x70, 0x61, 0x67, 0x65, 0x20,
+ 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c,
+ 0x65, 0x66, 0x74, 0x22, 0x3e, 0x4d, 0x6f, 0x76,
+ 0x65, 0x20, 0x4c, 0x65, 0x66, 0x74, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65,
+ 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x6b, 0x65,
+ 0x79, 0x3d, 0x22, 0x6c, 0x65, 0x73, 0x73, 0x22,
+ 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3d,
+ 0x22, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74,
+ 0x65, 0x22, 0x2f, 0x3e, 0x3c, 0x73, 0x69, 0x67,
+ 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61,
+ 0x74, 0x65, 0x22, 0x20, 0x68, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x72, 0x3d, 0x22, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x6c,
+ 0x65, 0x66, 0x74, 0x5f, 0x6d, 0x65, 0x6e, 0x75,
+ 0x69, 0x74, 0x65, 0x6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6c,
+ 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62,
+ 0x65, 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65,
+ 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d,
+ 0x22, 0x4d, 0x65, 0x6e, 0x75, 0x20, 0x69, 0x74,
+ 0x65, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x6f,
+ 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73,
+ 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20,
+ 0x70, 0x61, 0x67, 0x65, 0x20, 0x74, 0x6f, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x72, 0x69, 0x67, 0x68,
+ 0x74, 0x22, 0x3e, 0x4d, 0x6f, 0x76, 0x65, 0x20,
+ 0x52, 0x69, 0x67, 0x68, 0x74, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65,
+ 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79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 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x73,
+ 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x61, 0x63,
+ 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f,
+ 0x72, 0x20, 0x6b, 0x65, 0x79, 0x3d, 0x22, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x20, 0x73,
+ 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x3d, 0x22, 0x61,
+ 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22,
+ 0x2f, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x22, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65,
+ 0x72, 0x3d, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6d,
+ 0x65, 0x6e, 0x75, 0x69, 0x74, 0x65, 0x6d, 0x5f,
+ 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x5f, 0x63, 0x62, 0x22, 0x20, 0x73, 0x77, 0x61,
+ 0x70, 0x70, 0x65, 0x64, 0x3d, 0x22, 0x6e, 0x6f,
+ 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68,
+ 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x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0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x6d,
+ 0x61, 0x67, 0x65, 0x22, 0x3e, 0x68, 0x65, 0x6c,
+ 0x70, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x74,
+ 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x46, 0x61, 0x6c,
+ 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x61, 0x63,
+ 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f,
+ 0x72, 0x20, 0x6b, 0x65, 0x79, 0x3d, 0x22, 0x46,
+ 0x31, 0x22, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x3d, 0x22, 0x61, 0x63, 0x74, 0x69, 0x76,
+ 0x61, 0x74, 0x65, 0x22, 0x2f, 0x3e, 0x3c, 0x73,
+ 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x63, 0x74, 0x69,
+ 0x76, 0x61, 0x74, 0x65, 0x22, 0x20, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x3d, 0x22, 0x68,
+ 0x65, 0x6c, 0x70, 0x5f, 0x63, 0x6f, 0x6e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76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63,
+ 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f,
+ 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e,
+ 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x74,
+ 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x54, 0x72, 0x75,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x73, 0x69, 0x67,
+ 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61,
+ 0x74, 0x65, 0x22, 0x20, 0x68, 0x61, 0x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, 0x72, 0x20, 0x62, 0x75, 0x74,
+ 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x53, 0x63, 0x61,
+ 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67,
+ 0x6c, 0x65, 0x20, 0x70, 0x61, 0x67, 0x65, 0x20,
+ 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x69, 0x73, 0x5f, 0x69, 0x6d,
+ 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61,
+ 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
+ 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x3d, 0x22, 0x4c, 0x61, 0x62, 0x65,
+ 0x6c, 0x20, 0x6f, 0x6e, 0x20, 0x73, 0x63, 0x61,
+ 0x6e, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x62, 0x61,
+ 0x72, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x3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 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69,
+ 0x70, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
+ 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65,
+ 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x54, 0x6f, 0x6f,
+ 0x6c, 0x74, 0x69, 0x70, 0x20, 0x66, 0x6f, 0x72,
+ 0x20, 0x73, 0x61, 0x76, 0x65, 0x20, 0x74, 0x6f,
+ 0x6f, 0x6c, 0x62, 0x61, 0x72, 0x20, 0x62, 0x75,
+ 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x53, 0x61,
+ 0x76, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,
+ 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x61,
+ 0x20, 0x66, 0x69, 0x6c, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x69, 0x73, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72,
+ 0x74, 0x61, 0x6e, 0x74, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22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0x74,
+ 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c,
+ 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22,
+ 0x79, 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x54,
+ 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x20, 0x66,
+ 0x6f, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x70, 0x20,
+ 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e,
+ 0x53, 0x74, 0x6f, 0x70, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
+ 0x20, 0x73, 0x63, 0x61, 0x6e, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61,
+ 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
+ 0x22, 0x3e, 0x53, 0x74, 0x6f, 0x70, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64,
+ 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e,
+ 0x54, 0x72, 0x75, 0x65,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+ 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x54, 0x6f,
+ 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x20, 0x66, 0x6f,
+ 0x72, 0x20, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65,
+ 0x20, 0x6c, 0x65, 0x66, 0x74, 0x20, 0x28, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x63,
+ 0x6c, 0x6f, 0x63, 0x6b, 0x77, 0x69, 0x73, 0x65,
+ 0x29, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
+ 0x22, 0x3e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x67,
+ 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x6c, 0x65, 0x66, 0x74, 0x20, 0x28, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x63,
+ 0x6c, 0x6f, 0x63, 0x6b, 0x77, 0x69, 0x73, 0x65,
+ 0x29, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d,
+ 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22,
+ 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x6f, 0x6e,
+ 0x20, 0x72, 0x6f, 0x74, 0x61,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61,
+ 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x3d, 0x22, 0x54, 0x6f, 0x6f, 0x6c, 0x74, 0x69,
+ 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x6f,
+ 0x74, 0x61, 0x74, 0x65, 0x20, 0x72, 0x69, 0x67,
+ 0x68, 0x74, 0x20, 0x28, 0x63, 0x6c, 0x6f, 0x63,
+ 0x6b, 0x77, 0x69, 0x73, 0x65, 0x29, 0x20, 0x62,
+ 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x52,
+ 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x74,
+ 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x69,
+ 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x77, 0x69, 0x73, 0x65, 0x29, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22,
+ 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79,
+ 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x4c, 0x61,
+ 0x62, 0x65, 0x6c, 0x20, 0x6f, 0x6e, 0x20, 0x72,
+ 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x70, 0x61,
+ 0x67, 0x65, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74,
+ 0x20, 0x28, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x77,
+ 0x69, 0x73, 0x65, 0x29, 0x20, 0x69, 0x74, 0x65,
+ 0x6d, 0x22, 0x3e, 0x52, 0x6f, 0x74, 0x61, 0x74,
+ 0x65, 0x20, 0x52, 0x69, 0x67, 0x68, 0x74, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e,
+ 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x22, 0x3e, 0x6f, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x2d, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65,
+ 0x2d, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63,
+ 0x6c, 0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+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
+ 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65,
+ 0x73, 0x22, 0x3e, 0x43, 0x72, 0x6f, 0x70, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x6c, 0x65,
+ 0x63, 0x74, 0x65, 0x64, 0x20, 0x70, 0x61, 0x67,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x73, 0x5f, 0x69,
+ 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
+ 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65,
+ 0x73, 0x22, 0x3e, 0x43, 0x72, 0x6f, 0x70, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e,
+ 0x64, 0x65, 0x72, 0x6c, 0x69, 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
+ 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22,
+ 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x62, 0x75, 0x74,
+ 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73,
+ 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x46, 0x61,
+ 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f,
+ 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x65,
+ 0x78, 0x74, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65,
+ 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d,
+ 0x22, 0x54, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70,
+ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x74, 0x6f,
+ 0x70, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
+ 0x22, 0x3e, 0x53, 0x74, 0x6f, 0x70, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65,
+ 0x6e, 0x74, 0x20, 0x73, 0x63, 0x61, 0x6e, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 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, 0x73, 0x6c, 0x61, 0x74, 0x61,
+ 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
+ 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x3d, 0x22, 0x54, 0x6f, 0x6f, 0x6c,
+ 0x74, 0x69, 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20,
+ 0x73, 0x63, 0x61, 0x6e, 0x20, 0x74, 0x6f, 0x6f,
+ 0x6c, 0x62, 0x61, 0x72, 0x20, 0x62, 0x75, 0x74,
+ 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x53, 0x63, 0x61,
+ 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67,
+ 0x6c, 0x65, 0x20, 0x70, 0x61, 0x67, 0x65, 0x20,
+ 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c,
+ 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22,
+ 0x79, 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x4c,
+ 0x61, 0x62, 0x65, 0x6c, 0x20, 0x6f, 0x6e, 0x20,
+ 0x73, 0x63, 0x61, 0x6e, 0x20, 0x74, 0x6f, 0x6f,
+ 0x6c, 0x62, 0x61, 0x72, 0x20, 0x69, 0x74, 0x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, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76,
+ 0x65, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66,
+ 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61,
+ 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f,
+ 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x65,
+ 0x78, 0x74, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65,
+ 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d,
+ 0x22, 0x54, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70,
+ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x61, 0x76,
+ 0x65, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x62, 0x61,
+ 0x72, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
+ 0x22, 0x3e, 0x53, 0x61, 0x76, 0x65, 0x20, 0x64,
+ 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20,
+ 0x74, 0x6f, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f,
+ 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e,
+ 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61,
+ 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x22,
+ 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72,
+ 0x3d, 0x22, 0x73, 0x61, 0x76, 0x65, 0x5f, 0x66,
+ 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x75, 0x74, 0x74,
+ 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x69, 0x63, 0x6b,
+ 0x65, 0x64, 0x5f, 0x63, 0x62, 0x22, 0x20, 0x73,
+ 0x77, 0x61, 0x70, 0x70, 0x65, 0x64, 0x3d, 0x22,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x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69,
+ 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f,
+ 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46,
+ 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74,
+ 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x74,
+ 0x65, 0x78, 0x74, 0x22, 0x20, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x3d, 0x22, 0x54, 0x6f, 0x6f, 0x6c, 0x74, 0x69,
+ 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x65,
+ 0x77, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
+ 0x6e, 0x74, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f,
+ 0x6e, 0x22, 0x3e, 0x53, 0x74, 0x61, 0x72, 0x74,
+ 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x64,
+ 0x6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 0x69, 0x62, 0x6c, 0x65,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63,
+ 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x6f, 0x6c,
+ 0x74, 0x69, 0x70, 0x5f, 0x74, 0x65, 0x78, 0x74,
+ 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c,
+ 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22,
+ 0x79, 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x54,
+ 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x20, 0x66,
+ 0x6f, 0x72, 0x20, 0x72, 0x6f, 0x74, 0x61, 0x74,
+ 0x65, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20,
+ 0x28, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x77, 0x69,
+ 0x73, 0x65, 0x29, 0x20, 0x62, 0x75, 0x74, 0x74,
+ 0x6f, 0x6e, 0x22, 0x3e, 0x52, 0x6f, 0x74, 0x61,
+ 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70,
+ 0x61, 0x67, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74,
+ 0x20, 0x28, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x77,
+ 0x69, 0x73, 0x65, 0x29, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
+ 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72,
+ 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x73, 0x69,
+ 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x63, 0x6c, 0x69, 0x63, 0x6b,
+ 0x65, 0x64, 0x22, 0x20, 0x68, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x72, 0x3d, 0x22, 0x72, 0x6f, 0x74,
+ 0x61, 0x74, 0x65, 0x5f, 0x72, 0x69, 0x67, 0x68,
+ 0x74, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
+ 0x5f, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x65, 0x64,
+ 0x5f, 0x63, 0x62, 0x22, 0x20, 0x73, 0x77, 0x61,
+ 0x70, 0x70, 0x65, 0x64, 0x3d, 0x22, 0x6e, 0x6f,
+ 0x22, 0x2f, 0x3e, 0x3c, 0x73, 0x74, 0x79, 0x6c,
+ 0x65, 0x3e, 0x3c, 0x63, 0x6c, 0x61, 0x73, 0x73,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3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22, 0x20, 0x69, 0x64, 0x3d, 0x22,
+ 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6c,
+ 0x65, 0x66, 0x74, 0x5f, 0x62, 0x75, 0x74, 0x74,
+ 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69,
+ 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f,
+ 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46,
+ 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74,
+ 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x74,
+ 0x65, 0x78, 0x74, 0x22, 0x20, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x3d, 0x22, 0x54, 0x6f, 0x6f, 0x6c, 0x74, 0x69,
+ 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x6f,
+ 0x74, 0x61, 0x74, 0x65, 0x20, 0x6c, 0x65, 0x66,
+ 0x74, 0x20, 0x28, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x65, 0x72, 0x2d, 0x63, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x77, 0x69, 0x73, 0x65, 0x29, 0x20, 0x62, 0x75,
+ 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x52, 0x6f,
+ 0x74, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x74, 0x6f,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x66,
+ 0x74, 0x20, 0x28, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x65, 0x72, 0x2d, 0x63, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x77, 0x69, 0x73, 0x65, 0x29, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65,
+ 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x73,
+ 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x6c, 0x69, 0x63,
+ 0x6b, 0x65, 0x64, 0x22, 0x20, 0x68, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x72, 0x3d, 0x22, 0x72, 0x6f,
+ 0x74, 0x61, 0x74, 0x65, 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0x6c, 0x65, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61,
+ 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22,
+ 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70,
+ 0x5f, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61,
+ 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
+ 0x22, 0x3e, 0x43, 0x72, 0x6f, 0x70, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63,
+ 0x74, 0x65, 0x64, 0x20, 0x70, 0x61, 0x67, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75,
+ 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+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,
+ 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x62,
+ 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x77, 0x69,
+ 0x64, 0x74, 0x68, 0x22, 0x3e, 0x37, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x20,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
+ 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65,
+ 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x54, 0x69, 0x74,
+ 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
+ 0x73, 0x20, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67,
+ 0x22, 0x3e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72,
+ 0x65, 0x6e, 0x63, 0x65, 0x73, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x72, 0x65, 0x73, 0x69, 0x7a,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 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x63,
+ 0x65, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x64, 0x65,
+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73,
+ 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e,
+ 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64,
+ 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x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 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65,
+ 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d,
+ 0x22, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x62,
+ 0x65, 0x73, 0x69, 0x64, 0x65, 0x20, 0x73, 0x63,
+ 0x61, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x6f, 0x20,
+ 0x62, 0x6f, 0x78, 0x22, 0x3e, 0x53, 0x63, 0x61,
+ 0x6e, 0x20, 0x53, 0x5f, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x3a, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65,
+ 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69,
+ 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x6d, 0x6e, 0x65, 0x6d, 0x6f,
+ 0x6e, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x64, 0x67,
+ 0x65, 0x74, 0x22, 0x3e, 0x64, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x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3d, 0x22, 0x47, 0x74, 0x6b,
+ 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x69,
+ 0x64, 0x3d, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x73, 0x69, 0x64, 0x65, 0x5f, 0x6c, 0x61, 0x62,
+ 0x65, 0x6c, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69,
+ 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f,
+ 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46,
+ 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x78,
+ 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x22, 0x3e, 0x30,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c,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0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63,
+ 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73,
+ 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x78, 0x61, 0x6c, 0x69,
+ 0x67, 0x6e, 0x22, 0x3e, 0x30, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61,
+ 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73,
+ 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x3d, 0x22, 0x4c, 0x61, 0x62, 0x65,
+ 0x6c, 0x20, 0x62, 0x65, 0x73, 0x69, 0x64, 0x65,
+ 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x73, 0x69,
+ 0x7a, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x6f,
+ 0x20, 0x62, 0x6f, 0x78, 0x22, 0x3e, 0x50, 0x61,
+ 0x67, 0x65, 0x20, 0x53, 0x69, 0x7a, 0x65, 0x3a,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,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 0x73, 0x73, 0x3d, 0x22,
+ 0x47, 0x74, 0x6b, 0x4c, 0x61, 0x62, 0x65, 0x6c,
+ 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62, 0x72,
+ 0x69, 0x67, 0x68, 0x74, 0x6e, 0x65, 0x73, 0x73,
+ 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75,
+ 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x78, 0x61, 0x6c, 0x69, 0x67,
+ 0x6e, 0x22, 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c,
+ 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62,
+ 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22,
+ 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x3d, 0x22, 0x4c, 0x61, 0x62, 0x65, 0x6c,
+ 0x20, 0x62, 0x65, 0x73, 0x69, 0x64, 0x65, 0x20,
+ 0x62, 0x72, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x65,
+ 0x73, 0x73, 0x20, 0x73, 0x63, 0x61, 0x6c, 0x65,
+ 0x22, 0x3e, 0x42, 0x72, 0x69, 0x67, 0x68, 0x74,
+ 0x6e, 0x65, 0x73, 0x73, 0x3a, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65,
+ 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f,
+ 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c,
+ 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x61, 0x74, 0x74,
+ 0x61, 0x63, 0x68, 0x22, 0x3e, 0x30, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65,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 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75,
+ 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x68, 0x65, 0x78, 0x70, 0x61, 0x6e,
+ 0x64, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74,
+ 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x62, 0x72,
+ 0x69, 0x67, 0x68, 0x74, 0x6e, 0x65, 0x73, 0x73,
+ 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x6d,
+ 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x70,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46, 0x61, 0x6c,
+ 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x78, 0x61, 0x6c,
+ 0x69, 0x67, 0x6e, 0x22, 0x3e, 0x30, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
+ 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65,
+ 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x4c, 0x61, 0x62,
+ 0x65, 0x6c, 0x20, 0x62, 0x65, 0x73, 0x69, 0x64,
+ 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61,
+ 0x73, 0x74, 0x20, 0x73, 0x63, 0x61, 0x6c, 0x65,
+ 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61,
+ 0x73, 0x74, 0x3a, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73,
+ 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c,
+ 0x69, 0x6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0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61,
+ 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x68, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x6d, 0x65,
+ 0x6e, 0x74, 0x22, 0x3e, 0x63, 0x6f, 0x6e, 0x74,
+ 0x72, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x6a,
+ 0x75, 0x73, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3e, 0x46, 0x61,
+ 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e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 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d,
+ 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22,
+ 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x62, 0x65,
+ 0x73, 0x69, 0x64, 0x65, 0x20, 0x71, 0x75, 0x61,
+ 0x6c, 0x69, 0x74, 0x79, 0x20, 0x73, 0x63, 0x61,
+ 0x6c, 0x65, 0x22, 0x3e, 0x51, 0x75, 0x61, 0x6c,
+ 0x69, 0x74, 0x79, 0x3a, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
+ 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72,
+ 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72,
+ 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x6e, 0x65,
+ 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x77, 0x69,
+ 0x64, 0x67, 0x65, 0x74, 0x22, 0x3e, 0x71, 0x75,
+ 0x61, 0x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x6c, 0x61, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x3d, 0x22, 0x54, 0x6f, 0x6f, 0x6c, 0x62, 0x61,
+ 0x72, 0x20, 0x73, 0x63, 0x61, 0x6e, 0x20, 0x6d,
+ 0x65, 0x6e, 0x75, 0x20, 0x69, 0x74, 0x65, 0x6d,
+ 0x20, 0x74, 0x6f, 0x20, 0x73, 0x63, 0x61, 0x6e,
+ 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c,
+ 0x65, 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x66,
+ 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x22,
+ 0x3e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20,
+ 0x5f, 0x50, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65,
+ 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x73,
+ 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x63, 0x74, 0x69,
+ 0x76, 0x61, 0x74, 0x65, 0x22, 0x20, 0x68, 0x61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 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63,
+ 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73,
+ 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22,
+ 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79,
+ 0x65, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x65, 0x6e, 0x74, 0x73, 0x3d, 0x22, 0x54, 0x6f,
+ 0x6f, 0x6c, 0x62, 0x61, 0x72, 0x20, 0x73, 0x63,
+ 0x61, 0x6e, 0x20, 0x6d, 0x65, 0x6e, 0x75, 0x20,
+ 0x69, 0x74, 0x65, 0x6d, 0x20, 0x74, 0x6f, 0x20,
+ 0x73, 0x63, 0x61, 0x6e, 0x20, 0x61, 0x6c, 0x6c,
+ 0x20, 0x70, 0x61, 0x67, 0x65, 0x73, 0x20, 0x66,
+ 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x64, 0x6f,
+ 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x66,
+ 0x65, 0x65, 0x64, 0x65, 0x72, 0x22, 0x3e, 0x41,
+ 0x6c, 0x6c, 0x20, 0x50, 0x61, 0x67, 0x65, 0x73,
+ 0x20, 0x46, 0x72, 0x6f, 0x6d, 0x20, 0x5f, 0x46,
+ 0x65, 0x65, 0x64, 0x65, 0x72, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 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 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75,
+ 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x73, 0x5f,
+ 0x72, 0x61, 0x64, 0x69, 0x6f, 0x22, 0x3e, 0x54,
+ 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x22, 0x3e, 0x74, 0x65, 0x78,
+ 0x74, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x65, 0x6e, 0x75, 0x69, 0x74, 0x65,
+ 0x6d, 0x3c, 0x2f, 0x70, 0x72, 0x6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20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f,
+ 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c,
+ 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62,
+ 0x65, 0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65,
+ 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x20, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3d,
+ 0x22, 0x54, 0x6f, 0x6f, 0x6c, 0x62, 0x61, 0x72,
+ 0x20, 0x73, 0x63, 0x61, 0x6e, 0x20, 0x6d, 0x65,
+ 0x6e, 0x75, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x20,
+ 0x74, 0x6f, 0x20, 0x73, 0x63, 0x61, 0x6e, 0x20,
+ 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65,
+ 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x66, 0x72,
+ 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73,
+ 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x3e,
+ 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x5f,
+ 0x50, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+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x61,
+ 0x6c, 0x6c, 0x20, 0x70, 0x61, 0x67, 0x65, 0x73,
+ 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20,
+ 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
+ 0x20, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x22,
+ 0x3e, 0x41, 0x6c, 0x6c, 0x20, 0x50, 0x61, 0x67,
+ 0x65, 0x73, 0x20, 0x46, 0x72, 0x6f, 0x6d, 0x20,
+ 0x5f, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x3c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65,
+ 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e,
+ 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x63,
+ 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x20,
+ 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x3d,
+ 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75,
+ 0x6f, 0x75, 0x73, 0x5f, 0x73, 0x63, 0x61, 0x6e,
+ 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x5f,
+ 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x5f,
+ 0x63, 0x62, 0x22, 0x20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6c, 0x61, 0x62, 0x65, 0x6c, 0x22,
+ 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79,
+ 0x65, 0x73, 0x22, 0x3e, 0x54, 0x65, 0x78, 0x74,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75,
+ 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x73,
+ 0x5f, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x22, 0x3e,
+ 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c,
+ 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x67,
+ 0x67, 0x6c, 0x65, 0x64, 0x22, 0x20, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x3d, 0x22, 0x74,
+ 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x65, 0x6e, 0x75,
+ 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x6f, 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 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74,
+ 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65,
+ 0x73, 0x22, 0x3e, 0x50, 0x68, 0x6f, 0x74, 0x6f,
+ 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d,
+ 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75,
+ 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65,
+ 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
+ 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
+ 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x22, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22,
+ 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70,
+ 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e,
+ 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22,
+ 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x73,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 0x3e, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65,
+ 0x72, 0x66, 0x61, 0x63, 0x65, 0x3e, 0x0a, 0x00,
+ 0x00, 0x28, 0x75, 0x75, 0x61, 0x79, 0x29
+} };
+
+static GStaticResource static_resource = { simple_scan_resource_data.data, sizeof (simple_scan_resource_data.data), NULL, NULL, NULL };
+extern GResource *simple_scan_get_resource (void);
+GResource *simple_scan_get_resource (void)
+{
+ return g_static_resource_get_resource (&static_resource);
+}
+/*
+ If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and
+ destructors, in a sane way, including e.g. on library unload. If not you're on
+ your own.
+
+ Some compilers need #pragma to handle this, which does not work with macros,
+ so the way you need to use this is (for constructors):
+
+ #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
+ #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)
+ #endif
+ G_DEFINE_CONSTRUCTOR(my_constructor)
+ static void my_constructor(void) {
+ ...
+ }
+
+*/
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+
+#define G_HAS_CONSTRUCTORS 1
+
+#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);
+#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);
+
+#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
+/* Visual studio 2008 and later has _Pragma */
+
+#define G_HAS_CONSTRUCTORS 1
+
+#define G_DEFINE_CONSTRUCTOR(_func) \
+ static void _func(void); \
+ static int _func ## _wrapper(void) { _func(); return 0; } \
+ __pragma(section(".CRT$XCU",read)) \
+ __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _wrapper;
+
+#define G_DEFINE_DESTRUCTOR(_func) \
+ static void _func(void); \
+ static int _func ## _constructor(void) { atexit (_func); return 0; } \
+ __pragma(section(".CRT$XCU",read)) \
+ __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;
+
+#elif defined (_MSC_VER)
+
+#define G_HAS_CONSTRUCTORS 1
+
+/* Pre Visual studio 2008 must use #pragma section */
+#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
+#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
+
+#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
+ section(".CRT$XCU",read)
+#define G_DEFINE_CONSTRUCTOR(_func) \
+ static void _func(void); \
+ static int _func ## _wrapper(void) { _func(); return 0; } \
+ __declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper;
+
+#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
+ section(".CRT$XCU",read)
+#define G_DEFINE_DESTRUCTOR(_func) \
+ static void _func(void); \
+ static int _func ## _constructor(void) { atexit (_func); return 0; } \
+ __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;
+
+#elif defined(__SUNPRO_C)
+
+/* This is not tested, but i believe it should work, based on:
+ * http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c
+ */
+
+#define G_HAS_CONSTRUCTORS 1
+
+#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
+#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
+
+#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
+ init(_func)
+#define G_DEFINE_CONSTRUCTOR(_func) \
+ static void _func(void);
+
+#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
+ fini(_func)
+#define G_DEFINE_DESTRUCTOR(_func) \
+ static void _func(void);
+
+#else
+
+/* constructors not supported for this compiler */
+
+#endif
+
+
+#ifdef G_HAS_CONSTRUCTORS
+
+#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
+#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(resource_constructor)
+#endif
+G_DEFINE_CONSTRUCTOR(resource_constructor)
+#ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA
+#pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(resource_destructor)
+#endif
+G_DEFINE_DESTRUCTOR(resource_destructor)
+
+#else
+#warning "Constructor not supported on this compiler, linking in resources will not work"
+#endif
+
+static void resource_constructor (void)
+{
+ g_static_resource_init (&static_resource);
+}
+
+static void resource_destructor (void)
+{
+ g_static_resource_fini (&static_resource);
+}
diff --git a/src/sane.vapi b/src/sane.vapi
new file mode 100644
index 0000000..aa3d90c
--- /dev/null
+++ b/src/sane.vapi
@@ -0,0 +1,754 @@
+[CCode (cprefix = "SANE_", lower_case_cprefix = "sane_", cheader_filename = "sane/sane.h")]
+namespace Sane {
+ [SimpleType]
+ [BooleanType]
+ public struct Bool
+ {
+ }
+
+ [SimpleType]
+ [IntegerType (rank = 9)]
+ public struct Int
+ {
+ }
+
+ [SimpleType]
+ [IntegerType (rank = 9)]
+ public struct Fixed
+ {
+ }
+
+ [SimpleType]
+ [IntegerType (rank = 9)]
+ public struct Word
+ {
+ }
+
+ [CCode (ref_function = "", unref_function = "")]
+ public class Device
+ {
+ public string name;
+ public string vendor;
+ public string model;
+ public string type;
+ }
+
+ public enum Status
+ {
+ GOOD,
+ UNSUPPORTED,
+ CANCELLED,
+ DEVICE_BUSY,
+ INVAL,
+ EOF,
+ JAMMED,
+ NO_DOCS,
+ COVER_OPEN,
+ IO_ERROR,
+ NO_MEM,
+ ACCESS_DENIED
+ }
+
+ public static string status_to_string (Status status)
+ {
+ switch (status)
+ {
+ case Status.GOOD:
+ return "SANE_STATUS_GOOD";
+ case Status.UNSUPPORTED:
+ return "SANE_STATUS_UNSUPPORTED";
+ case Status.CANCELLED:
+ return "SANE_STATUS_CANCELLED";
+ case Status.DEVICE_BUSY:
+ return "SANE_STATUS_DEVICE_BUSY";
+ case Status.INVAL:
+ return "SANE_STATUS_INVAL";
+ case Status.EOF:
+ return "SANE_STATUS_EOF";
+ case Status.JAMMED:
+ return "SANE_STATUS_JAMMED";
+ case Status.NO_DOCS:
+ return "SANE_STATUS_NO_DOCS";
+ case Status.COVER_OPEN:
+ return "SANE_STATUS_COVER_OPEN";
+ case Status.IO_ERROR:
+ return "SANE_STATUS_IO_ERROR";
+ case Status.NO_MEM:
+ return "SANE_STATUS_NO_MEM";
+ case Status.ACCESS_DENIED:
+ return "SANE_STATUS_ACCESS_DENIED";
+ default:
+ return "SANE_STATUS(%d)".printf (status);
+ }
+ }
+
+ public enum Action
+ {
+ GET_VALUE,
+ SET_VALUE,
+ SET_AUTO
+ }
+
+ public enum Frame
+ {
+ GRAY,
+ RGB,
+ RED,
+ GREEN,
+ BLUE
+ }
+
+ public static string frame_to_string (Frame frame)
+ {
+ switch (frame)
+ {
+ case Frame.GRAY:
+ return "SANE_FRAME_GRAY";
+ case Frame.RGB:
+ return "SANE_FRAME_RGB";
+ case Frame.RED:
+ return "SANE_FRAME_RED";
+ case Frame.GREEN:
+ return "SANE_FRAME_GREEN";
+ case Frame.BLUE:
+ return "SANE_FRAME_BLUE";
+ default:
+ return "SANE_FRAME(%d)".printf (frame);
+ }
+ }
+
+ public struct Parameters
+ {
+ Frame format;
+ bool last_frame;
+ int bytes_per_line;
+ int pixels_per_line;
+ int lines;
+ int depth;
+ }
+
+ [CCode (cname = "SANE_MAX_USERNAME_LEN")]
+ public int MAX_USERNAME_LEN;
+
+ [CCode (cname = "SANE_MAX_USERNAME_LEN")]
+ public int MAX_PASSWORD_LEN;
+
+ [CCode (cname = "SANE_Value_Type", cprefix = "SANE_TYPE_")]
+ public enum ValueType
+ {
+ BOOL,
+ INT,
+ FIXED,
+ STRING,
+ BUTTON,
+ GROUP
+ }
+
+ public enum Unit
+ {
+ NONE,
+ PIXEL,
+ BIT,
+ MM,
+ DPI,
+ PERCENT,
+ MICROSECOND
+ }
+
+ [CCode (cname = "SANE_Constraint_Type", cprefix = "SANE_CONSTRAINT_")]
+ public enum ConstraintType
+ {
+ NONE,
+ RANGE,
+ WORD_LIST,
+ STRING_LIST
+ }
+
+ public class Range
+ {
+ public Word min;
+ public Word max;
+ public Word quant;
+ }
+
+ [CCode (cprefix = "SANE_CAP_")]
+ public enum Capability
+ {
+ SOFT_SELECT,
+ HARD_SELECT,
+ SOFT_DETECT,
+ EMULATED,
+ AUTOMATIC,
+ INACTIVE,
+ ADVANCED
+ }
+
+ [CCode (cname = "SANE_Option_Descriptor", ref_function = "", unref_function = "")]
+ public class OptionDescriptor
+ {
+ public unowned string name;
+ public unowned string title;
+ public unowned string desc;
+ public ValueType type;
+ public Unit unit;
+ public Int size;
+ public Int cap;
+
+ public ConstraintType constraint_type;
+ [CCode (cname = "constraint.string_list", array_length = false, null_terminated = true)]
+ public string[] string_list;
+ [CCode (cname = "constraint.word_list", array_length = false)]
+ public Word[] word_list;
+ [CCode (cname = "constraint.range")]
+ public Range range;
+ }
+
+ [CCode (type = "Int", cprefix = "SANE_INFO_")]
+ public enum Info
+ {
+ INEXACT,
+ RELOAD_OPTIONS,
+ RELOAD_PARAMS
+ }
+
+ [SimpleType]
+ public struct Handle
+ {
+ }
+
+ [CCode (has_target = false)]
+ public delegate void AuthCallback (string resource, [CCode (array_length = false)] char[] username, [CCode (array_length = false)] char[] password);
+
+ [CCode (cname = "SANE_VERSION_MAJOR")]
+ public int VERSION_MAJOR (Int code);
+ [CCode (cname = "SANE_VERSION_MINOR")]
+ public int VERSION_MINOR (Int code);
+ [CCode (cname = "SANE_VERSION_BUILD")]
+ public int VERSION_BUILD (Int code);
+
+ [CCode (cname = "SANE_FIX")]
+ public Fixed FIX (double d);
+ [CCode (cname = "SANE_UNFIX")]
+ public double UNFIX (Fixed w);
+
+ [CCode (cname = "SANE_I18N")]
+ public unowned string I18N (string value);
+
+ public Status init (out Int version_code, AuthCallback callback);
+ public void exit ();
+ public Status get_devices ([CCode (array_length = false, null_terminated = true)] out unowned Device[] device_list, bool local_only);
+ public unowned string strstatus (Status status);
+ public Status open (string devicename, out Handle handle);
+ public void close (Handle handle);
+ public unowned OptionDescriptor? get_option_descriptor (Handle handle, Int option);
+ public Status control_option (Handle handle, Int option, Action action, void *value, out Info? info = null);
+ public Status get_parameters (Handle handle, out Parameters params);
+ public Status start (Handle handle);
+ public Status read (Handle handle, uint8* data, Int max_length, out Int length);
+ public void cancel (Handle handle);
+ public Status set_io_mode (Handle handle, bool non_blocking);
+ public Status get_select_fd (Handle handle, out int fd);
+
+ [CCode (cname = "SANE_NAME_STANDARD", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_STANDARD;
+ [CCode (cname = "SANE_NAME_GEOMETRY", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_GEOMETRY;
+ [CCode (cname = "SANE_NAME_ENHANCEMENT", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_ENHANCEMENT;
+ [CCode (cname = "SANE_NAME_ADVANCED", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_ADVANCED;
+ [CCode (cname = "SANE_NAME_SENSORS", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SENSORS;
+ [CCode (cname = "SANE_NAME_PREVIEW", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_PREVIEW;
+ [CCode (cname = "SANE_NAME_GRAY_PREVIEW", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_GRAY_PREVIEW;
+ [CCode (cname = "SANE_NAME_BIT_DEPTH", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_BIT_DEPTH;
+ [CCode (cname = "SANE_NAME_SCAN_MODE", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_MODE;
+ [CCode (cname = "SANE_NAME_SCAN_SPEED", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_SPEED;
+ [CCode (cname = "SANE_NAME_SCAN_SOURCE", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_SOURCE;
+ [CCode (cname = "SANE_NAME_BACKTRACK", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_BACKTRACK;
+ [CCode (cname = "SANE_NAME_SCAN_TL_X", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_TL_X;
+ [CCode (cname = "SANE_NAME_SCAN_TL_Y", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_TL_Y;
+ [CCode (cname = "SANE_NAME_SCAN_BR_X", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_BR_X;
+ [CCode (cname = "SANE_NAME_SCAN_BR_Y", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_BR_Y;
+ [CCode (cname = "SANE_NAME_SCAN_RESOLUTION", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_RESOLUTION;
+ [CCode (cname = "SANE_NAME_SCAN_X_RESOLUTION", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_X_RESOLUTION;
+ [CCode (cname = "SANE_NAME_SCAN_Y_RESOLUTION", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_Y_RESOLUTION;
+ [CCode (cname = "SANE_NAME_PAGE_WIDTH", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_PAGE_WIDTH;
+ [CCode (cname = "SANE_NAME_PAGE_HEIGHT", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_PAGE_HEIGHT;
+ [CCode (cname = "SANE_NAME_CUSTOM_GAMMA", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_CUSTOM_GAMMA;
+ [CCode (cname = "SANE_NAME_GAMMA_VECTOR", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_GAMMA_VECTOR;
+ [CCode (cname = "SANE_NAME_GAMMA_VECTOR_R", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_GAMMA_VECTOR_R;
+ [CCode (cname = "SANE_NAME_GAMMA_VECTOR_G", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_GAMMA_VECTOR_G;
+ [CCode (cname = "SANE_NAME_GAMMA_VECTOR_B", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_GAMMA_VECTOR_B;
+ [CCode (cname = "SANE_NAME_BRIGHTNESS", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_BRIGHTNESS;
+ [CCode (cname = "SANE_NAME_CONTRAST", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_CONTRAST;
+ [CCode (cname = "SANE_NAME_GRAIN_SIZE", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_GRAIN_SIZE;
+ [CCode (cname = "SANE_NAME_HALFTONE", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_HALFTONE;
+ [CCode (cname = "SANE_NAME_BLACK_LEVEL", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_BLACK_LEVEL;
+ [CCode (cname = "SANE_NAME_WHITE_LEVEL", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_WHITE_LEVEL;
+ [CCode (cname = "SANE_NAME_WHITE_LEVEL_R", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_WHITE_LEVEL_R;
+ [CCode (cname = "SANE_NAME_WHITE_LEVEL_G", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_WHITE_LEVEL_G;
+ [CCode (cname = "SANE_NAME_WHITE_LEVEL_B", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_WHITE_LEVEL_B;
+ [CCode (cname = "SANE_NAME_SHADOW", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SHADOW;
+ [CCode (cname = "SANE_NAME_SHADOW_R", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SHADOW_R;
+ [CCode (cname = "SANE_NAME_SHADOW_G", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SHADOW_G;
+ [CCode (cname = "SANE_NAME_SHADOW_B", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SHADOW_B;
+ [CCode (cname = "SANE_NAME_HIGHLIGHT", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_HIGHLIGHT;
+ [CCode (cname = "SANE_NAME_HIGHLIGHT_R", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_HIGHLIGHT_R;
+ [CCode (cname = "SANE_NAME_HIGHLIGHT_G", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_HIGHLIGHT_G;
+ [CCode (cname = "SANE_NAME_HIGHLIGHT_B", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_HIGHLIGHT_B;
+ [CCode (cname = "SANE_NAME_HUE", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_HUE;
+ [CCode (cname = "SANE_NAME_SATURATION", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SATURATION;
+ [CCode (cname = "SANE_NAME_FILE", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_FILE;
+ [CCode (cname = "SANE_NAME_HALFTONE_DIMENSION", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_HALFTONE_DIMENSION;
+ [CCode (cname = "SANE_NAME_HALFTONE_PATTERN", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_HALFTONE_PATTERN;
+ [CCode (cname = "SANE_NAME_RESOLUTION_BIND", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_RESOLUTION_BIND;
+ [CCode (cname = "SANE_NAME_NEGATIVE", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_NEGATIVE;
+ [CCode (cname = "SANE_NAME_QUALITY_CAL", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_QUALITY_CAL;
+ [CCode (cname = "SANE_NAME_DOR", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_DOR;
+ [CCode (cname = "SANE_NAME_RGB_BIND", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_RGB_BIND;
+ [CCode (cname = "SANE_NAME_THRESHOLD", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_THRESHOLD;
+ [CCode (cname = "SANE_NAME_ANALOG_GAMMA", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_ANALOG_GAMMA;
+ [CCode (cname = "SANE_NAME_ANALOG_GAMMA_R", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_ANALOG_GAMMA_R;
+ [CCode (cname = "SANE_NAME_ANALOG_GAMMA_G", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_ANALOG_GAMMA_G;
+ [CCode (cname = "SANE_NAME_ANALOG_GAMMA_B", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_ANALOG_GAMMA_B;
+ [CCode (cname = "SANE_NAME_ANALOG_GAMMA_BIND", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_ANALOG_GAMMA_BIND;
+ [CCode (cname = "SANE_NAME_WARMUP", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_WARMUP;
+ [CCode (cname = "SANE_NAME_CAL_EXPOS_TIME", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_CAL_EXPOS_TIME;
+ [CCode (cname = "SANE_NAME_CAL_EXPOS_TIME_R", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_CAL_EXPOS_TIME_R;
+ [CCode (cname = "SANE_NAME_CAL_EXPOS_TIME_G", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_CAL_EXPOS_TIME_G;
+ [CCode (cname = "SANE_NAME_CAL_EXPOS_TIME_B", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_CAL_EXPOS_TIME_B;
+ [CCode (cname = "SANE_NAME_SCAN_EXPOS_TIME", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_EXPOS_TIME;
+ [CCode (cname = "SANE_NAME_SCAN_EXPOS_TIME_R", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_EXPOS_TIME_R;
+ [CCode (cname = "SANE_NAME_SCAN_EXPOS_TIME_G", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_EXPOS_TIME_G;
+ [CCode (cname = "SANE_NAME_SCAN_EXPOS_TIME_B", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_EXPOS_TIME_B;
+ [CCode (cname = "SANE_NAME_SELECT_EXPOSURE_TIME", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SELECT_EXPOSURE_TIME;
+ [CCode (cname = "SANE_NAME_CAL_LAMP_DEN", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_CAL_LAMP_DEN;
+ [CCode (cname = "SANE_NAME_SCAN_LAMP_DEN", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN_LAMP_DEN;
+ [CCode (cname = "SANE_NAME_SELECT_LAMP_DENSITY", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SELECT_LAMP_DENSITY;
+ [CCode (cname = "SANE_NAME_LAMP_OFF_AT_EXIT", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_LAMP_OFF_AT_EXIT;
+ [CCode (cname = "SANE_NAME_SCAN", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_SCAN;
+ [CCode (cname = "SANE_NAME_EMAIL", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_EMAIL;
+ [CCode (cname = "SANE_NAME_FAX", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_FAX;
+ [CCode (cname = "SANE_NAME_COPY", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_COPY;
+ [CCode (cname = "SANE_NAME_PDF", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_PDF;
+ [CCode (cname = "SANE_NAME_CANCEL", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_CANCEL;
+ [CCode (cname = "SANE_NAME_PAGE_LOADED", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_PAGE_LOADED;
+ [CCode (cname = "SANE_NAME_COVER_OPEN", cheader_filename = "sane/saneopts.h")]
+ public static string NAME_COVER_OPEN;
+ [CCode (cname = "SANE_TITLE_NUM_OPTIONS", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_NUM_OPTIONS;
+ [CCode (cname = "SANE_TITLE_STANDARD", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_STANDARD;
+ [CCode (cname = "SANE_TITLE_GEOMETRY", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_GEOMETRY;
+ [CCode (cname = "SANE_TITLE_ENHANCEMENT", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_ENHANCEMENT;
+ [CCode (cname = "SANE_TITLE_ADVANCED", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_ADVANCED;
+ [CCode (cname = "SANE_TITLE_SENSORS", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SENSORS;
+ [CCode (cname = "SANE_TITLE_PREVIEW", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_PREVIEW;
+ [CCode (cname = "SANE_TITLE_GRAY_PREVIEW", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_GRAY_PREVIEW;
+ [CCode (cname = "SANE_TITLE_BIT_DEPTH", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_BIT_DEPTH;
+ [CCode (cname = "SANE_TITLE_SCAN_MODE", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_MODE;
+ [CCode (cname = "SANE_TITLE_SCAN_SPEED", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_SPEED;
+ [CCode (cname = "SANE_TITLE_SCAN_SOURCE", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_SOURCE;
+ [CCode (cname = "SANE_TITLE_BACKTRACK", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_BACKTRACK;
+ [CCode (cname = "SANE_TITLE_SCAN_TL_X", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_TL_X;
+ [CCode (cname = "SANE_TITLE_SCAN_TL_Y", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_TL_Y;
+ [CCode (cname = "SANE_TITLE_SCAN_BR_X", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_BR_X;
+ [CCode (cname = "SANE_TITLE_SCAN_BR_Y", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_BR_Y;
+ [CCode (cname = "SANE_TITLE_SCAN_RESOLUTION", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_RESOLUTION;
+ [CCode (cname = "SANE_TITLE_SCAN_X_RESOLUTION", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_X_RESOLUTION;
+ [CCode (cname = "SANE_TITLE_SCAN_Y_RESOLUTION", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_Y_RESOLUTION;
+ [CCode (cname = "SANE_TITLE_PAGE_WIDTH", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_PAGE_WIDTH;
+ [CCode (cname = "SANE_TITLE_PAGE_HEIGHT", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_PAGE_HEIGHT;
+ [CCode (cname = "SANE_TITLE_CUSTOM_GAMMA", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_CUSTOM_GAMMA;
+ [CCode (cname = "SANE_TITLE_GAMMA_VECTOR", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_GAMMA_VECTOR;
+ [CCode (cname = "SANE_TITLE_GAMMA_VECTOR_R", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_GAMMA_VECTOR_R;
+ [CCode (cname = "SANE_TITLE_GAMMA_VECTOR_G", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_GAMMA_VECTOR_G;
+ [CCode (cname = "SANE_TITLE_GAMMA_VECTOR_B", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_GAMMA_VECTOR_B;
+ [CCode (cname = "SANE_TITLE_BRIGHTNESS", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_BRIGHTNESS;
+ [CCode (cname = "SANE_TITLE_CONTRAST", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_CONTRAST;
+ [CCode (cname = "SANE_TITLE_GRAIN_SIZE", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_GRAIN_SIZE;
+ [CCode (cname = "SANE_TITLE_HALFTONE", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_HALFTONE;
+ [CCode (cname = "SANE_TITLE_BLACK_LEVEL", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_BLACK_LEVEL;
+ [CCode (cname = "SANE_TITLE_WHITE_LEVEL", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_WHITE_LEVEL;
+ [CCode (cname = "SANE_TITLE_WHITE_LEVEL_R", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_WHITE_LEVEL_R;
+ [CCode (cname = "SANE_TITLE_WHITE_LEVEL_G", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_WHITE_LEVEL_G;
+ [CCode (cname = "SANE_TITLE_WHITE_LEVEL_B", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_WHITE_LEVEL_B;
+ [CCode (cname = "SANE_TITLE_SHADOW", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SHADOW;
+ [CCode (cname = "SANE_TITLE_SHADOW_R", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SHADOW_R;
+ [CCode (cname = "SANE_TITLE_SHADOW_G", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SHADOW_G;
+ [CCode (cname = "SANE_TITLE_SHADOW_B", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SHADOW_B;
+ [CCode (cname = "SANE_TITLE_HIGHLIGHT", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_HIGHLIGHT;
+ [CCode (cname = "SANE_TITLE_HIGHLIGHT_R", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_HIGHLIGHT_R;
+ [CCode (cname = "SANE_TITLE_HIGHLIGHT_G", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_HIGHLIGHT_G;
+ [CCode (cname = "SANE_TITLE_HIGHLIGHT_B", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_HIGHLIGHT_B;
+ [CCode (cname = "SANE_TITLE_HUE", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_HUE;
+ [CCode (cname = "SANE_TITLE_SATURATION", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SATURATION;
+ [CCode (cname = "SANE_TITLE_FILE", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_FILE;
+ [CCode (cname = "SANE_TITLE_HALFTONE_DIMENSION", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_HALFTONE_DIMENSION;
+ [CCode (cname = "SANE_TITLE_HALFTONE_PATTERN", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_HALFTONE_PATTERN;
+ [CCode (cname = "SANE_TITLE_RESOLUTION_BIND", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_RESOLUTION_BIND;
+ [CCode (cname = "SANE_TITLE_NEGATIVE", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_NEGATIVE;
+ [CCode (cname = "SANE_TITLE_QUALITY_CAL", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_QUALITY_CAL;
+ [CCode (cname = "SANE_TITLE_DOR", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_DOR;
+ [CCode (cname = "SANE_TITLE_RGB_BIND", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_RGB_BIND;
+ [CCode (cname = "SANE_TITLE_THRESHOLD", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_THRESHOLD;
+ [CCode (cname = "SANE_TITLE_ANALOG_GAMMA", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_ANALOG_GAMMA;
+ [CCode (cname = "SANE_TITLE_ANALOG_GAMMA_R", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_ANALOG_GAMMA_R;
+ [CCode (cname = "SANE_TITLE_ANALOG_GAMMA_G", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_ANALOG_GAMMA_G;
+ [CCode (cname = "SANE_TITLE_ANALOG_GAMMA_B", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_ANALOG_GAMMA_B;
+ [CCode (cname = "SANE_TITLE_ANALOG_GAMMA_BIND", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_ANALOG_GAMMA_BIND;
+ [CCode (cname = "SANE_TITLE_WARMUP", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_WARMUP;
+ [CCode (cname = "SANE_TITLE_CAL_EXPOS_TIME", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_CAL_EXPOS_TIME;
+ [CCode (cname = "SANE_TITLE_CAL_EXPOS_TIME_R", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_CAL_EXPOS_TIME_R;
+ [CCode (cname = "SANE_TITLE_CAL_EXPOS_TIME_G", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_CAL_EXPOS_TIME_G;
+ [CCode (cname = "SANE_TITLE_CAL_EXPOS_TIME_B", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_CAL_EXPOS_TIME_B;
+ [CCode (cname = "SANE_TITLE_SCAN_EXPOS_TIME", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_EXPOS_TIME;
+ [CCode (cname = "SANE_TITLE_SCAN_EXPOS_TIME_R", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_EXPOS_TIME_R;
+ [CCode (cname = "SANE_TITLE_SCAN_EXPOS_TIME_G", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_EXPOS_TIME_G;
+ [CCode (cname = "SANE_TITLE_SCAN_EXPOS_TIME_B", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_EXPOS_TIME_B;
+ [CCode (cname = "SANE_TITLE_SELECT_EXPOSURE_TIME", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SELECT_EXPOSURE_TIME;
+ [CCode (cname = "SANE_TITLE_CAL_LAMP_DEN", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_CAL_LAMP_DEN;
+ [CCode (cname = "SANE_TITLE_SCAN_LAMP_DEN", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN_LAMP_DEN;
+ [CCode (cname = "SANE_TITLE_SELECT_LAMP_DENSITY", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SELECT_LAMP_DENSITY;
+ [CCode (cname = "SANE_TITLE_LAMP_OFF_AT_EXIT", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_LAMP_OFF_AT_EXIT;
+ [CCode (cname = "SANE_TITLE_SCAN", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_SCAN;
+ [CCode (cname = "SANE_TITLE_EMAIL", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_EMAIL;
+ [CCode (cname = "SANE_TITLE_FAX", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_FAX;
+ [CCode (cname = "SANE_TITLE_COPY", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_COPY;
+ [CCode (cname = "SANE_TITLE_PDF", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_PDF;
+ [CCode (cname = "SANE_TITLE_CANCEL", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_CANCEL;
+ [CCode (cname = "SANE_TITLE_PAGE_LOADED", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_PAGE_LOADED;
+ [CCode (cname = "SANE_TITLE_COVER_OPEN", cheader_filename = "sane/saneopts.h")]
+ public static string TITLE_COVER_OPEN;
+ [CCode (cname = "SANE_DESC_NUM_OPTIONS", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_NUM_OPTIONS;
+ [CCode (cname = "SANE_DESC_STANDARD", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_STANDARD;
+ [CCode (cname = "SANE_DESC_GEOMETRY", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_GEOMETRY;
+ [CCode (cname = "SANE_DESC_ENHANCEMENT", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_ENHANCEMENT;
+ [CCode (cname = "SANE_DESC_ADVANCED", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_ADVANCED;
+ [CCode (cname = "SANE_DESC_SENSORS", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SENSORS;
+ [CCode (cname = "SANE_DESC_PREVIEW", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_PREVIEW;
+ [CCode (cname = "SANE_DESC_GRAY_PREVIEW", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_GRAY_PREVIEW;
+ [CCode (cname = "SANE_DESC_BIT_DEPTH", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_BIT_DEPTH;
+ [CCode (cname = "SANE_DESC_SCAN_MODE", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_MODE;
+ [CCode (cname = "SANE_DESC_SCAN_SPEED", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_SPEED;
+ [CCode (cname = "SANE_DESC_SCAN_SOURCE", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_SOURCE;
+ [CCode (cname = "SANE_DESC_BACKTRACK", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_BACKTRACK;
+ [CCode (cname = "SANE_DESC_SCAN_TL_X", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_TL_X;
+ [CCode (cname = "SANE_DESC_SCAN_TL_Y", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_TL_Y;
+ [CCode (cname = "SANE_DESC_SCAN_BR_X", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_BR_X;
+ [CCode (cname = "SANE_DESC_SCAN_BR_Y", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_BR_Y;
+ [CCode (cname = "SANE_DESC_SCAN_RESOLUTION", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_RESOLUTION;
+ [CCode (cname = "SANE_DESC_SCAN_X_RESOLUTION", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_X_RESOLUTION;
+ [CCode (cname = "SANE_DESC_SCAN_Y_RESOLUTION", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_Y_RESOLUTION;
+ [CCode (cname = "SANE_DESC_PAGE_WIDTH", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_PAGE_WIDTH;
+ [CCode (cname = "SANE_DESC_PAGE_HEIGHT", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_PAGE_HEIGHT;
+ [CCode (cname = "SANE_DESC_CUSTOM_GAMMA", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_CUSTOM_GAMMA;
+ [CCode (cname = "SANE_DESC_GAMMA_VECTOR", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_GAMMA_VECTOR;
+ [CCode (cname = "SANE_DESC_GAMMA_VECTOR_R", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_GAMMA_VECTOR_R;
+ [CCode (cname = "SANE_DESC_GAMMA_VECTOR_G", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_GAMMA_VECTOR_G;
+ [CCode (cname = "SANE_DESC_GAMMA_VECTOR_B", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_GAMMA_VECTOR_B;
+ [CCode (cname = "SANE_DESC_BRIGHTNESS", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_BRIGHTNESS;
+ [CCode (cname = "SANE_DESC_CONTRAST", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_CONTRAST;
+ [CCode (cname = "SANE_DESC_GRAIN_SIZE", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_GRAIN_SIZE;
+ [CCode (cname = "SANE_DESC_HALFTONE", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_HALFTONE;
+ [CCode (cname = "SANE_DESC_BLACK_LEVEL", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_BLACK_LEVEL;
+ [CCode (cname = "SANE_DESC_WHITE_LEVEL", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_WHITE_LEVEL;
+ [CCode (cname = "SANE_DESC_WHITE_LEVEL_R", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_WHITE_LEVEL_R;
+ [CCode (cname = "SANE_DESC_WHITE_LEVEL_G", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_WHITE_LEVEL_G;
+ [CCode (cname = "SANE_DESC_WHITE_LEVEL_B", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_WHITE_LEVEL_B;
+ [CCode (cname = "SANE_DESC_SHADOW", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SHADOW;
+ [CCode (cname = "SANE_DESC_SHADOW_R", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SHADOW_R;
+ [CCode (cname = "SANE_DESC_SHADOW_G", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SHADOW_G;
+ [CCode (cname = "SANE_DESC_SHADOW_B", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SHADOW_B;
+ [CCode (cname = "SANE_DESC_HIGHLIGHT", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_HIGHLIGHT;
+ [CCode (cname = "SANE_DESC_HIGHLIGHT_R", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_HIGHLIGHT_R;
+ [CCode (cname = "SANE_DESC_HIGHLIGHT_G", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_HIGHLIGHT_G;
+ [CCode (cname = "SANE_DESC_HIGHLIGHT_B", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_HIGHLIGHT_B;
+ [CCode (cname = "SANE_DESC_HUE", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_HUE;
+ [CCode (cname = "SANE_DESC_SATURATION", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SATURATION;
+ [CCode (cname = "SANE_DESC_FILE", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_FILE;
+ [CCode (cname = "SANE_DESC_HALFTONE_DIMENSION", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_HALFTONE_DIMENSION;
+ [CCode (cname = "SANE_DESC_HALFTONE_PATTERN", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_HALFTONE_PATTERN;
+ [CCode (cname = "SANE_DESC_RESOLUTION_BIND", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_RESOLUTION_BIND;
+ [CCode (cname = "SANE_DESC_NEGATIVE", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_NEGATIVE;
+ [CCode (cname = "SANE_DESC_QUALITY_CAL", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_QUALITY_CAL;
+ [CCode (cname = "SANE_DESC_DOR", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_DOR;
+ [CCode (cname = "SANE_DESC_RGB_BIND", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_RGB_BIND;
+ [CCode (cname = "SANE_DESC_THRESHOLD", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_THRESHOLD;
+ [CCode (cname = "SANE_DESC_ANALOG_GAMMA", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_ANALOG_GAMMA;
+ [CCode (cname = "SANE_DESC_ANALOG_GAMMA_R", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_ANALOG_GAMMA_R;
+ [CCode (cname = "SANE_DESC_ANALOG_GAMMA_G", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_ANALOG_GAMMA_G;
+ [CCode (cname = "SANE_DESC_ANALOG_GAMMA_B", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_ANALOG_GAMMA_B;
+ [CCode (cname = "SANE_DESC_ANALOG_GAMMA_BIND", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_ANALOG_GAMMA_BIND;
+ [CCode (cname = "SANE_DESC_WARMUP", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_WARMUP;
+ [CCode (cname = "SANE_DESC_CAL_EXPOS_TIME", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_CAL_EXPOS_TIME;
+ [CCode (cname = "SANE_DESC_CAL_EXPOS_TIME_R", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_CAL_EXPOS_TIME_R;
+ [CCode (cname = "SANE_DESC_CAL_EXPOS_TIME_G", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_CAL_EXPOS_TIME_G;
+ [CCode (cname = "SANE_DESC_CAL_EXPOS_TIME_B", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_CAL_EXPOS_TIME_B;
+ [CCode (cname = "SANE_DESC_SCAN_EXPOS_TIME", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_EXPOS_TIME;
+ [CCode (cname = "SANE_DESC_SCAN_EXPOS_TIME_R", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_EXPOS_TIME_R;
+ [CCode (cname = "SANE_DESC_SCAN_EXPOS_TIME_G", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_EXPOS_TIME_G;
+ [CCode (cname = "SANE_DESC_SCAN_EXPOS_TIME_B", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_EXPOS_TIME_B;
+ [CCode (cname = "SANE_DESC_SELECT_EXPOSURE_TIME", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SELECT_EXPOSURE_TIME;
+ [CCode (cname = "SANE_DESC_CAL_LAMP_DEN", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_CAL_LAMP_DEN;
+ [CCode (cname = "SANE_DESC_SCAN_LAMP_DEN", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN_LAMP_DEN;
+ [CCode (cname = "SANE_DESC_SELECT_LAMP_DENSITY", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SELECT_LAMP_DENSITY;
+ [CCode (cname = "SANE_DESC_LAMP_OFF_AT_EXIT", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_LAMP_OFF_AT_EXIT;
+ [CCode (cname = "SANE_DESC_SCAN", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_SCAN;
+ [CCode (cname = "SANE_DESC_EMAIL", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_EMAIL;
+ [CCode (cname = "SANE_DESC_FAX", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_FAX;
+ [CCode (cname = "SANE_DESC_COPY", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_COPY;
+ [CCode (cname = "SANE_DESC_PDF", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_PDF;
+ [CCode (cname = "SANE_DESC_CANCEL", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_CANCEL;
+ [CCode (cname = "SANE_DESC_PAGE_LOADED", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_PAGE_LOADED;
+ [CCode (cname = "SANE_DESC_COVER_OPEN", cheader_filename = "sane/saneopts.h")]
+ public static string DESC_COVER_OPEN;
+ [CCode (cname = "SANE_VALUE_SCAN_MODE_COLOR", cheader_filename = "sane/saneopts.h")]
+ public static string VALUE_SCAN_MODE_COLOR;
+ [CCode (cname = "SANE_VALUE_SCAN_MODE_COLOR_LINEART", cheader_filename = "sane/saneopts.h")]
+ public static string VALUE_SCAN_MODE_COLOR_LINEART;
+ [CCode (cname = "SANE_VALUE_SCAN_MODE_COLOR_HALFTONE", cheader_filename = "sane/saneopts.h")]
+ public static string VALUE_SCAN_MODE_COLOR_HALFTONE;
+ [CCode (cname = "SANE_VALUE_SCAN_MODE_GRAY", cheader_filename = "sane/saneopts.h")]
+ public static string VALUE_SCAN_MODE_GRAY;
+ [CCode (cname = "SANE_VALUE_SCAN_MODE_HALFTONE", cheader_filename = "sane/saneopts.h")]
+ public static string VALUE_SCAN_MODE_HALFTONE;
+ [CCode (cname = "SANE_VALUE_SCAN_MODE_LINEART", cheader_filename = "sane/saneopts.h")]
+ public static string VALUE_SCAN_MODE_LINEART;
+}
diff --git a/src/scanner.c b/src/scanner.c
new file mode 100644
index 0000000..57323b2
--- /dev/null
+++ b/src/scanner.c
@@ -0,0 +1,13352 @@
+/* scanner.c generated by valac 0.24.0, the Vala compiler
+ * generated from scanner.vala, do not modify */
+
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+/* TODO: Could indicate the start of the next page immediately after the last page is received (i.e. before the sane_cancel()) */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+#include <float.h>
+#include <math.h>
+#include "sane/sane.h"
+#include <glib/gi18n-lib.h>
+#include "sane/saneopts.h"
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_SCAN_DEVICE (scan_device_get_type ())
+#define SCAN_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_DEVICE, ScanDevice))
+#define SCAN_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_DEVICE, ScanDeviceClass))
+#define IS_SCAN_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_DEVICE))
+#define IS_SCAN_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_DEVICE))
+#define SCAN_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_DEVICE, ScanDeviceClass))
+
+typedef struct _ScanDevice ScanDevice;
+typedef struct _ScanDeviceClass ScanDeviceClass;
+typedef struct _ScanDevicePrivate ScanDevicePrivate;
+#define _g_free0(var) (var = (g_free (var), NULL))
+typedef struct _ParamSpecScanDevice ParamSpecScanDevice;
+
+#define TYPE_SCAN_PAGE_INFO (scan_page_info_get_type ())
+#define SCAN_PAGE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_PAGE_INFO, ScanPageInfo))
+#define SCAN_PAGE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_PAGE_INFO, ScanPageInfoClass))
+#define IS_SCAN_PAGE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_PAGE_INFO))
+#define IS_SCAN_PAGE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_PAGE_INFO))
+#define SCAN_PAGE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_PAGE_INFO, ScanPageInfoClass))
+
+typedef struct _ScanPageInfo ScanPageInfo;
+typedef struct _ScanPageInfoClass ScanPageInfoClass;
+typedef struct _ScanPageInfoPrivate ScanPageInfoPrivate;
+typedef struct _ParamSpecScanPageInfo ParamSpecScanPageInfo;
+
+#define TYPE_SCAN_LINE (scan_line_get_type ())
+#define SCAN_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_LINE, ScanLine))
+#define SCAN_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_LINE, ScanLineClass))
+#define IS_SCAN_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_LINE))
+#define IS_SCAN_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_LINE))
+#define SCAN_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_LINE, ScanLineClass))
+
+typedef struct _ScanLine ScanLine;
+typedef struct _ScanLineClass ScanLineClass;
+typedef struct _ScanLinePrivate ScanLinePrivate;
+typedef struct _ParamSpecScanLine ParamSpecScanLine;
+
+#define TYPE_SCAN_MODE (scan_mode_get_type ())
+
+#define TYPE_SCAN_TYPE (scan_type_get_type ())
+
+#define TYPE_SCAN_OPTIONS (scan_options_get_type ())
+#define SCAN_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_OPTIONS, ScanOptions))
+#define SCAN_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_OPTIONS, ScanOptionsClass))
+#define IS_SCAN_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_OPTIONS))
+#define IS_SCAN_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_OPTIONS))
+#define SCAN_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_OPTIONS, ScanOptionsClass))
+
+typedef struct _ScanOptions ScanOptions;
+typedef struct _ScanOptionsClass ScanOptionsClass;
+typedef struct _ScanOptionsPrivate ScanOptionsPrivate;
+typedef struct _ParamSpecScanOptions ParamSpecScanOptions;
+
+#define TYPE_SCAN_JOB (scan_job_get_type ())
+#define SCAN_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_JOB, ScanJob))
+#define SCAN_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_JOB, ScanJobClass))
+#define IS_SCAN_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_JOB))
+#define IS_SCAN_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_JOB))
+#define SCAN_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_JOB, ScanJobClass))
+
+typedef struct _ScanJob ScanJob;
+typedef struct _ScanJobClass ScanJobClass;
+typedef struct _ScanJobPrivate ScanJobPrivate;
+typedef struct _ParamSpecScanJob ParamSpecScanJob;
+
+#define TYPE_REQUEST (request_get_type ())
+#define REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REQUEST, Request))
+#define REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REQUEST, RequestClass))
+#define IS_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REQUEST))
+#define IS_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REQUEST))
+#define REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REQUEST, RequestClass))
+
+typedef struct _Request Request;
+typedef struct _RequestClass RequestClass;
+typedef struct _RequestPrivate RequestPrivate;
+typedef struct _ParamSpecRequest ParamSpecRequest;
+
+#define TYPE_REQUEST_REDETECT (request_redetect_get_type ())
+#define REQUEST_REDETECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REQUEST_REDETECT, RequestRedetect))
+#define REQUEST_REDETECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REQUEST_REDETECT, RequestRedetectClass))
+#define IS_REQUEST_REDETECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REQUEST_REDETECT))
+#define IS_REQUEST_REDETECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REQUEST_REDETECT))
+#define REQUEST_REDETECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REQUEST_REDETECT, RequestRedetectClass))
+
+typedef struct _RequestRedetect RequestRedetect;
+typedef struct _RequestRedetectClass RequestRedetectClass;
+typedef struct _RequestRedetectPrivate RequestRedetectPrivate;
+
+#define TYPE_REQUEST_CANCEL (request_cancel_get_type ())
+#define REQUEST_CANCEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REQUEST_CANCEL, RequestCancel))
+#define REQUEST_CANCEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REQUEST_CANCEL, RequestCancelClass))
+#define IS_REQUEST_CANCEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REQUEST_CANCEL))
+#define IS_REQUEST_CANCEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REQUEST_CANCEL))
+#define REQUEST_CANCEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REQUEST_CANCEL, RequestCancelClass))
+
+typedef struct _RequestCancel RequestCancel;
+typedef struct _RequestCancelClass RequestCancelClass;
+typedef struct _RequestCancelPrivate RequestCancelPrivate;
+
+#define TYPE_REQUEST_START_SCAN (request_start_scan_get_type ())
+#define REQUEST_START_SCAN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REQUEST_START_SCAN, RequestStartScan))
+#define REQUEST_START_SCAN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REQUEST_START_SCAN, RequestStartScanClass))
+#define IS_REQUEST_START_SCAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REQUEST_START_SCAN))
+#define IS_REQUEST_START_SCAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REQUEST_START_SCAN))
+#define REQUEST_START_SCAN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REQUEST_START_SCAN, RequestStartScanClass))
+
+typedef struct _RequestStartScan RequestStartScan;
+typedef struct _RequestStartScanClass RequestStartScanClass;
+typedef struct _RequestStartScanPrivate RequestStartScanPrivate;
+#define _scan_job_unref0(var) ((var == NULL) ? NULL : (var = (scan_job_unref (var), NULL)))
+
+#define TYPE_REQUEST_QUIT (request_quit_get_type ())
+#define REQUEST_QUIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REQUEST_QUIT, RequestQuit))
+#define REQUEST_QUIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REQUEST_QUIT, RequestQuitClass))
+#define IS_REQUEST_QUIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REQUEST_QUIT))
+#define IS_REQUEST_QUIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REQUEST_QUIT))
+#define REQUEST_QUIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REQUEST_QUIT, RequestQuitClass))
+
+typedef struct _RequestQuit RequestQuit;
+typedef struct _RequestQuitClass RequestQuitClass;
+typedef struct _RequestQuitPrivate RequestQuitPrivate;
+
+#define TYPE_CREDENTIALS (credentials_get_type ())
+#define CREDENTIALS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CREDENTIALS, Credentials))
+#define CREDENTIALS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CREDENTIALS, CredentialsClass))
+#define IS_CREDENTIALS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CREDENTIALS))
+#define IS_CREDENTIALS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CREDENTIALS))
+#define CREDENTIALS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CREDENTIALS, CredentialsClass))
+
+typedef struct _Credentials Credentials;
+typedef struct _CredentialsClass CredentialsClass;
+typedef struct _CredentialsPrivate CredentialsPrivate;
+typedef struct _ParamSpecCredentials ParamSpecCredentials;
+
+#define TYPE_SCAN_STATE (scan_state_get_type ())
+
+#define TYPE_NOTIFY (notify_get_type ())
+#define NOTIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY, Notify))
+#define NOTIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY, NotifyClass))
+#define IS_NOTIFY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY))
+#define IS_NOTIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY))
+#define NOTIFY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY, NotifyClass))
+
+typedef struct _Notify Notify;
+typedef struct _NotifyClass NotifyClass;
+typedef struct _NotifyPrivate NotifyPrivate;
+
+#define TYPE_SCANNER (scanner_get_type ())
+#define SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCANNER, Scanner))
+#define SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCANNER, ScannerClass))
+#define IS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCANNER))
+#define IS_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCANNER))
+#define SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCANNER, ScannerClass))
+
+typedef struct _Scanner Scanner;
+typedef struct _ScannerClass ScannerClass;
+typedef struct _ParamSpecNotify ParamSpecNotify;
+
+#define TYPE_NOTIFY_SCANNING_CHANGED (notify_scanning_changed_get_type ())
+#define NOTIFY_SCANNING_CHANGED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_SCANNING_CHANGED, NotifyScanningChanged))
+#define NOTIFY_SCANNING_CHANGED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_SCANNING_CHANGED, NotifyScanningChangedClass))
+#define IS_NOTIFY_SCANNING_CHANGED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_SCANNING_CHANGED))
+#define IS_NOTIFY_SCANNING_CHANGED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_SCANNING_CHANGED))
+#define NOTIFY_SCANNING_CHANGED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_SCANNING_CHANGED, NotifyScanningChangedClass))
+
+typedef struct _NotifyScanningChanged NotifyScanningChanged;
+typedef struct _NotifyScanningChangedClass NotifyScanningChangedClass;
+typedef struct _NotifyScanningChangedPrivate NotifyScanningChangedPrivate;
+
+#define TYPE_NOTIFY_UPDATE_DEVICES (notify_update_devices_get_type ())
+#define NOTIFY_UPDATE_DEVICES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_UPDATE_DEVICES, NotifyUpdateDevices))
+#define NOTIFY_UPDATE_DEVICES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_UPDATE_DEVICES, NotifyUpdateDevicesClass))
+#define IS_NOTIFY_UPDATE_DEVICES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_UPDATE_DEVICES))
+#define IS_NOTIFY_UPDATE_DEVICES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_UPDATE_DEVICES))
+#define NOTIFY_UPDATE_DEVICES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_UPDATE_DEVICES, NotifyUpdateDevicesClass))
+
+typedef struct _NotifyUpdateDevices NotifyUpdateDevices;
+typedef struct _NotifyUpdateDevicesClass NotifyUpdateDevicesClass;
+typedef struct _NotifyUpdateDevicesPrivate NotifyUpdateDevicesPrivate;
+#define __g_list_free__scan_device_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__scan_device_unref0_ (var), NULL)))
+
+#define TYPE_NOTIFY_REQUEST_AUTHORIZATION (notify_request_authorization_get_type ())
+#define NOTIFY_REQUEST_AUTHORIZATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_REQUEST_AUTHORIZATION, NotifyRequestAuthorization))
+#define NOTIFY_REQUEST_AUTHORIZATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_REQUEST_AUTHORIZATION, NotifyRequestAuthorizationClass))
+#define IS_NOTIFY_REQUEST_AUTHORIZATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_REQUEST_AUTHORIZATION))
+#define IS_NOTIFY_REQUEST_AUTHORIZATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_REQUEST_AUTHORIZATION))
+#define NOTIFY_REQUEST_AUTHORIZATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_REQUEST_AUTHORIZATION, NotifyRequestAuthorizationClass))
+
+typedef struct _NotifyRequestAuthorization NotifyRequestAuthorization;
+typedef struct _NotifyRequestAuthorizationClass NotifyRequestAuthorizationClass;
+typedef struct _NotifyRequestAuthorizationPrivate NotifyRequestAuthorizationPrivate;
+
+#define TYPE_NOTIFY_SCAN_FAILED (notify_scan_failed_get_type ())
+#define NOTIFY_SCAN_FAILED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_SCAN_FAILED, NotifyScanFailed))
+#define NOTIFY_SCAN_FAILED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_SCAN_FAILED, NotifyScanFailedClass))
+#define IS_NOTIFY_SCAN_FAILED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_SCAN_FAILED))
+#define IS_NOTIFY_SCAN_FAILED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_SCAN_FAILED))
+#define NOTIFY_SCAN_FAILED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_SCAN_FAILED, NotifyScanFailedClass))
+
+typedef struct _NotifyScanFailed NotifyScanFailed;
+typedef struct _NotifyScanFailedClass NotifyScanFailedClass;
+typedef struct _NotifyScanFailedPrivate NotifyScanFailedPrivate;
+
+#define TYPE_NOTIFY_DOCUMENT_DONE (notify_document_done_get_type ())
+#define NOTIFY_DOCUMENT_DONE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_DOCUMENT_DONE, NotifyDocumentDone))
+#define NOTIFY_DOCUMENT_DONE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_DOCUMENT_DONE, NotifyDocumentDoneClass))
+#define IS_NOTIFY_DOCUMENT_DONE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_DOCUMENT_DONE))
+#define IS_NOTIFY_DOCUMENT_DONE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_DOCUMENT_DONE))
+#define NOTIFY_DOCUMENT_DONE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_DOCUMENT_DONE, NotifyDocumentDoneClass))
+
+typedef struct _NotifyDocumentDone NotifyDocumentDone;
+typedef struct _NotifyDocumentDoneClass NotifyDocumentDoneClass;
+typedef struct _NotifyDocumentDonePrivate NotifyDocumentDonePrivate;
+
+#define TYPE_NOTIFY_EXPECT_PAGE (notify_expect_page_get_type ())
+#define NOTIFY_EXPECT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_EXPECT_PAGE, NotifyExpectPage))
+#define NOTIFY_EXPECT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_EXPECT_PAGE, NotifyExpectPageClass))
+#define IS_NOTIFY_EXPECT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_EXPECT_PAGE))
+#define IS_NOTIFY_EXPECT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_EXPECT_PAGE))
+#define NOTIFY_EXPECT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_EXPECT_PAGE, NotifyExpectPageClass))
+
+typedef struct _NotifyExpectPage NotifyExpectPage;
+typedef struct _NotifyExpectPageClass NotifyExpectPageClass;
+typedef struct _NotifyExpectPagePrivate NotifyExpectPagePrivate;
+
+#define TYPE_NOTIFY_GOT_PAGE_INFO (notify_got_page_info_get_type ())
+#define NOTIFY_GOT_PAGE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_GOT_PAGE_INFO, NotifyGotPageInfo))
+#define NOTIFY_GOT_PAGE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_GOT_PAGE_INFO, NotifyGotPageInfoClass))
+#define IS_NOTIFY_GOT_PAGE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_GOT_PAGE_INFO))
+#define IS_NOTIFY_GOT_PAGE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_GOT_PAGE_INFO))
+#define NOTIFY_GOT_PAGE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_GOT_PAGE_INFO, NotifyGotPageInfoClass))
+
+typedef struct _NotifyGotPageInfo NotifyGotPageInfo;
+typedef struct _NotifyGotPageInfoClass NotifyGotPageInfoClass;
+typedef struct _NotifyGotPageInfoPrivate NotifyGotPageInfoPrivate;
+#define _scan_page_info_unref0(var) ((var == NULL) ? NULL : (var = (scan_page_info_unref (var), NULL)))
+typedef struct _ScannerPrivate ScannerPrivate;
+
+#define TYPE_NOTIFY_PAGE_DONE (notify_page_done_get_type ())
+#define NOTIFY_PAGE_DONE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_PAGE_DONE, NotifyPageDone))
+#define NOTIFY_PAGE_DONE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_PAGE_DONE, NotifyPageDoneClass))
+#define IS_NOTIFY_PAGE_DONE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_PAGE_DONE))
+#define IS_NOTIFY_PAGE_DONE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_PAGE_DONE))
+#define NOTIFY_PAGE_DONE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_PAGE_DONE, NotifyPageDoneClass))
+
+typedef struct _NotifyPageDone NotifyPageDone;
+typedef struct _NotifyPageDoneClass NotifyPageDoneClass;
+typedef struct _NotifyPageDonePrivate NotifyPageDonePrivate;
+
+#define TYPE_NOTIFY_GOT_LINE (notify_got_line_get_type ())
+#define NOTIFY_GOT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NOTIFY_GOT_LINE, NotifyGotLine))
+#define NOTIFY_GOT_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NOTIFY_GOT_LINE, NotifyGotLineClass))
+#define IS_NOTIFY_GOT_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NOTIFY_GOT_LINE))
+#define IS_NOTIFY_GOT_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NOTIFY_GOT_LINE))
+#define NOTIFY_GOT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NOTIFY_GOT_LINE, NotifyGotLineClass))
+
+typedef struct _NotifyGotLine NotifyGotLine;
+typedef struct _NotifyGotLineClass NotifyGotLineClass;
+typedef struct _NotifyGotLinePrivate NotifyGotLinePrivate;
+#define _scan_line_unref0(var) ((var == NULL) ? NULL : (var = (scan_line_unref (var), NULL)))
+#define _g_thread_unref0(var) ((var == NULL) ? NULL : (var = (g_thread_unref (var), NULL)))
+#define _g_async_queue_unref0(var) ((var == NULL) ? NULL : (var = (g_async_queue_unref (var), NULL)))
+#define __g_list_free__scan_job_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__scan_job_unref0_ (var), NULL)))
+#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
+#define _scanner_unref0(var) ((var == NULL) ? NULL : (var = (scanner_unref (var), NULL)))
+#define _notify_unref0(var) ((var == NULL) ? NULL : (var = (notify_unref (var), NULL)))
+#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+#define _scan_device_unref0(var) ((var == NULL) ? NULL : (var = (scan_device_unref (var), NULL)))
+#define _credentials_unref0(var) ((var == NULL) ? NULL : (var = (credentials_unref (var), NULL)))
+#define _request_unref0(var) ((var == NULL) ? NULL : (var = (request_unref (var), NULL)))
+typedef struct _ParamSpecScanner ParamSpecScanner;
+
+struct _ScanDevice {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanDevicePrivate * priv;
+ gchar* name;
+ gchar* label;
+};
+
+struct _ScanDeviceClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanDevice *self);
+};
+
+struct _ParamSpecScanDevice {
+ GParamSpec parent_instance;
+};
+
+struct _ScanPageInfo {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanPageInfoPrivate * priv;
+ gint width;
+ gint height;
+ gint depth;
+ gint n_channels;
+ gdouble dpi;
+ gchar* device;
+};
+
+struct _ScanPageInfoClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanPageInfo *self);
+};
+
+struct _ParamSpecScanPageInfo {
+ GParamSpec parent_instance;
+};
+
+struct _ScanLine {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanLinePrivate * priv;
+ gint number;
+ gint n_lines;
+ gint width;
+ gint depth;
+ gint channel;
+ guchar* data;
+ gint data_length1;
+ gint data_length;
+};
+
+struct _ScanLineClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanLine *self);
+};
+
+struct _ParamSpecScanLine {
+ GParamSpec parent_instance;
+};
+
+typedef enum {
+ SCAN_MODE_DEFAULT,
+ SCAN_MODE_COLOR,
+ SCAN_MODE_GRAY,
+ SCAN_MODE_LINEART
+} ScanMode;
+
+typedef enum {
+ SCAN_TYPE_SINGLE,
+ SCAN_TYPE_ADF_FRONT,
+ SCAN_TYPE_ADF_BACK,
+ SCAN_TYPE_ADF_BOTH
+} ScanType;
+
+struct _ScanOptions {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanOptionsPrivate * priv;
+ gint dpi;
+ ScanMode scan_mode;
+ gint depth;
+ ScanType type;
+ gint paper_width;
+ gint paper_height;
+ gint brightness;
+ gint contrast;
+};
+
+struct _ScanOptionsClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanOptions *self);
+};
+
+struct _ParamSpecScanOptions {
+ GParamSpec parent_instance;
+};
+
+struct _ScanJob {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanJobPrivate * priv;
+ gint id;
+ gchar* device;
+ gdouble dpi;
+ ScanMode scan_mode;
+ gint depth;
+ ScanType type;
+ gint page_width;
+ gint page_height;
+ gint brightness;
+ gint contrast;
+};
+
+struct _ScanJobClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanJob *self);
+};
+
+struct _ParamSpecScanJob {
+ GParamSpec parent_instance;
+};
+
+struct _Request {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ RequestPrivate * priv;
+};
+
+struct _RequestClass {
+ GTypeClass parent_class;
+ void (*finalize) (Request *self);
+};
+
+struct _ParamSpecRequest {
+ GParamSpec parent_instance;
+};
+
+struct _RequestRedetect {
+ Request parent_instance;
+ RequestRedetectPrivate * priv;
+};
+
+struct _RequestRedetectClass {
+ RequestClass parent_class;
+};
+
+struct _RequestCancel {
+ Request parent_instance;
+ RequestCancelPrivate * priv;
+};
+
+struct _RequestCancelClass {
+ RequestClass parent_class;
+};
+
+struct _RequestStartScan {
+ Request parent_instance;
+ RequestStartScanPrivate * priv;
+ ScanJob* job;
+};
+
+struct _RequestStartScanClass {
+ RequestClass parent_class;
+};
+
+struct _RequestQuit {
+ Request parent_instance;
+ RequestQuitPrivate * priv;
+};
+
+struct _RequestQuitClass {
+ RequestClass parent_class;
+};
+
+struct _Credentials {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ CredentialsPrivate * priv;
+ gchar* username;
+ gchar* password;
+};
+
+struct _CredentialsClass {
+ GTypeClass parent_class;
+ void (*finalize) (Credentials *self);
+};
+
+struct _ParamSpecCredentials {
+ GParamSpec parent_instance;
+};
+
+typedef enum {
+ SCAN_STATE_IDLE = 0,
+ SCAN_STATE_REDETECT,
+ SCAN_STATE_OPEN,
+ SCAN_STATE_GET_OPTION,
+ SCAN_STATE_START,
+ SCAN_STATE_GET_PARAMETERS,
+ SCAN_STATE_READ
+} ScanState;
+
+struct _Notify {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ NotifyPrivate * priv;
+};
+
+struct _NotifyClass {
+ GTypeClass parent_class;
+ void (*finalize) (Notify *self);
+ void (*run) (Notify* self, Scanner* scanner);
+};
+
+struct _ParamSpecNotify {
+ GParamSpec parent_instance;
+};
+
+struct _NotifyScanningChanged {
+ Notify parent_instance;
+ NotifyScanningChangedPrivate * priv;
+};
+
+struct _NotifyScanningChangedClass {
+ NotifyClass parent_class;
+};
+
+struct _NotifyUpdateDevices {
+ Notify parent_instance;
+ NotifyUpdateDevicesPrivate * priv;
+};
+
+struct _NotifyUpdateDevicesClass {
+ NotifyClass parent_class;
+};
+
+struct _NotifyUpdateDevicesPrivate {
+ GList* devices;
+};
+
+struct _NotifyRequestAuthorization {
+ Notify parent_instance;
+ NotifyRequestAuthorizationPrivate * priv;
+};
+
+struct _NotifyRequestAuthorizationClass {
+ NotifyClass parent_class;
+};
+
+struct _NotifyRequestAuthorizationPrivate {
+ gchar* resource;
+};
+
+struct _NotifyScanFailed {
+ Notify parent_instance;
+ NotifyScanFailedPrivate * priv;
+};
+
+struct _NotifyScanFailedClass {
+ NotifyClass parent_class;
+};
+
+struct _NotifyScanFailedPrivate {
+ gint error_code;
+ gchar* error_string;
+};
+
+struct _NotifyDocumentDone {
+ Notify parent_instance;
+ NotifyDocumentDonePrivate * priv;
+};
+
+struct _NotifyDocumentDoneClass {
+ NotifyClass parent_class;
+};
+
+struct _NotifyExpectPage {
+ Notify parent_instance;
+ NotifyExpectPagePrivate * priv;
+};
+
+struct _NotifyExpectPageClass {
+ NotifyClass parent_class;
+};
+
+struct _NotifyGotPageInfo {
+ Notify parent_instance;
+ NotifyGotPageInfoPrivate * priv;
+};
+
+struct _NotifyGotPageInfoClass {
+ NotifyClass parent_class;
+};
+
+struct _NotifyGotPageInfoPrivate {
+ gint job_id;
+ ScanPageInfo* info;
+};
+
+struct _Scanner {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScannerPrivate * priv;
+ gint first_job_id;
+ gint job_id;
+};
+
+struct _ScannerClass {
+ GTypeClass parent_class;
+ void (*finalize) (Scanner *self);
+};
+
+struct _NotifyPageDone {
+ Notify parent_instance;
+ NotifyPageDonePrivate * priv;
+};
+
+struct _NotifyPageDoneClass {
+ NotifyClass parent_class;
+};
+
+struct _NotifyPageDonePrivate {
+ gint job_id;
+};
+
+struct _NotifyGotLine {
+ Notify parent_instance;
+ NotifyGotLinePrivate * priv;
+};
+
+struct _NotifyGotLineClass {
+ NotifyClass parent_class;
+};
+
+struct _NotifyGotLinePrivate {
+ gint job_id;
+ ScanLine* line;
+};
+
+struct _ScannerPrivate {
+ GThread* thread;
+ GAsyncQueue* request_queue;
+ GAsyncQueue* notify_queue;
+ GAsyncQueue* authorize_queue;
+ gchar* default_device;
+ ScanState state;
+ gboolean need_redetect;
+ GList* job_queue;
+ SANE_Handle handle;
+ gboolean have_handle;
+ gchar* current_device;
+ SANE_Parameters parameters;
+ SANE_Int option_index;
+ GHashTable* options;
+ guchar* buffer;
+ gint buffer_length1;
+ gint _buffer_size_;
+ gint n_used;
+ gint line_count;
+ gint pass_number;
+ gint page_number;
+ gint notified_page;
+ gboolean scanning;
+};
+
+struct _ParamSpecScanner {
+ GParamSpec parent_instance;
+};
+
+
+static gpointer scan_device_parent_class = NULL;
+static gpointer scan_page_info_parent_class = NULL;
+static gpointer scan_line_parent_class = NULL;
+static gpointer scan_options_parent_class = NULL;
+static gpointer scan_job_parent_class = NULL;
+static gpointer request_parent_class = NULL;
+static gpointer request_redetect_parent_class = NULL;
+static gpointer request_cancel_parent_class = NULL;
+static gpointer request_start_scan_parent_class = NULL;
+static gpointer request_quit_parent_class = NULL;
+static gpointer credentials_parent_class = NULL;
+static gpointer notify_parent_class = NULL;
+static gpointer notify_scanning_changed_parent_class = NULL;
+static gpointer notify_update_devices_parent_class = NULL;
+static gpointer notify_request_authorization_parent_class = NULL;
+static gpointer notify_scan_failed_parent_class = NULL;
+static gpointer notify_document_done_parent_class = NULL;
+static gpointer notify_expect_page_parent_class = NULL;
+static gpointer notify_got_page_info_parent_class = NULL;
+static gpointer notify_page_done_parent_class = NULL;
+static gpointer notify_got_line_parent_class = NULL;
+static gpointer scanner_parent_class = NULL;
+static Scanner* scanner_scanner_object;
+static Scanner* scanner_scanner_object = NULL;
+
+gpointer scan_device_ref (gpointer instance);
+void scan_device_unref (gpointer instance);
+GParamSpec* param_spec_scan_device (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_device (GValue* value, gpointer v_object);
+void value_take_scan_device (GValue* value, gpointer v_object);
+gpointer value_get_scan_device (const GValue* value);
+GType scan_device_get_type (void) G_GNUC_CONST;
+enum {
+ SCAN_DEVICE_DUMMY_PROPERTY
+};
+ScanDevice* scan_device_new (void);
+ScanDevice* scan_device_construct (GType object_type);
+static void scan_device_finalize (ScanDevice* obj);
+gpointer scan_page_info_ref (gpointer instance);
+void scan_page_info_unref (gpointer instance);
+GParamSpec* param_spec_scan_page_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_page_info (GValue* value, gpointer v_object);
+void value_take_scan_page_info (GValue* value, gpointer v_object);
+gpointer value_get_scan_page_info (const GValue* value);
+GType scan_page_info_get_type (void) G_GNUC_CONST;
+enum {
+ SCAN_PAGE_INFO_DUMMY_PROPERTY
+};
+ScanPageInfo* scan_page_info_new (void);
+ScanPageInfo* scan_page_info_construct (GType object_type);
+static void scan_page_info_finalize (ScanPageInfo* obj);
+gpointer scan_line_ref (gpointer instance);
+void scan_line_unref (gpointer instance);
+GParamSpec* param_spec_scan_line (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_line (GValue* value, gpointer v_object);
+void value_take_scan_line (GValue* value, gpointer v_object);
+gpointer value_get_scan_line (const GValue* value);
+GType scan_line_get_type (void) G_GNUC_CONST;
+enum {
+ SCAN_LINE_DUMMY_PROPERTY
+};
+ScanLine* scan_line_new (void);
+ScanLine* scan_line_construct (GType object_type);
+static void scan_line_finalize (ScanLine* obj);
+GType scan_mode_get_type (void) G_GNUC_CONST;
+GType scan_type_get_type (void) G_GNUC_CONST;
+gpointer scan_options_ref (gpointer instance);
+void scan_options_unref (gpointer instance);
+GParamSpec* param_spec_scan_options (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_options (GValue* value, gpointer v_object);
+void value_take_scan_options (GValue* value, gpointer v_object);
+gpointer value_get_scan_options (const GValue* value);
+GType scan_options_get_type (void) G_GNUC_CONST;
+enum {
+ SCAN_OPTIONS_DUMMY_PROPERTY
+};
+ScanOptions* scan_options_new (void);
+ScanOptions* scan_options_construct (GType object_type);
+static void scan_options_finalize (ScanOptions* obj);
+gpointer scan_job_ref (gpointer instance);
+void scan_job_unref (gpointer instance);
+GParamSpec* param_spec_scan_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_job (GValue* value, gpointer v_object);
+void value_take_scan_job (GValue* value, gpointer v_object);
+gpointer value_get_scan_job (const GValue* value);
+GType scan_job_get_type (void) G_GNUC_CONST;
+enum {
+ SCAN_JOB_DUMMY_PROPERTY
+};
+ScanJob* scan_job_new (void);
+ScanJob* scan_job_construct (GType object_type);
+static void scan_job_finalize (ScanJob* obj);
+gpointer request_ref (gpointer instance);
+void request_unref (gpointer instance);
+GParamSpec* param_spec_request (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_request (GValue* value, gpointer v_object);
+void value_take_request (GValue* value, gpointer v_object);
+gpointer value_get_request (const GValue* value);
+GType request_get_type (void) G_GNUC_CONST;
+enum {
+ REQUEST_DUMMY_PROPERTY
+};
+Request* request_new (void);
+Request* request_construct (GType object_type);
+static void request_finalize (Request* obj);
+GType request_redetect_get_type (void) G_GNUC_CONST;
+enum {
+ REQUEST_REDETECT_DUMMY_PROPERTY
+};
+RequestRedetect* request_redetect_new (void);
+RequestRedetect* request_redetect_construct (GType object_type);
+GType request_cancel_get_type (void) G_GNUC_CONST;
+enum {
+ REQUEST_CANCEL_DUMMY_PROPERTY
+};
+RequestCancel* request_cancel_new (void);
+RequestCancel* request_cancel_construct (GType object_type);
+GType request_start_scan_get_type (void) G_GNUC_CONST;
+enum {
+ REQUEST_START_SCAN_DUMMY_PROPERTY
+};
+RequestStartScan* request_start_scan_new (void);
+RequestStartScan* request_start_scan_construct (GType object_type);
+static void request_start_scan_finalize (Request* obj);
+GType request_quit_get_type (void) G_GNUC_CONST;
+enum {
+ REQUEST_QUIT_DUMMY_PROPERTY
+};
+RequestQuit* request_quit_new (void);
+RequestQuit* request_quit_construct (GType object_type);
+gpointer credentials_ref (gpointer instance);
+void credentials_unref (gpointer instance);
+GParamSpec* param_spec_credentials (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_credentials (GValue* value, gpointer v_object);
+void value_take_credentials (GValue* value, gpointer v_object);
+gpointer value_get_credentials (const GValue* value);
+GType credentials_get_type (void) G_GNUC_CONST;
+enum {
+ CREDENTIALS_DUMMY_PROPERTY
+};
+Credentials* credentials_new (void);
+Credentials* credentials_construct (GType object_type);
+static void credentials_finalize (Credentials* obj);
+GType scan_state_get_type (void) G_GNUC_CONST;
+gpointer notify_ref (gpointer instance);
+void notify_unref (gpointer instance);
+GParamSpec* param_spec_notify (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_notify (GValue* value, gpointer v_object);
+void value_take_notify (GValue* value, gpointer v_object);
+gpointer value_get_notify (const GValue* value);
+GType notify_get_type (void) G_GNUC_CONST;
+gpointer scanner_ref (gpointer instance);
+void scanner_unref (gpointer instance);
+GParamSpec* param_spec_scanner (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scanner (GValue* value, gpointer v_object);
+void value_take_scanner (GValue* value, gpointer v_object);
+gpointer value_get_scanner (const GValue* value);
+GType scanner_get_type (void) G_GNUC_CONST;
+enum {
+ NOTIFY_DUMMY_PROPERTY
+};
+void notify_run (Notify* self, Scanner* scanner);
+static void notify_real_run (Notify* self, Scanner* scanner);
+Notify* notify_new (void);
+Notify* notify_construct (GType object_type);
+static void notify_finalize (Notify* obj);
+GType notify_scanning_changed_get_type (void) G_GNUC_CONST;
+enum {
+ NOTIFY_SCANNING_CHANGED_DUMMY_PROPERTY
+};
+static void notify_scanning_changed_real_run (Notify* base, Scanner* scanner);
+NotifyScanningChanged* notify_scanning_changed_new (void);
+NotifyScanningChanged* notify_scanning_changed_construct (GType object_type);
+GType notify_update_devices_get_type (void) G_GNUC_CONST;
+#define NOTIFY_UPDATE_DEVICES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NOTIFY_UPDATE_DEVICES, NotifyUpdateDevicesPrivate))
+enum {
+ NOTIFY_UPDATE_DEVICES_DUMMY_PROPERTY
+};
+static void _scan_device_unref0_ (gpointer var);
+static void _g_list_free__scan_device_unref0_ (GList* self);
+NotifyUpdateDevices* notify_update_devices_new (GList* devices);
+NotifyUpdateDevices* notify_update_devices_construct (GType object_type, GList* devices);
+static void notify_update_devices_real_run (Notify* base, Scanner* scanner);
+static void notify_update_devices_finalize (Notify* obj);
+GType notify_request_authorization_get_type (void) G_GNUC_CONST;
+#define NOTIFY_REQUEST_AUTHORIZATION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NOTIFY_REQUEST_AUTHORIZATION, NotifyRequestAuthorizationPrivate))
+enum {
+ NOTIFY_REQUEST_AUTHORIZATION_DUMMY_PROPERTY
+};
+NotifyRequestAuthorization* notify_request_authorization_new (const gchar* resource);
+NotifyRequestAuthorization* notify_request_authorization_construct (GType object_type, const gchar* resource);
+static void notify_request_authorization_real_run (Notify* base, Scanner* scanner);
+static void notify_request_authorization_finalize (Notify* obj);
+GType notify_scan_failed_get_type (void) G_GNUC_CONST;
+#define NOTIFY_SCAN_FAILED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NOTIFY_SCAN_FAILED, NotifyScanFailedPrivate))
+enum {
+ NOTIFY_SCAN_FAILED_DUMMY_PROPERTY
+};
+NotifyScanFailed* notify_scan_failed_new (gint error_code, const gchar* error_string);
+NotifyScanFailed* notify_scan_failed_construct (GType object_type, gint error_code, const gchar* error_string);
+static void notify_scan_failed_real_run (Notify* base, Scanner* scanner);
+static void notify_scan_failed_finalize (Notify* obj);
+GType notify_document_done_get_type (void) G_GNUC_CONST;
+enum {
+ NOTIFY_DOCUMENT_DONE_DUMMY_PROPERTY
+};
+static void notify_document_done_real_run (Notify* base, Scanner* scanner);
+NotifyDocumentDone* notify_document_done_new (void);
+NotifyDocumentDone* notify_document_done_construct (GType object_type);
+GType notify_expect_page_get_type (void) G_GNUC_CONST;
+enum {
+ NOTIFY_EXPECT_PAGE_DUMMY_PROPERTY
+};
+static void notify_expect_page_real_run (Notify* base, Scanner* scanner);
+NotifyExpectPage* notify_expect_page_new (void);
+NotifyExpectPage* notify_expect_page_construct (GType object_type);
+GType notify_got_page_info_get_type (void) G_GNUC_CONST;
+#define NOTIFY_GOT_PAGE_INFO_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NOTIFY_GOT_PAGE_INFO, NotifyGotPageInfoPrivate))
+enum {
+ NOTIFY_GOT_PAGE_INFO_DUMMY_PROPERTY
+};
+NotifyGotPageInfo* notify_got_page_info_new (gint job_id, ScanPageInfo* info);
+NotifyGotPageInfo* notify_got_page_info_construct (GType object_type, gint job_id, ScanPageInfo* info);
+static void notify_got_page_info_real_run (Notify* base, Scanner* scanner);
+static void notify_got_page_info_finalize (Notify* obj);
+GType notify_page_done_get_type (void) G_GNUC_CONST;
+#define NOTIFY_PAGE_DONE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NOTIFY_PAGE_DONE, NotifyPageDonePrivate))
+enum {
+ NOTIFY_PAGE_DONE_DUMMY_PROPERTY
+};
+NotifyPageDone* notify_page_done_new (gint job_id);
+NotifyPageDone* notify_page_done_construct (GType object_type, gint job_id);
+static void notify_page_done_real_run (Notify* base, Scanner* scanner);
+static void notify_page_done_finalize (Notify* obj);
+GType notify_got_line_get_type (void) G_GNUC_CONST;
+#define NOTIFY_GOT_LINE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NOTIFY_GOT_LINE, NotifyGotLinePrivate))
+enum {
+ NOTIFY_GOT_LINE_DUMMY_PROPERTY
+};
+NotifyGotLine* notify_got_line_new (gint job_id, ScanLine* line);
+NotifyGotLine* notify_got_line_construct (GType object_type, gint job_id, ScanLine* line);
+static void notify_got_line_real_run (Notify* base, Scanner* scanner);
+static void notify_got_line_finalize (Notify* obj);
+#define SCANNER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SCANNER, ScannerPrivate))
+enum {
+ SCANNER_DUMMY_PROPERTY
+};
+static void _scan_job_unref0_ (gpointer var);
+static void _g_list_free__scan_job_unref0_ (GList* self);
+static Scanner* scanner_new (void);
+static Scanner* scanner_construct (GType object_type);
+static void _request_unref0_ (gpointer var);
+static void _notify_unref0_ (gpointer var);
+static void _credentials_unref0_ (gpointer var);
+Scanner* scanner_get_instance (void);
+static gboolean scanner_notify_idle_cb (Scanner* self);
+static void scanner_notify (Scanner* self, Notify* notification);
+static gboolean _scanner_notify_idle_cb_gsource_func (gpointer self);
+static void scanner_set_scanning (Scanner* self, gboolean is_scanning);
+static gint scanner_get_device_weight (const gchar* device);
+static gint scanner_compare_devices (ScanDevice* device1, ScanDevice* device2);
+static void scanner_do_redetect (Scanner* self);
+static gint _scanner_compare_devices_gcompare_func (gconstpointer a, gconstpointer b);
+static gint scanner_scale_int (Scanner* self, gint source_min, gint source_max, SANE_Option_Descriptor* option, gint value);
+static gboolean scanner_set_default_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index);
+static void scanner_set_bool_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gboolean value, gboolean* _result_);
+static void scanner_set_int_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gint value, gint* _result_);
+static void scanner_set_fixed_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gdouble value, gdouble* _result_);
+static void scanner_set_fixed_or_int_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gdouble value, gdouble* _result_);
+static void scanner_set_option_to_max (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index);
+static gboolean scanner_set_string_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, const gchar* value, gchar** _result_);
+static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gchar** values, int values_length1, gchar** _result_);
+static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descriptor* option);
+static void scanner_authorization_cb (const gchar* resource, gchar* username, int username_length1, gchar* password, int password_length1);
+void scanner_authorize (Scanner* self, const gchar* username, const gchar* password);
+static void scanner_close_device (Scanner* self);
+static void scanner_fail_scan (Scanner* self, gint error_code, const gchar* error_string);
+static gboolean scanner_handle_requests (Scanner* self);
+static void scanner_do_open (Scanner* self);
+static void _g_free0_ (gpointer var);
+static void scanner_do_get_option (Scanner* self);
+static SANE_Option_Descriptor* scanner_get_option_by_name (Scanner* self, SANE_Handle handle, const gchar* name, gint* index);
+static gdouble scanner_convert_page_size (Scanner* self, SANE_Option_Descriptor* option, gdouble size, gdouble dpi);
+static void scanner_do_complete_document (Scanner* self);
+static void scanner_do_start (Scanner* self);
+static void scanner_do_get_parameters (Scanner* self);
+static void scanner_do_complete_page (Scanner* self);
+static void scanner_do_read (Scanner* self);
+static void* scanner_scan_thread (Scanner* self);
+static void _scanner_authorization_cb_sane_authcallback (const gchar* resource, gchar* username, gchar* password);
+void scanner_redetect (Scanner* self);
+void scanner_start (Scanner* self);
+static gpointer _scanner_scan_thread_gthread_func (gpointer self);
+gboolean scanner_is_scanning (Scanner* self);
+static gchar* scanner_get_scan_mode_string (Scanner* self, ScanMode mode);
+static gchar* scanner_get_scan_type_string (Scanner* self, ScanType type);
+void scanner_scan (Scanner* self, const gchar* device, ScanOptions* options);
+void scanner_cancel (Scanner* self);
+void scanner_free (Scanner* self);
+static void g_cclosure_user_marshal_VOID__SCAN_PAGE_INFO (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
+static void g_cclosure_user_marshal_VOID__SCAN_LINE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
+static void g_cclosure_user_marshal_VOID__INT_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
+static void scanner_finalize (Scanner* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+
+ScanDevice* scan_device_construct (GType object_type) {
+ ScanDevice* self = NULL;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (ScanDevice*) g_type_create_instance (object_type);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 985 "scanner.c"
+}
+
+
+ScanDevice* scan_device_new (void) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return scan_device_construct (TYPE_SCAN_DEVICE);
+#line 992 "scanner.c"
+}
+
+
+static void value_scan_device_init (GValue* value) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 999 "scanner.c"
+}
+
+
+static void value_scan_device_free_value (GValue* value) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (value->data[0].v_pointer) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_device_unref (value->data[0].v_pointer);
+#line 1008 "scanner.c"
+ }
+}
+
+
+static void value_scan_device_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (src_value->data[0].v_pointer) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = scan_device_ref (src_value->data[0].v_pointer);
+#line 1018 "scanner.c"
+ } else {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 1022 "scanner.c"
+ }
+}
+
+
+static gpointer value_scan_device_peek_pointer (const GValue* value) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 1030 "scanner.c"
+}
+
+
+static gchar* value_scan_device_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (collect_values[0].v_pointer) {
+#line 1037 "scanner.c"
+ ScanDevice* object;
+ object = collect_values[0].v_pointer;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 1044 "scanner.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 1048 "scanner.c"
+ }
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = scan_device_ref (object);
+#line 1052 "scanner.c"
+ } else {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1056 "scanner.c"
+ }
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 1060 "scanner.c"
+}
+
+
+static gchar* value_scan_device_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ ScanDevice** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!object_p) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 1071 "scanner.c"
+ }
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!value->data[0].v_pointer) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = NULL;
+#line 1077 "scanner.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = value->data[0].v_pointer;
+#line 1081 "scanner.c"
+ } else {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = scan_device_ref (value->data[0].v_pointer);
+#line 1085 "scanner.c"
+ }
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 1089 "scanner.c"
+}
+
+
+GParamSpec* param_spec_scan_device (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecScanDevice* spec;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_DEVICE), NULL);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return G_PARAM_SPEC (spec);
+#line 1103 "scanner.c"
+}
+
+
+gpointer value_get_scan_device (const GValue* value) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_DEVICE), NULL);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 1112 "scanner.c"
+}
+
+
+void value_set_scan_device (GValue* value, gpointer v_object) {
+ ScanDevice* old;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_DEVICE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_DEVICE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_device_ref (value->data[0].v_pointer);
+#line 1132 "scanner.c"
+ } else {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1136 "scanner.c"
+ }
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_device_unref (old);
+#line 1142 "scanner.c"
+ }
+}
+
+
+void value_take_scan_device (GValue* value, gpointer v_object) {
+ ScanDevice* old;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_DEVICE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_DEVICE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 1161 "scanner.c"
+ } else {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1165 "scanner.c"
+ }
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_device_unref (old);
+#line 1171 "scanner.c"
+ }
+}
+
+
+static void scan_device_class_init (ScanDeviceClass * klass) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_device_parent_class = g_type_class_peek_parent (klass);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_DEVICE_CLASS (klass)->finalize = scan_device_finalize;
+#line 1181 "scanner.c"
+}
+
+
+static void scan_device_instance_init (ScanDevice * self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->ref_count = 1;
+#line 1188 "scanner.c"
+}
+
+
+static void scan_device_finalize (ScanDevice* obj) {
+ ScanDevice * self;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_DEVICE, ScanDevice);
+#line 16 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->name);
+#line 17 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->label);
+#line 1200 "scanner.c"
+}
+
+
+GType scan_device_get_type (void) {
+ static volatile gsize scan_device_type_id__volatile = 0;
+ if (g_once_init_enter (&scan_device_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_scan_device_init, value_scan_device_free_value, value_scan_device_copy_value, value_scan_device_peek_pointer, "p", value_scan_device_collect_value, "p", value_scan_device_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (ScanDeviceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scan_device_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScanDevice), 0, (GInstanceInitFunc) scan_device_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType scan_device_type_id;
+ scan_device_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ScanDevice", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&scan_device_type_id__volatile, scan_device_type_id);
+ }
+ return scan_device_type_id__volatile;
+}
+
+
+gpointer scan_device_ref (gpointer instance) {
+ ScanDevice* self;
+ self = instance;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return instance;
+#line 1225 "scanner.c"
+}
+
+
+void scan_device_unref (gpointer instance) {
+ ScanDevice* self;
+ self = instance;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_DEVICE_GET_CLASS (self)->finalize (self);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 1238 "scanner.c"
+ }
+}
+
+
+ScanPageInfo* scan_page_info_construct (GType object_type) {
+ ScanPageInfo* self = NULL;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (ScanPageInfo*) g_type_create_instance (object_type);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 1249 "scanner.c"
+}
+
+
+ScanPageInfo* scan_page_info_new (void) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return scan_page_info_construct (TYPE_SCAN_PAGE_INFO);
+#line 1256 "scanner.c"
+}
+
+
+static void value_scan_page_info_init (GValue* value) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1263 "scanner.c"
+}
+
+
+static void value_scan_page_info_free_value (GValue* value) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (value->data[0].v_pointer) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_page_info_unref (value->data[0].v_pointer);
+#line 1272 "scanner.c"
+ }
+}
+
+
+static void value_scan_page_info_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (src_value->data[0].v_pointer) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = scan_page_info_ref (src_value->data[0].v_pointer);
+#line 1282 "scanner.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 1286 "scanner.c"
+ }
+}
+
+
+static gpointer value_scan_page_info_peek_pointer (const GValue* value) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 1294 "scanner.c"
+}
+
+
+static gchar* value_scan_page_info_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (collect_values[0].v_pointer) {
+#line 1301 "scanner.c"
+ ScanPageInfo* object;
+ object = collect_values[0].v_pointer;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 1308 "scanner.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/scanner.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 1312 "scanner.c"
+ }
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = scan_page_info_ref (object);
+#line 1316 "scanner.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1320 "scanner.c"
+ }
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 1324 "scanner.c"
+}
+
+
+static gchar* value_scan_page_info_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ ScanPageInfo** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!object_p) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 1335 "scanner.c"
+ }
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!value->data[0].v_pointer) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = NULL;
+#line 1341 "scanner.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = value->data[0].v_pointer;
+#line 1345 "scanner.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = scan_page_info_ref (value->data[0].v_pointer);
+#line 1349 "scanner.c"
+ }
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 1353 "scanner.c"
+}
+
+
+GParamSpec* param_spec_scan_page_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecScanPageInfo* spec;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_PAGE_INFO), NULL);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return G_PARAM_SPEC (spec);
+#line 1367 "scanner.c"
+}
+
+
+gpointer value_get_scan_page_info (const GValue* value) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_PAGE_INFO), NULL);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 1376 "scanner.c"
+}
+
+
+void value_set_scan_page_info (GValue* value, gpointer v_object) {
+ ScanPageInfo* old;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_PAGE_INFO));
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_PAGE_INFO));
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ 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/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_page_info_ref (value->data[0].v_pointer);
+#line 1396 "scanner.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1400 "scanner.c"
+ }
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_page_info_unref (old);
+#line 1406 "scanner.c"
+ }
+}
+
+
+void value_take_scan_page_info (GValue* value, gpointer v_object) {
+ ScanPageInfo* old;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_PAGE_INFO));
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_PAGE_INFO));
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ 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/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 1425 "scanner.c"
+ } else {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1429 "scanner.c"
+ }
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_page_info_unref (old);
+#line 1435 "scanner.c"
+ }
+}
+
+
+static void scan_page_info_class_init (ScanPageInfoClass * klass) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_page_info_parent_class = g_type_class_peek_parent (klass);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_PAGE_INFO_CLASS (klass)->finalize = scan_page_info_finalize;
+#line 1445 "scanner.c"
+}
+
+
+static void scan_page_info_instance_init (ScanPageInfo * self) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->ref_count = 1;
+#line 1452 "scanner.c"
+}
+
+
+static void scan_page_info_finalize (ScanPageInfo* obj) {
+ ScanPageInfo * self;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_PAGE_INFO, ScanPageInfo);
+#line 36 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->device);
+#line 1462 "scanner.c"
+}
+
+
+GType scan_page_info_get_type (void) {
+ static volatile gsize scan_page_info_type_id__volatile = 0;
+ if (g_once_init_enter (&scan_page_info_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_scan_page_info_init, value_scan_page_info_free_value, value_scan_page_info_copy_value, value_scan_page_info_peek_pointer, "p", value_scan_page_info_collect_value, "p", value_scan_page_info_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (ScanPageInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scan_page_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScanPageInfo), 0, (GInstanceInitFunc) scan_page_info_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType scan_page_info_type_id;
+ scan_page_info_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ScanPageInfo", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&scan_page_info_type_id__volatile, scan_page_info_type_id);
+ }
+ return scan_page_info_type_id__volatile;
+}
+
+
+gpointer scan_page_info_ref (gpointer instance) {
+ ScanPageInfo* self;
+ self = instance;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return instance;
+#line 1487 "scanner.c"
+}
+
+
+void scan_page_info_unref (gpointer instance) {
+ ScanPageInfo* self;
+ self = instance;
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_PAGE_INFO_GET_CLASS (self)->finalize (self);
+#line 20 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 1500 "scanner.c"
+ }
+}
+
+
+ScanLine* scan_line_construct (GType object_type) {
+ ScanLine* self = NULL;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (ScanLine*) g_type_create_instance (object_type);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 1511 "scanner.c"
+}
+
+
+ScanLine* scan_line_new (void) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return scan_line_construct (TYPE_SCAN_LINE);
+#line 1518 "scanner.c"
+}
+
+
+static void value_scan_line_init (GValue* value) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1525 "scanner.c"
+}
+
+
+static void value_scan_line_free_value (GValue* value) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (value->data[0].v_pointer) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_line_unref (value->data[0].v_pointer);
+#line 1534 "scanner.c"
+ }
+}
+
+
+static void value_scan_line_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (src_value->data[0].v_pointer) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = scan_line_ref (src_value->data[0].v_pointer);
+#line 1544 "scanner.c"
+ } else {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 1548 "scanner.c"
+ }
+}
+
+
+static gpointer value_scan_line_peek_pointer (const GValue* value) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 1556 "scanner.c"
+}
+
+
+static gchar* value_scan_line_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (collect_values[0].v_pointer) {
+#line 1563 "scanner.c"
+ ScanLine* object;
+ object = collect_values[0].v_pointer;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 1570 "scanner.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 1574 "scanner.c"
+ }
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = scan_line_ref (object);
+#line 1578 "scanner.c"
+ } else {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1582 "scanner.c"
+ }
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 1586 "scanner.c"
+}
+
+
+static gchar* value_scan_line_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ ScanLine** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!object_p) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 1597 "scanner.c"
+ }
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!value->data[0].v_pointer) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = NULL;
+#line 1603 "scanner.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = value->data[0].v_pointer;
+#line 1607 "scanner.c"
+ } else {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = scan_line_ref (value->data[0].v_pointer);
+#line 1611 "scanner.c"
+ }
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 1615 "scanner.c"
+}
+
+
+GParamSpec* param_spec_scan_line (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecScanLine* spec;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_LINE), NULL);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return G_PARAM_SPEC (spec);
+#line 1629 "scanner.c"
+}
+
+
+gpointer value_get_scan_line (const GValue* value) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_LINE), NULL);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 1638 "scanner.c"
+}
+
+
+void value_set_scan_line (GValue* value, gpointer v_object) {
+ ScanLine* old;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_LINE));
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_LINE));
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_line_ref (value->data[0].v_pointer);
+#line 1658 "scanner.c"
+ } else {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1662 "scanner.c"
+ }
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_line_unref (old);
+#line 1668 "scanner.c"
+ }
+}
+
+
+void value_take_scan_line (GValue* value, gpointer v_object) {
+ ScanLine* old;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_LINE));
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_LINE));
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 1687 "scanner.c"
+ } else {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1691 "scanner.c"
+ }
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_line_unref (old);
+#line 1697 "scanner.c"
+ }
+}
+
+
+static void scan_line_class_init (ScanLineClass * klass) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_line_parent_class = g_type_class_peek_parent (klass);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_LINE_CLASS (klass)->finalize = scan_line_finalize;
+#line 1707 "scanner.c"
+}
+
+
+static void scan_line_instance_init (ScanLine * self) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->ref_count = 1;
+#line 1714 "scanner.c"
+}
+
+
+static void scan_line_finalize (ScanLine* obj) {
+ ScanLine * self;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_LINE, ScanLine);
+#line 55 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->data = (g_free (self->data), NULL);
+#line 1724 "scanner.c"
+}
+
+
+GType scan_line_get_type (void) {
+ static volatile gsize scan_line_type_id__volatile = 0;
+ if (g_once_init_enter (&scan_line_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_scan_line_init, value_scan_line_free_value, value_scan_line_copy_value, value_scan_line_peek_pointer, "p", value_scan_line_collect_value, "p", value_scan_line_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (ScanLineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scan_line_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScanLine), 0, (GInstanceInitFunc) scan_line_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType scan_line_type_id;
+ scan_line_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ScanLine", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&scan_line_type_id__volatile, scan_line_type_id);
+ }
+ return scan_line_type_id__volatile;
+}
+
+
+gpointer scan_line_ref (gpointer instance) {
+ ScanLine* self;
+ self = instance;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return instance;
+#line 1749 "scanner.c"
+}
+
+
+void scan_line_unref (gpointer instance) {
+ ScanLine* self;
+ self = instance;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_LINE_GET_CLASS (self)->finalize (self);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 1762 "scanner.c"
+ }
+}
+
+
+GType scan_mode_get_type (void) {
+ static volatile gsize scan_mode_type_id__volatile = 0;
+ if (g_once_init_enter (&scan_mode_type_id__volatile)) {
+ static const GEnumValue values[] = {{SCAN_MODE_DEFAULT, "SCAN_MODE_DEFAULT", "default"}, {SCAN_MODE_COLOR, "SCAN_MODE_COLOR", "color"}, {SCAN_MODE_GRAY, "SCAN_MODE_GRAY", "gray"}, {SCAN_MODE_LINEART, "SCAN_MODE_LINEART", "lineart"}, {0, NULL, NULL}};
+ GType scan_mode_type_id;
+ scan_mode_type_id = g_enum_register_static ("ScanMode", values);
+ g_once_init_leave (&scan_mode_type_id__volatile, scan_mode_type_id);
+ }
+ return scan_mode_type_id__volatile;
+}
+
+
+GType scan_type_get_type (void) {
+ static volatile gsize scan_type_type_id__volatile = 0;
+ if (g_once_init_enter (&scan_type_type_id__volatile)) {
+ static const GEnumValue values[] = {{SCAN_TYPE_SINGLE, "SCAN_TYPE_SINGLE", "single"}, {SCAN_TYPE_ADF_FRONT, "SCAN_TYPE_ADF_FRONT", "adf-front"}, {SCAN_TYPE_ADF_BACK, "SCAN_TYPE_ADF_BACK", "adf-back"}, {SCAN_TYPE_ADF_BOTH, "SCAN_TYPE_ADF_BOTH", "adf-both"}, {0, NULL, NULL}};
+ GType scan_type_type_id;
+ scan_type_type_id = g_enum_register_static ("ScanType", values);
+ g_once_init_leave (&scan_type_type_id__volatile, scan_type_type_id);
+ }
+ return scan_type_type_id__volatile;
+}
+
+
+ScanOptions* scan_options_construct (GType object_type) {
+ ScanOptions* self = NULL;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (ScanOptions*) g_type_create_instance (object_type);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 1797 "scanner.c"
+}
+
+
+ScanOptions* scan_options_new (void) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return scan_options_construct (TYPE_SCAN_OPTIONS);
+#line 1804 "scanner.c"
+}
+
+
+static void value_scan_options_init (GValue* value) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1811 "scanner.c"
+}
+
+
+static void value_scan_options_free_value (GValue* value) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (value->data[0].v_pointer) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_options_unref (value->data[0].v_pointer);
+#line 1820 "scanner.c"
+ }
+}
+
+
+static void value_scan_options_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (src_value->data[0].v_pointer) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = scan_options_ref (src_value->data[0].v_pointer);
+#line 1830 "scanner.c"
+ } else {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 1834 "scanner.c"
+ }
+}
+
+
+static gpointer value_scan_options_peek_pointer (const GValue* value) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 1842 "scanner.c"
+}
+
+
+static gchar* value_scan_options_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (collect_values[0].v_pointer) {
+#line 1849 "scanner.c"
+ ScanOptions* object;
+ object = collect_values[0].v_pointer;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 1856 "scanner.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 1860 "scanner.c"
+ }
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = scan_options_ref (object);
+#line 1864 "scanner.c"
+ } else {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1868 "scanner.c"
+ }
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 1872 "scanner.c"
+}
+
+
+static gchar* value_scan_options_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ ScanOptions** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!object_p) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 1883 "scanner.c"
+ }
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!value->data[0].v_pointer) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = NULL;
+#line 1889 "scanner.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = value->data[0].v_pointer;
+#line 1893 "scanner.c"
+ } else {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = scan_options_ref (value->data[0].v_pointer);
+#line 1897 "scanner.c"
+ }
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 1901 "scanner.c"
+}
+
+
+GParamSpec* param_spec_scan_options (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecScanOptions* spec;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_OPTIONS), NULL);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return G_PARAM_SPEC (spec);
+#line 1915 "scanner.c"
+}
+
+
+gpointer value_get_scan_options (const GValue* value) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_OPTIONS), NULL);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 1924 "scanner.c"
+}
+
+
+void value_set_scan_options (GValue* value, gpointer v_object) {
+ ScanOptions* old;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_OPTIONS));
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_OPTIONS));
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_options_ref (value->data[0].v_pointer);
+#line 1944 "scanner.c"
+ } else {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1948 "scanner.c"
+ }
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_options_unref (old);
+#line 1954 "scanner.c"
+ }
+}
+
+
+void value_take_scan_options (GValue* value, gpointer v_object) {
+ ScanOptions* old;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_OPTIONS));
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_OPTIONS));
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 1973 "scanner.c"
+ } else {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 1977 "scanner.c"
+ }
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_options_unref (old);
+#line 1983 "scanner.c"
+ }
+}
+
+
+static void scan_options_class_init (ScanOptionsClass * klass) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_options_parent_class = g_type_class_peek_parent (klass);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_OPTIONS_CLASS (klass)->finalize = scan_options_finalize;
+#line 1993 "scanner.c"
+}
+
+
+static void scan_options_instance_init (ScanOptions * self) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->ref_count = 1;
+#line 2000 "scanner.c"
+}
+
+
+static void scan_options_finalize (ScanOptions* obj) {
+ ScanOptions * self;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_OPTIONS, ScanOptions);
+#line 2008 "scanner.c"
+}
+
+
+GType scan_options_get_type (void) {
+ static volatile gsize scan_options_type_id__volatile = 0;
+ if (g_once_init_enter (&scan_options_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_scan_options_init, value_scan_options_free_value, value_scan_options_copy_value, value_scan_options_peek_pointer, "p", value_scan_options_collect_value, "p", value_scan_options_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (ScanOptionsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scan_options_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScanOptions), 0, (GInstanceInitFunc) scan_options_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType scan_options_type_id;
+ scan_options_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ScanOptions", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&scan_options_type_id__volatile, scan_options_type_id);
+ }
+ return scan_options_type_id__volatile;
+}
+
+
+gpointer scan_options_ref (gpointer instance) {
+ ScanOptions* self;
+ self = instance;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return instance;
+#line 2033 "scanner.c"
+}
+
+
+void scan_options_unref (gpointer instance) {
+ ScanOptions* self;
+ self = instance;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_OPTIONS_GET_CLASS (self)->finalize (self);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 2046 "scanner.c"
+ }
+}
+
+
+ScanJob* scan_job_construct (GType object_type) {
+ ScanJob* self = NULL;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (ScanJob*) g_type_create_instance (object_type);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 2057 "scanner.c"
+}
+
+
+ScanJob* scan_job_new (void) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return scan_job_construct (TYPE_SCAN_JOB);
+#line 2064 "scanner.c"
+}
+
+
+static void value_scan_job_init (GValue* value) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2071 "scanner.c"
+}
+
+
+static void value_scan_job_free_value (GValue* value) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (value->data[0].v_pointer) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_job_unref (value->data[0].v_pointer);
+#line 2080 "scanner.c"
+ }
+}
+
+
+static void value_scan_job_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (src_value->data[0].v_pointer) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = scan_job_ref (src_value->data[0].v_pointer);
+#line 2090 "scanner.c"
+ } else {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 2094 "scanner.c"
+ }
+}
+
+
+static gpointer value_scan_job_peek_pointer (const GValue* value) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 2102 "scanner.c"
+}
+
+
+static gchar* value_scan_job_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (collect_values[0].v_pointer) {
+#line 2109 "scanner.c"
+ ScanJob* object;
+ object = collect_values[0].v_pointer;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 2116 "scanner.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 2120 "scanner.c"
+ }
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = scan_job_ref (object);
+#line 2124 "scanner.c"
+ } else {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2128 "scanner.c"
+ }
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 2132 "scanner.c"
+}
+
+
+static gchar* value_scan_job_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ ScanJob** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!object_p) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 2143 "scanner.c"
+ }
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!value->data[0].v_pointer) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = NULL;
+#line 2149 "scanner.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = value->data[0].v_pointer;
+#line 2153 "scanner.c"
+ } else {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = scan_job_ref (value->data[0].v_pointer);
+#line 2157 "scanner.c"
+ }
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 2161 "scanner.c"
+}
+
+
+GParamSpec* param_spec_scan_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecScanJob* spec;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCAN_JOB), NULL);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return G_PARAM_SPEC (spec);
+#line 2175 "scanner.c"
+}
+
+
+gpointer value_get_scan_job (const GValue* value) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_JOB), NULL);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 2184 "scanner.c"
+}
+
+
+void value_set_scan_job (GValue* value, gpointer v_object) {
+ ScanJob* old;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_JOB));
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_JOB));
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_job_ref (value->data[0].v_pointer);
+#line 2204 "scanner.c"
+ } else {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2208 "scanner.c"
+ }
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_job_unref (old);
+#line 2214 "scanner.c"
+ }
+}
+
+
+void value_take_scan_job (GValue* value, gpointer v_object) {
+ ScanJob* old;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCAN_JOB));
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCAN_JOB));
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 2233 "scanner.c"
+ } else {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2237 "scanner.c"
+ }
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_job_unref (old);
+#line 2243 "scanner.c"
+ }
+}
+
+
+static void scan_job_class_init (ScanJobClass * klass) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_job_parent_class = g_type_class_peek_parent (klass);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_JOB_CLASS (klass)->finalize = scan_job_finalize;
+#line 2253 "scanner.c"
+}
+
+
+static void scan_job_instance_init (ScanJob * self) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->ref_count = 1;
+#line 2260 "scanner.c"
+}
+
+
+static void scan_job_finalize (ScanJob* obj) {
+ ScanJob * self;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCAN_JOB, ScanJob);
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->device);
+#line 2270 "scanner.c"
+}
+
+
+GType scan_job_get_type (void) {
+ static volatile gsize scan_job_type_id__volatile = 0;
+ if (g_once_init_enter (&scan_job_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_scan_job_init, value_scan_job_free_value, value_scan_job_copy_value, value_scan_job_peek_pointer, "p", value_scan_job_collect_value, "p", value_scan_job_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (ScanJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scan_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ScanJob), 0, (GInstanceInitFunc) scan_job_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType scan_job_type_id;
+ scan_job_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ScanJob", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&scan_job_type_id__volatile, scan_job_type_id);
+ }
+ return scan_job_type_id__volatile;
+}
+
+
+gpointer scan_job_ref (gpointer instance) {
+ ScanJob* self;
+ self = instance;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return instance;
+#line 2295 "scanner.c"
+}
+
+
+void scan_job_unref (gpointer instance) {
+ ScanJob* self;
+ self = instance;
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCAN_JOB_GET_CLASS (self)->finalize (self);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 2308 "scanner.c"
+ }
+}
+
+
+Request* request_construct (GType object_type) {
+ Request* self = NULL;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (Request*) g_type_create_instance (object_type);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 2319 "scanner.c"
+}
+
+
+Request* request_new (void) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return request_construct (TYPE_REQUEST);
+#line 2326 "scanner.c"
+}
+
+
+static void value_request_init (GValue* value) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2333 "scanner.c"
+}
+
+
+static void value_request_free_value (GValue* value) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (value->data[0].v_pointer) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_unref (value->data[0].v_pointer);
+#line 2342 "scanner.c"
+ }
+}
+
+
+static void value_request_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (src_value->data[0].v_pointer) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = request_ref (src_value->data[0].v_pointer);
+#line 2352 "scanner.c"
+ } else {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 2356 "scanner.c"
+ }
+}
+
+
+static gpointer value_request_peek_pointer (const GValue* value) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 2364 "scanner.c"
+}
+
+
+static gchar* value_request_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (collect_values[0].v_pointer) {
+#line 2371 "scanner.c"
+ Request* object;
+ object = collect_values[0].v_pointer;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 2378 "scanner.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 2382 "scanner.c"
+ }
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = request_ref (object);
+#line 2386 "scanner.c"
+ } else {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2390 "scanner.c"
+ }
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 2394 "scanner.c"
+}
+
+
+static gchar* value_request_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ Request** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!object_p) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 2405 "scanner.c"
+ }
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!value->data[0].v_pointer) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = NULL;
+#line 2411 "scanner.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = value->data[0].v_pointer;
+#line 2415 "scanner.c"
+ } else {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = request_ref (value->data[0].v_pointer);
+#line 2419 "scanner.c"
+ }
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 2423 "scanner.c"
+}
+
+
+GParamSpec* param_spec_request (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecRequest* spec;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_REQUEST), NULL);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return G_PARAM_SPEC (spec);
+#line 2437 "scanner.c"
+}
+
+
+gpointer value_get_request (const GValue* value) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_REQUEST), NULL);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 2446 "scanner.c"
+}
+
+
+void value_set_request (GValue* value, gpointer v_object) {
+ Request* old;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_REQUEST));
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_REQUEST));
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_ref (value->data[0].v_pointer);
+#line 2466 "scanner.c"
+ } else {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2470 "scanner.c"
+ }
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_unref (old);
+#line 2476 "scanner.c"
+ }
+}
+
+
+void value_take_request (GValue* value, gpointer v_object) {
+ Request* old;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_REQUEST));
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_REQUEST));
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 2495 "scanner.c"
+ } else {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2499 "scanner.c"
+ }
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_unref (old);
+#line 2505 "scanner.c"
+ }
+}
+
+
+static void request_class_init (RequestClass * klass) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_parent_class = g_type_class_peek_parent (klass);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ REQUEST_CLASS (klass)->finalize = request_finalize;
+#line 2515 "scanner.c"
+}
+
+
+static void request_instance_init (Request * self) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->ref_count = 1;
+#line 2522 "scanner.c"
+}
+
+
+static void request_finalize (Request* obj) {
+ Request * self;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_REQUEST, Request);
+#line 2530 "scanner.c"
+}
+
+
+GType request_get_type (void) {
+ static volatile gsize request_type_id__volatile = 0;
+ if (g_once_init_enter (&request_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_request_init, value_request_free_value, value_request_copy_value, value_request_peek_pointer, "p", value_request_collect_value, "p", value_request_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (RequestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) request_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Request), 0, (GInstanceInitFunc) request_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType request_type_id;
+ request_type_id = g_type_register_fundamental (g_type_fundamental_next (), "Request", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&request_type_id__volatile, request_type_id);
+ }
+ return request_type_id__volatile;
+}
+
+
+gpointer request_ref (gpointer instance) {
+ Request* self;
+ self = instance;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return instance;
+#line 2555 "scanner.c"
+}
+
+
+void request_unref (gpointer instance) {
+ Request* self;
+ self = instance;
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ REQUEST_GET_CLASS (self)->finalize (self);
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 2568 "scanner.c"
+ }
+}
+
+
+RequestRedetect* request_redetect_construct (GType object_type) {
+ RequestRedetect* self = NULL;
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (RequestRedetect*) request_construct (object_type);
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 2579 "scanner.c"
+}
+
+
+RequestRedetect* request_redetect_new (void) {
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return request_redetect_construct (TYPE_REQUEST_REDETECT);
+#line 2586 "scanner.c"
+}
+
+
+static void request_redetect_class_init (RequestRedetectClass * klass) {
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_redetect_parent_class = g_type_class_peek_parent (klass);
+#line 2593 "scanner.c"
+}
+
+
+static void request_redetect_instance_init (RequestRedetect * self) {
+}
+
+
+GType request_redetect_get_type (void) {
+ static volatile gsize request_redetect_type_id__volatile = 0;
+ if (g_once_init_enter (&request_redetect_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (RequestRedetectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) request_redetect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RequestRedetect), 0, (GInstanceInitFunc) request_redetect_instance_init, NULL };
+ GType request_redetect_type_id;
+ request_redetect_type_id = g_type_register_static (TYPE_REQUEST, "RequestRedetect", &g_define_type_info, 0);
+ g_once_init_leave (&request_redetect_type_id__volatile, request_redetect_type_id);
+ }
+ return request_redetect_type_id__volatile;
+}
+
+
+RequestCancel* request_cancel_construct (GType object_type) {
+ RequestCancel* self = NULL;
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (RequestCancel*) request_construct (object_type);
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 2619 "scanner.c"
+}
+
+
+RequestCancel* request_cancel_new (void) {
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return request_cancel_construct (TYPE_REQUEST_CANCEL);
+#line 2626 "scanner.c"
+}
+
+
+static void request_cancel_class_init (RequestCancelClass * klass) {
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_cancel_parent_class = g_type_class_peek_parent (klass);
+#line 2633 "scanner.c"
+}
+
+
+static void request_cancel_instance_init (RequestCancel * self) {
+}
+
+
+GType request_cancel_get_type (void) {
+ static volatile gsize request_cancel_type_id__volatile = 0;
+ if (g_once_init_enter (&request_cancel_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (RequestCancelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) request_cancel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RequestCancel), 0, (GInstanceInitFunc) request_cancel_instance_init, NULL };
+ GType request_cancel_type_id;
+ request_cancel_type_id = g_type_register_static (TYPE_REQUEST, "RequestCancel", &g_define_type_info, 0);
+ g_once_init_leave (&request_cancel_type_id__volatile, request_cancel_type_id);
+ }
+ return request_cancel_type_id__volatile;
+}
+
+
+RequestStartScan* request_start_scan_construct (GType object_type) {
+ RequestStartScan* self = NULL;
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (RequestStartScan*) request_construct (object_type);
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 2659 "scanner.c"
+}
+
+
+RequestStartScan* request_start_scan_new (void) {
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return request_start_scan_construct (TYPE_REQUEST_START_SCAN);
+#line 2666 "scanner.c"
+}
+
+
+static void request_start_scan_class_init (RequestStartScanClass * klass) {
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_start_scan_parent_class = g_type_class_peek_parent (klass);
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ REQUEST_CLASS (klass)->finalize = request_start_scan_finalize;
+#line 2675 "scanner.c"
+}
+
+
+static void request_start_scan_instance_init (RequestStartScan * self) {
+}
+
+
+static void request_start_scan_finalize (Request* obj) {
+ RequestStartScan * self;
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_REQUEST_START_SCAN, RequestStartScan);
+#line 109 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (self->job);
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ REQUEST_CLASS (request_start_scan_parent_class)->finalize (obj);
+#line 2691 "scanner.c"
+}
+
+
+GType request_start_scan_get_type (void) {
+ static volatile gsize request_start_scan_type_id__volatile = 0;
+ if (g_once_init_enter (&request_start_scan_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (RequestStartScanClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) request_start_scan_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RequestStartScan), 0, (GInstanceInitFunc) request_start_scan_instance_init, NULL };
+ GType request_start_scan_type_id;
+ request_start_scan_type_id = g_type_register_static (TYPE_REQUEST, "RequestStartScan", &g_define_type_info, 0);
+ g_once_init_leave (&request_start_scan_type_id__volatile, request_start_scan_type_id);
+ }
+ return request_start_scan_type_id__volatile;
+}
+
+
+RequestQuit* request_quit_construct (GType object_type) {
+ RequestQuit* self = NULL;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (RequestQuit*) request_construct (object_type);
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 2713 "scanner.c"
+}
+
+
+RequestQuit* request_quit_new (void) {
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return request_quit_construct (TYPE_REQUEST_QUIT);
+#line 2720 "scanner.c"
+}
+
+
+static void request_quit_class_init (RequestQuitClass * klass) {
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_quit_parent_class = g_type_class_peek_parent (klass);
+#line 2727 "scanner.c"
+}
+
+
+static void request_quit_instance_init (RequestQuit * self) {
+}
+
+
+GType request_quit_get_type (void) {
+ static volatile gsize request_quit_type_id__volatile = 0;
+ if (g_once_init_enter (&request_quit_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (RequestQuitClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) request_quit_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RequestQuit), 0, (GInstanceInitFunc) request_quit_instance_init, NULL };
+ GType request_quit_type_id;
+ request_quit_type_id = g_type_register_static (TYPE_REQUEST, "RequestQuit", &g_define_type_info, 0);
+ g_once_init_leave (&request_quit_type_id__volatile, request_quit_type_id);
+ }
+ return request_quit_type_id__volatile;
+}
+
+
+Credentials* credentials_construct (GType object_type) {
+ Credentials* self = NULL;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (Credentials*) g_type_create_instance (object_type);
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 2753 "scanner.c"
+}
+
+
+Credentials* credentials_new (void) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return credentials_construct (TYPE_CREDENTIALS);
+#line 2760 "scanner.c"
+}
+
+
+static void value_credentials_init (GValue* value) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2767 "scanner.c"
+}
+
+
+static void value_credentials_free_value (GValue* value) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (value->data[0].v_pointer) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ credentials_unref (value->data[0].v_pointer);
+#line 2776 "scanner.c"
+ }
+}
+
+
+static void value_credentials_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (src_value->data[0].v_pointer) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = credentials_ref (src_value->data[0].v_pointer);
+#line 2786 "scanner.c"
+ } else {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 2790 "scanner.c"
+ }
+}
+
+
+static gpointer value_credentials_peek_pointer (const GValue* value) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 2798 "scanner.c"
+}
+
+
+static gchar* value_credentials_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (collect_values[0].v_pointer) {
+#line 2805 "scanner.c"
+ Credentials* object;
+ object = collect_values[0].v_pointer;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 2812 "scanner.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 2816 "scanner.c"
+ }
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = credentials_ref (object);
+#line 2820 "scanner.c"
+ } else {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2824 "scanner.c"
+ }
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 2828 "scanner.c"
+}
+
+
+static gchar* value_credentials_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ Credentials** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!object_p) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 2839 "scanner.c"
+ }
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!value->data[0].v_pointer) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = NULL;
+#line 2845 "scanner.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = value->data[0].v_pointer;
+#line 2849 "scanner.c"
+ } else {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = credentials_ref (value->data[0].v_pointer);
+#line 2853 "scanner.c"
+ }
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 2857 "scanner.c"
+}
+
+
+GParamSpec* param_spec_credentials (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecCredentials* spec;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_CREDENTIALS), NULL);
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return G_PARAM_SPEC (spec);
+#line 2871 "scanner.c"
+}
+
+
+gpointer value_get_credentials (const GValue* value) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CREDENTIALS), NULL);
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 2880 "scanner.c"
+}
+
+
+void value_set_credentials (GValue* value, gpointer v_object) {
+ Credentials* old;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CREDENTIALS));
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_CREDENTIALS));
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ credentials_ref (value->data[0].v_pointer);
+#line 2900 "scanner.c"
+ } else {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2904 "scanner.c"
+ }
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ credentials_unref (old);
+#line 2910 "scanner.c"
+ }
+}
+
+
+void value_take_credentials (GValue* value, gpointer v_object) {
+ Credentials* old;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_CREDENTIALS));
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_CREDENTIALS));
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 2929 "scanner.c"
+ } else {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 2933 "scanner.c"
+ }
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ credentials_unref (old);
+#line 2939 "scanner.c"
+ }
+}
+
+
+static void credentials_class_init (CredentialsClass * klass) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ credentials_parent_class = g_type_class_peek_parent (klass);
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ CREDENTIALS_CLASS (klass)->finalize = credentials_finalize;
+#line 2949 "scanner.c"
+}
+
+
+static void credentials_instance_init (Credentials * self) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->ref_count = 1;
+#line 2956 "scanner.c"
+}
+
+
+static void credentials_finalize (Credentials* obj) {
+ Credentials * self;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CREDENTIALS, Credentials);
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->username);
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->password);
+#line 2968 "scanner.c"
+}
+
+
+GType credentials_get_type (void) {
+ static volatile gsize credentials_type_id__volatile = 0;
+ if (g_once_init_enter (&credentials_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_credentials_init, value_credentials_free_value, value_credentials_copy_value, value_credentials_peek_pointer, "p", value_credentials_collect_value, "p", value_credentials_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (CredentialsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) credentials_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Credentials), 0, (GInstanceInitFunc) credentials_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType credentials_type_id;
+ credentials_type_id = g_type_register_fundamental (g_type_fundamental_next (), "Credentials", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&credentials_type_id__volatile, credentials_type_id);
+ }
+ return credentials_type_id__volatile;
+}
+
+
+gpointer credentials_ref (gpointer instance) {
+ Credentials* self;
+ self = instance;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return instance;
+#line 2993 "scanner.c"
+}
+
+
+void credentials_unref (gpointer instance) {
+ Credentials* self;
+ self = instance;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ CREDENTIALS_GET_CLASS (self)->finalize (self);
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 3006 "scanner.c"
+ }
+}
+
+
+GType scan_state_get_type (void) {
+ static volatile gsize scan_state_type_id__volatile = 0;
+ if (g_once_init_enter (&scan_state_type_id__volatile)) {
+ static const GEnumValue values[] = {{SCAN_STATE_IDLE, "SCAN_STATE_IDLE", "idle"}, {SCAN_STATE_REDETECT, "SCAN_STATE_REDETECT", "redetect"}, {SCAN_STATE_OPEN, "SCAN_STATE_OPEN", "open"}, {SCAN_STATE_GET_OPTION, "SCAN_STATE_GET_OPTION", "get-option"}, {SCAN_STATE_START, "SCAN_STATE_START", "start"}, {SCAN_STATE_GET_PARAMETERS, "SCAN_STATE_GET_PARAMETERS", "get-parameters"}, {SCAN_STATE_READ, "SCAN_STATE_READ", "read"}, {0, NULL, NULL}};
+ GType scan_state_type_id;
+ scan_state_type_id = g_enum_register_static ("ScanState", values);
+ g_once_init_leave (&scan_state_type_id__volatile, scan_state_type_id);
+ }
+ return scan_state_type_id__volatile;
+}
+
+
+static void notify_real_run (Notify* self, Scanner* scanner) {
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 3026 "scanner.c"
+}
+
+
+void notify_run (Notify* self, Scanner* scanner) {
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_GET_CLASS (self)->run (self, scanner);
+#line 3035 "scanner.c"
+}
+
+
+Notify* notify_construct (GType object_type) {
+ Notify* self = NULL;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (Notify*) g_type_create_instance (object_type);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 3045 "scanner.c"
+}
+
+
+Notify* notify_new (void) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_construct (TYPE_NOTIFY);
+#line 3052 "scanner.c"
+}
+
+
+static void value_notify_init (GValue* value) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 3059 "scanner.c"
+}
+
+
+static void value_notify_free_value (GValue* value) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (value->data[0].v_pointer) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_unref (value->data[0].v_pointer);
+#line 3068 "scanner.c"
+ }
+}
+
+
+static void value_notify_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (src_value->data[0].v_pointer) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = notify_ref (src_value->data[0].v_pointer);
+#line 3078 "scanner.c"
+ } else {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 3082 "scanner.c"
+ }
+}
+
+
+static gpointer value_notify_peek_pointer (const GValue* value) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 3090 "scanner.c"
+}
+
+
+static gchar* value_notify_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (collect_values[0].v_pointer) {
+#line 3097 "scanner.c"
+ Notify* object;
+ object = collect_values[0].v_pointer;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 3104 "scanner.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 3108 "scanner.c"
+ }
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = notify_ref (object);
+#line 3112 "scanner.c"
+ } else {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 3116 "scanner.c"
+ }
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 3120 "scanner.c"
+}
+
+
+static gchar* value_notify_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ Notify** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!object_p) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 3131 "scanner.c"
+ }
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!value->data[0].v_pointer) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = NULL;
+#line 3137 "scanner.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = value->data[0].v_pointer;
+#line 3141 "scanner.c"
+ } else {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = notify_ref (value->data[0].v_pointer);
+#line 3145 "scanner.c"
+ }
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 3149 "scanner.c"
+}
+
+
+GParamSpec* param_spec_notify (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecNotify* spec;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_NOTIFY), NULL);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return G_PARAM_SPEC (spec);
+#line 3163 "scanner.c"
+}
+
+
+gpointer value_get_notify (const GValue* value) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NOTIFY), NULL);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 3172 "scanner.c"
+}
+
+
+void value_set_notify (GValue* value, gpointer v_object) {
+ Notify* old;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NOTIFY));
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_NOTIFY));
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_ref (value->data[0].v_pointer);
+#line 3192 "scanner.c"
+ } else {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 3196 "scanner.c"
+ }
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_unref (old);
+#line 3202 "scanner.c"
+ }
+}
+
+
+void value_take_notify (GValue* value, gpointer v_object) {
+ Notify* old;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NOTIFY));
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_NOTIFY));
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 3221 "scanner.c"
+ } else {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 3225 "scanner.c"
+ }
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_unref (old);
+#line 3231 "scanner.c"
+ }
+}
+
+
+static void notify_class_init (NotifyClass * klass) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_parent_class = g_type_class_peek_parent (klass);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->finalize = notify_finalize;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_real_run;
+#line 3243 "scanner.c"
+}
+
+
+static void notify_instance_init (Notify * self) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->ref_count = 1;
+#line 3250 "scanner.c"
+}
+
+
+static void notify_finalize (Notify* obj) {
+ Notify * self;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY, Notify);
+#line 3258 "scanner.c"
+}
+
+
+GType notify_get_type (void) {
+ static volatile gsize notify_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_notify_init, value_notify_free_value, value_notify_copy_value, value_notify_peek_pointer, "p", value_notify_collect_value, "p", value_notify_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Notify), 0, (GInstanceInitFunc) notify_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType notify_type_id;
+ notify_type_id = g_type_register_fundamental (g_type_fundamental_next (), "Notify", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&notify_type_id__volatile, notify_type_id);
+ }
+ return notify_type_id__volatile;
+}
+
+
+gpointer notify_ref (gpointer instance) {
+ Notify* self;
+ self = instance;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return instance;
+#line 3283 "scanner.c"
+}
+
+
+void notify_unref (gpointer instance) {
+ Notify* self;
+ self = instance;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_GET_CLASS (self)->finalize (self);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 3296 "scanner.c"
+ }
+}
+
+
+static void notify_scanning_changed_real_run (Notify* base, Scanner* scanner) {
+ NotifyScanningChanged * self;
+ Scanner* _tmp0_ = NULL;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyScanningChanged*) base;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = scanner;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_emit_by_name (_tmp0_, "scanning-changed");
+#line 3312 "scanner.c"
+}
+
+
+NotifyScanningChanged* notify_scanning_changed_construct (GType object_type) {
+ NotifyScanningChanged* self = NULL;
+#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyScanningChanged*) notify_construct (object_type);
+#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 3322 "scanner.c"
+}
+
+
+NotifyScanningChanged* notify_scanning_changed_new (void) {
+#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_scanning_changed_construct (TYPE_NOTIFY_SCANNING_CHANGED);
+#line 3329 "scanner.c"
+}
+
+
+static void notify_scanning_changed_class_init (NotifyScanningChangedClass * klass) {
+#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_scanning_changed_parent_class = g_type_class_peek_parent (klass);
+#line 136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_scanning_changed_real_run;
+#line 3338 "scanner.c"
+}
+
+
+static void notify_scanning_changed_instance_init (NotifyScanningChanged * self) {
+}
+
+
+GType notify_scanning_changed_get_type (void) {
+ static volatile gsize notify_scanning_changed_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_scanning_changed_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyScanningChangedClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_scanning_changed_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyScanningChanged), 0, (GInstanceInitFunc) notify_scanning_changed_instance_init, NULL };
+ GType notify_scanning_changed_type_id;
+ notify_scanning_changed_type_id = g_type_register_static (TYPE_NOTIFY, "NotifyScanningChanged", &g_define_type_info, 0);
+ g_once_init_leave (&notify_scanning_changed_type_id__volatile, notify_scanning_changed_type_id);
+ }
+ return notify_scanning_changed_type_id__volatile;
+}
+
+
+static void _scan_device_unref0_ (gpointer var) {
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ (var == NULL) ? NULL : (var = (scan_device_unref (var), NULL));
+#line 3361 "scanner.c"
+}
+
+
+static void _g_list_free__scan_device_unref0_ (GList* self) {
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_list_foreach (self, (GFunc) _scan_device_unref0_, NULL);
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_list_free (self);
+#line 3370 "scanner.c"
+}
+
+
+NotifyUpdateDevices* notify_update_devices_construct (GType object_type, GList* devices) {
+ NotifyUpdateDevices* self = NULL;
+ GList* _tmp0_ = NULL;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyUpdateDevices*) notify_construct (object_type);
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = devices;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ devices = NULL;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ __g_list_free__scan_device_unref0_0 (self->priv->devices);
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->devices = _tmp0_;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ __g_list_free__scan_device_unref0_0 (devices);
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 3391 "scanner.c"
+}
+
+
+NotifyUpdateDevices* notify_update_devices_new (GList* devices) {
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_update_devices_construct (TYPE_NOTIFY_UPDATE_DEVICES, devices);
+#line 3398 "scanner.c"
+}
+
+
+static void notify_update_devices_real_run (Notify* base, Scanner* scanner) {
+ NotifyUpdateDevices * self;
+ Scanner* _tmp0_ = NULL;
+ GList* _tmp1_ = NULL;
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyUpdateDevices*) base;
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = scanner;
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->devices;
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_emit_by_name (_tmp0_, "update-devices", _tmp1_);
+#line 3416 "scanner.c"
+}
+
+
+static void notify_update_devices_class_init (NotifyUpdateDevicesClass * klass) {
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_update_devices_parent_class = g_type_class_peek_parent (klass);
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->finalize = notify_update_devices_finalize;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_class_add_private (klass, sizeof (NotifyUpdateDevicesPrivate));
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_update_devices_real_run;
+#line 3429 "scanner.c"
+}
+
+
+static void notify_update_devices_instance_init (NotifyUpdateDevices * self) {
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv = NOTIFY_UPDATE_DEVICES_GET_PRIVATE (self);
+#line 3436 "scanner.c"
+}
+
+
+static void notify_update_devices_finalize (Notify* obj) {
+ NotifyUpdateDevices * self;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_UPDATE_DEVICES, NotifyUpdateDevices);
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ __g_list_free__scan_device_unref0_0 (self->priv->devices);
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (notify_update_devices_parent_class)->finalize (obj);
+#line 3448 "scanner.c"
+}
+
+
+GType notify_update_devices_get_type (void) {
+ static volatile gsize notify_update_devices_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_update_devices_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyUpdateDevicesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_update_devices_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyUpdateDevices), 0, (GInstanceInitFunc) notify_update_devices_instance_init, NULL };
+ GType notify_update_devices_type_id;
+ notify_update_devices_type_id = g_type_register_static (TYPE_NOTIFY, "NotifyUpdateDevices", &g_define_type_info, 0);
+ g_once_init_leave (&notify_update_devices_type_id__volatile, notify_update_devices_type_id);
+ }
+ return notify_update_devices_type_id__volatile;
+}
+
+
+NotifyRequestAuthorization* notify_request_authorization_construct (GType object_type, const gchar* resource) {
+ NotifyRequestAuthorization* self = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (resource != NULL, NULL);
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyRequestAuthorization*) notify_construct (object_type);
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = resource;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->resource);
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->resource = _tmp1_;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 3482 "scanner.c"
+}
+
+
+NotifyRequestAuthorization* notify_request_authorization_new (const gchar* resource) {
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_request_authorization_construct (TYPE_NOTIFY_REQUEST_AUTHORIZATION, resource);
+#line 3489 "scanner.c"
+}
+
+
+static void notify_request_authorization_real_run (Notify* base, Scanner* scanner) {
+ NotifyRequestAuthorization * self;
+ Scanner* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyRequestAuthorization*) base;
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = scanner;
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->resource;
+#line 152 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_emit_by_name (_tmp0_, "request-authorization", _tmp1_);
+#line 3507 "scanner.c"
+}
+
+
+static void notify_request_authorization_class_init (NotifyRequestAuthorizationClass * klass) {
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_request_authorization_parent_class = g_type_class_peek_parent (klass);
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->finalize = notify_request_authorization_finalize;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_class_add_private (klass, sizeof (NotifyRequestAuthorizationPrivate));
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_request_authorization_real_run;
+#line 3520 "scanner.c"
+}
+
+
+static void notify_request_authorization_instance_init (NotifyRequestAuthorization * self) {
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv = NOTIFY_REQUEST_AUTHORIZATION_GET_PRIVATE (self);
+#line 3527 "scanner.c"
+}
+
+
+static void notify_request_authorization_finalize (Notify* obj) {
+ NotifyRequestAuthorization * self;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_REQUEST_AUTHORIZATION, NotifyRequestAuthorization);
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->resource);
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (notify_request_authorization_parent_class)->finalize (obj);
+#line 3539 "scanner.c"
+}
+
+
+GType notify_request_authorization_get_type (void) {
+ static volatile gsize notify_request_authorization_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_request_authorization_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyRequestAuthorizationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_request_authorization_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyRequestAuthorization), 0, (GInstanceInitFunc) notify_request_authorization_instance_init, NULL };
+ GType notify_request_authorization_type_id;
+ notify_request_authorization_type_id = g_type_register_static (TYPE_NOTIFY, "NotifyRequestAuthorization", &g_define_type_info, 0);
+ g_once_init_leave (&notify_request_authorization_type_id__volatile, notify_request_authorization_type_id);
+ }
+ return notify_request_authorization_type_id__volatile;
+}
+
+
+NotifyScanFailed* notify_scan_failed_construct (GType object_type, gint error_code, const gchar* error_string) {
+ NotifyScanFailed* self = NULL;
+ gint _tmp0_ = 0;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (error_string != NULL, NULL);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyScanFailed*) notify_construct (object_type);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = error_code;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->error_code = _tmp0_;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = error_string;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->error_string);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->error_string = _tmp2_;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 3578 "scanner.c"
+}
+
+
+NotifyScanFailed* notify_scan_failed_new (gint error_code, const gchar* error_string) {
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_scan_failed_construct (TYPE_NOTIFY_SCAN_FAILED, error_code, error_string);
+#line 3585 "scanner.c"
+}
+
+
+static void notify_scan_failed_real_run (Notify* base, Scanner* scanner) {
+ NotifyScanFailed * self;
+ Scanner* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ const gchar* _tmp2_ = NULL;
+#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyScanFailed*) base;
+#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = scanner;
+#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->error_code;
+#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = self->priv->error_string;
+#line 160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_emit_by_name (_tmp0_, "scan-failed", _tmp1_, _tmp2_);
+#line 3606 "scanner.c"
+}
+
+
+static void notify_scan_failed_class_init (NotifyScanFailedClass * klass) {
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_scan_failed_parent_class = g_type_class_peek_parent (klass);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->finalize = notify_scan_failed_finalize;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_class_add_private (klass, sizeof (NotifyScanFailedPrivate));
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_scan_failed_real_run;
+#line 3619 "scanner.c"
+}
+
+
+static void notify_scan_failed_instance_init (NotifyScanFailed * self) {
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv = NOTIFY_SCAN_FAILED_GET_PRIVATE (self);
+#line 3626 "scanner.c"
+}
+
+
+static void notify_scan_failed_finalize (Notify* obj) {
+ NotifyScanFailed * self;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_SCAN_FAILED, NotifyScanFailed);
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->error_string);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (notify_scan_failed_parent_class)->finalize (obj);
+#line 3638 "scanner.c"
+}
+
+
+GType notify_scan_failed_get_type (void) {
+ static volatile gsize notify_scan_failed_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_scan_failed_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyScanFailedClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_scan_failed_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyScanFailed), 0, (GInstanceInitFunc) notify_scan_failed_instance_init, NULL };
+ GType notify_scan_failed_type_id;
+ notify_scan_failed_type_id = g_type_register_static (TYPE_NOTIFY, "NotifyScanFailed", &g_define_type_info, 0);
+ g_once_init_leave (&notify_scan_failed_type_id__volatile, notify_scan_failed_type_id);
+ }
+ return notify_scan_failed_type_id__volatile;
+}
+
+
+static void notify_document_done_real_run (Notify* base, Scanner* scanner) {
+ NotifyDocumentDone * self;
+ Scanner* _tmp0_ = NULL;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyDocumentDone*) base;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = scanner;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_emit_by_name (_tmp0_, "document-done");
+#line 3665 "scanner.c"
+}
+
+
+NotifyDocumentDone* notify_document_done_construct (GType object_type) {
+ NotifyDocumentDone* self = NULL;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyDocumentDone*) notify_construct (object_type);
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 3675 "scanner.c"
+}
+
+
+NotifyDocumentDone* notify_document_done_new (void) {
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_document_done_construct (TYPE_NOTIFY_DOCUMENT_DONE);
+#line 3682 "scanner.c"
+}
+
+
+static void notify_document_done_class_init (NotifyDocumentDoneClass * klass) {
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_document_done_parent_class = g_type_class_peek_parent (klass);
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_document_done_real_run;
+#line 3691 "scanner.c"
+}
+
+
+static void notify_document_done_instance_init (NotifyDocumentDone * self) {
+}
+
+
+GType notify_document_done_get_type (void) {
+ static volatile gsize notify_document_done_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_document_done_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyDocumentDoneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_document_done_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyDocumentDone), 0, (GInstanceInitFunc) notify_document_done_instance_init, NULL };
+ GType notify_document_done_type_id;
+ notify_document_done_type_id = g_type_register_static (TYPE_NOTIFY, "NotifyDocumentDone", &g_define_type_info, 0);
+ g_once_init_leave (&notify_document_done_type_id__volatile, notify_document_done_type_id);
+ }
+ return notify_document_done_type_id__volatile;
+}
+
+
+static void notify_expect_page_real_run (Notify* base, Scanner* scanner) {
+ NotifyExpectPage * self;
+ Scanner* _tmp0_ = NULL;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyExpectPage*) base;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = scanner;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_emit_by_name (_tmp0_, "expect-page");
+#line 3722 "scanner.c"
+}
+
+
+NotifyExpectPage* notify_expect_page_construct (GType object_type) {
+ NotifyExpectPage* self = NULL;
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyExpectPage*) notify_construct (object_type);
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 3732 "scanner.c"
+}
+
+
+NotifyExpectPage* notify_expect_page_new (void) {
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_expect_page_construct (TYPE_NOTIFY_EXPECT_PAGE);
+#line 3739 "scanner.c"
+}
+
+
+static void notify_expect_page_class_init (NotifyExpectPageClass * klass) {
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_expect_page_parent_class = g_type_class_peek_parent (klass);
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_expect_page_real_run;
+#line 3748 "scanner.c"
+}
+
+
+static void notify_expect_page_instance_init (NotifyExpectPage * self) {
+}
+
+
+GType notify_expect_page_get_type (void) {
+ static volatile gsize notify_expect_page_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_expect_page_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyExpectPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_expect_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyExpectPage), 0, (GInstanceInitFunc) notify_expect_page_instance_init, NULL };
+ GType notify_expect_page_type_id;
+ notify_expect_page_type_id = g_type_register_static (TYPE_NOTIFY, "NotifyExpectPage", &g_define_type_info, 0);
+ g_once_init_leave (&notify_expect_page_type_id__volatile, notify_expect_page_type_id);
+ }
+ return notify_expect_page_type_id__volatile;
+}
+
+
+static gpointer _scan_page_info_ref0 (gpointer self) {
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self ? scan_page_info_ref (self) : NULL;
+#line 3771 "scanner.c"
+}
+
+
+NotifyGotPageInfo* notify_got_page_info_construct (GType object_type, gint job_id, ScanPageInfo* info) {
+ NotifyGotPageInfo* self = NULL;
+ gint _tmp0_ = 0;
+ ScanPageInfo* _tmp1_ = NULL;
+ ScanPageInfo* _tmp2_ = NULL;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (info != NULL, NULL);
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyGotPageInfo*) notify_construct (object_type);
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = job_id;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->job_id = _tmp0_;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = info;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _scan_page_info_ref0 (_tmp1_);
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_page_info_unref0 (self->priv->info);
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->info = _tmp2_;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 3798 "scanner.c"
+}
+
+
+NotifyGotPageInfo* notify_got_page_info_new (gint job_id, ScanPageInfo* info) {
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_got_page_info_construct (TYPE_NOTIFY_GOT_PAGE_INFO, job_id, info);
+#line 3805 "scanner.c"
+}
+
+
+static void notify_got_page_info_real_run (Notify* base, Scanner* scanner) {
+ NotifyGotPageInfo * self;
+ gboolean _tmp0_ = FALSE;
+ gint _tmp1_ = 0;
+ Scanner* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+#line 178 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyGotPageInfo*) base;
+#line 178 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->job_id;
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = scanner;
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _tmp2_->first_job_id;
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_ >= _tmp3_) {
+#line 3827 "scanner.c"
+ gint _tmp4_ = 0;
+ Scanner* _tmp5_ = NULL;
+ gint _tmp6_ = 0;
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = self->priv->job_id;
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = scanner;
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _tmp5_->job_id;
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = _tmp4_ < _tmp6_;
+#line 3839 "scanner.c"
+ } else {
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = FALSE;
+#line 3843 "scanner.c"
+ }
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp0_) {
+#line 3847 "scanner.c"
+ Scanner* _tmp7_ = NULL;
+ ScanPageInfo* _tmp8_ = NULL;
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = scanner;
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = self->priv->info;
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_emit_by_name (_tmp7_, "got-page-info", _tmp8_);
+#line 3856 "scanner.c"
+ }
+}
+
+
+static void notify_got_page_info_class_init (NotifyGotPageInfoClass * klass) {
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_got_page_info_parent_class = g_type_class_peek_parent (klass);
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->finalize = notify_got_page_info_finalize;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_class_add_private (klass, sizeof (NotifyGotPageInfoPrivate));
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_got_page_info_real_run;
+#line 3870 "scanner.c"
+}
+
+
+static void notify_got_page_info_instance_init (NotifyGotPageInfo * self) {
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv = NOTIFY_GOT_PAGE_INFO_GET_PRIVATE (self);
+#line 3877 "scanner.c"
+}
+
+
+static void notify_got_page_info_finalize (Notify* obj) {
+ NotifyGotPageInfo * self;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_GOT_PAGE_INFO, NotifyGotPageInfo);
+#line 177 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_page_info_unref0 (self->priv->info);
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (notify_got_page_info_parent_class)->finalize (obj);
+#line 3889 "scanner.c"
+}
+
+
+GType notify_got_page_info_get_type (void) {
+ static volatile gsize notify_got_page_info_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_got_page_info_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyGotPageInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_got_page_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyGotPageInfo), 0, (GInstanceInitFunc) notify_got_page_info_instance_init, NULL };
+ GType notify_got_page_info_type_id;
+ notify_got_page_info_type_id = g_type_register_static (TYPE_NOTIFY, "NotifyGotPageInfo", &g_define_type_info, 0);
+ g_once_init_leave (&notify_got_page_info_type_id__volatile, notify_got_page_info_type_id);
+ }
+ return notify_got_page_info_type_id__volatile;
+}
+
+
+NotifyPageDone* notify_page_done_construct (GType object_type, gint job_id) {
+ NotifyPageDone* self = NULL;
+ gint _tmp0_ = 0;
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyPageDone*) notify_construct (object_type);
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = job_id;
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->job_id = _tmp0_;
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 3916 "scanner.c"
+}
+
+
+NotifyPageDone* notify_page_done_new (gint job_id) {
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_page_done_construct (TYPE_NOTIFY_PAGE_DONE, job_id);
+#line 3923 "scanner.c"
+}
+
+
+static void notify_page_done_real_run (Notify* base, Scanner* scanner) {
+ NotifyPageDone * self;
+ gboolean _tmp0_ = FALSE;
+ gint _tmp1_ = 0;
+ Scanner* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyPageDone*) base;
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->job_id;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = scanner;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _tmp2_->first_job_id;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_ >= _tmp3_) {
+#line 3945 "scanner.c"
+ gint _tmp4_ = 0;
+ Scanner* _tmp5_ = NULL;
+ gint _tmp6_ = 0;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = self->priv->job_id;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = scanner;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _tmp5_->job_id;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = _tmp4_ < _tmp6_;
+#line 3957 "scanner.c"
+ } else {
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = FALSE;
+#line 3961 "scanner.c"
+ }
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp0_) {
+#line 3965 "scanner.c"
+ Scanner* _tmp7_ = NULL;
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = scanner;
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_emit_by_name (_tmp7_, "page-done");
+#line 3971 "scanner.c"
+ }
+}
+
+
+static void notify_page_done_class_init (NotifyPageDoneClass * klass) {
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_page_done_parent_class = g_type_class_peek_parent (klass);
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->finalize = notify_page_done_finalize;
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_class_add_private (klass, sizeof (NotifyPageDonePrivate));
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_page_done_real_run;
+#line 3985 "scanner.c"
+}
+
+
+static void notify_page_done_instance_init (NotifyPageDone * self) {
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv = NOTIFY_PAGE_DONE_GET_PRIVATE (self);
+#line 3992 "scanner.c"
+}
+
+
+static void notify_page_done_finalize (Notify* obj) {
+ NotifyPageDone * self;
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_PAGE_DONE, NotifyPageDone);
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (notify_page_done_parent_class)->finalize (obj);
+#line 4002 "scanner.c"
+}
+
+
+GType notify_page_done_get_type (void) {
+ static volatile gsize notify_page_done_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_page_done_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyPageDoneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_page_done_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyPageDone), 0, (GInstanceInitFunc) notify_page_done_instance_init, NULL };
+ GType notify_page_done_type_id;
+ notify_page_done_type_id = g_type_register_static (TYPE_NOTIFY, "NotifyPageDone", &g_define_type_info, 0);
+ g_once_init_leave (&notify_page_done_type_id__volatile, notify_page_done_type_id);
+ }
+ return notify_page_done_type_id__volatile;
+}
+
+
+static gpointer _scan_line_ref0 (gpointer self) {
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self ? scan_line_ref (self) : NULL;
+#line 4021 "scanner.c"
+}
+
+
+NotifyGotLine* notify_got_line_construct (GType object_type, gint job_id, ScanLine* line) {
+ NotifyGotLine* self = NULL;
+ gint _tmp0_ = 0;
+ ScanLine* _tmp1_ = NULL;
+ ScanLine* _tmp2_ = NULL;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (line != NULL, NULL);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyGotLine*) notify_construct (object_type);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = job_id;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->job_id = _tmp0_;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = line;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _scan_line_ref0 (_tmp1_);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_line_unref0 (self->priv->line);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->line = _tmp2_;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 4048 "scanner.c"
+}
+
+
+NotifyGotLine* notify_got_line_new (gint job_id, ScanLine* line) {
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return notify_got_line_construct (TYPE_NOTIFY_GOT_LINE, job_id, line);
+#line 4055 "scanner.c"
+}
+
+
+static void notify_got_line_real_run (Notify* base, Scanner* scanner) {
+ NotifyGotLine * self;
+ gboolean _tmp0_ = FALSE;
+ gint _tmp1_ = 0;
+ Scanner* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+#line 201 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (NotifyGotLine*) base;
+#line 201 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (scanner != NULL);
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->job_id;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = scanner;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _tmp2_->first_job_id;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_ >= _tmp3_) {
+#line 4077 "scanner.c"
+ gint _tmp4_ = 0;
+ Scanner* _tmp5_ = NULL;
+ gint _tmp6_ = 0;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = self->priv->job_id;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = scanner;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _tmp5_->job_id;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = _tmp4_ < _tmp6_;
+#line 4089 "scanner.c"
+ } else {
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = FALSE;
+#line 4093 "scanner.c"
+ }
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp0_) {
+#line 4097 "scanner.c"
+ Scanner* _tmp7_ = NULL;
+ ScanLine* _tmp8_ = NULL;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = scanner;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = self->priv->line;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_emit_by_name (_tmp7_, "got-line", _tmp8_);
+#line 4106 "scanner.c"
+ }
+}
+
+
+static void notify_got_line_class_init (NotifyGotLineClass * klass) {
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_got_line_parent_class = g_type_class_peek_parent (klass);
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->finalize = notify_got_line_finalize;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_class_add_private (klass, sizeof (NotifyGotLinePrivate));
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (klass)->run = notify_got_line_real_run;
+#line 4120 "scanner.c"
+}
+
+
+static void notify_got_line_instance_init (NotifyGotLine * self) {
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv = NOTIFY_GOT_LINE_GET_PRIVATE (self);
+#line 4127 "scanner.c"
+}
+
+
+static void notify_got_line_finalize (Notify* obj) {
+ NotifyGotLine * self;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NOTIFY_GOT_LINE, NotifyGotLine);
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_line_unref0 (self->priv->line);
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ NOTIFY_CLASS (notify_got_line_parent_class)->finalize (obj);
+#line 4139 "scanner.c"
+}
+
+
+GType notify_got_line_get_type (void) {
+ static volatile gsize notify_got_line_type_id__volatile = 0;
+ if (g_once_init_enter (&notify_got_line_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (NotifyGotLineClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) notify_got_line_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NotifyGotLine), 0, (GInstanceInitFunc) notify_got_line_instance_init, NULL };
+ GType notify_got_line_type_id;
+ notify_got_line_type_id = g_type_register_static (TYPE_NOTIFY, "NotifyGotLine", &g_define_type_info, 0);
+ g_once_init_leave (&notify_got_line_type_id__volatile, notify_got_line_type_id);
+ }
+ return notify_got_line_type_id__volatile;
+}
+
+
+static void _scan_job_unref0_ (gpointer var) {
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ (var == NULL) ? NULL : (var = (scan_job_unref (var), NULL));
+#line 4158 "scanner.c"
+}
+
+
+static void _g_list_free__scan_job_unref0_ (GList* self) {
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_list_foreach (self, (GFunc) _scan_job_unref0_, NULL);
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_list_free (self);
+#line 4167 "scanner.c"
+}
+
+
+static void _request_unref0_ (gpointer var) {
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ (var == NULL) ? NULL : (var = (request_unref (var), NULL));
+#line 4174 "scanner.c"
+}
+
+
+static void _notify_unref0_ (gpointer var) {
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ (var == NULL) ? NULL : (var = (notify_unref (var), NULL));
+#line 4181 "scanner.c"
+}
+
+
+static void _credentials_unref0_ (gpointer var) {
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ (var == NULL) ? NULL : (var = (credentials_unref (var), NULL));
+#line 4188 "scanner.c"
+}
+
+
+static Scanner* scanner_construct (GType object_type) {
+ Scanner* self = NULL;
+ GAsyncQueue* _tmp0_ = NULL;
+ GAsyncQueue* _tmp1_ = NULL;
+ GAsyncQueue* _tmp2_ = NULL;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = (Scanner*) g_type_create_instance (object_type);
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = g_async_queue_new_full (_request_unref0_);
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_async_queue_unref0 (self->priv->request_queue);
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->request_queue = _tmp0_;
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = g_async_queue_new_full (_notify_unref0_);
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_async_queue_unref0 (self->priv->notify_queue);
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->notify_queue = _tmp1_;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = g_async_queue_new_full (_credentials_unref0_);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_async_queue_unref0 (self->priv->authorize_queue);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->authorize_queue = _tmp2_;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self;
+#line 4219 "scanner.c"
+}
+
+
+static Scanner* scanner_new (void) {
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return scanner_construct (TYPE_SCANNER);
+#line 4226 "scanner.c"
+}
+
+
+static gpointer _scanner_ref0 (gpointer self) {
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self ? scanner_ref (self) : NULL;
+#line 4233 "scanner.c"
+}
+
+
+Scanner* scanner_get_instance (void) {
+ Scanner* result = NULL;
+ Scanner* _tmp0_ = NULL;
+ Scanner* _tmp2_ = NULL;
+ Scanner* _tmp3_ = NULL;
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = scanner_scanner_object;
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp0_ == NULL) {
+#line 4246 "scanner.c"
+ Scanner* _tmp1_ = NULL;
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = scanner_new ();
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scanner_unref0 (scanner_scanner_object);
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_scanner_object = _tmp1_;
+#line 4254 "scanner.c"
+ }
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = scanner_scanner_object;
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _scanner_ref0 (_tmp2_);
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp3_;
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 4264 "scanner.c"
+}
+
+
+static gboolean scanner_notify_idle_cb (Scanner* self) {
+ gboolean result = FALSE;
+ Notify* notification = NULL;
+ GAsyncQueue* _tmp0_ = NULL;
+ gpointer _tmp1_ = NULL;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->notify_queue;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = g_async_queue_pop (_tmp0_);
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notification = (Notify*) _tmp1_;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ notify_run (notification, self);
+#line 289 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = FALSE;
+#line 289 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (notification);
+#line 289 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 4289 "scanner.c"
+}
+
+
+static gpointer _notify_ref0 (gpointer self) {
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self ? notify_ref (self) : NULL;
+#line 4296 "scanner.c"
+}
+
+
+static gboolean _scanner_notify_idle_cb_gsource_func (gpointer self) {
+ gboolean result;
+ result = scanner_notify_idle_cb ((Scanner*) self);
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 4305 "scanner.c"
+}
+
+
+static void scanner_notify (Scanner* self, Notify* notification) {
+ GAsyncQueue* _tmp0_ = NULL;
+ Notify* _tmp1_ = NULL;
+ Notify* _tmp2_ = NULL;
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (notification != NULL);
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->notify_queue;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = notification;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _notify_ref0 (_tmp1_);
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_async_queue_push (_tmp0_, _tmp2_);
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _scanner_notify_idle_cb_gsource_func, scanner_ref (self), scanner_unref);
+#line 4327 "scanner.c"
+}
+
+
+static void scanner_set_scanning (Scanner* self, gboolean is_scanning) {
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 298 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = self->priv->scanning;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp2_) {
+#line 4341 "scanner.c"
+ gboolean _tmp3_ = FALSE;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = is_scanning;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = !_tmp3_;
+#line 4347 "scanner.c"
+ } else {
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = FALSE;
+#line 4351 "scanner.c"
+ }
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_) {
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = TRUE;
+#line 4357 "scanner.c"
+ } else {
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = self->priv->scanning;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp5_) {
+#line 4365 "scanner.c"
+ gboolean _tmp6_ = FALSE;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = is_scanning;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp6_;
+#line 4371 "scanner.c"
+ } else {
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = FALSE;
+#line 4375 "scanner.c"
+ }
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = _tmp4_;
+#line 4379 "scanner.c"
+ }
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp0_) {
+#line 4383 "scanner.c"
+ gboolean _tmp7_ = FALSE;
+ NotifyScanningChanged* _tmp8_ = NULL;
+ NotifyScanningChanged* _tmp9_ = NULL;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = is_scanning;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->scanning = _tmp7_;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = notify_scanning_changed_new ();
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = _tmp8_;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (self, (Notify*) _tmp9_);
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp9_);
+#line 4399 "scanner.c"
+ }
+}
+
+
+static gboolean string_contains (const gchar* self, const gchar* needle) {
+ gboolean result = FALSE;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 1274 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 1274 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (needle != NULL, FALSE);
+#line 1275 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = needle;
+#line 1275 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
+#line 1275 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp1_ != NULL;
+#line 1275 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 4420 "scanner.c"
+}
+
+
+static gint scanner_get_device_weight (const gchar* device) {
+ gint result = 0;
+ const gchar* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ const gchar* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+#line 307 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (device != NULL, 0);
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = device;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = g_str_has_prefix (_tmp0_, "vfl:");
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_) {
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = 2;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 4442 "scanner.c"
+ }
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = device;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = string_contains (_tmp2_, "usb");
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp3_) {
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = 0;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 4454 "scanner.c"
+ }
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = 1;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 4460 "scanner.c"
+}
+
+
+static gint scanner_compare_devices (ScanDevice* device1, ScanDevice* device2) {
+ gint result = 0;
+ gint weight1 = 0;
+ ScanDevice* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+ gint weight2 = 0;
+ ScanDevice* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+ GCompareFunc _tmp10_ = NULL;
+ ScanDevice* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+ ScanDevice* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (device1 != NULL, 0);
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (device2 != NULL, 0);
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = device1;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->name;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = scanner_get_device_weight (_tmp1_);
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ weight1 = _tmp2_;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = device2;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_->name;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = scanner_get_device_weight (_tmp4_);
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ weight2 = _tmp5_;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = weight1;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = weight2;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp6_ != _tmp7_) {
+#line 4508 "scanner.c"
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = weight1;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = weight2;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp8_ - _tmp9_;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 4519 "scanner.c"
+ }
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = g_strcmp0;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = device1;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = _tmp11_->label;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = device2;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = _tmp13_->label;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = _tmp10_ (_tmp12_, _tmp14_);
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp15_;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 4537 "scanner.c"
+}
+
+
+static gchar* sane_status_to_string (SANE_Status status) {
+ gchar* result = NULL;
+ SANE_Status _tmp0_ = 0;
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp0_ = status;
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ switch (_tmp0_) {
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_GOOD:
+#line 4550 "scanner.c"
+ {
+ gchar* _tmp1_ = NULL;
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp1_ = g_strdup ("SANE_STATUS_GOOD");
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp1_;
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4559 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_UNSUPPORTED:
+#line 4563 "scanner.c"
+ {
+ gchar* _tmp2_ = NULL;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp2_ = g_strdup ("SANE_STATUS_UNSUPPORTED");
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp2_;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4572 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_CANCELLED:
+#line 4576 "scanner.c"
+ {
+ gchar* _tmp3_ = NULL;
+#line 61 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp3_ = g_strdup ("SANE_STATUS_CANCELLED");
+#line 61 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp3_;
+#line 61 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4585 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_DEVICE_BUSY:
+#line 4589 "scanner.c"
+ {
+ gchar* _tmp4_ = NULL;
+#line 63 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp4_ = g_strdup ("SANE_STATUS_DEVICE_BUSY");
+#line 63 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp4_;
+#line 63 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4598 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_INVAL:
+#line 4602 "scanner.c"
+ {
+ gchar* _tmp5_ = NULL;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp5_ = g_strdup ("SANE_STATUS_INVAL");
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp5_;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4611 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_EOF:
+#line 4615 "scanner.c"
+ {
+ gchar* _tmp6_ = NULL;
+#line 67 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp6_ = g_strdup ("SANE_STATUS_EOF");
+#line 67 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp6_;
+#line 67 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4624 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_JAMMED:
+#line 4628 "scanner.c"
+ {
+ gchar* _tmp7_ = NULL;
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp7_ = g_strdup ("SANE_STATUS_JAMMED");
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp7_;
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4637 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_NO_DOCS:
+#line 4641 "scanner.c"
+ {
+ gchar* _tmp8_ = NULL;
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp8_ = g_strdup ("SANE_STATUS_NO_DOCS");
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp8_;
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4650 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_COVER_OPEN:
+#line 4654 "scanner.c"
+ {
+ gchar* _tmp9_ = NULL;
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp9_ = g_strdup ("SANE_STATUS_COVER_OPEN");
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp9_;
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4663 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_IO_ERROR:
+#line 4667 "scanner.c"
+ {
+ gchar* _tmp10_ = NULL;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp10_ = g_strdup ("SANE_STATUS_IO_ERROR");
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp10_;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4676 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_NO_MEM:
+#line 4680 "scanner.c"
+ {
+ gchar* _tmp11_ = NULL;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp11_ = g_strdup ("SANE_STATUS_NO_MEM");
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp11_;
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4689 "scanner.c"
+ }
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_STATUS_ACCESS_DENIED:
+#line 4693 "scanner.c"
+ {
+ gchar* _tmp12_ = NULL;
+#line 79 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp12_ = g_strdup ("SANE_STATUS_ACCESS_DENIED");
+#line 79 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp12_;
+#line 79 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4702 "scanner.c"
+ }
+ default:
+ {
+ SANE_Status _tmp13_ = 0;
+ gchar* _tmp14_ = NULL;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp13_ = status;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp14_ = g_strdup_printf ("SANE_STATUS(%d)", (gint) _tmp13_);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp14_;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 4716 "scanner.c"
+ }
+ }
+}
+
+
+static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
+ gchar* result = NULL;
+ GError * _inner_error_ = NULL;
+#line 1278 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1278 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (old != NULL, NULL);
+#line 1278 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (replacement != NULL, NULL);
+#line 4731 "scanner.c"
+ {
+ GRegex* regex = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ GRegex* _tmp3_ = NULL;
+ GRegex* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ GRegex* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = old;
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = g_regex_escape_string (_tmp0_, -1);
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = _tmp1_;
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = _tmp3_;
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _g_free0 (_tmp2_);
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ regex = _tmp4_;
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_inner_error_ != NULL) {
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_inner_error_->domain == G_REGEX_ERROR) {
+#line 4762 "scanner.c"
+ goto __catch14_g_regex_error;
+ }
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_clear_error (&_inner_error_);
+#line 1280 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return NULL;
+#line 4771 "scanner.c"
+ }
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp6_ = regex;
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp7_ = replacement;
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) (-1), 0, _tmp7_, 0, &_inner_error_);
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = _tmp8_;
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_inner_error_ != NULL) {
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _g_regex_unref0 (regex);
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_inner_error_->domain == G_REGEX_ERROR) {
+#line 4787 "scanner.c"
+ goto __catch14_g_regex_error;
+ }
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _g_regex_unref0 (regex);
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_clear_error (&_inner_error_);
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return NULL;
+#line 4798 "scanner.c"
+ }
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp9_ = _tmp5_;
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = NULL;
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp9_;
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _g_free0 (_tmp5_);
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _g_regex_unref0 (regex);
+#line 1281 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 4812 "scanner.c"
+ }
+ goto __finally14;
+ __catch14_g_regex_error:
+ {
+ GError* e = NULL;
+#line 1279 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ e = _inner_error_;
+#line 1279 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _inner_error_ = NULL;
+#line 1283 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_assert_not_reached ();
+#line 1279 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _g_error_free0 (e);
+#line 4826 "scanner.c"
+ }
+ __finally14:
+#line 1279 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_inner_error_ != NULL) {
+#line 1279 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1279 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_clear_error (&_inner_error_);
+#line 1279 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return NULL;
+#line 4837 "scanner.c"
+ }
+}
+
+
+static gpointer _scan_device_ref0 (gpointer self) {
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self ? scan_device_ref (self) : NULL;
+#line 4845 "scanner.c"
+}
+
+
+static gint _scanner_compare_devices_gcompare_func (gconstpointer a, gconstpointer b) {
+ gint result;
+ result = scanner_compare_devices ((ScanDevice*) a, (ScanDevice*) b);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 4854 "scanner.c"
+}
+
+
+static void scanner_do_redetect (Scanner* self) {
+ SANE_Device** device_list = NULL;
+ gint device_list_length1 = 0;
+ gint _device_list_size_ = 0;
+ SANE_Status status = 0;
+ SANE_Device** _tmp0_ = NULL;
+ SANE_Status _tmp1_ = 0;
+ SANE_Status _tmp2_ = 0;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ SANE_Status _tmp5_ = 0;
+ GList* devices = NULL;
+ GList* _tmp56_ = NULL;
+ GList* _tmp63_ = NULL;
+ NotifyUpdateDevices* _tmp64_ = NULL;
+ NotifyUpdateDevices* _tmp65_ = NULL;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ device_list = NULL;
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ device_list_length1 = 0;
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _device_list_size_ = device_list_length1;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = sane_get_devices (&_tmp0_, FALSE);
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ device_list = _tmp0_;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ device_list_length1 = -1;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _device_list_size_ = device_list_length1;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp1_;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = status;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = sane_status_to_string (_tmp2_);
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_;
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:338: sane_get_devices () -> %s", _tmp4_);
+#line 338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp4_);
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = status;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp5_ != SANE_STATUS_GOOD) {
+#line 4906 "scanner.c"
+ SANE_Status _tmp6_ = 0;
+ const gchar* _tmp7_ = NULL;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = status;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = sane_strstatus (_tmp6_);
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:341: Unable to get SANE devices: %s", _tmp7_);
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->need_redetect = FALSE;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_IDLE;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 4921 "scanner.c"
+ }
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ devices = NULL;
+#line 4925 "scanner.c"
+ {
+ gint i = 0;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 4930 "scanner.c"
+ {
+ gboolean _tmp8_ = FALSE;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = TRUE;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 4937 "scanner.c"
+ SANE_Device** _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+ gint _tmp11_ = 0;
+ SANE_Device* _tmp12_ = NULL;
+ SANE_Device** _tmp13_ = NULL;
+ gint _tmp13__length1 = 0;
+ gint _tmp14_ = 0;
+ SANE_Device* _tmp15_ = NULL;
+ const gchar* _tmp16_ = NULL;
+ SANE_Device** _tmp17_ = NULL;
+ gint _tmp17__length1 = 0;
+ gint _tmp18_ = 0;
+ SANE_Device* _tmp19_ = NULL;
+ const gchar* _tmp20_ = NULL;
+ SANE_Device** _tmp21_ = NULL;
+ gint _tmp21__length1 = 0;
+ gint _tmp22_ = 0;
+ SANE_Device* _tmp23_ = NULL;
+ const gchar* _tmp24_ = NULL;
+ SANE_Device** _tmp25_ = NULL;
+ gint _tmp25__length1 = 0;
+ gint _tmp26_ = 0;
+ SANE_Device* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
+ ScanDevice* scan_device = NULL;
+ ScanDevice* _tmp29_ = NULL;
+ ScanDevice* _tmp30_ = NULL;
+ SANE_Device** _tmp31_ = NULL;
+ gint _tmp31__length1 = 0;
+ gint _tmp32_ = 0;
+ SANE_Device* _tmp33_ = NULL;
+ const gchar* _tmp34_ = NULL;
+ gchar* _tmp35_ = NULL;
+ gchar* vendor = NULL;
+ SANE_Device** _tmp36_ = NULL;
+ gint _tmp36__length1 = 0;
+ gint _tmp37_ = 0;
+ SANE_Device* _tmp38_ = NULL;
+ const gchar* _tmp39_ = NULL;
+ gchar* _tmp40_ = NULL;
+ const gchar* _tmp41_ = NULL;
+ ScanDevice* _tmp43_ = NULL;
+ const gchar* _tmp44_ = NULL;
+ SANE_Device** _tmp45_ = NULL;
+ gint _tmp45__length1 = 0;
+ gint _tmp46_ = 0;
+ SANE_Device* _tmp47_ = NULL;
+ const gchar* _tmp48_ = NULL;
+ gchar* _tmp49_ = NULL;
+ ScanDevice* _tmp50_ = NULL;
+ const gchar* _tmp51_ = NULL;
+ gchar* _tmp52_ = NULL;
+ gchar* _tmp53_ = NULL;
+ ScanDevice* _tmp54_ = NULL;
+ ScanDevice* _tmp55_ = NULL;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp8_) {
+#line 4995 "scanner.c"
+ gint _tmp9_ = 0;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = i;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp9_ + 1;
+#line 5001 "scanner.c"
+ }
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = FALSE;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = device_list;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10__length1 = device_list_length1;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = i;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = _tmp10_[_tmp11_];
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(_tmp12_ != NULL)) {
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 5017 "scanner.c"
+ }
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = device_list;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13__length1 = device_list_length1;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = i;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = _tmp13_[_tmp14_];
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = _tmp15_->name;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = device_list;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17__length1 = device_list_length1;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = i;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = _tmp17_[_tmp18_];
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = _tmp19_->vendor;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = device_list;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21__length1 = device_list_length1;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = i;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = _tmp21_[_tmp22_];
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = _tmp23_->model;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = device_list;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25__length1 = device_list_length1;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = i;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = _tmp25_[_tmp26_];
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = _tmp27_->type;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:350: Device: name=\"%s\" vendor=\"%s\" model=\"%s\" type=" \
+"\"%s\"", _tmp16_, _tmp20_, _tmp24_, _tmp28_);
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = scan_device_new ();
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scan_device = _tmp29_;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = scan_device;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = device_list;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31__length1 = device_list_length1;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = i;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = _tmp31_[_tmp32_];
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = _tmp33_->name;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = g_strdup (_tmp34_);
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp30_->name);
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_->name = _tmp35_;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = device_list;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36__length1 = device_list_length1;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = i;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = _tmp36_[_tmp37_];
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_ = _tmp38_->vendor;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp40_ = g_strdup (_tmp39_);
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ vendor = _tmp40_;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_ = vendor;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp41_, "Hewlett-Packard") == 0) {
+#line 5101 "scanner.c"
+ gchar* _tmp42_ = NULL;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp42_ = g_strdup ("HP");
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (vendor);
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ vendor = _tmp42_;
+#line 5109 "scanner.c"
+ }
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp43_ = scan_device;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp44_ = vendor;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_ = device_list;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45__length1 = device_list_length1;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp46_ = i;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp47_ = _tmp45_[_tmp46_];
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_ = _tmp47_->model;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp49_ = g_strdup_printf ("%s %s", _tmp44_, _tmp48_);
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp43_->label);
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp43_->label = _tmp49_;
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_ = scan_device;
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_ = _tmp50_->label;
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp52_ = string_replace (_tmp51_, "_", " ");
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp53_ = _tmp52_;
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp53_);
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_ = scan_device;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp55_ = _scan_device_ref0 (_tmp54_);
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ devices = g_list_append (devices, _tmp55_);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (vendor);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_device_unref0 (scan_device);
+#line 5151 "scanner.c"
+ }
+ }
+ }
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ devices = g_list_sort (devices, _scanner_compare_devices_gcompare_func);
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->need_redetect = FALSE;
+#line 372 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_IDLE;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp56_ = devices;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp56_ != NULL) {
+#line 5165 "scanner.c"
+ ScanDevice* device = NULL;
+ GList* _tmp57_ = NULL;
+ gconstpointer _tmp58_ = NULL;
+ ScanDevice* _tmp59_ = NULL;
+ ScanDevice* _tmp60_ = NULL;
+ const gchar* _tmp61_ = NULL;
+ gchar* _tmp62_ = NULL;
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp57_ = devices;
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp58_ = g_list_nth_data (_tmp57_, (guint) 0);
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp59_ = _scan_device_ref0 ((ScanDevice*) _tmp58_);
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ device = _tmp59_;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp60_ = device;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp61_ = _tmp60_->name;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp62_ = g_strdup (_tmp61_);
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->default_device);
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->default_device = _tmp62_;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_device_unref0 (device);
+#line 5193 "scanner.c"
+ } else {
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->default_device);
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->default_device = NULL;
+#line 5199 "scanner.c"
+ }
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp63_ = devices;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ devices = NULL;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp64_ = notify_update_devices_new (_tmp63_);
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp65_ = _tmp64_;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (self, (Notify*) _tmp65_);
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp65_);
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ __g_list_free__scan_device_unref0_0 (devices);
+#line 5215 "scanner.c"
+}
+
+
+static gint scanner_scale_int (Scanner* self, gint source_min, gint source_max, SANE_Option_Descriptor* option, gint value) {
+ gint result = 0;
+ gint v = 0;
+ gint _tmp0_ = 0;
+ SANE_Option_Descriptor* _tmp1_ = NULL;
+ SANE_Value_Type _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ gboolean _tmp4_ = FALSE;
+ SANE_Option_Descriptor* _tmp5_ = NULL;
+ SANE_Constraint_Type _tmp6_ = 0;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (option != NULL, 0);
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = value;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp0_;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = option;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _tmp1_->type;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = value;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (_tmp2_ == SANE_TYPE_INT, _tmp3_);
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = option;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _tmp5_->constraint_type;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp6_ == SANE_CONSTRAINT_RANGE) {
+#line 5251 "scanner.c"
+ SANE_Option_Descriptor* _tmp7_ = NULL;
+ SANE_Range* _tmp8_ = NULL;
+ SANE_Word _tmp9_ = {0};
+ SANE_Option_Descriptor* _tmp10_ = NULL;
+ SANE_Range* _tmp11_ = NULL;
+ SANE_Word _tmp12_ = {0};
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = option;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = _tmp7_->constraint.range;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = _tmp8_->max;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = option;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = _tmp10_->constraint.range;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = _tmp11_->min;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp9_ != _tmp12_;
+#line 5272 "scanner.c"
+ } else {
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = FALSE;
+#line 5276 "scanner.c"
+ }
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp4_) {
+#line 5280 "scanner.c"
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ SANE_Option_Descriptor* _tmp16_ = NULL;
+ SANE_Range* _tmp17_ = NULL;
+ SANE_Word _tmp18_ = {0};
+ SANE_Option_Descriptor* _tmp19_ = NULL;
+ SANE_Range* _tmp20_ = NULL;
+ SANE_Word _tmp21_ = {0};
+ gint _tmp22_ = 0;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+ SANE_Option_Descriptor* _tmp26_ = NULL;
+ SANE_Range* _tmp27_ = NULL;
+ SANE_Word _tmp28_ = {0};
+ gint _tmp29_ = 0;
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+ gint _tmp32_ = 0;
+ SANE_Option_Descriptor* _tmp33_ = NULL;
+ SANE_Range* _tmp34_ = NULL;
+ SANE_Word _tmp35_ = {0};
+ SANE_Option_Descriptor* _tmp36_ = NULL;
+ SANE_Range* _tmp37_ = NULL;
+ SANE_Word _tmp38_ = {0};
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = v;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = source_min;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp13_ - _tmp14_;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = v;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = option;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = _tmp16_->constraint.range;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = _tmp17_->max;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = option;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = _tmp19_->constraint.range;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = _tmp20_->min;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp15_ * ((gint) (_tmp18_ - _tmp21_));
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = v;
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = source_max;
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = source_min;
+#line 395 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp22_ / (_tmp23_ - _tmp24_);
+#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = v;
+#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = option;
+#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = _tmp26_->constraint.range;
+#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = _tmp27_->min;
+#line 396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp25_ + ((gint) _tmp28_);
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = value;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = source_min;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = source_max;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = v;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = option;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = _tmp33_->constraint.range;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = _tmp34_->min;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = option;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = _tmp36_->constraint.range;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = _tmp37_->max;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:397: scale_int: scaling %d [min: %d, max: %d] to %d [min:" \
+" %d, max: %d]", _tmp29_, _tmp30_, _tmp31_, _tmp32_, (gint) _tmp35_, (gint) _tmp38_);
+#line 5369 "scanner.c"
+ }
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = v;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 5375 "scanner.c"
+}
+
+
+static gboolean scanner_set_default_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index) {
+ gboolean result = FALSE;
+ SANE_Option_Descriptor* _tmp0_ = NULL;
+ SANE_Int _tmp1_ = {0};
+ SANE_Status status = 0;
+ SANE_Handle _tmp2_ = {0};
+ SANE_Int _tmp3_ = {0};
+ SANE_Status _tmp4_ = 0;
+ SANE_Int _tmp5_ = {0};
+ SANE_Status _tmp6_ = 0;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ SANE_Status _tmp9_ = 0;
+ SANE_Status _tmp14_ = 0;
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (option != NULL, FALSE);
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = option;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->cap;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if ((_tmp1_ & SANE_CAP_AUTOMATIC) == ((SANE_Int) 0)) {
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = FALSE;
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 5407 "scanner.c"
+ }
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = handle;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = option_index;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = sane_control_option (_tmp2_, _tmp3_, SANE_ACTION_SET_AUTO, NULL, NULL);
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp4_;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = option_index;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = status;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = sane_status_to_string (_tmp6_);
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = _tmp7_;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:411: sane_control_option (%d, SANE_ACTION_SET_AUTO) -> %s", (gint) _tmp5_, _tmp8_);
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp8_);
+#line 412 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = status;
+#line 412 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp9_ != SANE_STATUS_GOOD) {
+#line 5433 "scanner.c"
+ SANE_Option_Descriptor* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ SANE_Status _tmp12_ = 0;
+ const gchar* _tmp13_ = NULL;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = option;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = _tmp10_->name;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = status;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = sane_strstatus (_tmp12_);
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:413: Error setting default option %s: %s", _tmp11_, _tmp13_);
+#line 5448 "scanner.c"
+ }
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = status;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp14_ == SANE_STATUS_GOOD;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 5456 "scanner.c"
+}
+
+
+static void scanner_set_bool_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gboolean value, gboolean* _result_) {
+ gboolean _vala_result = FALSE;
+ SANE_Option_Descriptor* _tmp0_ = NULL;
+ SANE_Value_Type _tmp1_ = 0;
+ SANE_Bool v = {0};
+ gboolean _tmp2_ = FALSE;
+ SANE_Status status = 0;
+ SANE_Handle _tmp3_ = {0};
+ SANE_Int _tmp4_ = {0};
+ SANE_Status _tmp5_ = 0;
+ SANE_Bool _tmp6_ = {0};
+ const gchar* _tmp7_ = NULL;
+ gboolean _tmp8_ = FALSE;
+ const gchar* _tmp9_ = NULL;
+ gboolean _tmp10_ = FALSE;
+ SANE_Int _tmp11_ = {0};
+ SANE_Status _tmp12_ = 0;
+ gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (option != NULL);
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = option;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->type;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (_tmp1_ == SANE_TYPE_BOOL);
+#line 422 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = value;
+#line 422 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = (SANE_Bool) _tmp2_;
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = handle;
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = option_index;
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = sane_control_option (_tmp3_, _tmp4_, SANE_ACTION_SET_VALUE, &v, NULL);
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp5_;
+#line 424 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = v;
+#line 424 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = (gboolean) _tmp6_;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = value;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp8_) {
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = "SANE_TRUE";
+#line 5511 "scanner.c"
+ } else {
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = "SANE_FALSE";
+#line 5515 "scanner.c"
+ }
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = _vala_result;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp10_) {
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = "SANE_TRUE";
+#line 5523 "scanner.c"
+ } else {
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = "SANE_FALSE";
+#line 5527 "scanner.c"
+ }
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = option_index;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = status;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = sane_status_to_string (_tmp12_);
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = _tmp13_;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:425: sane_control_option (%d, SANE_ACTION_SET_VALUE, %s) " \
+"-> (%s, %s)", (gint) _tmp11_, _tmp7_, _tmp14_, _tmp9_);
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp14_);
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_result_) {
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *_result_ = _vala_result;
+#line 5545 "scanner.c"
+ }
+}
+
+
+static void scanner_set_int_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gint value, gint* _result_) {
+ gint _vala_result = 0;
+ SANE_Option_Descriptor* _tmp0_ = NULL;
+ SANE_Value_Type _tmp1_ = 0;
+ SANE_Int v = {0};
+ gint _tmp2_ = 0;
+ SANE_Option_Descriptor* _tmp3_ = NULL;
+ SANE_Constraint_Type _tmp4_ = 0;
+ SANE_Status status = 0;
+ SANE_Handle _tmp48_ = {0};
+ SANE_Int _tmp49_ = {0};
+ SANE_Status _tmp50_ = 0;
+ SANE_Int _tmp51_ = {0};
+ gint _tmp52_ = 0;
+ gchar* _tmp53_ = NULL;
+ gchar* _tmp54_ = NULL;
+ SANE_Int _tmp55_ = {0};
+ SANE_Int _tmp56_ = {0};
+#line 428 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 428 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (option != NULL);
+#line 430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = option;
+#line 430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->type;
+#line 430 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (_tmp1_ == SANE_TYPE_INT);
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = value;
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = (SANE_Int) _tmp2_;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = option;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_->constraint_type;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp4_ == SANE_CONSTRAINT_RANGE) {
+#line 5588 "scanner.c"
+ SANE_Option_Descriptor* _tmp5_ = NULL;
+ SANE_Range* _tmp6_ = NULL;
+ SANE_Word _tmp7_ = {0};
+ SANE_Int _tmp12_ = {0};
+ SANE_Option_Descriptor* _tmp13_ = NULL;
+ SANE_Range* _tmp14_ = NULL;
+ SANE_Word _tmp15_ = {0};
+ SANE_Int _tmp19_ = {0};
+ SANE_Option_Descriptor* _tmp20_ = NULL;
+ SANE_Range* _tmp21_ = NULL;
+ SANE_Word _tmp22_ = {0};
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = option;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _tmp5_->constraint.range;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = _tmp6_->quant;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp7_ != ((SANE_Word) 0)) {
+#line 5608 "scanner.c"
+ SANE_Int _tmp8_ = {0};
+ SANE_Option_Descriptor* _tmp9_ = NULL;
+ SANE_Range* _tmp10_ = NULL;
+ SANE_Word _tmp11_ = {0};
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = v;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = option;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = _tmp9_->constraint.range;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = _tmp10_->quant;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp8_ * _tmp11_;
+#line 5623 "scanner.c"
+ }
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = v;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = option;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = _tmp13_->constraint.range;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = _tmp14_->min;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp12_ < ((SANE_Int) _tmp15_)) {
+#line 5635 "scanner.c"
+ SANE_Option_Descriptor* _tmp16_ = NULL;
+ SANE_Range* _tmp17_ = NULL;
+ SANE_Word _tmp18_ = {0};
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = option;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = _tmp16_->constraint.range;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = _tmp17_->min;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = (SANE_Int) _tmp18_;
+#line 5647 "scanner.c"
+ }
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = v;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = option;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = _tmp20_->constraint.range;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = _tmp21_->max;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp19_ > ((SANE_Int) _tmp22_)) {
+#line 5659 "scanner.c"
+ SANE_Option_Descriptor* _tmp23_ = NULL;
+ SANE_Range* _tmp24_ = NULL;
+ SANE_Word _tmp25_ = {0};
+#line 440 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = option;
+#line 440 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = _tmp23_->constraint.range;
+#line 440 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = _tmp24_->max;
+#line 440 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = (SANE_Int) _tmp25_;
+#line 5671 "scanner.c"
+ }
+ } else {
+ SANE_Option_Descriptor* _tmp26_ = NULL;
+ SANE_Constraint_Type _tmp27_ = 0;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = option;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = _tmp26_->constraint_type;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp27_ == SANE_CONSTRAINT_WORD_LIST) {
+#line 5682 "scanner.c"
+ gint distance = 0;
+ gint _tmp28_ = 0;
+ gint nearest = 0;
+ gint _tmp47_ = 0;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = G_MAXINT;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ distance = _tmp28_;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ nearest = 0;
+#line 5693 "scanner.c"
+ {
+ gint i = 0;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 5698 "scanner.c"
+ {
+ gboolean _tmp29_ = FALSE;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = TRUE;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 5705 "scanner.c"
+ gint _tmp31_ = 0;
+ SANE_Option_Descriptor* _tmp32_ = NULL;
+ SANE_Word* _tmp33_ = NULL;
+ gint _tmp33__length1 = 0;
+ SANE_Word _tmp34_ = {0};
+ gint x = 0;
+ SANE_Option_Descriptor* _tmp35_ = NULL;
+ SANE_Word* _tmp36_ = NULL;
+ gint _tmp36__length1 = 0;
+ gint _tmp37_ = 0;
+ SANE_Word _tmp38_ = {0};
+ gint d = 0;
+ gint _tmp39_ = 0;
+ SANE_Int _tmp40_ = {0};
+ gint _tmp41_ = 0;
+ gint _tmp42_ = 0;
+ gint _tmp43_ = 0;
+ gint _tmp44_ = 0;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp29_) {
+#line 5726 "scanner.c"
+ gint _tmp30_ = 0;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = i;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp30_ + 1;
+#line 5732 "scanner.c"
+ }
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = FALSE;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = i;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = option;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = _tmp32_->constraint.word_list;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33__length1 = -1;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = _tmp33_[0];
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(((SANE_Word) _tmp31_) < _tmp34_)) {
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 5750 "scanner.c"
+ }
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = option;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = _tmp35_->constraint.word_list;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36__length1 = -1;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = i;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = _tmp36_[_tmp37_ + 1];
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ x = (gint) _tmp38_;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_ = x;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp40_ = v;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ d = (gint) (_tmp39_ - _tmp40_);
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_ = d;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp42_ = abs (_tmp41_);
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ d = _tmp42_;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp43_ = d;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp44_ = distance;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp43_ < _tmp44_) {
+#line 5782 "scanner.c"
+ gint _tmp45_ = 0;
+ gint _tmp46_ = 0;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_ = d;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ distance = _tmp45_;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp46_ = x;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ nearest = _tmp46_;
+#line 5793 "scanner.c"
+ }
+ }
+ }
+ }
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp47_ = nearest;
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = (SANE_Int) _tmp47_;
+#line 5802 "scanner.c"
+ }
+ }
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_ = handle;
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp49_ = option_index;
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_ = sane_control_option (_tmp48_, _tmp49_, SANE_ACTION_SET_VALUE, &v, NULL);
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp50_;
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_ = option_index;
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp52_ = value;
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp53_ = sane_status_to_string (status);
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_ = _tmp53_;
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp55_ = v;
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:462: sane_control_option (%d, SANE_ACTION_SET_VALUE, %d) " \
+"-> (%s, %d)", (gint) _tmp51_, _tmp52_, _tmp54_, (gint) _tmp55_);
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp54_);
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp56_ = v;
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = (gint) _tmp56_;
+#line 428 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_result_) {
+#line 428 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *_result_ = _vala_result;
+#line 5835 "scanner.c"
+ }
+}
+
+
+static void scanner_set_fixed_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gdouble value, gdouble* _result_) {
+ gdouble _vala_result = 0.0;
+ gdouble v = 0.0;
+ gdouble _tmp0_ = 0.0;
+ SANE_Fixed v_fixed = {0};
+ SANE_Option_Descriptor* _tmp1_ = NULL;
+ SANE_Value_Type _tmp2_ = 0;
+ SANE_Option_Descriptor* _tmp3_ = NULL;
+ SANE_Constraint_Type _tmp4_ = 0;
+ gdouble _tmp42_ = 0.0;
+ SANE_Fixed _tmp43_ = {0};
+ SANE_Status status = 0;
+ SANE_Handle _tmp44_ = {0};
+ SANE_Int _tmp45_ = {0};
+ SANE_Status _tmp46_ = 0;
+ SANE_Int _tmp47_ = {0};
+ gdouble _tmp48_ = 0.0;
+ gchar* _tmp49_ = NULL;
+ gchar* _tmp50_ = NULL;
+ gdouble _tmp51_ = 0.0;
+ gdouble _tmp52_ = 0.0;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (option != NULL);
+#line 468 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = value;
+#line 468 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp0_;
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = option;
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _tmp1_->type;
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (_tmp2_ == SANE_TYPE_FIXED);
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = option;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_->constraint_type;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp4_ == SANE_CONSTRAINT_RANGE) {
+#line 5881 "scanner.c"
+ gdouble min = 0.0;
+ SANE_Option_Descriptor* _tmp5_ = NULL;
+ SANE_Range* _tmp6_ = NULL;
+ SANE_Word _tmp7_ = {0};
+ gdouble _tmp8_ = 0.0;
+ gdouble max = 0.0;
+ SANE_Option_Descriptor* _tmp9_ = NULL;
+ SANE_Range* _tmp10_ = NULL;
+ SANE_Word _tmp11_ = {0};
+ gdouble _tmp12_ = 0.0;
+ gdouble _tmp13_ = 0.0;
+ gdouble _tmp14_ = 0.0;
+ gdouble _tmp16_ = 0.0;
+ gdouble _tmp17_ = 0.0;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = option;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _tmp5_->constraint.range;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = _tmp6_->min;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = SANE_UNFIX ((SANE_Fixed) _tmp7_);
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ min = _tmp8_;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = option;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = _tmp9_->constraint.range;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = _tmp10_->max;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = SANE_UNFIX ((SANE_Fixed) _tmp11_);
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ max = _tmp12_;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = v;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = min;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp13_ < _tmp14_) {
+#line 5922 "scanner.c"
+ gdouble _tmp15_ = 0.0;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = min;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp15_;
+#line 5928 "scanner.c"
+ }
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = v;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = max;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp16_ > _tmp17_) {
+#line 5936 "scanner.c"
+ gdouble _tmp18_ = 0.0;
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = max;
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp18_;
+#line 5942 "scanner.c"
+ }
+ } else {
+ SANE_Option_Descriptor* _tmp19_ = NULL;
+ SANE_Constraint_Type _tmp20_ = 0;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = option;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = _tmp19_->constraint_type;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp20_ == SANE_CONSTRAINT_WORD_LIST) {
+#line 5953 "scanner.c"
+ gdouble distance = 0.0;
+ gdouble _tmp21_ = 0.0;
+ gdouble nearest = 0.0;
+ gdouble _tmp41_ = 0.0;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = DBL_MAX;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ distance = _tmp21_;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ nearest = 0.0;
+#line 5964 "scanner.c"
+ {
+ gint i = 0;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 5969 "scanner.c"
+ {
+ gboolean _tmp22_ = FALSE;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = TRUE;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 5976 "scanner.c"
+ gint _tmp24_ = 0;
+ SANE_Option_Descriptor* _tmp25_ = NULL;
+ SANE_Word* _tmp26_ = NULL;
+ gint _tmp26__length1 = 0;
+ SANE_Word _tmp27_ = {0};
+ gdouble x = 0.0;
+ SANE_Option_Descriptor* _tmp28_ = NULL;
+ SANE_Word* _tmp29_ = NULL;
+ gint _tmp29__length1 = 0;
+ gint _tmp30_ = 0;
+ SANE_Word _tmp31_ = {0};
+ gdouble _tmp32_ = 0.0;
+ gdouble _tmp33_ = 0.0;
+ gdouble _tmp34_ = 0.0;
+ gdouble _tmp35_ = 0.0;
+ gdouble _tmp36_ = 0.0;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp22_) {
+#line 5995 "scanner.c"
+ gint _tmp23_ = 0;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = i;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp23_ + 1;
+#line 6001 "scanner.c"
+ }
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = FALSE;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = i;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = option;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = _tmp25_->constraint.word_list;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26__length1 = -1;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = _tmp26_[0];
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(((SANE_Word) _tmp24_) < _tmp27_)) {
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6019 "scanner.c"
+ }
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = option;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = _tmp28_->constraint.word_list;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29__length1 = -1;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = i;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = _tmp29_[_tmp30_ + 1];
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = SANE_UNFIX ((SANE_Fixed) _tmp31_);
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ x = _tmp32_;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = x;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = v;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = fabs (_tmp33_ - _tmp34_);
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = distance;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp35_ < _tmp36_) {
+#line 6045 "scanner.c"
+ gdouble _tmp37_ = 0.0;
+ gdouble _tmp38_ = 0.0;
+ gdouble _tmp39_ = 0.0;
+ gdouble _tmp40_ = 0.0;
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = x;
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = v;
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_ = fabs (_tmp37_ - _tmp38_);
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ distance = _tmp39_;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp40_ = x;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ nearest = _tmp40_;
+#line 6062 "scanner.c"
+ }
+ }
+ }
+ }
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_ = nearest;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v = _tmp41_;
+#line 6071 "scanner.c"
+ }
+ }
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp42_ = v;
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp43_ = SANE_FIX (_tmp42_);
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ v_fixed = _tmp43_;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp44_ = handle;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_ = option_index;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp46_ = sane_control_option (_tmp44_, _tmp45_, SANE_ACTION_SET_VALUE, &v_fixed, NULL);
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp46_;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp47_ = option_index;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_ = value;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp49_ = sane_status_to_string (status);
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_ = _tmp49_;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_ = SANE_UNFIX (v_fixed);
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:502: sane_control_option (%d, SANE_ACTION_SET_VALUE, %f) " \
+"-> (%s, %f)", (gint) _tmp47_, _tmp48_, _tmp50_, _tmp51_);
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp50_);
+#line 504 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp52_ = SANE_UNFIX (v_fixed);
+#line 504 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = _tmp52_;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_result_) {
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *_result_ = _vala_result;
+#line 6110 "scanner.c"
+ }
+}
+
+
+static void scanner_set_fixed_or_int_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gdouble value, gdouble* _result_) {
+ gdouble _vala_result = 0.0;
+ SANE_Option_Descriptor* _tmp0_ = NULL;
+ SANE_Value_Type _tmp1_ = 0;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (option != NULL);
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = option;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->type;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_ == SANE_TYPE_FIXED) {
+#line 6129 "scanner.c"
+ SANE_Handle _tmp2_ = {0};
+ SANE_Option_Descriptor* _tmp3_ = NULL;
+ SANE_Int _tmp4_ = {0};
+ gdouble _tmp5_ = 0.0;
+ gdouble _tmp6_ = 0.0;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = handle;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = option;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = option_index;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = value;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_fixed_option (self, _tmp2_, _tmp3_, _tmp4_, _tmp5_, &_tmp6_);
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = _tmp6_;
+#line 6147 "scanner.c"
+ } else {
+ SANE_Option_Descriptor* _tmp7_ = NULL;
+ SANE_Value_Type _tmp8_ = 0;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = option;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = _tmp7_->type;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp8_ == SANE_TYPE_INT) {
+#line 6157 "scanner.c"
+ gint r = 0;
+ SANE_Handle _tmp9_ = {0};
+ SANE_Option_Descriptor* _tmp10_ = NULL;
+ SANE_Int _tmp11_ = {0};
+ gdouble _tmp12_ = 0.0;
+ gdouble _tmp13_ = 0.0;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = handle;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = option;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = option_index;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = value;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = round (_tmp12_);
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_int_option (self, _tmp9_, _tmp10_, _tmp11_, (gint) _tmp13_, &_tmp14_);
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ r = _tmp14_;
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = r;
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = (gdouble) _tmp15_;
+#line 6184 "scanner.c"
+ } else {
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = 0.0;
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:520: Unable to set unsupported option type");
+#line 6190 "scanner.c"
+ }
+ }
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_result_) {
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *_result_ = _vala_result;
+#line 6197 "scanner.c"
+ }
+}
+
+
+static void scanner_set_option_to_max (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index) {
+ SANE_Option_Descriptor* _tmp0_ = NULL;
+ SANE_Constraint_Type _tmp1_ = 0;
+ SANE_Status status = 0;
+ SANE_Handle _tmp2_ = {0};
+ SANE_Int _tmp3_ = {0};
+ SANE_Option_Descriptor* _tmp4_ = NULL;
+ SANE_Range* _tmp5_ = NULL;
+ SANE_Status _tmp6_ = 0;
+ SANE_Int _tmp7_ = {0};
+ SANE_Status _tmp8_ = 0;
+ gchar* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (option != NULL);
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = option;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->constraint_type;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_ != SANE_CONSTRAINT_RANGE) {
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 6227 "scanner.c"
+ }
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = handle;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = option_index;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = option;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = _tmp4_->constraint.range;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = sane_control_option (_tmp2_, _tmp3_, SANE_ACTION_SET_VALUE, &_tmp5_->max, NULL);
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp6_;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = option_index;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = status;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = sane_status_to_string (_tmp8_);
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = _tmp9_;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:530: sane_control_option (%d, SANE_ACTION_SET_VALUE, opti" \
+"on.range.max) -> (%s)", (gint) _tmp7_, _tmp10_);
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp10_);
+#line 6253 "scanner.c"
+}
+
+
+static gchar string_get (const gchar* self, glong index) {
+ gchar result = '\0';
+ glong _tmp0_ = 0L;
+ gchar _tmp1_ = '\0';
+#line 996 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, '\0');
+#line 997 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = index;
+#line 997 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = ((gchar*) self)[_tmp0_];
+#line 997 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp1_;
+#line 997 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 6271 "scanner.c"
+}
+
+
+static gboolean scanner_set_string_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, const gchar* value, gchar** _result_) {
+ gchar* _vala_result = NULL;
+ gboolean result = FALSE;
+ gchar* _tmp0_ = NULL;
+ SANE_Option_Descriptor* _tmp1_ = NULL;
+ SANE_Value_Type _tmp2_ = 0;
+ gchar* s = NULL;
+ SANE_Option_Descriptor* _tmp3_ = NULL;
+ SANE_Int _tmp4_ = {0};
+ gchar* _tmp5_ = NULL;
+ gint s_length1 = 0;
+ gint _s_size_ = 0;
+ gint i = 0;
+ gchar* _tmp21_ = NULL;
+ gint _tmp21__length1 = 0;
+ gint _tmp22_ = 0;
+ gchar _tmp23_ = '\0';
+ SANE_Status status = 0;
+ SANE_Handle _tmp24_ = {0};
+ SANE_Int _tmp25_ = {0};
+ gchar* _tmp26_ = NULL;
+ gint _tmp26__length1 = 0;
+ SANE_Status _tmp27_ = 0;
+ gchar* _tmp28_ = NULL;
+ gint _tmp28__length1 = 0;
+ gchar* _tmp29_ = NULL;
+ SANE_Int _tmp30_ = {0};
+ const gchar* _tmp31_ = NULL;
+ gchar* _tmp32_ = NULL;
+ gchar* _tmp33_ = NULL;
+ const gchar* _tmp34_ = NULL;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (option != NULL, FALSE);
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (value != NULL, FALSE);
+#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = g_strdup ("");
+#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_vala_result);
+#line 535 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = _tmp0_;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = option;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _tmp1_->type;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (_tmp2_ == SANE_TYPE_STRING, FALSE);
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = option;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_->size;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = g_new0 (gchar, _tmp4_);
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp5_;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s_length1 = _tmp4_;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _s_size_ = s_length1;
+#line 540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 6338 "scanner.c"
+ {
+ gboolean _tmp6_ = FALSE;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = TRUE;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 6345 "scanner.c"
+ gboolean _tmp8_ = FALSE;
+ gint _tmp9_ = 0;
+ SANE_Option_Descriptor* _tmp10_ = NULL;
+ SANE_Int _tmp11_ = {0};
+ gchar* _tmp15_ = NULL;
+ gint _tmp15__length1 = 0;
+ gint _tmp16_ = 0;
+ const gchar* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+ gchar _tmp19_ = '\0';
+ gchar _tmp20_ = '\0';
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp6_) {
+#line 6359 "scanner.c"
+ gint _tmp7_ = 0;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = i;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp7_ + 1;
+#line 6365 "scanner.c"
+ }
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = FALSE;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = i;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = option;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = _tmp10_->size;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (((SANE_Int) _tmp9_) < (_tmp11_ - 1)) {
+#line 6377 "scanner.c"
+ const gchar* _tmp12_ = NULL;
+ gint _tmp13_ = 0;
+ gchar _tmp14_ = '\0';
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = value;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = i;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = string_get (_tmp12_, (glong) _tmp13_);
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = _tmp14_ != '\0';
+#line 6389 "scanner.c"
+ } else {
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = FALSE;
+#line 6393 "scanner.c"
+ }
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp8_) {
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6399 "scanner.c"
+ }
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = s;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15__length1 = s_length1;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = i;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = value;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = i;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = string_get (_tmp17_, (glong) _tmp18_);
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_[_tmp16_] = _tmp19_;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = _tmp15_[_tmp16_];
+#line 6417 "scanner.c"
+ }
+ }
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = s;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21__length1 = s_length1;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = i;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_[_tmp22_] = '\0';
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = _tmp21_[_tmp22_];
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = handle;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = option_index;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = s;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26__length1 = s_length1;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = sane_control_option (_tmp24_, _tmp25_, SANE_ACTION_SET_VALUE, _tmp26_, NULL);
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp27_;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = s;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28__length1 = s_length1;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = g_strdup ((const gchar*) _tmp28_);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_vala_result);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = _tmp29_;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = option_index;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = value;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = sane_status_to_string (status);
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = _tmp32_;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = _vala_result;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:546: sane_control_option (%d, SANE_ACTION_SET_VALUE, \"%s" \
+"\") -> (%s, \"%s\")", (gint) _tmp30_, _tmp31_, _tmp33_, _tmp34_);
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp33_);
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = status == SANE_STATUS_GOOD;
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = (g_free (s), NULL);
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_result_) {
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *_result_ = _vala_result;
+#line 6474 "scanner.c"
+ } else {
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_vala_result);
+#line 6478 "scanner.c"
+ }
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 6482 "scanner.c"
+}
+
+
+static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, gchar** values, int values_length1, gchar** _result_) {
+ gchar* _vala_result = NULL;
+ gboolean result = FALSE;
+ SANE_Option_Descriptor* _tmp0_ = NULL;
+ SANE_Value_Type _tmp1_ = 0;
+ SANE_Option_Descriptor* _tmp2_ = NULL;
+ SANE_Constraint_Type _tmp3_ = 0;
+ gchar* _tmp34_ = NULL;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (option != NULL, FALSE);
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = option;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->type;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (_tmp1_ == SANE_TYPE_STRING, FALSE);
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = option;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _tmp2_->constraint_type;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (_tmp3_ == SANE_CONSTRAINT_STRING_LIST, FALSE);
+#line 6510 "scanner.c"
+ {
+ gint i = 0;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 6515 "scanner.c"
+ {
+ gboolean _tmp4_ = FALSE;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = TRUE;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 6522 "scanner.c"
+ gchar** _tmp6_ = NULL;
+ gint _tmp6__length1 = 0;
+ gint _tmp7_ = 0;
+ const gchar* _tmp8_ = NULL;
+ gint j = 0;
+ SANE_Option_Descriptor* _tmp22_ = NULL;
+ gchar** _tmp23_ = NULL;
+ gint _tmp23__length1 = 0;
+ gint _tmp24_ = 0;
+ const gchar* _tmp25_ = NULL;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp4_) {
+#line 6535 "scanner.c"
+ gint _tmp5_ = 0;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = i;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp5_ + 1;
+#line 6541 "scanner.c"
+ }
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = FALSE;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = values;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6__length1 = values_length1;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = i;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = _tmp6_[_tmp7_];
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(_tmp8_ != NULL)) {
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6557 "scanner.c"
+ }
+#line 558 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ j = 0;
+#line 6561 "scanner.c"
+ {
+ gboolean _tmp9_ = FALSE;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = TRUE;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 6568 "scanner.c"
+ SANE_Option_Descriptor* _tmp11_ = NULL;
+ gchar** _tmp12_ = NULL;
+ gint _tmp12__length1 = 0;
+ gint _tmp13_ = 0;
+ const gchar* _tmp14_ = NULL;
+ gchar** _tmp15_ = NULL;
+ gint _tmp15__length1 = 0;
+ gint _tmp16_ = 0;
+ const gchar* _tmp17_ = NULL;
+ SANE_Option_Descriptor* _tmp18_ = NULL;
+ gchar** _tmp19_ = NULL;
+ gint _tmp19__length1 = 0;
+ gint _tmp20_ = 0;
+ const gchar* _tmp21_ = NULL;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp9_) {
+#line 6585 "scanner.c"
+ gint _tmp10_ = 0;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = j;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ j = _tmp10_ + 1;
+#line 6591 "scanner.c"
+ }
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = FALSE;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = option;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = _tmp11_->constraint.string_list;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12__length1 = -1;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = j;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = _tmp12_[_tmp13_];
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(_tmp14_ != NULL)) {
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6609 "scanner.c"
+ }
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = values;
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15__length1 = values_length1;
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = i;
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = _tmp15_[_tmp16_];
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = option;
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = _tmp18_->constraint.string_list;
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19__length1 = -1;
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = j;
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = _tmp19_[_tmp20_];
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp17_, _tmp21_) == 0) {
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6633 "scanner.c"
+ }
+ }
+ }
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = option;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = _tmp22_->constraint.string_list;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23__length1 = -1;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = j;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = _tmp23_[_tmp24_];
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp25_ != NULL) {
+#line 6649 "scanner.c"
+ SANE_Handle _tmp26_ = {0};
+ SANE_Option_Descriptor* _tmp27_ = NULL;
+ SANE_Int _tmp28_ = {0};
+ gchar** _tmp29_ = NULL;
+ gint _tmp29__length1 = 0;
+ gint _tmp30_ = 0;
+ const gchar* _tmp31_ = NULL;
+ gchar* _tmp32_ = NULL;
+ gboolean _tmp33_ = FALSE;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = handle;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = option;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = option_index;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = values;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29__length1 = values_length1;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = i;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = _tmp29_[_tmp30_];
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = scanner_set_string_option (self, _tmp26_, _tmp27_, _tmp28_, _tmp31_, &_tmp32_);
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_vala_result);
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = _tmp32_;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp33_;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_result_) {
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *_result_ = _vala_result;
+#line 6685 "scanner.c"
+ } else {
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_vala_result);
+#line 6689 "scanner.c"
+ }
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 6693 "scanner.c"
+ }
+ }
+ }
+ }
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = g_strdup ("");
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_vala_result);
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_result = _tmp34_;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = FALSE;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_result_) {
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *_result_ = _vala_result;
+#line 6710 "scanner.c"
+ } else {
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_vala_result);
+#line 6714 "scanner.c"
+ }
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 6718 "scanner.c"
+}
+
+
+static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descriptor* option) {
+ gchar* s = NULL;
+ SANE_Int _tmp0_ = {0};
+ gchar* _tmp1_ = NULL;
+ SANE_Option_Descriptor* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ SANE_Option_Descriptor* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ SANE_Option_Descriptor* _tmp18_ = NULL;
+ SANE_Value_Type _tmp19_ = 0;
+ const gchar* _tmp38_ = NULL;
+ SANE_Option_Descriptor* _tmp39_ = NULL;
+ SANE_Int _tmp40_ = {0};
+ gchar* _tmp41_ = NULL;
+ gchar* _tmp42_ = NULL;
+ gchar* _tmp43_ = NULL;
+ SANE_Option_Descriptor* _tmp44_ = NULL;
+ SANE_Unit _tmp45_ = 0;
+ SANE_Option_Descriptor* _tmp64_ = NULL;
+ SANE_Constraint_Type _tmp65_ = 0;
+ SANE_Int cap = {0};
+ SANE_Option_Descriptor* _tmp149_ = NULL;
+ SANE_Int _tmp150_ = {0};
+ SANE_Int _tmp151_ = {0};
+ const gchar* _tmp212_ = NULL;
+ SANE_Option_Descriptor* _tmp213_ = NULL;
+ const gchar* _tmp214_ = NULL;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (option != NULL);
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = index;
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = g_strdup_printf ("Option %d:", (gint) _tmp0_);
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp1_;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = option;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _tmp2_->name;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp3_, "") != 0) {
+#line 6765 "scanner.c"
+ const gchar* _tmp4_ = NULL;
+ SANE_Option_Descriptor* _tmp5_ = NULL;
+ const gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = s;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = option;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _tmp5_->name;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = g_strdup_printf (" name='%s'", _tmp6_);
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = _tmp7_;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = g_strconcat (_tmp4_, _tmp8_, NULL);
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp9_;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp8_);
+#line 6790 "scanner.c"
+ }
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = option;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = _tmp10_->title;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp11_, "") != 0) {
+#line 6798 "scanner.c"
+ const gchar* _tmp12_ = NULL;
+ SANE_Option_Descriptor* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+ gchar* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = s;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = option;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = _tmp13_->title;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = g_strdup_printf (" title='%s'", _tmp14_);
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = _tmp15_;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = g_strconcat (_tmp12_, _tmp16_, NULL);
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp17_;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp16_);
+#line 6823 "scanner.c"
+ }
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = option;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = _tmp18_->type;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ switch (_tmp19_) {
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_TYPE_BOOL:
+#line 6833 "scanner.c"
+ {
+ const gchar* _tmp20_ = NULL;
+ gchar* _tmp21_ = NULL;
+#line 586 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = s;
+#line 586 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = g_strconcat (_tmp20_, " type=bool", NULL);
+#line 586 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 586 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp21_;
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6847 "scanner.c"
+ }
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_TYPE_INT:
+#line 6851 "scanner.c"
+ {
+ const gchar* _tmp22_ = NULL;
+ gchar* _tmp23_ = NULL;
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = s;
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = g_strconcat (_tmp22_, " type=int", NULL);
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp23_;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6865 "scanner.c"
+ }
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_TYPE_FIXED:
+#line 6869 "scanner.c"
+ {
+ const gchar* _tmp24_ = NULL;
+ gchar* _tmp25_ = NULL;
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = s;
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = g_strconcat (_tmp24_, " type=fixed", NULL);
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp25_;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6883 "scanner.c"
+ }
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_TYPE_STRING:
+#line 6887 "scanner.c"
+ {
+ const gchar* _tmp26_ = NULL;
+ gchar* _tmp27_ = NULL;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = s;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = g_strconcat (_tmp26_, " type=string", NULL);
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp27_;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6901 "scanner.c"
+ }
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_TYPE_BUTTON:
+#line 6905 "scanner.c"
+ {
+ const gchar* _tmp28_ = NULL;
+ gchar* _tmp29_ = NULL;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = s;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = g_strconcat (_tmp28_, " type=button", NULL);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp29_;
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6919 "scanner.c"
+ }
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_TYPE_GROUP:
+#line 6923 "scanner.c"
+ {
+ const gchar* _tmp30_ = NULL;
+ gchar* _tmp31_ = NULL;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = s;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = g_strconcat (_tmp30_, " type=group", NULL);
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp31_;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6937 "scanner.c"
+ }
+ default:
+ {
+ const gchar* _tmp32_ = NULL;
+ SANE_Option_Descriptor* _tmp33_ = NULL;
+ SANE_Value_Type _tmp34_ = 0;
+ gchar* _tmp35_ = NULL;
+ gchar* _tmp36_ = NULL;
+ gchar* _tmp37_ = NULL;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = s;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = option;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = _tmp33_->type;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = g_strdup_printf (" type=%d", (gint) _tmp34_);
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = _tmp35_;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = g_strconcat (_tmp32_, _tmp36_, NULL);
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp37_;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp36_);
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 6967 "scanner.c"
+ }
+ }
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = s;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_ = option;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp40_ = _tmp39_->size;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_ = g_strdup_printf (" size=%d", (gint) _tmp40_);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp42_ = _tmp41_;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp43_ = g_strconcat (_tmp38_, _tmp42_, NULL);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp43_;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp42_);
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp44_ = option;
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_ = _tmp44_->unit;
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ switch (_tmp45_) {
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_UNIT_NONE:
+#line 6996 "scanner.c"
+ {
+#line 613 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7000 "scanner.c"
+ }
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_UNIT_PIXEL:
+#line 7004 "scanner.c"
+ {
+ const gchar* _tmp46_ = NULL;
+ gchar* _tmp47_ = NULL;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp46_ = s;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp47_ = g_strconcat (_tmp46_, " unit=pixels", NULL);
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp47_;
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7018 "scanner.c"
+ }
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_UNIT_BIT:
+#line 7022 "scanner.c"
+ {
+ const gchar* _tmp48_ = NULL;
+ gchar* _tmp49_ = NULL;
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_ = s;
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp49_ = g_strconcat (_tmp48_, " unit=bits", NULL);
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp49_;
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7036 "scanner.c"
+ }
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_UNIT_MM:
+#line 7040 "scanner.c"
+ {
+ const gchar* _tmp50_ = NULL;
+ gchar* _tmp51_ = NULL;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_ = s;
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_ = g_strconcat (_tmp50_, " unit=mm", NULL);
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp51_;
+#line 622 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7054 "scanner.c"
+ }
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_UNIT_DPI:
+#line 7058 "scanner.c"
+ {
+ const gchar* _tmp52_ = NULL;
+ gchar* _tmp53_ = NULL;
+#line 624 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp52_ = s;
+#line 624 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp53_ = g_strconcat (_tmp52_, " unit=dpi", NULL);
+#line 624 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 624 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp53_;
+#line 625 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7072 "scanner.c"
+ }
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_UNIT_PERCENT:
+#line 7076 "scanner.c"
+ {
+ const gchar* _tmp54_ = NULL;
+ gchar* _tmp55_ = NULL;
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_ = s;
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp55_ = g_strconcat (_tmp54_, " unit=percent", NULL);
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp55_;
+#line 628 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7090 "scanner.c"
+ }
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_UNIT_MICROSECOND:
+#line 7094 "scanner.c"
+ {
+ const gchar* _tmp56_ = NULL;
+ gchar* _tmp57_ = NULL;
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp56_ = s;
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp57_ = g_strconcat (_tmp56_, " unit=microseconds", NULL);
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp57_;
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7108 "scanner.c"
+ }
+ default:
+ {
+ const gchar* _tmp58_ = NULL;
+ SANE_Option_Descriptor* _tmp59_ = NULL;
+ SANE_Unit _tmp60_ = 0;
+ gchar* _tmp61_ = NULL;
+ gchar* _tmp62_ = NULL;
+ gchar* _tmp63_ = NULL;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp58_ = s;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp59_ = option;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp60_ = _tmp59_->unit;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp61_ = g_strdup_printf (" unit=%d", (gint) _tmp60_);
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp62_ = _tmp61_;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp63_ = g_strconcat (_tmp58_, _tmp62_, NULL);
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp63_;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp62_);
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7138 "scanner.c"
+ }
+ }
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp64_ = option;
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp65_ = _tmp64_->constraint_type;
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ switch (_tmp65_) {
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_CONSTRAINT_RANGE:
+#line 7149 "scanner.c"
+ {
+ SANE_Option_Descriptor* _tmp66_ = NULL;
+ SANE_Value_Type _tmp67_ = 0;
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp66_ = option;
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp67_ = _tmp66_->type;
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp67_ == SANE_TYPE_FIXED) {
+#line 7159 "scanner.c"
+ const gchar* _tmp68_ = NULL;
+ SANE_Option_Descriptor* _tmp69_ = NULL;
+ SANE_Range* _tmp70_ = NULL;
+ SANE_Word _tmp71_ = {0};
+ gdouble _tmp72_ = 0.0;
+ SANE_Option_Descriptor* _tmp73_ = NULL;
+ SANE_Range* _tmp74_ = NULL;
+ SANE_Word _tmp75_ = {0};
+ gdouble _tmp76_ = 0.0;
+ SANE_Option_Descriptor* _tmp77_ = NULL;
+ SANE_Range* _tmp78_ = NULL;
+ SANE_Word _tmp79_ = {0};
+ gchar* _tmp80_ = NULL;
+ gchar* _tmp81_ = NULL;
+ gchar* _tmp82_ = NULL;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp68_ = s;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp69_ = option;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp70_ = _tmp69_->constraint.range;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp71_ = _tmp70_->min;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp72_ = SANE_UNFIX ((SANE_Fixed) _tmp71_);
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp73_ = option;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp74_ = _tmp73_->constraint.range;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp75_ = _tmp74_->max;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp76_ = SANE_UNFIX ((SANE_Fixed) _tmp75_);
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp77_ = option;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp78_ = _tmp77_->constraint.range;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp79_ = _tmp78_->quant;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp80_ = g_strdup_printf (" min=%f, max=%f, quant=%d", _tmp72_, _tmp76_, (gint) _tmp79_);
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp81_ = _tmp80_;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp82_ = g_strconcat (_tmp68_, _tmp81_, NULL);
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp82_;
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp81_);
+#line 7211 "scanner.c"
+ } else {
+ const gchar* _tmp83_ = NULL;
+ SANE_Option_Descriptor* _tmp84_ = NULL;
+ SANE_Range* _tmp85_ = NULL;
+ SANE_Word _tmp86_ = {0};
+ SANE_Option_Descriptor* _tmp87_ = NULL;
+ SANE_Range* _tmp88_ = NULL;
+ SANE_Word _tmp89_ = {0};
+ SANE_Option_Descriptor* _tmp90_ = NULL;
+ SANE_Range* _tmp91_ = NULL;
+ SANE_Word _tmp92_ = {0};
+ gchar* _tmp93_ = NULL;
+ gchar* _tmp94_ = NULL;
+ gchar* _tmp95_ = NULL;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp83_ = s;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp84_ = option;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp85_ = _tmp84_->constraint.range;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp86_ = _tmp85_->min;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp87_ = option;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp88_ = _tmp87_->constraint.range;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp89_ = _tmp88_->max;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp90_ = option;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp91_ = _tmp90_->constraint.range;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp92_ = _tmp91_->quant;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp93_ = g_strdup_printf (" min=%d, max=%d, quant=%d", (gint) _tmp86_, (gint) _tmp89_, (gint) _tmp92_);
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp94_ = _tmp93_;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp95_ = g_strconcat (_tmp83_, _tmp94_, NULL);
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp95_;
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp94_);
+#line 7258 "scanner.c"
+ }
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7262 "scanner.c"
+ }
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_CONSTRAINT_WORD_LIST:
+#line 7266 "scanner.c"
+ {
+ const gchar* _tmp96_ = NULL;
+ gchar* _tmp97_ = NULL;
+ const gchar* _tmp126_ = NULL;
+ gchar* _tmp127_ = NULL;
+#line 646 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp96_ = s;
+#line 646 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp97_ = g_strconcat (_tmp96_, " values=[", NULL);
+#line 646 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 646 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp97_;
+#line 7280 "scanner.c"
+ {
+ gint i = 0;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 7285 "scanner.c"
+ {
+ gboolean _tmp98_ = FALSE;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp98_ = TRUE;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 7292 "scanner.c"
+ gint _tmp100_ = 0;
+ SANE_Option_Descriptor* _tmp101_ = NULL;
+ SANE_Word* _tmp102_ = NULL;
+ gint _tmp102__length1 = 0;
+ SANE_Word _tmp103_ = {0};
+ gint _tmp104_ = 0;
+ SANE_Option_Descriptor* _tmp107_ = NULL;
+ SANE_Value_Type _tmp108_ = 0;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp98_) {
+#line 7303 "scanner.c"
+ gint _tmp99_ = 0;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp99_ = i;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp99_ + 1;
+#line 7309 "scanner.c"
+ }
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp98_ = FALSE;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp100_ = i;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp101_ = option;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp102_ = _tmp101_->constraint.word_list;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp102__length1 = -1;
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp103_ = _tmp102_[0];
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(((SANE_Word) _tmp100_) < _tmp103_)) {
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7327 "scanner.c"
+ }
+#line 649 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp104_ = i;
+#line 649 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp104_ != 0) {
+#line 7333 "scanner.c"
+ const gchar* _tmp105_ = NULL;
+ gchar* _tmp106_ = NULL;
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp105_ = s;
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp106_ = g_strconcat (_tmp105_, ", ", NULL);
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp106_;
+#line 7344 "scanner.c"
+ }
+#line 651 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp107_ = option;
+#line 651 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp108_ = _tmp107_->type;
+#line 651 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp108_ == SANE_TYPE_INT) {
+#line 7352 "scanner.c"
+ const gchar* _tmp109_ = NULL;
+ SANE_Option_Descriptor* _tmp110_ = NULL;
+ SANE_Word* _tmp111_ = NULL;
+ gint _tmp111__length1 = 0;
+ gint _tmp112_ = 0;
+ SANE_Word _tmp113_ = {0};
+ gchar* _tmp114_ = NULL;
+ gchar* _tmp115_ = NULL;
+ gchar* _tmp116_ = NULL;
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp109_ = s;
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp110_ = option;
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp111_ = _tmp110_->constraint.word_list;
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp111__length1 = -1;
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp112_ = i;
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp113_ = _tmp111_[_tmp112_ + 1];
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp114_ = g_strdup_printf ("%d", (gint) _tmp113_);
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp115_ = _tmp114_;
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp116_ = g_strconcat (_tmp109_, _tmp115_, NULL);
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp116_;
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp115_);
+#line 7386 "scanner.c"
+ } else {
+ const gchar* _tmp117_ = NULL;
+ SANE_Option_Descriptor* _tmp118_ = NULL;
+ SANE_Word* _tmp119_ = NULL;
+ gint _tmp119__length1 = 0;
+ gint _tmp120_ = 0;
+ SANE_Word _tmp121_ = {0};
+ gdouble _tmp122_ = 0.0;
+ gchar* _tmp123_ = NULL;
+ gchar* _tmp124_ = NULL;
+ gchar* _tmp125_ = NULL;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp117_ = s;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp118_ = option;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp119_ = _tmp118_->constraint.word_list;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp119__length1 = -1;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp120_ = i;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp121_ = _tmp119_[_tmp120_ + 1];
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp122_ = SANE_UNFIX ((SANE_Fixed) _tmp121_);
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp123_ = g_strdup_printf ("%f", _tmp122_);
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp124_ = _tmp123_;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp125_ = g_strconcat (_tmp117_, _tmp124_, NULL);
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp125_;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp124_);
+#line 7424 "scanner.c"
+ }
+ }
+ }
+ }
+#line 656 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp126_ = s;
+#line 656 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp127_ = g_strconcat (_tmp126_, "]", NULL);
+#line 656 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 656 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp127_;
+#line 657 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7439 "scanner.c"
+ }
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_CONSTRAINT_STRING_LIST:
+#line 7443 "scanner.c"
+ {
+ const gchar* _tmp128_ = NULL;
+ gchar* _tmp129_ = NULL;
+ const gchar* _tmp147_ = NULL;
+ gchar* _tmp148_ = NULL;
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp128_ = s;
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp129_ = g_strconcat (_tmp128_, " values=[", NULL);
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp129_;
+#line 7457 "scanner.c"
+ {
+ gint i = 0;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 7462 "scanner.c"
+ {
+ gboolean _tmp130_ = FALSE;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp130_ = TRUE;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 7469 "scanner.c"
+ SANE_Option_Descriptor* _tmp132_ = NULL;
+ gchar** _tmp133_ = NULL;
+ gint _tmp133__length1 = 0;
+ gint _tmp134_ = 0;
+ const gchar* _tmp135_ = NULL;
+ gint _tmp136_ = 0;
+ const gchar* _tmp139_ = NULL;
+ SANE_Option_Descriptor* _tmp140_ = NULL;
+ gchar** _tmp141_ = NULL;
+ gint _tmp141__length1 = 0;
+ gint _tmp142_ = 0;
+ const gchar* _tmp143_ = NULL;
+ gchar* _tmp144_ = NULL;
+ gchar* _tmp145_ = NULL;
+ gchar* _tmp146_ = NULL;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp130_) {
+#line 7487 "scanner.c"
+ gint _tmp131_ = 0;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp131_ = i;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp131_ + 1;
+#line 7493 "scanner.c"
+ }
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp130_ = FALSE;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp132_ = option;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp133_ = _tmp132_->constraint.string_list;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp133__length1 = -1;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp134_ = i;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp135_ = _tmp133_[_tmp134_];
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(_tmp135_ != NULL)) {
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7511 "scanner.c"
+ }
+#line 662 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp136_ = i;
+#line 662 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp136_ != 0) {
+#line 7517 "scanner.c"
+ const gchar* _tmp137_ = NULL;
+ gchar* _tmp138_ = NULL;
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp137_ = s;
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_ = g_strconcat (_tmp137_, ", ", NULL);
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp138_;
+#line 7528 "scanner.c"
+ }
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp139_ = s;
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp140_ = option;
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp141_ = _tmp140_->constraint.string_list;
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp141__length1 = -1;
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp142_ = i;
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp143_ = _tmp141_[_tmp142_];
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp144_ = g_strdup_printf ("\"%s\"", _tmp143_);
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp145_ = _tmp144_;
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp146_ = g_strconcat (_tmp139_, _tmp145_, NULL);
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp146_;
+#line 664 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp145_);
+#line 7554 "scanner.c"
+ }
+ }
+ }
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp147_ = s;
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp148_ = g_strconcat (_tmp147_, "]", NULL);
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 666 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp148_;
+#line 667 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7568 "scanner.c"
+ }
+ default:
+ {
+#line 669 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 7574 "scanner.c"
+ }
+ }
+#line 672 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp149_ = option;
+#line 672 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp150_ = _tmp149_->cap;
+#line 672 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ cap = _tmp150_;
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp151_ = cap;
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp151_ != ((SANE_Int) 0)) {
+#line 7587 "scanner.c"
+ const gchar* _tmp152_ = NULL;
+ gchar* _tmp153_ = NULL;
+ SANE_Int _tmp154_ = {0};
+ SANE_Int _tmp161_ = {0};
+ SANE_Int _tmp168_ = {0};
+ SANE_Int _tmp175_ = {0};
+ SANE_Int _tmp182_ = {0};
+ SANE_Int _tmp189_ = {0};
+ SANE_Int _tmp196_ = {0};
+ SANE_Int _tmp203_ = {0};
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp152_ = s;
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp153_ = g_strconcat (_tmp152_, " cap=", NULL);
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp153_;
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp154_ = cap;
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if ((_tmp154_ & SANE_CAP_SOFT_SELECT) != ((SANE_Int) 0)) {
+#line 7610 "scanner.c"
+ const gchar* _tmp155_ = NULL;
+ const gchar* _tmp158_ = NULL;
+ gchar* _tmp159_ = NULL;
+ SANE_Int _tmp160_ = {0};
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp155_ = s;
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp155_, "") != 0) {
+#line 7619 "scanner.c"
+ const gchar* _tmp156_ = NULL;
+ gchar* _tmp157_ = NULL;
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp156_ = s;
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp157_ = g_strconcat (_tmp156_, ",", NULL);
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp157_;
+#line 7630 "scanner.c"
+ }
+#line 680 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp158_ = s;
+#line 680 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp159_ = g_strconcat (_tmp158_, "soft-select", NULL);
+#line 680 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 680 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp159_;
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp160_ = cap;
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ cap = _tmp160_ & (~SANE_CAP_SOFT_SELECT);
+#line 7644 "scanner.c"
+ }
+#line 683 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp161_ = cap;
+#line 683 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if ((_tmp161_ & SANE_CAP_HARD_SELECT) != ((SANE_Int) 0)) {
+#line 7650 "scanner.c"
+ const gchar* _tmp162_ = NULL;
+ const gchar* _tmp165_ = NULL;
+ gchar* _tmp166_ = NULL;
+ SANE_Int _tmp167_ = {0};
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp162_ = s;
+#line 685 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp162_, "") != 0) {
+#line 7659 "scanner.c"
+ const gchar* _tmp163_ = NULL;
+ gchar* _tmp164_ = NULL;
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp163_ = s;
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp164_ = g_strconcat (_tmp163_, ",", NULL);
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp164_;
+#line 7670 "scanner.c"
+ }
+#line 687 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp165_ = s;
+#line 687 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp166_ = g_strconcat (_tmp165_, "hard-select", NULL);
+#line 687 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 687 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp166_;
+#line 688 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp167_ = cap;
+#line 688 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ cap = _tmp167_ & (~SANE_CAP_HARD_SELECT);
+#line 7684 "scanner.c"
+ }
+#line 690 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp168_ = cap;
+#line 690 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if ((_tmp168_ & SANE_CAP_SOFT_DETECT) != ((SANE_Int) 0)) {
+#line 7690 "scanner.c"
+ const gchar* _tmp169_ = NULL;
+ const gchar* _tmp172_ = NULL;
+ gchar* _tmp173_ = NULL;
+ SANE_Int _tmp174_ = {0};
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp169_ = s;
+#line 692 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp169_, "") != 0) {
+#line 7699 "scanner.c"
+ const gchar* _tmp170_ = NULL;
+ gchar* _tmp171_ = NULL;
+#line 693 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp170_ = s;
+#line 693 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp171_ = g_strconcat (_tmp170_, ",", NULL);
+#line 693 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 693 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp171_;
+#line 7710 "scanner.c"
+ }
+#line 694 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp172_ = s;
+#line 694 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp173_ = g_strconcat (_tmp172_, "soft-detect", NULL);
+#line 694 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 694 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp173_;
+#line 695 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp174_ = cap;
+#line 695 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ cap = _tmp174_ & (~SANE_CAP_SOFT_DETECT);
+#line 7724 "scanner.c"
+ }
+#line 697 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp175_ = cap;
+#line 697 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if ((_tmp175_ & SANE_CAP_EMULATED) != ((SANE_Int) 0)) {
+#line 7730 "scanner.c"
+ const gchar* _tmp176_ = NULL;
+ const gchar* _tmp179_ = NULL;
+ gchar* _tmp180_ = NULL;
+ SANE_Int _tmp181_ = {0};
+#line 699 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp176_ = s;
+#line 699 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp176_, "") != 0) {
+#line 7739 "scanner.c"
+ const gchar* _tmp177_ = NULL;
+ gchar* _tmp178_ = NULL;
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp177_ = s;
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp178_ = g_strconcat (_tmp177_, ",", NULL);
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp178_;
+#line 7750 "scanner.c"
+ }
+#line 701 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp179_ = s;
+#line 701 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp180_ = g_strconcat (_tmp179_, "emulated", NULL);
+#line 701 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 701 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp180_;
+#line 702 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp181_ = cap;
+#line 702 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ cap = _tmp181_ & (~SANE_CAP_EMULATED);
+#line 7764 "scanner.c"
+ }
+#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp182_ = cap;
+#line 704 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if ((_tmp182_ & SANE_CAP_AUTOMATIC) != ((SANE_Int) 0)) {
+#line 7770 "scanner.c"
+ const gchar* _tmp183_ = NULL;
+ const gchar* _tmp186_ = NULL;
+ gchar* _tmp187_ = NULL;
+ SANE_Int _tmp188_ = {0};
+#line 706 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp183_ = s;
+#line 706 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp183_, "") != 0) {
+#line 7779 "scanner.c"
+ const gchar* _tmp184_ = NULL;
+ gchar* _tmp185_ = NULL;
+#line 707 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp184_ = s;
+#line 707 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp185_ = g_strconcat (_tmp184_, ",", NULL);
+#line 707 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 707 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp185_;
+#line 7790 "scanner.c"
+ }
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp186_ = s;
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp187_ = g_strconcat (_tmp186_, "automatic", NULL);
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 708 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp187_;
+#line 709 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp188_ = cap;
+#line 709 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ cap = _tmp188_ & (~SANE_CAP_AUTOMATIC);
+#line 7804 "scanner.c"
+ }
+#line 711 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp189_ = cap;
+#line 711 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if ((_tmp189_ & SANE_CAP_INACTIVE) != ((SANE_Int) 0)) {
+#line 7810 "scanner.c"
+ const gchar* _tmp190_ = NULL;
+ const gchar* _tmp193_ = NULL;
+ gchar* _tmp194_ = NULL;
+ SANE_Int _tmp195_ = {0};
+#line 713 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp190_ = s;
+#line 713 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp190_, "") != 0) {
+#line 7819 "scanner.c"
+ const gchar* _tmp191_ = NULL;
+ gchar* _tmp192_ = NULL;
+#line 714 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp191_ = s;
+#line 714 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp192_ = g_strconcat (_tmp191_, ",", NULL);
+#line 714 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 714 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp192_;
+#line 7830 "scanner.c"
+ }
+#line 715 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp193_ = s;
+#line 715 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp194_ = g_strconcat (_tmp193_, "inactive", NULL);
+#line 715 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 715 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp194_;
+#line 716 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp195_ = cap;
+#line 716 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ cap = _tmp195_ & (~SANE_CAP_INACTIVE);
+#line 7844 "scanner.c"
+ }
+#line 718 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp196_ = cap;
+#line 718 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if ((_tmp196_ & SANE_CAP_ADVANCED) != ((SANE_Int) 0)) {
+#line 7850 "scanner.c"
+ const gchar* _tmp197_ = NULL;
+ const gchar* _tmp200_ = NULL;
+ gchar* _tmp201_ = NULL;
+ SANE_Int _tmp202_ = {0};
+#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp197_ = s;
+#line 720 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp197_, "") != 0) {
+#line 7859 "scanner.c"
+ const gchar* _tmp198_ = NULL;
+ gchar* _tmp199_ = NULL;
+#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp198_ = s;
+#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp199_ = g_strconcat (_tmp198_, ",", NULL);
+#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 721 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp199_;
+#line 7870 "scanner.c"
+ }
+#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp200_ = s;
+#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp201_ = g_strconcat (_tmp200_, "advanced", NULL);
+#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 722 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp201_;
+#line 723 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp202_ = cap;
+#line 723 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ cap = _tmp202_ & (~SANE_CAP_ADVANCED);
+#line 7884 "scanner.c"
+ }
+#line 726 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp203_ = cap;
+#line 726 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp203_ != ((SANE_Int) 0)) {
+#line 7890 "scanner.c"
+ const gchar* _tmp204_ = NULL;
+ const gchar* _tmp207_ = NULL;
+ SANE_Int _tmp208_ = {0};
+ gchar* _tmp209_ = NULL;
+ gchar* _tmp210_ = NULL;
+ gchar* _tmp211_ = NULL;
+#line 728 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp204_ = s;
+#line 728 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp204_, "") != 0) {
+#line 7901 "scanner.c"
+ const gchar* _tmp205_ = NULL;
+ gchar* _tmp206_ = NULL;
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp205_ = s;
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp206_ = g_strconcat (_tmp205_, ",", NULL);
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp206_;
+#line 7912 "scanner.c"
+ }
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp207_ = s;
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp208_ = cap;
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp209_ = g_strdup_printf ("%x", (guint) ((gint) _tmp208_));
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp210_ = _tmp209_;
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp211_ = g_strconcat (_tmp207_, _tmp210_, NULL);
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ s = _tmp211_;
+#line 730 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp210_);
+#line 7930 "scanner.c"
+ }
+ }
+#line 734 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp212_ = s;
+#line 734 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:734: %s", _tmp212_);
+#line 736 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp213_ = option;
+#line 736 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp214_ = _tmp213_->desc;
+#line 736 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp214_ != NULL) {
+#line 7943 "scanner.c"
+ SANE_Option_Descriptor* _tmp215_ = NULL;
+ const gchar* _tmp216_ = NULL;
+#line 737 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp215_ = option;
+#line 737 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp216_ = _tmp215_->desc;
+#line 737 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:737: Description: %s", _tmp216_);
+#line 7952 "scanner.c"
+ }
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (s);
+#line 7956 "scanner.c"
+}
+
+
+static void scanner_authorization_cb (const gchar* resource, gchar* username, int username_length1, gchar* password, int password_length1) {
+ Scanner* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ NotifyRequestAuthorization* _tmp2_ = NULL;
+ NotifyRequestAuthorization* _tmp3_ = NULL;
+ Credentials* credentials = NULL;
+ Scanner* _tmp4_ = NULL;
+ GAsyncQueue* _tmp5_ = NULL;
+ gpointer _tmp6_ = NULL;
+#line 740 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (resource != NULL);
+#line 742 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = scanner_scanner_object;
+#line 742 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = resource;
+#line 742 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = notify_request_authorization_new (_tmp1_);
+#line 742 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _tmp2_;
+#line 742 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (_tmp0_, (Notify*) _tmp3_);
+#line 742 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp3_);
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = scanner_scanner_object;
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = _tmp4_->priv->authorize_queue;
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = g_async_queue_pop (_tmp5_);
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ credentials = (Credentials*) _tmp6_;
+#line 7991 "scanner.c"
+ {
+ gint i = 0;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 7996 "scanner.c"
+ {
+ gboolean _tmp7_ = FALSE;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = TRUE;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 8003 "scanner.c"
+ gboolean _tmp9_ = FALSE;
+ Credentials* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ gchar _tmp13_ = '\0';
+ gchar* _tmp16_ = NULL;
+ gint _tmp16__length1 = 0;
+ gint _tmp17_ = 0;
+ Credentials* _tmp18_ = NULL;
+ const gchar* _tmp19_ = NULL;
+ gint _tmp20_ = 0;
+ gchar _tmp21_ = '\0';
+ gchar _tmp22_ = '\0';
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp7_) {
+#line 8019 "scanner.c"
+ gint _tmp8_ = 0;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = i;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp8_ + 1;
+#line 8025 "scanner.c"
+ }
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = FALSE;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = credentials;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = _tmp10_->username;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = i;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = string_get (_tmp11_, (glong) _tmp12_);
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp13_ != '\0') {
+#line 8039 "scanner.c"
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = i;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = SANE_MAX_USERNAME_LEN;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = _tmp14_ < _tmp15_;
+#line 8048 "scanner.c"
+ } else {
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = FALSE;
+#line 8052 "scanner.c"
+ }
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp9_) {
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 8058 "scanner.c"
+ }
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = username;
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16__length1 = username_length1;
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = i;
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = credentials;
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = _tmp18_->username;
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = i;
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = string_get (_tmp19_, (glong) _tmp20_);
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_[_tmp17_] = _tmp21_;
+#line 746 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = _tmp16_[_tmp17_];
+#line 8078 "scanner.c"
+ }
+ }
+ }
+ {
+ gint i = 0;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 8086 "scanner.c"
+ {
+ gboolean _tmp23_ = FALSE;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = TRUE;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 8093 "scanner.c"
+ gboolean _tmp25_ = FALSE;
+ Credentials* _tmp26_ = NULL;
+ const gchar* _tmp27_ = NULL;
+ gint _tmp28_ = 0;
+ gchar _tmp29_ = '\0';
+ gchar* _tmp32_ = NULL;
+ gint _tmp32__length1 = 0;
+ gint _tmp33_ = 0;
+ Credentials* _tmp34_ = NULL;
+ const gchar* _tmp35_ = NULL;
+ gint _tmp36_ = 0;
+ gchar _tmp37_ = '\0';
+ gchar _tmp38_ = '\0';
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp23_) {
+#line 8109 "scanner.c"
+ gint _tmp24_ = 0;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = i;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp24_ + 1;
+#line 8115 "scanner.c"
+ }
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = FALSE;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = credentials;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = _tmp26_->password;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = i;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = string_get (_tmp27_, (glong) _tmp28_);
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp29_ != '\0') {
+#line 8129 "scanner.c"
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = i;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = SANE_MAX_USERNAME_LEN;
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = _tmp30_ < _tmp31_;
+#line 8138 "scanner.c"
+ } else {
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = FALSE;
+#line 8142 "scanner.c"
+ }
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp25_) {
+#line 747 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 8148 "scanner.c"
+ }
+#line 748 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = password;
+#line 748 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32__length1 = password_length1;
+#line 748 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = i;
+#line 748 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = credentials;
+#line 748 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = _tmp34_->password;
+#line 748 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = i;
+#line 748 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = string_get (_tmp35_, (glong) _tmp36_);
+#line 748 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_[_tmp33_] = _tmp37_;
+#line 748 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = _tmp32_[_tmp33_];
+#line 8168 "scanner.c"
+ }
+ }
+ }
+#line 740 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _credentials_unref0 (credentials);
+#line 8174 "scanner.c"
+}
+
+
+static gpointer _credentials_ref0 (gpointer self) {
+#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self ? credentials_ref (self) : NULL;
+#line 8181 "scanner.c"
+}
+
+
+void scanner_authorize (Scanner* self, const gchar* username, const gchar* password) {
+ Credentials* credentials = NULL;
+ Credentials* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ GAsyncQueue* _tmp5_ = NULL;
+ Credentials* _tmp6_ = NULL;
+#line 751 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 751 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (username != NULL);
+#line 751 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (password != NULL);
+#line 753 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = credentials_new ();
+#line 753 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ credentials = _tmp0_;
+#line 754 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = username;
+#line 754 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 754 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (credentials->username);
+#line 754 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ credentials->username = _tmp2_;
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = password;
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = g_strdup (_tmp3_);
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (credentials->password);
+#line 755 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ credentials->password = _tmp4_;
+#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = self->priv->authorize_queue;
+#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _credentials_ref0 (credentials);
+#line 756 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_async_queue_push (_tmp5_, _tmp6_);
+#line 751 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _credentials_unref0 (credentials);
+#line 8228 "scanner.c"
+}
+
+
+static void scanner_close_device (Scanner* self) {
+ gboolean _tmp0_ = FALSE;
+#line 759 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 761 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->have_handle;
+#line 761 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp0_) {
+#line 8240 "scanner.c"
+ SANE_Handle _tmp1_ = {0};
+ SANE_Handle _tmp2_ = {0};
+#line 763 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->handle;
+#line 763 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ sane_cancel (_tmp1_);
+#line 764 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:764: sane_cancel ()");
+#line 766 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = self->priv->handle;
+#line 766 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ sane_close (_tmp2_);
+#line 767 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:767: sane_close ()");
+#line 768 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->have_handle = FALSE;
+#line 769 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_hash_table_unref0 (self->priv->options);
+#line 769 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->options = NULL;
+#line 8261 "scanner.c"
+ }
+#line 772 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer = (g_free (self->priv->buffer), NULL);
+#line 772 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer = NULL;
+#line 772 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer_length1 = 0;
+#line 772 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->_buffer_size_ = self->priv->buffer_length1;
+#line 773 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ __g_list_free__scan_job_unref0_0 (self->priv->job_queue);
+#line 773 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->job_queue = NULL;
+#line 775 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_scanning (self, FALSE);
+#line 8277 "scanner.c"
+}
+
+
+static void scanner_fail_scan (Scanner* self, gint error_code, const gchar* error_string) {
+ gint _tmp0_ = 0;
+ const gchar* _tmp1_ = NULL;
+ NotifyScanFailed* _tmp2_ = NULL;
+ NotifyScanFailed* _tmp3_ = NULL;
+#line 778 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 778 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (error_string != NULL);
+#line 780 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_close_device (self);
+#line 781 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_IDLE;
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = error_code;
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = error_string;
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = notify_scan_failed_new (_tmp0_, _tmp1_);
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _tmp2_;
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (self, (Notify*) _tmp3_);
+#line 782 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp3_);
+#line 8306 "scanner.c"
+}
+
+
+static gpointer _request_ref0 (gpointer self) {
+#line 807 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self ? request_ref (self) : NULL;
+#line 8313 "scanner.c"
+}
+
+
+static gpointer _scan_job_ref0 (gpointer self) {
+#line 808 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self ? scan_job_ref (self) : NULL;
+#line 8320 "scanner.c"
+}
+
+
+static gboolean scanner_handle_requests (Scanner* self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+ ScanState _tmp1_ = 0;
+ gint request_count = 0;
+#line 785 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 788 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->state;
+#line 788 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_ == SCAN_STATE_IDLE) {
+#line 8335 "scanner.c"
+ gboolean _tmp2_ = FALSE;
+#line 788 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = self->priv->need_redetect;
+#line 788 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = _tmp2_;
+#line 8341 "scanner.c"
+ } else {
+#line 788 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = FALSE;
+#line 8345 "scanner.c"
+ }
+#line 788 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp0_) {
+#line 789 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_REDETECT;
+#line 8351 "scanner.c"
+ }
+#line 792 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_count = 0;
+#line 793 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 8357 "scanner.c"
+ Request* request = NULL;
+ gboolean _tmp3_ = FALSE;
+ gboolean _tmp4_ = FALSE;
+ ScanState _tmp5_ = 0;
+ gint _tmp11_ = 0;
+ Request* _tmp12_ = NULL;
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = self->priv->state;
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp5_ == SCAN_STATE_IDLE) {
+#line 8368 "scanner.c"
+ gint _tmp6_ = 0;
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = request_count;
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp6_ == 0;
+#line 8374 "scanner.c"
+ } else {
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = FALSE;
+#line 8378 "scanner.c"
+ }
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp4_) {
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = TRUE;
+#line 8384 "scanner.c"
+ } else {
+ GAsyncQueue* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+#line 797 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = self->priv->request_queue;
+#line 797 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = g_async_queue_length (_tmp7_);
+#line 797 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _tmp8_ > 0;
+#line 8394 "scanner.c"
+ }
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp3_) {
+#line 8398 "scanner.c"
+ GAsyncQueue* _tmp9_ = NULL;
+ gpointer _tmp10_ = NULL;
+#line 798 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = self->priv->request_queue;
+#line 798 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = g_async_queue_pop (_tmp9_);
+#line 798 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _request_unref0 (request);
+#line 798 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request = (Request*) _tmp10_;
+#line 8409 "scanner.c"
+ } else {
+#line 800 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = TRUE;
+#line 800 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _request_unref0 (request);
+#line 800 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 8417 "scanner.c"
+ }
+#line 802 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:802: Processing request");
+#line 803 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = request_count;
+#line 803 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request_count = _tmp11_ + 1;
+#line 805 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = request;
+#line 805 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, TYPE_REQUEST_START_SCAN)) {
+#line 8429 "scanner.c"
+ RequestStartScan* r = NULL;
+ Request* _tmp13_ = NULL;
+ RequestStartScan* _tmp14_ = NULL;
+ RequestStartScan* _tmp15_ = NULL;
+ ScanJob* _tmp16_ = NULL;
+ ScanJob* _tmp17_ = NULL;
+#line 807 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = request;
+#line 807 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = _request_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_REQUEST_START_SCAN, RequestStartScan));
+#line 807 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ r = _tmp14_;
+#line 808 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = r;
+#line 808 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = _tmp15_->job;
+#line 808 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = _scan_job_ref0 (_tmp16_);
+#line 808 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->job_queue = g_list_append (self->priv->job_queue, _tmp17_);
+#line 805 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _request_unref0 (r);
+#line 8452 "scanner.c"
+ } else {
+ Request* _tmp18_ = NULL;
+#line 810 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = request;
+#line 810 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, TYPE_REQUEST_CANCEL)) {
+#line 812 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_fail_scan (self, (gint) SANE_STATUS_CANCELLED, "Scan cancelled - do not report this error");
+#line 8461 "scanner.c"
+ } else {
+ Request* _tmp19_ = NULL;
+#line 814 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = request;
+#line 814 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, TYPE_REQUEST_QUIT)) {
+#line 816 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_close_device (self);
+#line 817 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = FALSE;
+#line 817 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _request_unref0 (request);
+#line 817 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 8476 "scanner.c"
+ }
+ }
+ }
+#line 793 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _request_unref0 (request);
+#line 8482 "scanner.c"
+ }
+}
+
+
+static void _g_free0_ (gpointer var) {
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ var = (g_free (var), NULL);
+#line 8490 "scanner.c"
+}
+
+
+static void scanner_do_open (Scanner* self) {
+ ScanJob* job = NULL;
+ GList* _tmp0_ = NULL;
+ gconstpointer _tmp1_ = NULL;
+ ScanJob* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ ScanJob* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+ ScanJob* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ gboolean _tmp13_ = FALSE;
+ GHashFunc _tmp18_ = NULL;
+ GEqualFunc _tmp19_ = NULL;
+ GHashTable* _tmp20_ = NULL;
+ SANE_Status status = 0;
+ ScanJob* _tmp21_ = NULL;
+ const gchar* _tmp22_ = NULL;
+ SANE_Handle _tmp23_ = {0};
+ SANE_Status _tmp24_ = 0;
+ ScanJob* _tmp25_ = NULL;
+ const gchar* _tmp26_ = NULL;
+ SANE_Status _tmp27_ = 0;
+ gchar* _tmp28_ = NULL;
+ gchar* _tmp29_ = NULL;
+ SANE_Status _tmp30_ = 0;
+ ScanJob* _tmp35_ = NULL;
+ const gchar* _tmp36_ = NULL;
+ gchar* _tmp37_ = NULL;
+#line 822 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 824 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->job_queue;
+#line 824 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->data;
+#line 824 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp1_, TYPE_SCAN_JOB, ScanJob));
+#line 824 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ job = _tmp2_;
+#line 826 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->line_count = 0;
+#line 827 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->pass_number = 0;
+#line 828 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->page_number = 0;
+#line 829 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->notified_page = -1;
+#line 830 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->option_index = (SANE_Int) 0;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = job;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = _tmp4_->device;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp5_ == NULL) {
+#line 8548 "scanner.c"
+ const gchar* _tmp6_ = NULL;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = self->priv->default_device;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _tmp6_ != NULL;
+#line 8554 "scanner.c"
+ } else {
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = FALSE;
+#line 8558 "scanner.c"
+ }
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp3_) {
+#line 8562 "scanner.c"
+ ScanJob* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+#line 833 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = job;
+#line 833 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = self->priv->default_device;
+#line 833 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = g_strdup (_tmp8_);
+#line 833 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp7_->device);
+#line 833 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_->device = _tmp9_;
+#line 8576 "scanner.c"
+ }
+#line 835 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = job;
+#line 835 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = _tmp10_->device;
+#line 835 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp11_ == NULL) {
+#line 8584 "scanner.c"
+ const gchar* _tmp12_ = NULL;
+#line 837 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:837: No scan device available");
+#line 838 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = _ ("No scanners available. Please connect a scanner.");
+#line 838 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_fail_scan (self, 0, _tmp12_);
+#line 841 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 841 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 8596 "scanner.c"
+ }
+#line 845 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = self->priv->have_handle;
+#line 845 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp13_) {
+#line 8602 "scanner.c"
+ const gchar* _tmp14_ = NULL;
+ ScanJob* _tmp15_ = NULL;
+ const gchar* _tmp16_ = NULL;
+ SANE_Handle _tmp17_ = {0};
+#line 847 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = self->priv->current_device;
+#line 847 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = job;
+#line 847 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = _tmp15_->device;
+#line 847 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp14_, _tmp16_) == 0) {
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_GET_OPTION;
+#line 850 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 850 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 8621 "scanner.c"
+ }
+#line 853 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = self->priv->handle;
+#line 853 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ sane_close (_tmp17_);
+#line 854 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:854: sane_close ()");
+#line 855 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->have_handle = FALSE;
+#line 8631 "scanner.c"
+ }
+#line 858 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->current_device);
+#line 858 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->current_device = NULL;
+#line 860 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->have_handle = FALSE;
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = g_str_hash;
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = g_str_equal;
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = g_hash_table_new_full (_tmp18_, _tmp19_, _g_free0_, NULL);
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_hash_table_unref0 (self->priv->options);
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->options = _tmp20_;
+#line 862 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = job;
+#line 862 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = _tmp21_->device;
+#line 862 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = sane_open (_tmp22_, &_tmp23_);
+#line 862 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->handle = _tmp23_;
+#line 862 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp24_;
+#line 863 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = job;
+#line 863 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = _tmp25_->device;
+#line 863 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = status;
+#line 863 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = sane_status_to_string (_tmp27_);
+#line 863 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = _tmp28_;
+#line 863 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:863: sane_open (\"%s\") -> %s", _tmp26_, _tmp29_);
+#line 863 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp29_);
+#line 865 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = status;
+#line 865 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp30_ != SANE_STATUS_GOOD) {
+#line 8677 "scanner.c"
+ SANE_Status _tmp31_ = 0;
+ const gchar* _tmp32_ = NULL;
+ SANE_Status _tmp33_ = 0;
+ const gchar* _tmp34_ = NULL;
+#line 867 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = status;
+#line 867 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = sane_strstatus (_tmp31_);
+#line 867 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:867: Unable to get open device: %s", _tmp32_);
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = status;
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = _ ("Unable to connect to scanner");
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_fail_scan (self, (gint) _tmp33_, _tmp34_);
+#line 871 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 871 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 8698 "scanner.c"
+ }
+#line 873 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->have_handle = TRUE;
+#line 875 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = job;
+#line 875 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = _tmp35_->device;
+#line 875 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = g_strdup (_tmp36_);
+#line 875 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->current_device);
+#line 875 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->current_device = _tmp37_;
+#line 876 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_GET_OPTION;
+#line 822 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 8716 "scanner.c"
+}
+
+
+static void scanner_do_get_option (Scanner* self) {
+ ScanJob* job = NULL;
+ GList* _tmp0_ = NULL;
+ gconstpointer _tmp1_ = NULL;
+ ScanJob* _tmp2_ = NULL;
+ SANE_Option_Descriptor* option = NULL;
+ SANE_Handle _tmp3_ = {0};
+ SANE_Int _tmp4_ = {0};
+ SANE_Option_Descriptor* _tmp5_ = NULL;
+ SANE_Int _tmp6_ = {0};
+ SANE_Int index = {0};
+ SANE_Int _tmp7_ = {0};
+ SANE_Int _tmp8_ = {0};
+ SANE_Option_Descriptor* _tmp9_ = NULL;
+ SANE_Int _tmp356_ = {0};
+ SANE_Option_Descriptor* _tmp357_ = NULL;
+ SANE_Option_Descriptor* _tmp358_ = NULL;
+ SANE_Value_Type _tmp359_ = 0;
+ SANE_Option_Descriptor* _tmp360_ = NULL;
+ SANE_Int _tmp361_ = {0};
+ SANE_Option_Descriptor* _tmp362_ = NULL;
+ const gchar* _tmp363_ = NULL;
+ GHashTable* _tmp364_ = NULL;
+ SANE_Option_Descriptor* _tmp365_ = NULL;
+ const gchar* _tmp366_ = NULL;
+ gchar* _tmp367_ = NULL;
+ SANE_Int _tmp368_ = {0};
+#line 879 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 881 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->job_queue;
+#line 881 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->data;
+#line 881 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp1_, TYPE_SCAN_JOB, ScanJob));
+#line 881 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ job = _tmp2_;
+#line 883 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = self->priv->handle;
+#line 883 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = self->priv->option_index;
+#line 883 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = sane_get_option_descriptor (_tmp3_, _tmp4_);
+#line 883 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp5_;
+#line 884 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = self->priv->option_index;
+#line 884 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:884: sane_get_option_descriptor (%d)", (gint) _tmp6_);
+#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = self->priv->option_index;
+#line 885 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = _tmp7_;
+#line 886 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = self->priv->option_index;
+#line 886 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->option_index = _tmp8_ + 1;
+#line 889 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = option;
+#line 889 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp9_ == NULL) {
+#line 8781 "scanner.c"
+ SANE_Handle _tmp10_ = {0};
+ const gchar* _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ SANE_Option_Descriptor* _tmp13_ = NULL;
+ SANE_Option_Descriptor* _tmp14_ = NULL;
+ SANE_Option_Descriptor* _tmp18_ = NULL;
+ SANE_Handle _tmp96_ = {0};
+ const gchar* _tmp97_ = NULL;
+ gint _tmp98_ = 0;
+ SANE_Option_Descriptor* _tmp99_ = NULL;
+ SANE_Option_Descriptor* _tmp100_ = NULL;
+ SANE_Handle _tmp156_ = {0};
+ gint _tmp157_ = 0;
+ SANE_Option_Descriptor* _tmp158_ = NULL;
+ SANE_Option_Descriptor* _tmp159_ = NULL;
+ SANE_Handle _tmp167_ = {0};
+ gint _tmp168_ = 0;
+ SANE_Option_Descriptor* _tmp169_ = NULL;
+ SANE_Option_Descriptor* _tmp170_ = NULL;
+ SANE_Handle _tmp178_ = {0};
+ gint _tmp179_ = 0;
+ SANE_Option_Descriptor* _tmp180_ = NULL;
+ SANE_Option_Descriptor* _tmp181_ = NULL;
+ SANE_Handle _tmp194_ = {0};
+ const gchar* _tmp195_ = NULL;
+ gint _tmp196_ = 0;
+ SANE_Option_Descriptor* _tmp197_ = NULL;
+ SANE_Option_Descriptor* _tmp198_ = NULL;
+ SANE_Handle _tmp218_ = {0};
+ const gchar* _tmp219_ = NULL;
+ gint _tmp220_ = 0;
+ SANE_Option_Descriptor* _tmp221_ = NULL;
+ SANE_Option_Descriptor* _tmp222_ = NULL;
+ SANE_Handle _tmp237_ = {0};
+ const gchar* _tmp238_ = NULL;
+ gint _tmp239_ = 0;
+ SANE_Option_Descriptor* _tmp240_ = NULL;
+ SANE_Option_Descriptor* _tmp241_ = NULL;
+ SANE_Handle _tmp256_ = {0};
+ const gchar* _tmp257_ = NULL;
+ gint _tmp258_ = 0;
+ SANE_Option_Descriptor* _tmp259_ = NULL;
+ gboolean _tmp260_ = FALSE;
+ SANE_Option_Descriptor* _tmp261_ = NULL;
+ SANE_Handle _tmp273_ = {0};
+ const gchar* _tmp274_ = NULL;
+ gint _tmp275_ = 0;
+ SANE_Option_Descriptor* _tmp276_ = NULL;
+ gboolean _tmp277_ = FALSE;
+ SANE_Option_Descriptor* _tmp278_ = NULL;
+ SANE_Handle _tmp290_ = {0};
+ const gchar* _tmp291_ = NULL;
+ gint _tmp292_ = 0;
+ SANE_Option_Descriptor* _tmp293_ = NULL;
+ SANE_Option_Descriptor* _tmp294_ = NULL;
+ SANE_Handle _tmp305_ = {0};
+ const gchar* _tmp306_ = NULL;
+ gint _tmp307_ = 0;
+ SANE_Option_Descriptor* _tmp308_ = NULL;
+ SANE_Option_Descriptor* _tmp309_ = NULL;
+ const gchar* _tmp320_ = NULL;
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = self->priv->handle;
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = SANE_NAME_SCAN_SOURCE;
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = scanner_get_option_by_name (self, _tmp10_, _tmp11_, &_tmp12_);
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp12_;
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp13_;
+#line 893 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = option;
+#line 893 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp14_ == NULL) {
+#line 8857 "scanner.c"
+ SANE_Handle _tmp15_ = {0};
+ gint _tmp16_ = 0;
+ SANE_Option_Descriptor* _tmp17_ = NULL;
+#line 895 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:895: SCAN_SOURCE not available, trying alternative \"doc-" \
+"source\"");
+#line 896 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = self->priv->handle;
+#line 896 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = scanner_get_option_by_name (self, _tmp15_, "doc-source", &_tmp16_);
+#line 896 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp16_;
+#line 896 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp17_;
+#line 8871 "scanner.c"
+ }
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = option;
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp18_ != NULL) {
+#line 8877 "scanner.c"
+ gchar** flatbed_sources = NULL;
+ gchar* _tmp19_ = NULL;
+ const gchar* _tmp20_ = NULL;
+ gchar* _tmp21_ = NULL;
+ gchar* _tmp22_ = NULL;
+ const gchar* _tmp23_ = NULL;
+ gchar* _tmp24_ = NULL;
+ gchar* _tmp25_ = NULL;
+ gchar* _tmp26_ = NULL;
+ const gchar* _tmp27_ = NULL;
+ gchar* _tmp28_ = NULL;
+ gchar** _tmp29_ = NULL;
+ gint flatbed_sources_length1 = 0;
+ gint _flatbed_sources_size_ = 0;
+ gchar** adf_sources = NULL;
+ gchar* _tmp30_ = NULL;
+ const gchar* _tmp31_ = NULL;
+ gchar* _tmp32_ = NULL;
+ gchar* _tmp33_ = NULL;
+ gchar* _tmp34_ = NULL;
+ gchar* _tmp35_ = NULL;
+ gchar* _tmp36_ = NULL;
+ gchar** _tmp37_ = NULL;
+ gint adf_sources_length1 = 0;
+ gint _adf_sources_size_ = 0;
+ gchar** adf_front_sources = NULL;
+ gchar* _tmp38_ = NULL;
+ const gchar* _tmp39_ = NULL;
+ gchar* _tmp40_ = NULL;
+ gchar** _tmp41_ = NULL;
+ gint adf_front_sources_length1 = 0;
+ gint _adf_front_sources_size_ = 0;
+ gchar** adf_back_sources = NULL;
+ gchar* _tmp42_ = NULL;
+ const gchar* _tmp43_ = NULL;
+ gchar* _tmp44_ = NULL;
+ gchar** _tmp45_ = NULL;
+ gint adf_back_sources_length1 = 0;
+ gint _adf_back_sources_size_ = 0;
+ gchar** adf_duplex_sources = NULL;
+ gchar* _tmp46_ = NULL;
+ const gchar* _tmp47_ = NULL;
+ gchar* _tmp48_ = NULL;
+ gchar* _tmp49_ = NULL;
+ gchar* _tmp50_ = NULL;
+ gchar* _tmp51_ = NULL;
+ gchar* _tmp52_ = NULL;
+ gchar* _tmp53_ = NULL;
+ gchar** _tmp54_ = NULL;
+ gint adf_duplex_sources_length1 = 0;
+ gint _adf_duplex_sources_size_ = 0;
+ ScanJob* _tmp55_ = NULL;
+ ScanType _tmp56_ = 0;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = g_strdup ("Auto");
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = SANE_I18N ("Auto");
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = g_strdup (_tmp20_);
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = g_strdup ("Flatbed");
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = SANE_I18N ("Flatbed");
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = g_strdup (_tmp23_);
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = g_strdup ("FlatBed");
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = g_strdup ("Normal");
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = SANE_I18N ("Normal");
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = g_strdup (_tmp27_);
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = g_new0 (gchar*, 7 + 1);
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_[0] = _tmp19_;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_[1] = _tmp21_;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_[2] = _tmp22_;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_[3] = _tmp24_;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_[4] = _tmp25_;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_[5] = _tmp26_;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_[6] = _tmp28_;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ flatbed_sources = _tmp29_;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ flatbed_sources_length1 = 7;
+#line 900 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _flatbed_sources_size_ = flatbed_sources_length1;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = g_strdup ("Automatic Document Feeder");
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = SANE_I18N ("Automatic Document Feeder");
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = g_strdup (_tmp31_);
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = g_strdup ("ADF");
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = g_strdup ("Automatic Document Feeder(left aligned)");
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = g_strdup ("Automatic Document Feeder(centrally aligned)");
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = g_strdup ("ADF Simplex");
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = g_new0 (gchar*, 6 + 1);
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_[0] = _tmp30_;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_[1] = _tmp32_;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_[2] = _tmp33_;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_[3] = _tmp34_;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_[4] = _tmp35_;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_[5] = _tmp36_;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_sources = _tmp37_;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_sources_length1 = 6;
+#line 911 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _adf_sources_size_ = adf_sources_length1;
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = g_strdup ("ADF Front");
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_ = SANE_I18N ("ADF Front");
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp40_ = g_strdup (_tmp39_);
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_ = g_new0 (gchar*, 2 + 1);
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_[0] = _tmp38_;
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_[1] = _tmp40_;
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_front_sources = _tmp41_;
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_front_sources_length1 = 2;
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _adf_front_sources_size_ = adf_front_sources_length1;
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp42_ = g_strdup ("ADF Back");
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp43_ = SANE_I18N ("ADF Back");
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp44_ = g_strdup (_tmp43_);
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_ = g_new0 (gchar*, 2 + 1);
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_[0] = _tmp42_;
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_[1] = _tmp44_;
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_back_sources = _tmp45_;
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_back_sources_length1 = 2;
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _adf_back_sources_size_ = adf_back_sources_length1;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp46_ = g_strdup ("ADF Duplex");
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp47_ = SANE_I18N ("ADF Duplex");
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_ = g_strdup (_tmp47_);
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp49_ = g_strdup ("ADF Duplex - Long-Edge Binding");
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_ = g_strdup ("ADF Duplex - Short-Edge Binding");
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_ = g_strdup ("Duplex");
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp52_ = g_strdup ("Automatic Document Feeder(centrally aligned,Duplex)");
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp53_ = g_strdup ("Automatic Document Feeder(left aligned,Duplex)");
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_ = g_new0 (gchar*, 7 + 1);
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_[0] = _tmp46_;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_[1] = _tmp48_;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_[2] = _tmp49_;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_[3] = _tmp50_;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_[4] = _tmp51_;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_[5] = _tmp52_;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_[6] = _tmp53_;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_duplex_sources = _tmp54_;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_duplex_sources_length1 = 7;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _adf_duplex_sources_size_ = adf_duplex_sources_length1;
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp55_ = job;
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp56_ = _tmp55_->type;
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ switch (_tmp56_) {
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_TYPE_SINGLE:
+#line 9089 "scanner.c"
+ {
+ SANE_Handle _tmp57_ = {0};
+ SANE_Option_Descriptor* _tmp58_ = NULL;
+ SANE_Int _tmp59_ = {0};
+ gboolean _tmp60_ = FALSE;
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp57_ = self->priv->handle;
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp58_ = option;
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp59_ = index;
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp60_ = scanner_set_default_option (self, _tmp57_, _tmp58_, _tmp59_);
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp60_) {
+#line 9105 "scanner.c"
+ SANE_Handle _tmp61_ = {0};
+ SANE_Option_Descriptor* _tmp62_ = NULL;
+ SANE_Int _tmp63_ = {0};
+ gchar** _tmp64_ = NULL;
+ gint _tmp64__length1 = 0;
+ gboolean _tmp65_ = FALSE;
+#line 948 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp61_ = self->priv->handle;
+#line 948 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp62_ = option;
+#line 948 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp63_ = index;
+#line 948 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp64_ = flatbed_sources;
+#line 948 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp64__length1 = flatbed_sources_length1;
+#line 948 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp65_ = scanner_set_constrained_string_option (self, _tmp61_, _tmp62_, _tmp63_, _tmp64_, _tmp64__length1, NULL);
+#line 948 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp65_) {
+#line 949 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:949: Unable to set single page source, please file a bug");
+#line 9128 "scanner.c"
+ }
+ }
+#line 950 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 9133 "scanner.c"
+ }
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_TYPE_ADF_FRONT:
+#line 9137 "scanner.c"
+ {
+ SANE_Handle _tmp66_ = {0};
+ SANE_Option_Descriptor* _tmp67_ = NULL;
+ SANE_Int _tmp68_ = {0};
+ gchar** _tmp69_ = NULL;
+ gint _tmp69__length1 = 0;
+ gboolean _tmp70_ = FALSE;
+#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp66_ = self->priv->handle;
+#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp67_ = option;
+#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp68_ = index;
+#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp69_ = adf_front_sources;
+#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp69__length1 = adf_front_sources_length1;
+#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp70_ = scanner_set_constrained_string_option (self, _tmp66_, _tmp67_, _tmp68_, _tmp69_, _tmp69__length1, NULL);
+#line 952 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp70_) {
+#line 9159 "scanner.c"
+ SANE_Handle _tmp71_ = {0};
+ SANE_Option_Descriptor* _tmp72_ = NULL;
+ SANE_Int _tmp73_ = {0};
+ gchar** _tmp74_ = NULL;
+ gint _tmp74__length1 = 0;
+ gboolean _tmp75_ = FALSE;
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp71_ = self->priv->handle;
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp72_ = option;
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp73_ = index;
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp74_ = adf_sources;
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp74__length1 = adf_sources_length1;
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp75_ = scanner_set_constrained_string_option (self, _tmp71_, _tmp72_, _tmp73_, _tmp74_, _tmp74__length1, NULL);
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp75_) {
+#line 954 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:954: Unable to set front ADF source, please file a bug");
+#line 9182 "scanner.c"
+ }
+ }
+#line 955 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 9187 "scanner.c"
+ }
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_TYPE_ADF_BACK:
+#line 9191 "scanner.c"
+ {
+ SANE_Handle _tmp76_ = {0};
+ SANE_Option_Descriptor* _tmp77_ = NULL;
+ SANE_Int _tmp78_ = {0};
+ gchar** _tmp79_ = NULL;
+ gint _tmp79__length1 = 0;
+ gboolean _tmp80_ = FALSE;
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp76_ = self->priv->handle;
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp77_ = option;
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp78_ = index;
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp79_ = adf_back_sources;
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp79__length1 = adf_back_sources_length1;
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp80_ = scanner_set_constrained_string_option (self, _tmp76_, _tmp77_, _tmp78_, _tmp79_, _tmp79__length1, NULL);
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp80_) {
+#line 9213 "scanner.c"
+ SANE_Handle _tmp81_ = {0};
+ SANE_Option_Descriptor* _tmp82_ = NULL;
+ SANE_Int _tmp83_ = {0};
+ gchar** _tmp84_ = NULL;
+ gint _tmp84__length1 = 0;
+ gboolean _tmp85_ = FALSE;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp81_ = self->priv->handle;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp82_ = option;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp83_ = index;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp84_ = adf_sources;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp84__length1 = adf_sources_length1;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp85_ = scanner_set_constrained_string_option (self, _tmp81_, _tmp82_, _tmp83_, _tmp84_, _tmp84__length1, NULL);
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp85_) {
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:959: Unable to set back ADF source, please file a bug");
+#line 9236 "scanner.c"
+ }
+ }
+#line 960 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 9241 "scanner.c"
+ }
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_TYPE_ADF_BOTH:
+#line 9245 "scanner.c"
+ {
+ SANE_Handle _tmp86_ = {0};
+ SANE_Option_Descriptor* _tmp87_ = NULL;
+ SANE_Int _tmp88_ = {0};
+ gchar** _tmp89_ = NULL;
+ gint _tmp89__length1 = 0;
+ gboolean _tmp90_ = FALSE;
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp86_ = self->priv->handle;
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp87_ = option;
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp88_ = index;
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp89_ = adf_duplex_sources;
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp89__length1 = adf_duplex_sources_length1;
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp90_ = scanner_set_constrained_string_option (self, _tmp86_, _tmp87_, _tmp88_, _tmp89_, _tmp89__length1, NULL);
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp90_) {
+#line 9267 "scanner.c"
+ SANE_Handle _tmp91_ = {0};
+ SANE_Option_Descriptor* _tmp92_ = NULL;
+ SANE_Int _tmp93_ = {0};
+ gchar** _tmp94_ = NULL;
+ gint _tmp94__length1 = 0;
+ gboolean _tmp95_ = FALSE;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp91_ = self->priv->handle;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp92_ = option;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp93_ = index;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp94_ = adf_sources;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp94__length1 = adf_sources_length1;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp95_ = scanner_set_constrained_string_option (self, _tmp91_, _tmp92_, _tmp93_, _tmp94_, _tmp94__length1, NULL);
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp95_) {
+#line 964 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:964: Unable to set duplex ADF source, please file a bug");
+#line 9290 "scanner.c"
+ }
+ }
+#line 965 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 9295 "scanner.c"
+ }
+ default:
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 9300 "scanner.c"
+ }
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_duplex_sources = (_vala_array_free (adf_duplex_sources, adf_duplex_sources_length1, (GDestroyNotify) g_free), NULL);
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_back_sources = (_vala_array_free (adf_back_sources, adf_back_sources_length1, (GDestroyNotify) g_free), NULL);
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_front_sources = (_vala_array_free (adf_front_sources, adf_front_sources_length1, (GDestroyNotify) g_free), NULL);
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ adf_sources = (_vala_array_free (adf_sources, adf_sources_length1, (GDestroyNotify) g_free), NULL);
+#line 898 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ flatbed_sources = (_vala_array_free (flatbed_sources, flatbed_sources_length1, (GDestroyNotify) g_free), NULL);
+#line 9312 "scanner.c"
+ }
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp96_ = self->priv->handle;
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp97_ = SANE_NAME_SCAN_MODE;
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp99_ = scanner_get_option_by_name (self, _tmp96_, _tmp97_, &_tmp98_);
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp98_;
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp99_;
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp100_ = option;
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp100_ != NULL) {
+#line 9328 "scanner.c"
+ gchar** color_scan_modes = NULL;
+ const gchar* _tmp101_ = NULL;
+ gchar* _tmp102_ = NULL;
+ gchar* _tmp103_ = NULL;
+ gchar* _tmp104_ = NULL;
+ gchar* _tmp105_ = NULL;
+ gchar** _tmp106_ = NULL;
+ gint color_scan_modes_length1 = 0;
+ gint _color_scan_modes_size_ = 0;
+ gchar** gray_scan_modes = NULL;
+ const gchar* _tmp107_ = NULL;
+ gchar* _tmp108_ = NULL;
+ gchar* _tmp109_ = NULL;
+ gchar* _tmp110_ = NULL;
+ const gchar* _tmp111_ = NULL;
+ gchar* _tmp112_ = NULL;
+ gchar* _tmp113_ = NULL;
+ gchar* _tmp114_ = NULL;
+ gchar** _tmp115_ = NULL;
+ gint gray_scan_modes_length1 = 0;
+ gint _gray_scan_modes_size_ = 0;
+ gchar** lineart_scan_modes = NULL;
+ const gchar* _tmp116_ = NULL;
+ gchar* _tmp117_ = NULL;
+ gchar* _tmp118_ = NULL;
+ gchar* _tmp119_ = NULL;
+ const gchar* _tmp120_ = NULL;
+ gchar* _tmp121_ = NULL;
+ gchar* _tmp122_ = NULL;
+ const gchar* _tmp123_ = NULL;
+ gchar* _tmp124_ = NULL;
+ gchar* _tmp125_ = NULL;
+ const gchar* _tmp126_ = NULL;
+ gchar* _tmp127_ = NULL;
+ gchar* _tmp128_ = NULL;
+ const gchar* _tmp129_ = NULL;
+ gchar* _tmp130_ = NULL;
+ gchar* _tmp131_ = NULL;
+ gchar* _tmp132_ = NULL;
+ const gchar* _tmp133_ = NULL;
+ gchar* _tmp134_ = NULL;
+ gchar* _tmp135_ = NULL;
+ gchar* _tmp136_ = NULL;
+ gchar* _tmp137_ = NULL;
+ gchar** _tmp138_ = NULL;
+ gint lineart_scan_modes_length1 = 0;
+ gint _lineart_scan_modes_size_ = 0;
+ ScanJob* _tmp139_ = NULL;
+ ScanMode _tmp140_ = 0;
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp101_ = SANE_VALUE_SCAN_MODE_COLOR;
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp102_ = g_strdup (_tmp101_);
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp103_ = g_strdup ("Color");
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp104_ = g_strdup ("24bit Color");
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp105_ = g_strdup ("Color - 16 Million Colors");
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp106_ = g_new0 (gchar*, 4 + 1);
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp106_[0] = _tmp102_;
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp106_[1] = _tmp103_;
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp106_[2] = _tmp104_;
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp106_[3] = _tmp105_;
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ color_scan_modes = _tmp106_;
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ color_scan_modes_length1 = 4;
+#line 974 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _color_scan_modes_size_ = color_scan_modes_length1;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp107_ = SANE_VALUE_SCAN_MODE_GRAY;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp108_ = g_strdup (_tmp107_);
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp109_ = g_strdup ("Gray");
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp110_ = g_strdup ("Grayscale");
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp111_ = SANE_I18N ("Grayscale");
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp112_ = g_strdup (_tmp111_);
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp113_ = g_strdup ("True Gray");
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp114_ = g_strdup ("Grayscale - 256 Levels");
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp115_ = g_new0 (gchar*, 6 + 1);
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp115_[0] = _tmp108_;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp115_[1] = _tmp109_;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp115_[2] = _tmp110_;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp115_[3] = _tmp112_;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp115_[4] = _tmp113_;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp115_[5] = _tmp114_;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ gray_scan_modes = _tmp115_;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ gray_scan_modes_length1 = 6;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _gray_scan_modes_size_ = gray_scan_modes_length1;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp116_ = SANE_VALUE_SCAN_MODE_LINEART;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp117_ = g_strdup (_tmp116_);
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp118_ = g_strdup ("Lineart");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp119_ = g_strdup ("LineArt");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp120_ = SANE_I18N ("LineArt");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp121_ = g_strdup (_tmp120_);
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp122_ = g_strdup ("Black & White");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp123_ = SANE_I18N ("Black & White");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp124_ = g_strdup (_tmp123_);
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp125_ = g_strdup ("Binary");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp126_ = SANE_I18N ("Binary");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp127_ = g_strdup (_tmp126_);
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp128_ = g_strdup ("Thresholded");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp129_ = SANE_VALUE_SCAN_MODE_GRAY;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp130_ = g_strdup (_tmp129_);
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp131_ = g_strdup ("Gray");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp132_ = g_strdup ("Grayscale");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp133_ = SANE_I18N ("Grayscale");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp134_ = g_strdup (_tmp133_);
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp135_ = g_strdup ("True Gray");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp136_ = g_strdup ("Black and White - Line Art");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp137_ = g_strdup ("Black and White - Halftone");
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_ = g_new0 (gchar*, 16 + 1);
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[0] = _tmp117_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[1] = _tmp118_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[2] = _tmp119_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[3] = _tmp121_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[4] = _tmp122_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[5] = _tmp124_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[6] = _tmp125_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[7] = _tmp127_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[8] = _tmp128_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[9] = _tmp130_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[10] = _tmp131_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[11] = _tmp132_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[12] = _tmp134_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[13] = _tmp135_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[14] = _tmp136_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_[15] = _tmp137_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ lineart_scan_modes = _tmp138_;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ lineart_scan_modes_length1 = 16;
+#line 990 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _lineart_scan_modes_size_ = lineart_scan_modes_length1;
+#line 1010 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp139_ = job;
+#line 1010 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp140_ = _tmp139_->scan_mode;
+#line 1010 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ switch (_tmp140_) {
+#line 1010 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_MODE_COLOR:
+#line 9532 "scanner.c"
+ {
+ SANE_Handle _tmp141_ = {0};
+ SANE_Option_Descriptor* _tmp142_ = NULL;
+ SANE_Int _tmp143_ = {0};
+ gchar** _tmp144_ = NULL;
+ gint _tmp144__length1 = 0;
+ gboolean _tmp145_ = FALSE;
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp141_ = self->priv->handle;
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp142_ = option;
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp143_ = index;
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp144_ = color_scan_modes;
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp144__length1 = color_scan_modes_length1;
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp145_ = scanner_set_constrained_string_option (self, _tmp141_, _tmp142_, _tmp143_, _tmp144_, _tmp144__length1, NULL);
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp145_) {
+#line 1014 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1014: Unable to set Color mode, please file a bug");
+#line 9556 "scanner.c"
+ }
+#line 1015 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 9560 "scanner.c"
+ }
+#line 1010 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_MODE_GRAY:
+#line 9564 "scanner.c"
+ {
+ SANE_Handle _tmp146_ = {0};
+ SANE_Option_Descriptor* _tmp147_ = NULL;
+ SANE_Int _tmp148_ = {0};
+ gchar** _tmp149_ = NULL;
+ gint _tmp149__length1 = 0;
+ gboolean _tmp150_ = FALSE;
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp146_ = self->priv->handle;
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp147_ = option;
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp148_ = index;
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp149_ = gray_scan_modes;
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp149__length1 = gray_scan_modes_length1;
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp150_ = scanner_set_constrained_string_option (self, _tmp146_, _tmp147_, _tmp148_, _tmp149_, _tmp149__length1, NULL);
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp150_) {
+#line 1018 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1018: Unable to set Gray mode, please file a bug");
+#line 9588 "scanner.c"
+ }
+#line 1019 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 9592 "scanner.c"
+ }
+#line 1010 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_MODE_LINEART:
+#line 9596 "scanner.c"
+ {
+ SANE_Handle _tmp151_ = {0};
+ SANE_Option_Descriptor* _tmp152_ = NULL;
+ SANE_Int _tmp153_ = {0};
+ gchar** _tmp154_ = NULL;
+ gint _tmp154__length1 = 0;
+ gboolean _tmp155_ = FALSE;
+#line 1021 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp151_ = self->priv->handle;
+#line 1021 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp152_ = option;
+#line 1021 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp153_ = index;
+#line 1021 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp154_ = lineart_scan_modes;
+#line 1021 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp154__length1 = lineart_scan_modes_length1;
+#line 1021 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp155_ = scanner_set_constrained_string_option (self, _tmp151_, _tmp152_, _tmp153_, _tmp154_, _tmp154__length1, NULL);
+#line 1021 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp155_) {
+#line 1022 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1022: Unable to set Lineart mode, please file a bug");
+#line 9620 "scanner.c"
+ }
+#line 1023 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 9624 "scanner.c"
+ }
+ default:
+ {
+#line 1025 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 9630 "scanner.c"
+ }
+ }
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ lineart_scan_modes = (_vala_array_free (lineart_scan_modes, lineart_scan_modes_length1, (GDestroyNotify) g_free), NULL);
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ gray_scan_modes = (_vala_array_free (gray_scan_modes, gray_scan_modes_length1, (GDestroyNotify) g_free), NULL);
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ color_scan_modes = (_vala_array_free (color_scan_modes, color_scan_modes_length1, (GDestroyNotify) g_free), NULL);
+#line 9639 "scanner.c"
+ }
+#line 1030 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp156_ = self->priv->handle;
+#line 1030 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp158_ = scanner_get_option_by_name (self, _tmp156_, "duplex", &_tmp157_);
+#line 1030 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp157_;
+#line 1030 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp158_;
+#line 1031 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp159_ = option;
+#line 1031 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp159_ != NULL) {
+#line 9653 "scanner.c"
+ SANE_Option_Descriptor* _tmp160_ = NULL;
+ SANE_Value_Type _tmp161_ = 0;
+#line 1033 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp160_ = option;
+#line 1033 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp161_ = _tmp160_->type;
+#line 1033 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp161_ == SANE_TYPE_BOOL) {
+#line 9662 "scanner.c"
+ SANE_Handle _tmp162_ = {0};
+ SANE_Option_Descriptor* _tmp163_ = NULL;
+ SANE_Int _tmp164_ = {0};
+ ScanJob* _tmp165_ = NULL;
+ ScanType _tmp166_ = 0;
+#line 1034 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp162_ = self->priv->handle;
+#line 1034 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp163_ = option;
+#line 1034 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp164_ = index;
+#line 1034 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp165_ = job;
+#line 1034 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp166_ = _tmp165_->type;
+#line 1034 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_bool_option (self, _tmp162_, _tmp163_, _tmp164_, _tmp166_ == SCAN_TYPE_ADF_BOTH, NULL);
+#line 9680 "scanner.c"
+ }
+ }
+#line 1038 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp167_ = self->priv->handle;
+#line 1038 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp169_ = scanner_get_option_by_name (self, _tmp167_, "batch-scan", &_tmp168_);
+#line 1038 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp168_;
+#line 1038 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp169_;
+#line 1039 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp170_ = option;
+#line 1039 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp170_ != NULL) {
+#line 9695 "scanner.c"
+ SANE_Option_Descriptor* _tmp171_ = NULL;
+ SANE_Value_Type _tmp172_ = 0;
+#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp171_ = option;
+#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp172_ = _tmp171_->type;
+#line 1041 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp172_ == SANE_TYPE_BOOL) {
+#line 9704 "scanner.c"
+ SANE_Handle _tmp173_ = {0};
+ SANE_Option_Descriptor* _tmp174_ = NULL;
+ SANE_Int _tmp175_ = {0};
+ ScanJob* _tmp176_ = NULL;
+ ScanType _tmp177_ = 0;
+#line 1042 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp173_ = self->priv->handle;
+#line 1042 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp174_ = option;
+#line 1042 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp175_ = index;
+#line 1042 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp176_ = job;
+#line 1042 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp177_ = _tmp176_->type;
+#line 1042 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_bool_option (self, _tmp173_, _tmp174_, _tmp175_, _tmp177_ != SCAN_TYPE_SINGLE, NULL);
+#line 9722 "scanner.c"
+ }
+ }
+#line 1046 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp178_ = self->priv->handle;
+#line 1046 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp180_ = scanner_get_option_by_name (self, _tmp178_, "compression", &_tmp179_);
+#line 1046 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp179_;
+#line 1046 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp180_;
+#line 1047 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp181_ = option;
+#line 1047 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp181_ != NULL) {
+#line 9737 "scanner.c"
+ gchar** disable_compression_names = NULL;
+ const gchar* _tmp182_ = NULL;
+ gchar* _tmp183_ = NULL;
+ const gchar* _tmp184_ = NULL;
+ gchar* _tmp185_ = NULL;
+ gchar* _tmp186_ = NULL;
+ gchar* _tmp187_ = NULL;
+ gchar** _tmp188_ = NULL;
+ gint disable_compression_names_length1 = 0;
+ gint _disable_compression_names_size_ = 0;
+ SANE_Handle _tmp189_ = {0};
+ SANE_Option_Descriptor* _tmp190_ = NULL;
+ SANE_Int _tmp191_ = {0};
+ gchar** _tmp192_ = NULL;
+ gint _tmp192__length1 = 0;
+ gboolean _tmp193_ = FALSE;
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp182_ = SANE_I18N ("None");
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp183_ = g_strdup (_tmp182_);
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp184_ = SANE_I18N ("none");
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp185_ = g_strdup (_tmp184_);
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp186_ = g_strdup ("None");
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp187_ = g_strdup ("none");
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp188_ = g_new0 (gchar*, 4 + 1);
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp188_[0] = _tmp183_;
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp188_[1] = _tmp185_;
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp188_[2] = _tmp186_;
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp188_[3] = _tmp187_;
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ disable_compression_names = _tmp188_;
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ disable_compression_names_length1 = 4;
+#line 1049 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _disable_compression_names_size_ = disable_compression_names_length1;
+#line 1057 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp189_ = self->priv->handle;
+#line 1057 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp190_ = option;
+#line 1057 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp191_ = index;
+#line 1057 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp192_ = disable_compression_names;
+#line 1057 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp192__length1 = disable_compression_names_length1;
+#line 1057 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp193_ = scanner_set_constrained_string_option (self, _tmp189_, _tmp190_, _tmp191_, _tmp192_, _tmp192__length1, NULL);
+#line 1057 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp193_) {
+#line 1058 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1058: Unable to disable compression, please file a bug");
+#line 9798 "scanner.c"
+ }
+#line 1047 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ disable_compression_names = (_vala_array_free (disable_compression_names, disable_compression_names_length1, (GDestroyNotify) g_free), NULL);
+#line 9802 "scanner.c"
+ }
+#line 1062 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp194_ = self->priv->handle;
+#line 1062 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp195_ = SANE_NAME_SCAN_RESOLUTION;
+#line 1062 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp197_ = scanner_get_option_by_name (self, _tmp194_, _tmp195_, &_tmp196_);
+#line 1062 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp196_;
+#line 1062 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp197_;
+#line 1063 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp198_ = option;
+#line 1063 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp198_ != NULL) {
+#line 9818 "scanner.c"
+ SANE_Handle _tmp199_ = {0};
+ SANE_Option_Descriptor* _tmp200_ = NULL;
+ SANE_Int _tmp201_ = {0};
+ ScanJob* _tmp202_ = NULL;
+ gdouble _tmp203_ = 0.0;
+ ScanJob* _tmp204_ = NULL;
+ gdouble _tmp205_ = 0.0;
+ SANE_Handle _tmp206_ = {0};
+ const gchar* _tmp207_ = NULL;
+ gint _tmp208_ = 0;
+ SANE_Option_Descriptor* _tmp209_ = NULL;
+ SANE_Option_Descriptor* _tmp210_ = NULL;
+#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp199_ = self->priv->handle;
+#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp200_ = option;
+#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp201_ = index;
+#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp202_ = job;
+#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp203_ = _tmp202_->dpi;
+#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp204_ = job;
+#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_fixed_or_int_option (self, _tmp199_, _tmp200_, _tmp201_, _tmp203_, &_tmp205_);
+#line 1065 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp204_->dpi = _tmp205_;
+#line 1066 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp206_ = self->priv->handle;
+#line 1066 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp207_ = SANE_NAME_BIT_DEPTH;
+#line 1066 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp209_ = scanner_get_option_by_name (self, _tmp206_, _tmp207_, &_tmp208_);
+#line 1066 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp208_;
+#line 1066 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp209_;
+#line 1067 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp210_ = option;
+#line 1067 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp210_ != NULL) {
+#line 9861 "scanner.c"
+ ScanJob* _tmp211_ = NULL;
+ gint _tmp212_ = 0;
+#line 1069 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp211_ = job;
+#line 1069 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp212_ = _tmp211_->depth;
+#line 1069 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp212_ > 0) {
+#line 9870 "scanner.c"
+ SANE_Handle _tmp213_ = {0};
+ SANE_Option_Descriptor* _tmp214_ = NULL;
+ SANE_Int _tmp215_ = {0};
+ ScanJob* _tmp216_ = NULL;
+ gint _tmp217_ = 0;
+#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp213_ = self->priv->handle;
+#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp214_ = option;
+#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp215_ = index;
+#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp216_ = job;
+#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp217_ = _tmp216_->depth;
+#line 1070 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_int_option (self, _tmp213_, _tmp214_, _tmp215_, _tmp217_, NULL);
+#line 9888 "scanner.c"
+ }
+ }
+ }
+#line 1075 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp218_ = self->priv->handle;
+#line 1075 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp219_ = SANE_NAME_SCAN_BR_X;
+#line 1075 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp221_ = scanner_get_option_by_name (self, _tmp218_, _tmp219_, &_tmp220_);
+#line 1075 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp220_;
+#line 1075 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp221_;
+#line 1076 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp222_ = option;
+#line 1076 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp222_ != NULL) {
+#line 9906 "scanner.c"
+ ScanJob* _tmp223_ = NULL;
+ gint _tmp224_ = 0;
+#line 1078 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp223_ = job;
+#line 1078 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp224_ = _tmp223_->page_width;
+#line 1078 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp224_ > 0) {
+#line 9915 "scanner.c"
+ SANE_Handle _tmp225_ = {0};
+ SANE_Option_Descriptor* _tmp226_ = NULL;
+ SANE_Int _tmp227_ = {0};
+ SANE_Option_Descriptor* _tmp228_ = NULL;
+ ScanJob* _tmp229_ = NULL;
+ gint _tmp230_ = 0;
+ ScanJob* _tmp231_ = NULL;
+ gdouble _tmp232_ = 0.0;
+ gdouble _tmp233_ = 0.0;
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp225_ = self->priv->handle;
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp226_ = option;
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp227_ = index;
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp228_ = option;
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp229_ = job;
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp230_ = _tmp229_->page_width;
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp231_ = job;
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp232_ = _tmp231_->dpi;
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp233_ = scanner_convert_page_size (self, _tmp228_, (gdouble) _tmp230_, _tmp232_);
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_fixed_or_int_option (self, _tmp225_, _tmp226_, _tmp227_, _tmp233_, NULL);
+#line 9945 "scanner.c"
+ } else {
+ SANE_Handle _tmp234_ = {0};
+ SANE_Option_Descriptor* _tmp235_ = NULL;
+ SANE_Int _tmp236_ = {0};
+#line 1081 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp234_ = self->priv->handle;
+#line 1081 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp235_ = option;
+#line 1081 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp236_ = index;
+#line 1081 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_option_to_max (self, _tmp234_, _tmp235_, _tmp236_);
+#line 9958 "scanner.c"
+ }
+ }
+#line 1083 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp237_ = self->priv->handle;
+#line 1083 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp238_ = SANE_NAME_SCAN_BR_Y;
+#line 1083 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp240_ = scanner_get_option_by_name (self, _tmp237_, _tmp238_, &_tmp239_);
+#line 1083 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp239_;
+#line 1083 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp240_;
+#line 1084 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp241_ = option;
+#line 1084 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp241_ != NULL) {
+#line 9975 "scanner.c"
+ ScanJob* _tmp242_ = NULL;
+ gint _tmp243_ = 0;
+#line 1086 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp242_ = job;
+#line 1086 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp243_ = _tmp242_->page_height;
+#line 1086 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp243_ > 0) {
+#line 9984 "scanner.c"
+ SANE_Handle _tmp244_ = {0};
+ SANE_Option_Descriptor* _tmp245_ = NULL;
+ SANE_Int _tmp246_ = {0};
+ SANE_Option_Descriptor* _tmp247_ = NULL;
+ ScanJob* _tmp248_ = NULL;
+ gint _tmp249_ = 0;
+ ScanJob* _tmp250_ = NULL;
+ gdouble _tmp251_ = 0.0;
+ gdouble _tmp252_ = 0.0;
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp244_ = self->priv->handle;
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp245_ = option;
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp246_ = index;
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp247_ = option;
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp248_ = job;
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp249_ = _tmp248_->page_height;
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp250_ = job;
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp251_ = _tmp250_->dpi;
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp252_ = scanner_convert_page_size (self, _tmp247_, (gdouble) _tmp249_, _tmp251_);
+#line 1087 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_fixed_or_int_option (self, _tmp244_, _tmp245_, _tmp246_, _tmp252_, NULL);
+#line 10014 "scanner.c"
+ } else {
+ SANE_Handle _tmp253_ = {0};
+ SANE_Option_Descriptor* _tmp254_ = NULL;
+ SANE_Int _tmp255_ = {0};
+#line 1089 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp253_ = self->priv->handle;
+#line 1089 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp254_ = option;
+#line 1089 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp255_ = index;
+#line 1089 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_option_to_max (self, _tmp253_, _tmp254_, _tmp255_);
+#line 10027 "scanner.c"
+ }
+ }
+#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp256_ = self->priv->handle;
+#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp257_ = SANE_NAME_PAGE_WIDTH;
+#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp259_ = scanner_get_option_by_name (self, _tmp256_, _tmp257_, &_tmp258_);
+#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp258_;
+#line 1093 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp259_;
+#line 1094 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp261_ = option;
+#line 1094 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp261_ != NULL) {
+#line 10044 "scanner.c"
+ ScanJob* _tmp262_ = NULL;
+ gint _tmp263_ = 0;
+#line 1094 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp262_ = job;
+#line 1094 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp263_ = _tmp262_->page_width;
+#line 1094 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp260_ = ((gdouble) _tmp263_) > 0.0;
+#line 10053 "scanner.c"
+ } else {
+#line 1094 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp260_ = FALSE;
+#line 10057 "scanner.c"
+ }
+#line 1094 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp260_) {
+#line 10061 "scanner.c"
+ SANE_Handle _tmp264_ = {0};
+ SANE_Option_Descriptor* _tmp265_ = NULL;
+ SANE_Int _tmp266_ = {0};
+ SANE_Option_Descriptor* _tmp267_ = NULL;
+ ScanJob* _tmp268_ = NULL;
+ gint _tmp269_ = 0;
+ ScanJob* _tmp270_ = NULL;
+ gdouble _tmp271_ = 0.0;
+ gdouble _tmp272_ = 0.0;
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp264_ = self->priv->handle;
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp265_ = option;
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp266_ = index;
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp267_ = option;
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp268_ = job;
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp269_ = _tmp268_->page_width;
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp270_ = job;
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp271_ = _tmp270_->dpi;
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp272_ = scanner_convert_page_size (self, _tmp267_, (gdouble) _tmp269_, _tmp271_);
+#line 1095 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_fixed_or_int_option (self, _tmp264_, _tmp265_, _tmp266_, _tmp272_, NULL);
+#line 10091 "scanner.c"
+ }
+#line 1096 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp273_ = self->priv->handle;
+#line 1096 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp274_ = SANE_NAME_PAGE_HEIGHT;
+#line 1096 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp276_ = scanner_get_option_by_name (self, _tmp273_, _tmp274_, &_tmp275_);
+#line 1096 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp275_;
+#line 1096 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp276_;
+#line 1097 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp278_ = option;
+#line 1097 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp278_ != NULL) {
+#line 10107 "scanner.c"
+ ScanJob* _tmp279_ = NULL;
+ gint _tmp280_ = 0;
+#line 1097 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp279_ = job;
+#line 1097 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp280_ = _tmp279_->page_height;
+#line 1097 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp277_ = ((gdouble) _tmp280_) > 0.0;
+#line 10116 "scanner.c"
+ } else {
+#line 1097 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp277_ = FALSE;
+#line 10120 "scanner.c"
+ }
+#line 1097 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp277_) {
+#line 10124 "scanner.c"
+ SANE_Handle _tmp281_ = {0};
+ SANE_Option_Descriptor* _tmp282_ = NULL;
+ SANE_Int _tmp283_ = {0};
+ SANE_Option_Descriptor* _tmp284_ = NULL;
+ ScanJob* _tmp285_ = NULL;
+ gint _tmp286_ = 0;
+ ScanJob* _tmp287_ = NULL;
+ gdouble _tmp288_ = 0.0;
+ gdouble _tmp289_ = 0.0;
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp281_ = self->priv->handle;
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp282_ = option;
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp283_ = index;
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp284_ = option;
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp285_ = job;
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp286_ = _tmp285_->page_height;
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp287_ = job;
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp288_ = _tmp287_->dpi;
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp289_ = scanner_convert_page_size (self, _tmp284_, (gdouble) _tmp286_, _tmp288_);
+#line 1098 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_fixed_or_int_option (self, _tmp281_, _tmp282_, _tmp283_, _tmp289_, NULL);
+#line 10154 "scanner.c"
+ }
+#line 1100 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp290_ = self->priv->handle;
+#line 1100 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp291_ = SANE_NAME_BRIGHTNESS;
+#line 1100 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp293_ = scanner_get_option_by_name (self, _tmp290_, _tmp291_, &_tmp292_);
+#line 1100 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp292_;
+#line 1100 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp293_;
+#line 1101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp294_ = option;
+#line 1101 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp294_ != NULL) {
+#line 10170 "scanner.c"
+ ScanJob* _tmp295_ = NULL;
+ gint _tmp296_ = 0;
+#line 1103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp295_ = job;
+#line 1103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp296_ = _tmp295_->brightness;
+#line 1103 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp296_ != 0) {
+#line 10179 "scanner.c"
+ gint brightness = 0;
+ SANE_Option_Descriptor* _tmp297_ = NULL;
+ ScanJob* _tmp298_ = NULL;
+ gint _tmp299_ = 0;
+ gint _tmp300_ = 0;
+ SANE_Handle _tmp301_ = {0};
+ SANE_Option_Descriptor* _tmp302_ = NULL;
+ SANE_Int _tmp303_ = {0};
+ gint _tmp304_ = 0;
+#line 1105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp297_ = option;
+#line 1105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp298_ = job;
+#line 1105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp299_ = _tmp298_->brightness;
+#line 1105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp300_ = scanner_scale_int (self, -100, 100, _tmp297_, _tmp299_);
+#line 1105 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ brightness = _tmp300_;
+#line 1106 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp301_ = self->priv->handle;
+#line 1106 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp302_ = option;
+#line 1106 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp303_ = index;
+#line 1106 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp304_ = brightness;
+#line 1106 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_int_option (self, _tmp301_, _tmp302_, _tmp303_, _tmp304_, NULL);
+#line 10209 "scanner.c"
+ }
+ }
+#line 1109 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp305_ = self->priv->handle;
+#line 1109 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp306_ = SANE_NAME_CONTRAST;
+#line 1109 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp308_ = scanner_get_option_by_name (self, _tmp305_, _tmp306_, &_tmp307_);
+#line 1109 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp307_;
+#line 1109 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp308_;
+#line 1110 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp309_ = option;
+#line 1110 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp309_ != NULL) {
+#line 10226 "scanner.c"
+ ScanJob* _tmp310_ = NULL;
+ gint _tmp311_ = 0;
+#line 1112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp310_ = job;
+#line 1112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp311_ = _tmp310_->contrast;
+#line 1112 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp311_ != 0) {
+#line 10235 "scanner.c"
+ gint contrast = 0;
+ SANE_Option_Descriptor* _tmp312_ = NULL;
+ ScanJob* _tmp313_ = NULL;
+ gint _tmp314_ = 0;
+ gint _tmp315_ = 0;
+ SANE_Handle _tmp316_ = {0};
+ SANE_Option_Descriptor* _tmp317_ = NULL;
+ SANE_Int _tmp318_ = {0};
+ gint _tmp319_ = 0;
+#line 1114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp312_ = option;
+#line 1114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp313_ = job;
+#line 1114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp314_ = _tmp313_->contrast;
+#line 1114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp315_ = scanner_scale_int (self, -100, 100, _tmp312_, _tmp314_);
+#line 1114 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ contrast = _tmp315_;
+#line 1115 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp316_ = self->priv->handle;
+#line 1115 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp317_ = option;
+#line 1115 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp318_ = index;
+#line 1115 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp319_ = contrast;
+#line 1115 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_int_option (self, _tmp316_, _tmp317_, _tmp318_, _tmp319_, NULL);
+#line 10265 "scanner.c"
+ }
+ }
+#line 1120 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp320_ = self->priv->current_device;
+#line 1120 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_strcmp0 (_tmp320_, "test") == 0) {
+#line 10272 "scanner.c"
+ SANE_Handle _tmp321_ = {0};
+ gint _tmp322_ = 0;
+ SANE_Option_Descriptor* _tmp323_ = NULL;
+ SANE_Option_Descriptor* _tmp324_ = NULL;
+ SANE_Handle _tmp328_ = {0};
+ gint _tmp329_ = 0;
+ SANE_Option_Descriptor* _tmp330_ = NULL;
+ SANE_Option_Descriptor* _tmp331_ = NULL;
+ SANE_Handle _tmp335_ = {0};
+ gint _tmp336_ = 0;
+ SANE_Option_Descriptor* _tmp337_ = NULL;
+ SANE_Option_Descriptor* _tmp338_ = NULL;
+ SANE_Handle _tmp342_ = {0};
+ gint _tmp343_ = 0;
+ SANE_Option_Descriptor* _tmp344_ = NULL;
+ SANE_Option_Descriptor* _tmp345_ = NULL;
+ SANE_Handle _tmp349_ = {0};
+ gint _tmp350_ = 0;
+ SANE_Option_Descriptor* _tmp351_ = NULL;
+ SANE_Option_Descriptor* _tmp352_ = NULL;
+#line 1122 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp321_ = self->priv->handle;
+#line 1122 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp323_ = scanner_get_option_by_name (self, _tmp321_, "hand-scanner", &_tmp322_);
+#line 1122 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp322_;
+#line 1122 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp323_;
+#line 1123 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp324_ = option;
+#line 1123 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp324_ != NULL) {
+#line 10305 "scanner.c"
+ SANE_Handle _tmp325_ = {0};
+ SANE_Option_Descriptor* _tmp326_ = NULL;
+ SANE_Int _tmp327_ = {0};
+#line 1124 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp325_ = self->priv->handle;
+#line 1124 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp326_ = option;
+#line 1124 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp327_ = index;
+#line 1124 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_bool_option (self, _tmp325_, _tmp326_, _tmp327_, FALSE, NULL);
+#line 10317 "scanner.c"
+ }
+#line 1125 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp328_ = self->priv->handle;
+#line 1125 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp330_ = scanner_get_option_by_name (self, _tmp328_, "three-pass", &_tmp329_);
+#line 1125 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp329_;
+#line 1125 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp330_;
+#line 1126 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp331_ = option;
+#line 1126 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp331_ != NULL) {
+#line 10331 "scanner.c"
+ SANE_Handle _tmp332_ = {0};
+ SANE_Option_Descriptor* _tmp333_ = NULL;
+ SANE_Int _tmp334_ = {0};
+#line 1127 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp332_ = self->priv->handle;
+#line 1127 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp333_ = option;
+#line 1127 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp334_ = index;
+#line 1127 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_bool_option (self, _tmp332_, _tmp333_, _tmp334_, FALSE, NULL);
+#line 10343 "scanner.c"
+ }
+#line 1128 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp335_ = self->priv->handle;
+#line 1128 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp337_ = scanner_get_option_by_name (self, _tmp335_, "test-picture", &_tmp336_);
+#line 1128 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp336_;
+#line 1128 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp337_;
+#line 1129 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp338_ = option;
+#line 1129 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp338_ != NULL) {
+#line 10357 "scanner.c"
+ SANE_Handle _tmp339_ = {0};
+ SANE_Option_Descriptor* _tmp340_ = NULL;
+ SANE_Int _tmp341_ = {0};
+#line 1130 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp339_ = self->priv->handle;
+#line 1130 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp340_ = option;
+#line 1130 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp341_ = index;
+#line 1130 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_string_option (self, _tmp339_, _tmp340_, _tmp341_, "Color pattern", NULL);
+#line 10369 "scanner.c"
+ }
+#line 1131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp342_ = self->priv->handle;
+#line 1131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp344_ = scanner_get_option_by_name (self, _tmp342_, "read-delay", &_tmp343_);
+#line 1131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp343_;
+#line 1131 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp344_;
+#line 1132 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp345_ = option;
+#line 1132 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp345_ != NULL) {
+#line 10383 "scanner.c"
+ SANE_Handle _tmp346_ = {0};
+ SANE_Option_Descriptor* _tmp347_ = NULL;
+ SANE_Int _tmp348_ = {0};
+#line 1133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp346_ = self->priv->handle;
+#line 1133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp347_ = option;
+#line 1133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp348_ = index;
+#line 1133 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_bool_option (self, _tmp346_, _tmp347_, _tmp348_, TRUE, NULL);
+#line 10395 "scanner.c"
+ }
+#line 1134 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp349_ = self->priv->handle;
+#line 1134 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp351_ = scanner_get_option_by_name (self, _tmp349_, "read-delay-duration", &_tmp350_);
+#line 1134 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ index = (SANE_Int) _tmp350_;
+#line 1134 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ option = _tmp351_;
+#line 1135 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp352_ = option;
+#line 1135 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp352_ != NULL) {
+#line 10409 "scanner.c"
+ SANE_Handle _tmp353_ = {0};
+ SANE_Option_Descriptor* _tmp354_ = NULL;
+ SANE_Int _tmp355_ = {0};
+#line 1136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp353_ = self->priv->handle;
+#line 1136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp354_ = option;
+#line 1136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp355_ = index;
+#line 1136 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_int_option (self, _tmp353_, _tmp354_, _tmp355_, 200000, NULL);
+#line 10421 "scanner.c"
+ }
+ }
+#line 1139 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_START;
+#line 1140 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 1140 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 10430 "scanner.c"
+ }
+#line 1143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp356_ = index;
+#line 1143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp357_ = option;
+#line 1143 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_log_option (self, _tmp356_, _tmp357_);
+#line 1146 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp358_ = option;
+#line 1146 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp359_ = _tmp358_->type;
+#line 1146 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp359_ == SANE_TYPE_GROUP) {
+#line 1147 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 1147 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 10448 "scanner.c"
+ }
+#line 1150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp360_ = option;
+#line 1150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp361_ = _tmp360_->cap;
+#line 1150 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if ((_tmp361_ & SANE_CAP_INACTIVE) != ((SANE_Int) 0)) {
+#line 1151 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 1151 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 10460 "scanner.c"
+ }
+#line 1154 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp362_ = option;
+#line 1154 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp363_ = _tmp362_->name;
+#line 1154 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp363_ == NULL) {
+#line 1155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 1155 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 10472 "scanner.c"
+ }
+#line 1157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp364_ = self->priv->options;
+#line 1157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp365_ = option;
+#line 1157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp366_ = _tmp365_->name;
+#line 1157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp367_ = g_strdup (_tmp366_);
+#line 1157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp368_ = index;
+#line 1157 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_hash_table_insert (_tmp364_, _tmp367_, (gpointer) ((gintptr) ((gint) _tmp368_)));
+#line 879 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 10488 "scanner.c"
+}
+
+
+static gdouble scanner_convert_page_size (Scanner* self, SANE_Option_Descriptor* option, gdouble size, gdouble dpi) {
+ gdouble result = 0.0;
+ SANE_Option_Descriptor* _tmp0_ = NULL;
+ SANE_Unit _tmp1_ = 0;
+#line 1160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, 0.0);
+#line 1160 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (option != NULL, 0.0);
+#line 1162 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = option;
+#line 1162 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->unit;
+#line 1162 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_ == SANE_UNIT_PIXEL) {
+#line 10506 "scanner.c"
+ gdouble _tmp2_ = 0.0;
+ gdouble _tmp3_ = 0.0;
+#line 1163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = dpi;
+#line 1163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = size;
+#line 1163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = (_tmp2_ * _tmp3_) / 254.0;
+#line 1163 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 10517 "scanner.c"
+ } else {
+ SANE_Option_Descriptor* _tmp4_ = NULL;
+ SANE_Unit _tmp5_ = 0;
+#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = option;
+#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = _tmp4_->unit;
+#line 1164 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp5_ == SANE_UNIT_MM) {
+#line 10527 "scanner.c"
+ gdouble _tmp6_ = 0.0;
+#line 1165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = size;
+#line 1165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp6_ / 10.0;
+#line 1165 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 10535 "scanner.c"
+ } else {
+#line 1168 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1168: Unable to set unsupported unit type");
+#line 1169 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = (gdouble) 0.0f;
+#line 1169 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 10543 "scanner.c"
+ }
+ }
+}
+
+
+static SANE_Option_Descriptor* scanner_get_option_by_name (Scanner* self, SANE_Handle handle, const gchar* name, gint* index) {
+ gint _vala_index = 0;
+ SANE_Option_Descriptor* result = NULL;
+ GHashTable* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gconstpointer _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ SANE_Handle _tmp4_ = {0};
+ gint _tmp5_ = 0;
+ SANE_Option_Descriptor* _tmp6_ = NULL;
+#line 1173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1173 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (name != NULL, NULL);
+#line 1175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->options;
+#line 1175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = name;
+#line 1175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
+#line 1175 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _vala_index = (gint) ((gintptr) _tmp2_);
+#line 1176 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = _vala_index;
+#line 1176 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp3_ == 0) {
+#line 1177 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = NULL;
+#line 1177 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (index) {
+#line 1177 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *index = _vala_index;
+#line 10581 "scanner.c"
+ }
+#line 1177 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 10585 "scanner.c"
+ }
+#line 1179 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = handle;
+#line 1179 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = _vala_index;
+#line 1179 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = sane_get_option_descriptor (_tmp4_, (SANE_Int) _tmp5_);
+#line 1179 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp6_;
+#line 1179 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (index) {
+#line 1179 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *index = _vala_index;
+#line 10599 "scanner.c"
+ }
+#line 1179 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 10603 "scanner.c"
+}
+
+
+static void scanner_do_complete_document (Scanner* self) {
+ SANE_Handle _tmp0_ = {0};
+ GList* _tmp1_ = NULL;
+ GList* _tmp2_ = NULL;
+ NotifyDocumentDone* _tmp3_ = NULL;
+ NotifyDocumentDone* _tmp4_ = NULL;
+#line 1182 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 1184 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->handle;
+#line 1184 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ sane_cancel (_tmp0_);
+#line 1185 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1185: sane_cancel ()");
+#line 1187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->job_queue;
+#line 1187 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->job_queue = g_list_remove_link (self->priv->job_queue, _tmp1_);
+#line 1189 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_IDLE;
+#line 1192 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = self->priv->job_queue;
+#line 1192 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp2_ != NULL) {
+#line 1194 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_OPEN;
+#line 1195 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 10635 "scanner.c"
+ }
+#line 1201 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = notify_document_done_new ();
+#line 1201 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_;
+#line 1201 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (self, (Notify*) _tmp4_);
+#line 1201 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp4_);
+#line 1202 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_scanning (self, FALSE);
+#line 10647 "scanner.c"
+}
+
+
+static void scanner_do_start (Scanner* self) {
+ SANE_Status status = 0;
+ NotifyExpectPage* _tmp0_ = NULL;
+ NotifyExpectPage* _tmp1_ = NULL;
+ SANE_Handle _tmp2_ = {0};
+ SANE_Status _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ SANE_Status _tmp6_ = 0;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ SANE_Status _tmp9_ = 0;
+#line 1205 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 1209 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = notify_expect_page_new ();
+#line 1209 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_;
+#line 1209 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (self, (Notify*) _tmp1_);
+#line 1209 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp1_);
+#line 1211 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = self->priv->handle;
+#line 1211 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = sane_start (_tmp2_);
+#line 1211 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp3_;
+#line 1212 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = self->priv->page_number;
+#line 1212 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = self->priv->pass_number;
+#line 1212 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = status;
+#line 1212 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = sane_status_to_string (_tmp6_);
+#line 1212 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = _tmp7_;
+#line 1212 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1212: sane_start (page=%d, pass=%d) -> %s", _tmp4_, _tmp5_, _tmp8_);
+#line 1212 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp8_);
+#line 1213 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = status;
+#line 1213 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp9_ == SANE_STATUS_GOOD) {
+#line 1214 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_GET_PARAMETERS;
+#line 10699 "scanner.c"
+ } else {
+ SANE_Status _tmp10_ = 0;
+#line 1215 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = status;
+#line 1215 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp10_ == SANE_STATUS_NO_DOCS) {
+#line 1216 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_do_complete_document (self);
+#line 10708 "scanner.c"
+ } else {
+ SANE_Status _tmp11_ = 0;
+ const gchar* _tmp12_ = NULL;
+ SANE_Status _tmp13_ = 0;
+ const gchar* _tmp14_ = NULL;
+#line 1219 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = status;
+#line 1219 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = sane_strstatus (_tmp11_);
+#line 1219 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1219: Unable to start device: %s", _tmp12_);
+#line 1220 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = status;
+#line 1220 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = _ ("Unable to start scan");
+#line 1220 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_fail_scan (self, (gint) _tmp13_, _tmp14_);
+#line 10726 "scanner.c"
+ }
+ }
+}
+
+
+static gchar* sane_frame_to_string (SANE_Frame frame) {
+ gchar* result = NULL;
+ SANE_Frame _tmp0_ = 0;
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp0_ = frame;
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ switch (_tmp0_) {
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_FRAME_GRAY:
+#line 10741 "scanner.c"
+ {
+ gchar* _tmp1_ = NULL;
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp1_ = g_strdup ("SANE_FRAME_GRAY");
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp1_;
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 10750 "scanner.c"
+ }
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_FRAME_RGB:
+#line 10754 "scanner.c"
+ {
+ gchar* _tmp2_ = NULL;
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp2_ = g_strdup ("SANE_FRAME_RGB");
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp2_;
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 10763 "scanner.c"
+ }
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_FRAME_RED:
+#line 10767 "scanner.c"
+ {
+ gchar* _tmp3_ = NULL;
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp3_ = g_strdup ("SANE_FRAME_RED");
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp3_;
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 10776 "scanner.c"
+ }
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_FRAME_GREEN:
+#line 10780 "scanner.c"
+ {
+ gchar* _tmp4_ = NULL;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp4_ = g_strdup ("SANE_FRAME_GREEN");
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp4_;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 10789 "scanner.c"
+ }
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ case SANE_FRAME_BLUE:
+#line 10793 "scanner.c"
+ {
+ gchar* _tmp5_ = NULL;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp5_ = g_strdup ("SANE_FRAME_BLUE");
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp5_;
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 10802 "scanner.c"
+ }
+ default:
+ {
+ SANE_Frame _tmp6_ = 0;
+ gchar* _tmp7_ = NULL;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp6_ = frame;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ _tmp7_ = g_strdup_printf ("SANE_FRAME(%d)", (gint) _tmp6_);
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ result = _tmp7_;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/sane.vapi"
+ return result;
+#line 10816 "scanner.c"
+ }
+ }
+}
+
+
+static void scanner_do_get_parameters (Scanner* self) {
+ SANE_Status status = 0;
+ SANE_Handle _tmp0_ = {0};
+ SANE_Parameters _tmp1_ = {0};
+ SANE_Status _tmp2_ = 0;
+ SANE_Status _tmp3_ = 0;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ SANE_Status _tmp6_ = 0;
+ ScanJob* job = NULL;
+ GList* _tmp11_ = NULL;
+ gconstpointer _tmp12_ = NULL;
+ ScanJob* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ SANE_Parameters _tmp15_ = {0};
+ gboolean _tmp16_ = FALSE;
+ SANE_Parameters _tmp17_ = {0};
+ SANE_Frame _tmp18_ = 0;
+ gchar* _tmp19_ = NULL;
+ gchar* _tmp20_ = NULL;
+ SANE_Parameters _tmp21_ = {0};
+ gint _tmp22_ = 0;
+ SANE_Parameters _tmp23_ = {0};
+ gint _tmp24_ = 0;
+ SANE_Parameters _tmp25_ = {0};
+ gint _tmp26_ = 0;
+ SANE_Parameters _tmp27_ = {0};
+ gint _tmp28_ = 0;
+ ScanPageInfo* info = NULL;
+ ScanPageInfo* _tmp29_ = NULL;
+ ScanPageInfo* _tmp30_ = NULL;
+ SANE_Parameters _tmp31_ = {0};
+ gint _tmp32_ = 0;
+ ScanPageInfo* _tmp33_ = NULL;
+ SANE_Parameters _tmp34_ = {0};
+ gint _tmp35_ = 0;
+ ScanPageInfo* _tmp36_ = NULL;
+ SANE_Parameters _tmp37_ = {0};
+ gint _tmp38_ = 0;
+ gboolean _tmp39_ = FALSE;
+ gboolean _tmp40_ = FALSE;
+ gboolean _tmp41_ = FALSE;
+ SANE_Parameters _tmp42_ = {0};
+ gint _tmp43_ = 0;
+ gint _tmp53_ = 0;
+ SANE_Parameters _tmp54_ = {0};
+ SANE_Frame _tmp55_ = 0;
+ ScanPageInfo* _tmp56_ = NULL;
+ ScanPageInfo* _tmp57_ = NULL;
+ ScanJob* _tmp58_ = NULL;
+ gdouble _tmp59_ = 0.0;
+ ScanPageInfo* _tmp60_ = NULL;
+ const gchar* _tmp61_ = NULL;
+ gchar* _tmp62_ = NULL;
+ gint _tmp63_ = 0;
+ gint _tmp64_ = 0;
+ gint buffer_size = 0;
+ SANE_Parameters _tmp71_ = {0};
+ gint _tmp72_ = 0;
+ gint _tmp73_ = 0;
+ guchar* _tmp74_ = NULL;
+#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 1228 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->handle;
+#line 1228 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = sane_get_parameters (_tmp0_, &_tmp1_);
+#line 1228 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->parameters = _tmp1_;
+#line 1228 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp2_;
+#line 1229 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = status;
+#line 1229 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = sane_status_to_string (_tmp3_);
+#line 1229 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = _tmp4_;
+#line 1229 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1229: sane_get_parameters () -> %s", _tmp5_);
+#line 1229 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp5_);
+#line 1230 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = status;
+#line 1230 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp6_ != SANE_STATUS_GOOD) {
+#line 10907 "scanner.c"
+ SANE_Status _tmp7_ = 0;
+ const gchar* _tmp8_ = NULL;
+ SANE_Status _tmp9_ = 0;
+ const gchar* _tmp10_ = NULL;
+#line 1232 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = status;
+#line 1232 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = sane_strstatus (_tmp7_);
+#line 1232 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1232: Unable to get device parameters: %s", _tmp8_);
+#line 1233 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = status;
+#line 1233 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = _ ("Error communicating with scanner");
+#line 1233 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_fail_scan (self, (gint) _tmp9_, _tmp10_);
+#line 1236 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 10926 "scanner.c"
+ }
+#line 1239 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = self->priv->job_queue;
+#line 1239 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = _tmp11_->data;
+#line 1239 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp12_, TYPE_SCAN_JOB, ScanJob));
+#line 1239 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ job = _tmp13_;
+#line 1243 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = self->priv->parameters;
+#line 1243 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = _tmp15_.last_frame;
+#line 1243 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp16_) {
+#line 1243 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = "SANE_TRUE";
+#line 10944 "scanner.c"
+ } else {
+#line 1243 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = "SANE_FALSE";
+#line 10948 "scanner.c"
+ }
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = self->priv->parameters;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = _tmp17_.format;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = sane_frame_to_string (_tmp18_);
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = _tmp19_;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = self->priv->parameters;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = _tmp21_.bytes_per_line;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = self->priv->parameters;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = _tmp23_.pixels_per_line;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = self->priv->parameters;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = _tmp25_.lines;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = self->priv->parameters;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = _tmp27_.depth;
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1241: Parameters: format=%s last_frame=%s bytes_per_line=" \
+"%d pixels_per_line=%d lines=%d depth=%d", _tmp20_, _tmp14_, _tmp22_, _tmp24_, _tmp26_, _tmp28_);
+#line 1241 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp20_);
+#line 1249 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = scan_page_info_new ();
+#line 1249 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ info = _tmp29_;
+#line 1250 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = info;
+#line 1250 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = self->priv->parameters;
+#line 1250 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = _tmp31_.pixels_per_line;
+#line 1250 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_->width = _tmp32_;
+#line 1251 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = info;
+#line 1251 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = self->priv->parameters;
+#line 1251 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = _tmp34_.lines;
+#line 1251 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_->height = _tmp35_;
+#line 1252 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = info;
+#line 1252 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = self->priv->parameters;
+#line 1252 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = _tmp37_.depth;
+#line 1252 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_->depth = _tmp38_;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp42_ = self->priv->parameters;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp43_ = _tmp42_.depth;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp43_ == 8) {
+#line 11012 "scanner.c"
+ SANE_Parameters _tmp44_ = {0};
+ SANE_Frame _tmp45_ = 0;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp44_ = self->priv->parameters;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_ = _tmp44_.format;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_ = _tmp45_ == SANE_FRAME_GRAY;
+#line 11021 "scanner.c"
+ } else {
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_ = FALSE;
+#line 11025 "scanner.c"
+ }
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp41_) {
+#line 11029 "scanner.c"
+ ScanJob* _tmp46_ = NULL;
+ gint _tmp47_ = 0;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp46_ = job;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp47_ = _tmp46_->depth;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp40_ = _tmp47_ == 2;
+#line 11038 "scanner.c"
+ } else {
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp40_ = FALSE;
+#line 11042 "scanner.c"
+ }
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp40_) {
+#line 11046 "scanner.c"
+ ScanJob* _tmp48_ = NULL;
+ ScanMode _tmp49_ = 0;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_ = job;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp49_ = _tmp48_->scan_mode;
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_ = _tmp49_ == SCAN_MODE_GRAY;
+#line 11055 "scanner.c"
+ } else {
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_ = FALSE;
+#line 11059 "scanner.c"
+ }
+#line 1255 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp39_) {
+#line 11063 "scanner.c"
+ ScanPageInfo* _tmp50_ = NULL;
+ ScanJob* _tmp51_ = NULL;
+ gint _tmp52_ = 0;
+#line 1256 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_ = info;
+#line 1256 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_ = job;
+#line 1256 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp52_ = _tmp51_->depth;
+#line 1256 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_->depth = _tmp52_;
+#line 11075 "scanner.c"
+ }
+#line 1257 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_ = self->priv->parameters;
+#line 1257 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp55_ = _tmp54_.format;
+#line 1257 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp55_ == SANE_FRAME_GRAY) {
+#line 1257 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp53_ = 1;
+#line 11085 "scanner.c"
+ } else {
+#line 1257 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp53_ = 3;
+#line 11089 "scanner.c"
+ }
+#line 1257 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp56_ = info;
+#line 1257 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp56_->n_channels = _tmp53_;
+#line 1258 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp57_ = info;
+#line 1258 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp58_ = job;
+#line 1258 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp59_ = _tmp58_->dpi;
+#line 1258 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp57_->dpi = _tmp59_;
+#line 1259 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp60_ = info;
+#line 1259 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp61_ = self->priv->current_device;
+#line 1259 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp62_ = g_strdup (_tmp61_);
+#line 1259 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp60_->device);
+#line 1259 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp60_->device = _tmp62_;
+#line 1261 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp63_ = self->priv->page_number;
+#line 1261 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp64_ = self->priv->notified_page;
+#line 1261 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp63_ != _tmp64_) {
+#line 11119 "scanner.c"
+ ScanJob* _tmp65_ = NULL;
+ gint _tmp66_ = 0;
+ ScanPageInfo* _tmp67_ = NULL;
+ NotifyGotPageInfo* _tmp68_ = NULL;
+ NotifyGotPageInfo* _tmp69_ = NULL;
+ gint _tmp70_ = 0;
+#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp65_ = job;
+#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp66_ = _tmp65_->id;
+#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp67_ = info;
+#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp68_ = notify_got_page_info_new (_tmp66_, _tmp67_);
+#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp69_ = _tmp68_;
+#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (self, (Notify*) _tmp69_);
+#line 1263 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp69_);
+#line 1264 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp70_ = self->priv->page_number;
+#line 1264 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->notified_page = _tmp70_;
+#line 11144 "scanner.c"
+ }
+#line 1268 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp71_ = self->priv->parameters;
+#line 1268 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp72_ = _tmp71_.bytes_per_line;
+#line 1268 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ buffer_size = _tmp72_ + 1;
+#line 1269 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp73_ = buffer_size;
+#line 1269 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp74_ = g_new0 (guchar, _tmp73_);
+#line 1269 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer = (g_free (self->priv->buffer), NULL);
+#line 1269 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer = _tmp74_;
+#line 1269 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer_length1 = _tmp73_;
+#line 1269 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->_buffer_size_ = self->priv->buffer_length1;
+#line 1270 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->n_used = 0;
+#line 1271 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->line_count = 0;
+#line 1272 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->pass_number = 0;
+#line 1273 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_READ;
+#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_page_info_unref0 (info);
+#line 1226 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 11176 "scanner.c"
+}
+
+
+static void scanner_do_complete_page (Scanner* self) {
+ ScanJob* job = NULL;
+ GList* _tmp0_ = NULL;
+ gconstpointer _tmp1_ = NULL;
+ ScanJob* _tmp2_ = NULL;
+ ScanJob* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ NotifyPageDone* _tmp5_ = NULL;
+ NotifyPageDone* _tmp6_ = NULL;
+ SANE_Parameters _tmp7_ = {0};
+ gboolean _tmp8_ = FALSE;
+ ScanJob* _tmp10_ = NULL;
+ ScanType _tmp11_ = 0;
+#line 1276 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 1278 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->job_queue;
+#line 1278 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->data;
+#line 1278 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp1_, TYPE_SCAN_JOB, ScanJob));
+#line 1278 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ job = _tmp2_;
+#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = job;
+#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_->id;
+#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = notify_page_done_new (_tmp4_);
+#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _tmp5_;
+#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (self, (Notify*) _tmp6_);
+#line 1280 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp6_);
+#line 1283 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = self->priv->parameters;
+#line 1283 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = _tmp7_.last_frame;
+#line 1283 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp8_) {
+#line 11221 "scanner.c"
+ gint _tmp9_ = 0;
+#line 1285 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = self->priv->pass_number;
+#line 1285 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->pass_number = _tmp9_ + 1;
+#line 1286 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_START;
+#line 1287 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 1287 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 11233 "scanner.c"
+ }
+#line 1291 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = job;
+#line 1291 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = _tmp10_->type;
+#line 1291 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp11_ != SCAN_TYPE_SINGLE) {
+#line 11241 "scanner.c"
+ gint _tmp12_ = 0;
+ ScanJob* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ NotifyPageDone* _tmp15_ = NULL;
+ NotifyPageDone* _tmp16_ = NULL;
+#line 1293 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = self->priv->page_number;
+#line 1293 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->page_number = _tmp12_ + 1;
+#line 1294 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->pass_number = 0;
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = job;
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = _tmp13_->id;
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = notify_page_done_new (_tmp14_);
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = _tmp15_;
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (self, (Notify*) _tmp16_);
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp16_);
+#line 1296 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_START;
+#line 1297 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 1297 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 11271 "scanner.c"
+ }
+#line 1300 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_do_complete_document (self);
+#line 1276 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 11277 "scanner.c"
+}
+
+
+static void scanner_do_read (Scanner* self) {
+ ScanJob* job = NULL;
+ GList* _tmp0_ = NULL;
+ gconstpointer _tmp1_ = NULL;
+ ScanJob* _tmp2_ = NULL;
+ gint n_to_read = 0;
+ guchar* _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ gint _tmp4_ = 0;
+ SANE_Int n_read = {0};
+ guchar* b = NULL;
+ guchar* _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ SANE_Status status = 0;
+ SANE_Handle _tmp6_ = {0};
+ guchar* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ SANE_Int _tmp10_ = {0};
+ SANE_Status _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ SANE_Status _tmp13_ = 0;
+ gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+ SANE_Int _tmp16_ = {0};
+ SANE_Status _tmp17_ = 0;
+ SANE_Status _tmp29_ = 0;
+ gboolean full_read = FALSE;
+ gboolean _tmp34_ = FALSE;
+ gint _tmp35_ = 0;
+ gint _tmp38_ = 0;
+ SANE_Int _tmp39_ = {0};
+ gint _tmp40_ = 0;
+ SANE_Parameters _tmp41_ = {0};
+ gint _tmp42_ = 0;
+#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 1305 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->job_queue;
+#line 1305 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = _tmp0_->data;
+#line 1305 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _scan_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((ScanJob*) _tmp1_, TYPE_SCAN_JOB, ScanJob));
+#line 1305 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ job = _tmp2_;
+#line 1308 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = self->priv->buffer;
+#line 1308 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3__length1 = self->priv->buffer_length1;
+#line 1308 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = self->priv->n_used;
+#line 1308 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ n_to_read = _tmp3__length1 - _tmp4_;
+#line 1311 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = self->priv->buffer;
+#line 1311 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5__length1 = self->priv->buffer_length1;
+#line 1311 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ b = (guchar*) _tmp5_;
+#line 1312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = self->priv->handle;
+#line 1312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = b;
+#line 1312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = self->priv->n_used;
+#line 1312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = n_to_read;
+#line 1312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = sane_read (_tmp6_, (guint8*) (_tmp7_ + _tmp8_), (SANE_Int) _tmp9_, &_tmp10_);
+#line 1312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ n_read = _tmp10_;
+#line 1312 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp11_;
+#line 1313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = n_to_read;
+#line 1313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = status;
+#line 1313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = sane_status_to_string (_tmp13_);
+#line 1313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = _tmp14_;
+#line 1313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = n_read;
+#line 1313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1313: sane_read (%d) -> (%s, %d)", _tmp12_, _tmp15_, (gint) _tmp16_);
+#line 1313 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp15_);
+#line 1316 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = status;
+#line 1316 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp17_ == SANE_STATUS_EOF) {
+#line 11372 "scanner.c"
+ gboolean _tmp18_ = FALSE;
+ SANE_Parameters _tmp19_ = {0};
+ gint _tmp20_ = 0;
+ gint _tmp27_ = 0;
+#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = self->priv->parameters;
+#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = _tmp19_.lines;
+#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp20_ > 0) {
+#line 11383 "scanner.c"
+ gint _tmp21_ = 0;
+ SANE_Parameters _tmp22_ = {0};
+ gint _tmp23_ = 0;
+#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = self->priv->line_count;
+#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = self->priv->parameters;
+#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = _tmp22_.lines;
+#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = _tmp21_ != _tmp23_;
+#line 11395 "scanner.c"
+ } else {
+#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = FALSE;
+#line 11399 "scanner.c"
+ }
+#line 1318 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp18_) {
+#line 11403 "scanner.c"
+ gint _tmp24_ = 0;
+ SANE_Parameters _tmp25_ = {0};
+ gint _tmp26_ = 0;
+#line 1319 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = self->priv->line_count;
+#line 1319 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = self->priv->parameters;
+#line 1319 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = _tmp25_.lines;
+#line 1319 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1319: Scan completed with %d lines, expected %d lines", _tmp24_, _tmp26_);
+#line 11415 "scanner.c"
+ }
+#line 1320 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = self->priv->n_used;
+#line 1320 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp27_ > 0) {
+#line 11421 "scanner.c"
+ gint _tmp28_ = 0;
+#line 1321 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = self->priv->n_used;
+#line 1321 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1321: Scan complete with %d bytes of unused data", _tmp28_);
+#line 11427 "scanner.c"
+ }
+#line 1322 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_do_complete_page (self);
+#line 1323 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 1323 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 11435 "scanner.c"
+ }
+#line 1327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = status;
+#line 1327 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp29_ != SANE_STATUS_GOOD) {
+#line 11441 "scanner.c"
+ SANE_Status _tmp30_ = 0;
+ const gchar* _tmp31_ = NULL;
+ SANE_Status _tmp32_ = 0;
+ const gchar* _tmp33_ = NULL;
+#line 1329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = status;
+#line 1329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = sane_strstatus (_tmp30_);
+#line 1329 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1329: Unable to read frame from device: %s", _tmp31_);
+#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = status;
+#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = _ ("Error communicating with scanner");
+#line 1330 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_fail_scan (self, (gint) _tmp32_, _tmp33_);
+#line 1333 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 1333 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 11462 "scanner.c"
+ }
+#line 1336 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ full_read = FALSE;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = self->priv->n_used;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp35_ == 0) {
+#line 11470 "scanner.c"
+ SANE_Int _tmp36_ = {0};
+ guchar* _tmp37_ = NULL;
+ gint _tmp37__length1 = 0;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = n_read;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = self->priv->buffer;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37__length1 = self->priv->buffer_length1;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = _tmp36_ == ((SANE_Int) _tmp37__length1);
+#line 11482 "scanner.c"
+ } else {
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = FALSE;
+#line 11486 "scanner.c"
+ }
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp34_) {
+#line 1338 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ full_read = TRUE;
+#line 11492 "scanner.c"
+ }
+#line 1339 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = self->priv->n_used;
+#line 1339 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_ = n_read;
+#line 1339 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->n_used = _tmp38_ + ((gint) _tmp39_);
+#line 1342 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp40_ = self->priv->n_used;
+#line 1342 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_ = self->priv->parameters;
+#line 1342 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp42_ = _tmp41_.bytes_per_line;
+#line 1342 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp40_ >= _tmp42_) {
+#line 11508 "scanner.c"
+ ScanLine* line = NULL;
+ ScanLine* _tmp43_ = NULL;
+ SANE_Parameters _tmp44_ = {0};
+ SANE_Frame _tmp45_ = 0;
+ ScanLine* _tmp51_ = NULL;
+ SANE_Parameters _tmp52_ = {0};
+ gint _tmp53_ = 0;
+ ScanLine* _tmp54_ = NULL;
+ SANE_Parameters _tmp55_ = {0};
+ gint _tmp56_ = 0;
+ ScanLine* _tmp57_ = NULL;
+ guchar* _tmp58_ = NULL;
+ gint _tmp58__length1 = 0;
+ ScanLine* _tmp59_ = NULL;
+ SANE_Parameters _tmp60_ = {0};
+ gint _tmp61_ = 0;
+ ScanLine* _tmp62_ = NULL;
+ gint _tmp63_ = 0;
+ ScanLine* _tmp64_ = NULL;
+ gint _tmp65_ = 0;
+ ScanLine* _tmp66_ = NULL;
+ gint _tmp67_ = 0;
+ gint _tmp68_ = 0;
+ ScanLine* _tmp69_ = NULL;
+ gint _tmp70_ = 0;
+ gint buffer_size = 0;
+ ScanLine* _tmp71_ = NULL;
+ guchar* _tmp72_ = NULL;
+ gint _tmp72__length1 = 0;
+ gboolean _tmp73_ = FALSE;
+ gint _tmp77_ = 0;
+ guchar* _tmp78_ = NULL;
+ gint n_remaining = 0;
+ gint _tmp79_ = 0;
+ ScanLine* _tmp80_ = NULL;
+ gint _tmp81_ = 0;
+ ScanLine* _tmp82_ = NULL;
+ gint _tmp83_ = 0;
+ gboolean _tmp100_ = FALSE;
+ gboolean _tmp101_ = FALSE;
+ gboolean _tmp102_ = FALSE;
+ SANE_Parameters _tmp103_ = {0};
+ gint _tmp104_ = 0;
+ ScanJob* _tmp153_ = NULL;
+ gint _tmp154_ = 0;
+ ScanLine* _tmp155_ = NULL;
+ NotifyGotLine* _tmp156_ = NULL;
+ NotifyGotLine* _tmp157_ = NULL;
+#line 1344 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp43_ = scan_line_new ();
+#line 1344 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ line = _tmp43_;
+#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp44_ = self->priv->parameters;
+#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_ = _tmp44_.format;
+#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ switch (_tmp45_) {
+#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_FRAME_GRAY:
+#line 11569 "scanner.c"
+ {
+ ScanLine* _tmp46_ = NULL;
+#line 1348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp46_ = line;
+#line 1348 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp46_->channel = 0;
+#line 1349 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 11578 "scanner.c"
+ }
+#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_FRAME_RGB:
+#line 11582 "scanner.c"
+ {
+ ScanLine* _tmp47_ = NULL;
+#line 1351 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp47_ = line;
+#line 1351 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp47_->channel = -1;
+#line 1352 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 11591 "scanner.c"
+ }
+#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_FRAME_RED:
+#line 11595 "scanner.c"
+ {
+ ScanLine* _tmp48_ = NULL;
+#line 1354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_ = line;
+#line 1354 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_->channel = 0;
+#line 1355 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 11604 "scanner.c"
+ }
+#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_FRAME_GREEN:
+#line 11608 "scanner.c"
+ {
+ ScanLine* _tmp49_ = NULL;
+#line 1357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp49_ = line;
+#line 1357 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp49_->channel = 1;
+#line 1358 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 11617 "scanner.c"
+ }
+#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SANE_FRAME_BLUE:
+#line 11621 "scanner.c"
+ {
+ ScanLine* _tmp50_ = NULL;
+#line 1360 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_ = line;
+#line 1360 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_->channel = 2;
+#line 1361 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 11630 "scanner.c"
+ }
+ default:
+#line 1345 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 11635 "scanner.c"
+ }
+#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_ = line;
+#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp52_ = self->priv->parameters;
+#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp53_ = _tmp52_.pixels_per_line;
+#line 1363 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_->width = _tmp53_;
+#line 1364 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_ = line;
+#line 1364 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp55_ = self->priv->parameters;
+#line 1364 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp56_ = _tmp55_.depth;
+#line 1364 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_->depth = _tmp56_;
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp57_ = line;
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp58_ = self->priv->buffer;
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp58__length1 = self->priv->buffer_length1;
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer = NULL;
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer_length1 = 0;
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp57_->data = (g_free (_tmp57_->data), NULL);
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp57_->data = _tmp58_;
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp57_->data_length1 = _tmp58__length1;
+#line 1366 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp59_ = line;
+#line 1366 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp60_ = self->priv->parameters;
+#line 1366 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp61_ = _tmp60_.bytes_per_line;
+#line 1366 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp59_->data_length = _tmp61_;
+#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp62_ = line;
+#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp63_ = self->priv->line_count;
+#line 1367 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp62_->number = _tmp63_;
+#line 1368 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp64_ = line;
+#line 1368 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp65_ = self->priv->n_used;
+#line 1368 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp66_ = line;
+#line 1368 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp67_ = _tmp66_->data_length;
+#line 1368 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp64_->n_lines = _tmp65_ / _tmp67_;
+#line 1370 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp68_ = self->priv->line_count;
+#line 1370 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp69_ = line;
+#line 1370 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp70_ = _tmp69_->n_lines;
+#line 1370 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->line_count = _tmp68_ + _tmp70_;
+#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp71_ = line;
+#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp72_ = _tmp71_->data;
+#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp72__length1 = _tmp71_->data_length1;
+#line 1373 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ buffer_size = _tmp72__length1;
+#line 1374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp73_ = full_read;
+#line 1374 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp73_) {
+#line 11713 "scanner.c"
+ gint _tmp74_ = 0;
+ SANE_Parameters _tmp75_ = {0};
+ gint _tmp76_ = 0;
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp74_ = buffer_size;
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp75_ = self->priv->parameters;
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp76_ = _tmp75_.bytes_per_line;
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ buffer_size = _tmp74_ + _tmp76_;
+#line 11725 "scanner.c"
+ }
+#line 1377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp77_ = buffer_size;
+#line 1377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp78_ = g_new0 (guchar, _tmp77_);
+#line 1377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer = (g_free (self->priv->buffer), NULL);
+#line 1377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer = _tmp78_;
+#line 1377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer_length1 = _tmp77_;
+#line 1377 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->_buffer_size_ = self->priv->buffer_length1;
+#line 1378 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp79_ = self->priv->n_used;
+#line 1378 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp80_ = line;
+#line 1378 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp81_ = _tmp80_->n_lines;
+#line 1378 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp82_ = line;
+#line 1378 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp83_ = _tmp82_->data_length;
+#line 1378 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ n_remaining = _tmp79_ - (_tmp81_ * _tmp83_);
+#line 1379 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->n_used = 0;
+#line 11753 "scanner.c"
+ {
+ gint i = 0;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 11758 "scanner.c"
+ {
+ gboolean _tmp84_ = FALSE;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp84_ = TRUE;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 11765 "scanner.c"
+ gint _tmp86_ = 0;
+ gint _tmp87_ = 0;
+ guchar* _tmp88_ = NULL;
+ gint _tmp88__length1 = 0;
+ gint _tmp89_ = 0;
+ ScanLine* _tmp90_ = NULL;
+ guchar* _tmp91_ = NULL;
+ gint _tmp91__length1 = 0;
+ gint _tmp92_ = 0;
+ ScanLine* _tmp93_ = NULL;
+ gint _tmp94_ = 0;
+ ScanLine* _tmp95_ = NULL;
+ gint _tmp96_ = 0;
+ guchar _tmp97_ = '\0';
+ guchar _tmp98_ = '\0';
+ gint _tmp99_ = 0;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp84_) {
+#line 11784 "scanner.c"
+ gint _tmp85_ = 0;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp85_ = i;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp85_ + 1;
+#line 11790 "scanner.c"
+ }
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp84_ = FALSE;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp86_ = i;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp87_ = n_remaining;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(_tmp86_ < _tmp87_)) {
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 11802 "scanner.c"
+ }
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp88_ = self->priv->buffer;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp88__length1 = self->priv->buffer_length1;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp89_ = i;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp90_ = line;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp91_ = _tmp90_->data;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp91__length1 = _tmp90_->data_length1;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp92_ = i;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp93_ = line;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp94_ = _tmp93_->n_lines;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp95_ = line;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp96_ = _tmp95_->data_length;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp97_ = _tmp91_[_tmp92_ + (_tmp94_ * _tmp96_)];
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp88_[_tmp89_] = _tmp97_;
+#line 1382 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp98_ = _tmp88_[_tmp89_];
+#line 1383 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp99_ = self->priv->n_used;
+#line 1383 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->n_used = _tmp99_ + 1;
+#line 11836 "scanner.c"
+ }
+ }
+ }
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp103_ = self->priv->parameters;
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp104_ = _tmp103_.depth;
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp104_ == 8) {
+#line 11846 "scanner.c"
+ SANE_Parameters _tmp105_ = {0};
+ SANE_Frame _tmp106_ = 0;
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp105_ = self->priv->parameters;
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp106_ = _tmp105_.format;
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp102_ = _tmp106_ == SANE_FRAME_GRAY;
+#line 11855 "scanner.c"
+ } else {
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp102_ = FALSE;
+#line 11859 "scanner.c"
+ }
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp102_) {
+#line 11863 "scanner.c"
+ ScanJob* _tmp107_ = NULL;
+ gint _tmp108_ = 0;
+#line 1389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp107_ = job;
+#line 1389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp108_ = _tmp107_->depth;
+#line 1389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp101_ = _tmp108_ == 2;
+#line 11872 "scanner.c"
+ } else {
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp101_ = FALSE;
+#line 11876 "scanner.c"
+ }
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp101_) {
+#line 11880 "scanner.c"
+ ScanJob* _tmp109_ = NULL;
+ ScanMode _tmp110_ = 0;
+#line 1389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp109_ = job;
+#line 1389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp110_ = _tmp109_->scan_mode;
+#line 1389 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp100_ = _tmp110_ == SCAN_MODE_GRAY;
+#line 11889 "scanner.c"
+ } else {
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp100_ = FALSE;
+#line 11893 "scanner.c"
+ }
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp100_) {
+#line 11897 "scanner.c"
+ guchar block = '\0';
+ gint write_offset = 0;
+ gint block_shift = 0;
+ ScanLine* _tmp150_ = NULL;
+ ScanLine* _tmp151_ = NULL;
+ gint _tmp152_ = 0;
+#line 1391 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ block = (guchar) 0;
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ write_offset = 0;
+#line 1393 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ block_shift = 6;
+#line 11910 "scanner.c"
+ {
+ gint i = 0;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = 0;
+#line 11915 "scanner.c"
+ {
+ gboolean _tmp111_ = FALSE;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp111_ = TRUE;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 11922 "scanner.c"
+ gint _tmp113_ = 0;
+ ScanLine* _tmp114_ = NULL;
+ gint _tmp115_ = 0;
+ gint offset = 0;
+ gint _tmp116_ = 0;
+ ScanLine* _tmp117_ = NULL;
+ gint _tmp118_ = 0;
+ gint _tmp143_ = 0;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp111_) {
+#line 11933 "scanner.c"
+ gint _tmp112_ = 0;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp112_ = i;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ i = _tmp112_ + 1;
+#line 11939 "scanner.c"
+ }
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp111_ = FALSE;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp113_ = i;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp114_ = line;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp115_ = _tmp114_->n_lines;
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(_tmp113_ < _tmp115_)) {
+#line 1394 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 11953 "scanner.c"
+ }
+#line 1396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp116_ = i;
+#line 1396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp117_ = line;
+#line 1396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp118_ = _tmp117_->data_length;
+#line 1396 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ offset = _tmp116_ * _tmp118_;
+#line 11963 "scanner.c"
+ {
+ gint x = 0;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ x = 0;
+#line 11968 "scanner.c"
+ {
+ gboolean _tmp119_ = FALSE;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp119_ = TRUE;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 11975 "scanner.c"
+ gint _tmp121_ = 0;
+ ScanLine* _tmp122_ = NULL;
+ gint _tmp123_ = 0;
+ guchar p = '\0';
+ ScanLine* _tmp124_ = NULL;
+ guchar* _tmp125_ = NULL;
+ gint _tmp125__length1 = 0;
+ gint _tmp126_ = 0;
+ gint _tmp127_ = 0;
+ guchar _tmp128_ = '\0';
+ guchar sample = '\0';
+ guchar _tmp129_ = '\0';
+ guchar _tmp132_ = '\0';
+ guchar _tmp133_ = '\0';
+ gint _tmp134_ = 0;
+ gint _tmp135_ = 0;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp119_) {
+#line 11994 "scanner.c"
+ gint _tmp120_ = 0;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp120_ = x;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ x = _tmp120_ + 1;
+#line 12000 "scanner.c"
+ }
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp119_ = FALSE;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp121_ = x;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp122_ = line;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp123_ = _tmp122_->width;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!(_tmp121_ < _tmp123_)) {
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12014 "scanner.c"
+ }
+#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp124_ = line;
+#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp125_ = _tmp124_->data;
+#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp125__length1 = _tmp124_->data_length1;
+#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp126_ = offset;
+#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp127_ = x;
+#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp128_ = _tmp125_[_tmp126_ + _tmp127_];
+#line 1399 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ p = _tmp128_;
+#line 1402 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp129_ = p;
+#line 1402 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (((gint) _tmp129_) >= 192) {
+#line 1403 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ sample = (guchar) 3;
+#line 12036 "scanner.c"
+ } else {
+ guchar _tmp130_ = '\0';
+#line 1404 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp130_ = p;
+#line 1404 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (((gint) _tmp130_) >= 128) {
+#line 1405 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ sample = (guchar) 2;
+#line 12045 "scanner.c"
+ } else {
+ guchar _tmp131_ = '\0';
+#line 1406 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp131_ = p;
+#line 1406 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (((gint) _tmp131_) >= 64) {
+#line 1407 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ sample = (guchar) 1;
+#line 12054 "scanner.c"
+ } else {
+#line 1409 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ sample = (guchar) 0;
+#line 12058 "scanner.c"
+ }
+ }
+ }
+#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp132_ = block;
+#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp133_ = sample;
+#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp134_ = block_shift;
+#line 1411 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ block = _tmp132_ | (_tmp133_ << _tmp134_);
+#line 1412 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp135_ = block_shift;
+#line 1412 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp135_ == 0) {
+#line 12074 "scanner.c"
+ ScanLine* _tmp136_ = NULL;
+ guchar* _tmp137_ = NULL;
+ gint _tmp137__length1 = 0;
+ gint _tmp138_ = 0;
+ guchar _tmp139_ = '\0';
+ guchar _tmp140_ = '\0';
+ gint _tmp141_ = 0;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp136_ = line;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp137_ = _tmp136_->data;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp137__length1 = _tmp136_->data_length1;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp138_ = write_offset;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp139_ = block;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp137_[_tmp138_] = _tmp139_;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp140_ = _tmp137_[_tmp138_];
+#line 1415 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp141_ = write_offset;
+#line 1415 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ write_offset = _tmp141_ + 1;
+#line 1416 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ block = (guchar) 0;
+#line 1417 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ block_shift = 6;
+#line 12104 "scanner.c"
+ } else {
+ gint _tmp142_ = 0;
+#line 1420 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp142_ = block_shift;
+#line 1420 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ block_shift = _tmp142_ - 2;
+#line 12111 "scanner.c"
+ }
+ }
+ }
+ }
+#line 1424 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp143_ = block_shift;
+#line 1424 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp143_ != 6) {
+#line 12120 "scanner.c"
+ ScanLine* _tmp144_ = NULL;
+ guchar* _tmp145_ = NULL;
+ gint _tmp145__length1 = 0;
+ gint _tmp146_ = 0;
+ guchar _tmp147_ = '\0';
+ guchar _tmp148_ = '\0';
+ gint _tmp149_ = 0;
+#line 1426 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp144_ = line;
+#line 1426 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp145_ = _tmp144_->data;
+#line 1426 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp145__length1 = _tmp144_->data_length1;
+#line 1426 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp146_ = write_offset;
+#line 1426 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp147_ = block;
+#line 1426 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp145_[_tmp146_] = _tmp147_;
+#line 1426 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp148_ = _tmp145_[_tmp146_];
+#line 1427 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp149_ = write_offset;
+#line 1427 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ write_offset = _tmp149_ + 1;
+#line 1428 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ block = (guchar) 0;
+#line 1429 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ block_shift = 6;
+#line 12150 "scanner.c"
+ }
+ }
+ }
+ }
+#line 1433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp150_ = line;
+#line 1433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp151_ = line;
+#line 1433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp152_ = _tmp151_->width;
+#line 1433 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp150_->data_length = ((_tmp152_ * 2) + 7) / 8;
+#line 12163 "scanner.c"
+ }
+#line 1436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp153_ = job;
+#line 1436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp154_ = _tmp153_->id;
+#line 1436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp155_ = line;
+#line 1436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp156_ = notify_got_line_new (_tmp154_, _tmp155_);
+#line 1436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp157_ = _tmp156_;
+#line 1436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_notify (self, (Notify*) _tmp157_);
+#line 1436 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _notify_unref0 (_tmp157_);
+#line 1342 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_line_unref0 (line);
+#line 12181 "scanner.c"
+ }
+#line 1303 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (job);
+#line 12185 "scanner.c"
+}
+
+
+static void _scanner_authorization_cb_sane_authcallback (const gchar* resource, gchar* username, gchar* password) {
+#line 1445 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_authorization_cb (resource, username, -1, password, -1);
+#line 12192 "scanner.c"
+}
+
+
+static void* scanner_scan_thread (Scanner* self) {
+ void* result = NULL;
+ SANE_Int version_code = {0};
+ SANE_Status status = 0;
+ SANE_Int _tmp0_ = {0};
+ SANE_Status _tmp1_ = 0;
+ SANE_Status _tmp2_ = 0;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ SANE_Status _tmp5_ = 0;
+ SANE_Int _tmp8_ = {0};
+ gint _tmp9_ = 0;
+ SANE_Int _tmp10_ = {0};
+ gint _tmp11_ = 0;
+ SANE_Int _tmp12_ = {0};
+ gint _tmp13_ = 0;
+#line 1440 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1442 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_IDLE;
+#line 1445 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = sane_init (&_tmp0_, _scanner_authorization_cb_sane_authcallback);
+#line 1445 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ version_code = _tmp0_;
+#line 1445 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ status = _tmp1_;
+#line 1446 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = status;
+#line 1446 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = sane_status_to_string (_tmp2_);
+#line 1446 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_;
+#line 1446 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1446: sane_init () -> %s", _tmp4_);
+#line 1446 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp4_);
+#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = status;
+#line 1447 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp5_ != SANE_STATUS_GOOD) {
+#line 12236 "scanner.c"
+ SANE_Status _tmp6_ = 0;
+ const gchar* _tmp7_ = NULL;
+#line 1449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = status;
+#line 1449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = sane_strstatus (_tmp6_);
+#line 1449 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_warning ("scanner.vala:1449: Unable to initialize SANE backend: %s", _tmp7_);
+#line 1450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = NULL;
+#line 1450 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12249 "scanner.c"
+ }
+#line 1452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = version_code;
+#line 1452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = SANE_VERSION_MAJOR (_tmp8_);
+#line 1452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = version_code;
+#line 1452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = SANE_VERSION_MINOR (_tmp10_);
+#line 1452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = version_code;
+#line 1452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = SANE_VERSION_BUILD (_tmp12_);
+#line 1452 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1452: SANE version %d.%d.%d", _tmp9_, _tmp11_, _tmp13_);
+#line 1458 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_redetect (self);
+#line 1460 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ while (TRUE) {
+#line 12269 "scanner.c"
+ gboolean _tmp14_ = FALSE;
+ ScanState _tmp15_ = 0;
+#line 1460 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = scanner_handle_requests (self);
+#line 1460 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!_tmp14_) {
+#line 1460 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12278 "scanner.c"
+ }
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = self->priv->state;
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ switch (_tmp15_) {
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_STATE_IDLE:
+#line 12286 "scanner.c"
+ {
+ GList* _tmp16_ = NULL;
+#line 1465 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = self->priv->job_queue;
+#line 1465 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp16_ != NULL) {
+#line 1467 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_set_scanning (self, TRUE);
+#line 1468 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->state = SCAN_STATE_OPEN;
+#line 12297 "scanner.c"
+ }
+#line 1470 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12301 "scanner.c"
+ }
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_STATE_REDETECT:
+#line 12305 "scanner.c"
+ {
+#line 1472 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_do_redetect (self);
+#line 1473 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12311 "scanner.c"
+ }
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_STATE_OPEN:
+#line 12315 "scanner.c"
+ {
+#line 1475 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_do_open (self);
+#line 1476 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12321 "scanner.c"
+ }
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_STATE_GET_OPTION:
+#line 12325 "scanner.c"
+ {
+#line 1478 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_do_get_option (self);
+#line 1479 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12331 "scanner.c"
+ }
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_STATE_START:
+#line 12335 "scanner.c"
+ {
+#line 1481 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_do_start (self);
+#line 1482 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12341 "scanner.c"
+ }
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_STATE_GET_PARAMETERS:
+#line 12345 "scanner.c"
+ {
+#line 1484 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_do_get_parameters (self);
+#line 1485 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12351 "scanner.c"
+ }
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_STATE_READ:
+#line 12355 "scanner.c"
+ {
+#line 1487 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_do_read (self);
+#line 1488 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12361 "scanner.c"
+ }
+ default:
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ break;
+#line 12366 "scanner.c"
+ }
+ }
+#line 1492 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = NULL;
+#line 1492 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12373 "scanner.c"
+}
+
+
+static gpointer _scanner_scan_thread_gthread_func (gpointer self) {
+ gpointer result;
+ result = scanner_scan_thread ((Scanner*) self);
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_unref (self);
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12384 "scanner.c"
+}
+
+
+void scanner_start (Scanner* self) {
+ GError * _inner_error_ = NULL;
+#line 1495 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 12392 "scanner.c"
+ {
+ GThread* _tmp0_ = NULL;
+ GThread* _tmp1_ = NULL;
+ GThread* _tmp2_ = NULL;
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = g_thread_try_new ("scan-thread", _scanner_scan_thread_gthread_func, scanner_ref (self), &_inner_error_);
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = _tmp1_;
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_inner_error_ != NULL) {
+#line 12403 "scanner.c"
+ goto __catch15_g_error;
+ }
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = _tmp0_;
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = NULL;
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_thread_unref0 (self->priv->thread);
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->thread = _tmp2_;
+#line 1497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_thread_unref0 (_tmp0_);
+#line 12416 "scanner.c"
+ }
+ goto __finally15;
+ __catch15_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+#line 1497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ e = _inner_error_;
+#line 1497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _inner_error_ = NULL;
+#line 1503 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = e;
+#line 1503 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_->message;
+#line 1503 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_critical ("scanner.vala:1503: Unable to create thread: %s", _tmp4_);
+#line 1497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_error_free0 (e);
+#line 12436 "scanner.c"
+ }
+ __finally15:
+#line 1497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_inner_error_ != NULL) {
+#line 1497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_clear_error (&_inner_error_);
+#line 1497 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 12447 "scanner.c"
+ }
+}
+
+
+void scanner_redetect (Scanner* self) {
+ gboolean _tmp0_ = FALSE;
+ GAsyncQueue* _tmp1_ = NULL;
+ RequestRedetect* _tmp2_ = NULL;
+#line 1507 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 1509 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->need_redetect;
+#line 1509 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp0_) {
+#line 1510 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return;
+#line 12464 "scanner.c"
+ }
+#line 1511 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->need_redetect = TRUE;
+#line 1513 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1513: Requesting redetection of scan devices");
+#line 1515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->request_queue;
+#line 1515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = request_redetect_new ();
+#line 1515 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_async_queue_push (_tmp1_, (Request*) _tmp2_);
+#line 12476 "scanner.c"
+}
+
+
+gboolean scanner_is_scanning (Scanner* self) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 1518 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 1520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->scanning;
+#line 1520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp0_;
+#line 1520 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12491 "scanner.c"
+}
+
+
+static gchar* scanner_get_scan_mode_string (Scanner* self, ScanMode mode) {
+ gchar* result = NULL;
+ ScanMode _tmp0_ = 0;
+#line 1523 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1525 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = mode;
+#line 1525 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ switch (_tmp0_) {
+#line 1525 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_MODE_DEFAULT:
+#line 12506 "scanner.c"
+ {
+ gchar* _tmp1_ = NULL;
+#line 1528 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = g_strdup ("ScanMode.DEFAULT");
+#line 1528 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp1_;
+#line 1528 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12515 "scanner.c"
+ }
+#line 1525 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_MODE_COLOR:
+#line 12519 "scanner.c"
+ {
+ gchar* _tmp2_ = NULL;
+#line 1530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = g_strdup ("ScanMode.COLOR");
+#line 1530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp2_;
+#line 1530 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12528 "scanner.c"
+ }
+#line 1525 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_MODE_GRAY:
+#line 12532 "scanner.c"
+ {
+ gchar* _tmp3_ = NULL;
+#line 1532 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = g_strdup ("ScanMode.GRAY");
+#line 1532 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp3_;
+#line 1532 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12541 "scanner.c"
+ }
+#line 1525 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_MODE_LINEART:
+#line 12545 "scanner.c"
+ {
+ gchar* _tmp4_ = NULL;
+#line 1534 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = g_strdup ("ScanMode.LINEART");
+#line 1534 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp4_;
+#line 1534 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12554 "scanner.c"
+ }
+ default:
+ {
+ ScanMode _tmp5_ = 0;
+ gchar* _tmp6_ = NULL;
+#line 1536 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = mode;
+#line 1536 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = g_strdup_printf ("%d", (gint) _tmp5_);
+#line 1536 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp6_;
+#line 1536 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12568 "scanner.c"
+ }
+ }
+}
+
+
+static gchar* scanner_get_scan_type_string (Scanner* self, ScanType type) {
+ gchar* result = NULL;
+ ScanType _tmp0_ = 0;
+#line 1540 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = type;
+#line 1542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ switch (_tmp0_) {
+#line 1542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_TYPE_SINGLE:
+#line 12585 "scanner.c"
+ {
+ gchar* _tmp1_ = NULL;
+#line 1545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = g_strdup ("ScanType.SINGLE");
+#line 1545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp1_;
+#line 1545 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12594 "scanner.c"
+ }
+#line 1542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_TYPE_ADF_FRONT:
+#line 12598 "scanner.c"
+ {
+ gchar* _tmp2_ = NULL;
+#line 1547 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = g_strdup ("ScanType.ADF_FRONT");
+#line 1547 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp2_;
+#line 1547 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12607 "scanner.c"
+ }
+#line 1542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_TYPE_ADF_BACK:
+#line 12611 "scanner.c"
+ {
+ gchar* _tmp3_ = NULL;
+#line 1549 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = g_strdup ("ScanType.ADF_BACK");
+#line 1549 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp3_;
+#line 1549 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12620 "scanner.c"
+ }
+#line 1542 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ case SCAN_TYPE_ADF_BOTH:
+#line 12624 "scanner.c"
+ {
+ gchar* _tmp4_ = NULL;
+#line 1551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = g_strdup ("ScanType.ADF_BOTH");
+#line 1551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp4_;
+#line 1551 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12633 "scanner.c"
+ }
+ default:
+ {
+ ScanType _tmp5_ = 0;
+ gchar* _tmp6_ = NULL;
+#line 1553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = type;
+#line 1553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = g_strdup_printf ("%d", (gint) _tmp5_);
+#line 1553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ result = _tmp6_;
+#line 1553 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return result;
+#line 12647 "scanner.c"
+ }
+ }
+}
+
+
+void scanner_scan (Scanner* self, const gchar* device, ScanOptions* options) {
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ ScanOptions* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ ScanOptions* _tmp5_ = NULL;
+ ScanMode _tmp6_ = 0;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ ScanOptions* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ ScanOptions* _tmp11_ = NULL;
+ ScanType _tmp12_ = 0;
+ gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ ScanOptions* _tmp15_ = NULL;
+ gint _tmp16_ = 0;
+ ScanOptions* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+ ScanOptions* _tmp19_ = NULL;
+ gint _tmp20_ = 0;
+ ScanOptions* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ RequestStartScan* request = NULL;
+ RequestStartScan* _tmp23_ = NULL;
+ ScanJob* _tmp24_ = NULL;
+ ScanJob* _tmp25_ = NULL;
+ gint _tmp26_ = 0;
+ ScanJob* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
+ gchar* _tmp29_ = NULL;
+ ScanJob* _tmp30_ = NULL;
+ ScanOptions* _tmp31_ = NULL;
+ gint _tmp32_ = 0;
+ ScanJob* _tmp33_ = NULL;
+ ScanOptions* _tmp34_ = NULL;
+ ScanMode _tmp35_ = 0;
+ ScanJob* _tmp36_ = NULL;
+ ScanOptions* _tmp37_ = NULL;
+ gint _tmp38_ = 0;
+ ScanJob* _tmp39_ = NULL;
+ ScanOptions* _tmp40_ = NULL;
+ ScanType _tmp41_ = 0;
+ ScanJob* _tmp42_ = NULL;
+ ScanOptions* _tmp43_ = NULL;
+ gint _tmp44_ = 0;
+ ScanJob* _tmp45_ = NULL;
+ ScanOptions* _tmp46_ = NULL;
+ gint _tmp47_ = 0;
+ ScanJob* _tmp48_ = NULL;
+ ScanOptions* _tmp49_ = NULL;
+ gint _tmp50_ = 0;
+ ScanJob* _tmp51_ = NULL;
+ ScanOptions* _tmp52_ = NULL;
+ gint _tmp53_ = 0;
+ GAsyncQueue* _tmp54_ = NULL;
+ Request* _tmp55_ = NULL;
+#line 1557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 1557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (options != NULL);
+#line 1560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = device;
+#line 1560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp1_ != NULL) {
+#line 12718 "scanner.c"
+ const gchar* _tmp2_ = NULL;
+#line 1560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = device;
+#line 1560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = _tmp2_;
+#line 12724 "scanner.c"
+ } else {
+#line 1560 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = "(null)";
+#line 12728 "scanner.c"
+ }
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = options;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _tmp3_->dpi;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp5_ = options;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp6_ = _tmp5_->scan_mode;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp7_ = scanner_get_scan_mode_string (self, _tmp6_);
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp8_ = _tmp7_;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp9_ = options;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp10_ = _tmp9_->depth;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp11_ = options;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp12_ = _tmp11_->type;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp13_ = scanner_get_scan_type_string (self, _tmp12_);
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp14_ = _tmp13_;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp15_ = options;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp16_ = _tmp15_->paper_width;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp17_ = options;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp18_ = _tmp17_->paper_height;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp19_ = options;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp20_ = _tmp19_->brightness;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp21_ = options;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp22_ = _tmp21_->contrast;
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1559: Scanner.scan (\"%s\", dpi=%d, scan_mode=%s, depth=%" \
+"d, type=%s, paper_width=%d, paper_height=%d, brightness=%d, contrast=%" \
+"d)", _tmp0_, _tmp4_, _tmp8_, _tmp10_, _tmp14_, _tmp16_, _tmp18_, _tmp20_, _tmp22_);
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp14_);
+#line 1559 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp8_);
+#line 1563 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp23_ = request_start_scan_new ();
+#line 1563 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request = _tmp23_;
+#line 1564 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp24_ = scan_job_new ();
+#line 1564 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _scan_job_unref0 (request->job);
+#line 1564 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ request->job = _tmp24_;
+#line 1565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_ = request->job;
+#line 1565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp26_ = self->job_id;
+#line 1565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->job_id = _tmp26_ + 1;
+#line 1565 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp25_->id = _tmp26_;
+#line 1566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_ = request->job;
+#line 1566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp28_ = device;
+#line 1566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp29_ = g_strdup (_tmp28_);
+#line 1566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (_tmp27_->device);
+#line 1566 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp27_->device = _tmp29_;
+#line 1567 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_ = request->job;
+#line 1567 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp31_ = options;
+#line 1567 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp32_ = _tmp31_->dpi;
+#line 1567 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp30_->dpi = (gdouble) _tmp32_;
+#line 1568 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_ = request->job;
+#line 1568 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp34_ = options;
+#line 1568 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp35_ = _tmp34_->scan_mode;
+#line 1568 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp33_->scan_mode = _tmp35_;
+#line 1569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_ = request->job;
+#line 1569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp37_ = options;
+#line 1569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp38_ = _tmp37_->depth;
+#line 1569 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp36_->depth = _tmp38_;
+#line 1570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_ = request->job;
+#line 1570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp40_ = options;
+#line 1570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp41_ = _tmp40_->type;
+#line 1570 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp39_->type = _tmp41_;
+#line 1571 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp42_ = request->job;
+#line 1571 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp43_ = options;
+#line 1571 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp44_ = _tmp43_->paper_width;
+#line 1571 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp42_->page_width = _tmp44_;
+#line 1572 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_ = request->job;
+#line 1572 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp46_ = options;
+#line 1572 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp47_ = _tmp46_->paper_height;
+#line 1572 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp45_->page_height = _tmp47_;
+#line 1573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_ = request->job;
+#line 1573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp49_ = options;
+#line 1573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp50_ = _tmp49_->brightness;
+#line 1573 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp48_->brightness = _tmp50_;
+#line 1574 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_ = request->job;
+#line 1574 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp52_ = options;
+#line 1574 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp53_ = _tmp52_->contrast;
+#line 1574 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp51_->contrast = _tmp53_;
+#line 1575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp54_ = self->priv->request_queue;
+#line 1575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp55_ = _request_ref0 ((Request*) request);
+#line 1575 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_async_queue_push (_tmp54_, _tmp55_);
+#line 1557 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _request_unref0 (request);
+#line 12876 "scanner.c"
+}
+
+
+void scanner_cancel (Scanner* self) {
+ gint _tmp0_ = 0;
+ GAsyncQueue* _tmp1_ = NULL;
+ RequestCancel* _tmp2_ = NULL;
+#line 1578 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 1580 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->job_id;
+#line 1580 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->first_job_id = _tmp0_;
+#line 1581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = self->priv->request_queue;
+#line 1581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = request_cancel_new ();
+#line 1581 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_async_queue_push (_tmp1_, (Request*) _tmp2_);
+#line 12896 "scanner.c"
+}
+
+
+static gpointer _g_thread_ref0 (gpointer self) {
+#line 1592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return self ? g_thread_ref (self) : NULL;
+#line 12903 "scanner.c"
+}
+
+
+void scanner_free (Scanner* self) {
+ GAsyncQueue* _tmp0_ = NULL;
+ RequestQuit* _tmp1_ = NULL;
+ GThread* _tmp2_ = NULL;
+#line 1584 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (self != NULL);
+#line 1586 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1586: Stopping scan thread");
+#line 1588 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp0_ = self->priv->request_queue;
+#line 1588 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp1_ = request_quit_new ();
+#line 1588 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_async_queue_push (_tmp0_, (Request*) _tmp1_);
+#line 1590 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp2_ = self->priv->thread;
+#line 1590 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (_tmp2_ != NULL) {
+#line 12925 "scanner.c"
+ GThread* _tmp3_ = NULL;
+ GThread* _tmp4_ = NULL;
+#line 1592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp3_ = self->priv->thread;
+#line 1592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _tmp4_ = _g_thread_ref0 (_tmp3_);
+#line 1592 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_thread_join (_tmp4_);
+#line 1593 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_thread_unref0 (self->priv->thread);
+#line 1593 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->thread = NULL;
+#line 12938 "scanner.c"
+ }
+#line 1596 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ sane_exit ();
+#line 1597 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_debug ("scanner.vala:1597: sane_exit ()");
+#line 12944 "scanner.c"
+}
+
+
+static void g_cclosure_user_marshal_VOID__SCAN_PAGE_INFO (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__SCAN_PAGE_INFO) (gpointer data1, gpointer arg_1, gpointer data2);
+ register GMarshalFunc_VOID__SCAN_PAGE_INFO callback;
+ register GCClosure * cc;
+ register gpointer data1;
+ register gpointer data2;
+ cc = (GCClosure *) closure;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (n_param_values == 2);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data1 = closure->data;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data2 = param_values->data[0].v_pointer;
+#line 12963 "scanner.c"
+ } else {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data1 = param_values->data[0].v_pointer;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data2 = closure->data;
+#line 12969 "scanner.c"
+ }
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ callback = (GMarshalFunc_VOID__SCAN_PAGE_INFO) (marshal_data ? marshal_data : cc->callback);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ callback (data1, value_get_scan_page_info (param_values + 1), data2);
+#line 12975 "scanner.c"
+}
+
+
+static void g_cclosure_user_marshal_VOID__SCAN_LINE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__SCAN_LINE) (gpointer data1, gpointer arg_1, gpointer data2);
+ register GMarshalFunc_VOID__SCAN_LINE callback;
+ register GCClosure * cc;
+ register gpointer data1;
+ register gpointer data2;
+ cc = (GCClosure *) closure;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (n_param_values == 2);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data1 = closure->data;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data2 = param_values->data[0].v_pointer;
+#line 12994 "scanner.c"
+ } else {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data1 = param_values->data[0].v_pointer;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data2 = closure->data;
+#line 13000 "scanner.c"
+ }
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ callback = (GMarshalFunc_VOID__SCAN_LINE) (marshal_data ? marshal_data : cc->callback);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ callback (data1, value_get_scan_line (param_values + 1), data2);
+#line 13006 "scanner.c"
+}
+
+
+static void g_cclosure_user_marshal_VOID__INT_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__INT_STRING) (gpointer data1, gint arg_1, const char* arg_2, gpointer data2);
+ register GMarshalFunc_VOID__INT_STRING callback;
+ register GCClosure * cc;
+ register gpointer data1;
+ register gpointer data2;
+ cc = (GCClosure *) closure;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (n_param_values == 3);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data1 = closure->data;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data2 = param_values->data[0].v_pointer;
+#line 13025 "scanner.c"
+ } else {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data1 = param_values->data[0].v_pointer;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ data2 = closure->data;
+#line 13031 "scanner.c"
+ }
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ callback = (GMarshalFunc_VOID__INT_STRING) (marshal_data ? marshal_data : cc->callback);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ callback (data1, g_value_get_int (param_values + 1), g_value_get_string (param_values + 2), data2);
+#line 13037 "scanner.c"
+}
+
+
+static void value_scanner_init (GValue* value) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 13044 "scanner.c"
+}
+
+
+static void value_scanner_free_value (GValue* value) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (value->data[0].v_pointer) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_unref (value->data[0].v_pointer);
+#line 13053 "scanner.c"
+ }
+}
+
+
+static void value_scanner_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (src_value->data[0].v_pointer) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = scanner_ref (src_value->data[0].v_pointer);
+#line 13063 "scanner.c"
+ } else {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 13067 "scanner.c"
+ }
+}
+
+
+static gpointer value_scanner_peek_pointer (const GValue* value) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 13075 "scanner.c"
+}
+
+
+static gchar* value_scanner_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (collect_values[0].v_pointer) {
+#line 13082 "scanner.c"
+ Scanner* object;
+ object = collect_values[0].v_pointer;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 13089 "scanner.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.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 13093 "scanner.c"
+ }
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = scanner_ref (object);
+#line 13097 "scanner.c"
+ } else {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 13101 "scanner.c"
+ }
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 13105 "scanner.c"
+}
+
+
+static gchar* value_scanner_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ Scanner** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!object_p) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 13116 "scanner.c"
+ }
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (!value->data[0].v_pointer) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = NULL;
+#line 13122 "scanner.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = value->data[0].v_pointer;
+#line 13126 "scanner.c"
+ } else {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ *object_p = scanner_ref (value->data[0].v_pointer);
+#line 13130 "scanner.c"
+ }
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return NULL;
+#line 13134 "scanner.c"
+}
+
+
+GParamSpec* param_spec_scanner (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecScanner* spec;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_SCANNER), NULL);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return G_PARAM_SPEC (spec);
+#line 13148 "scanner.c"
+}
+
+
+gpointer value_get_scanner (const GValue* value) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCANNER), NULL);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return value->data[0].v_pointer;
+#line 13157 "scanner.c"
+}
+
+
+void value_set_scanner (GValue* value, gpointer v_object) {
+ Scanner* old;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCANNER));
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCANNER));
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_ref (value->data[0].v_pointer);
+#line 13177 "scanner.c"
+ } else {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 13181 "scanner.c"
+ }
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_unref (old);
+#line 13187 "scanner.c"
+ }
+}
+
+
+void value_take_scanner (GValue* value, gpointer v_object) {
+ Scanner* old;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SCANNER));
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ old = value->data[0].v_pointer;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (v_object) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SCANNER));
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = v_object;
+#line 13206 "scanner.c"
+ } else {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ value->data[0].v_pointer = NULL;
+#line 13210 "scanner.c"
+ }
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (old) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_unref (old);
+#line 13216 "scanner.c"
+ }
+}
+
+
+static void scanner_class_init (ScannerClass * klass) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ scanner_parent_class = g_type_class_peek_parent (klass);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCANNER_CLASS (klass)->finalize = scanner_finalize;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_class_add_private (klass, sizeof (ScannerPrivate));
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_new ("update_devices", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_new ("request_authorization", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_new ("expect_page", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_new ("got_page_info", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__SCAN_PAGE_INFO, G_TYPE_NONE, 1, TYPE_SCAN_PAGE_INFO);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_new ("got_line", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__SCAN_LINE, G_TYPE_NONE, 1, TYPE_SCAN_LINE);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_new ("scan_failed", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_STRING, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_STRING);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_new ("page_done", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_new ("document_done", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_signal_new ("scanning_changed", TYPE_SCANNER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 13246 "scanner.c"
+}
+
+
+static void scanner_instance_init (Scanner * self) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv = SCANNER_GET_PRIVATE (self);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->ref_count = 1;
+#line 13255 "scanner.c"
+}
+
+
+static void scanner_finalize (Scanner* obj) {
+ Scanner * self;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SCANNER, Scanner);
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_thread_unref0 (self->priv->thread);
+#line 217 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_async_queue_unref0 (self->priv->request_queue);
+#line 220 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_async_queue_unref0 (self->priv->notify_queue);
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_async_queue_unref0 (self->priv->authorize_queue);
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->default_device);
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ __g_list_free__scan_job_unref0_0 (self->priv->job_queue);
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_free0 (self->priv->current_device);
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ _g_hash_table_unref0 (self->priv->options);
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ self->priv->buffer = (g_free (self->priv->buffer), NULL);
+#line 13281 "scanner.c"
+}
+
+
+GType scanner_get_type (void) {
+ static volatile gsize scanner_type_id__volatile = 0;
+ if (g_once_init_enter (&scanner_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_scanner_init, value_scanner_free_value, value_scanner_copy_value, value_scanner_peek_pointer, "p", value_scanner_collect_value, "p", value_scanner_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (ScannerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) scanner_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Scanner), 0, (GInstanceInitFunc) scanner_instance_init, &g_define_type_value_table };
+ static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+ GType scanner_type_id;
+ scanner_type_id = g_type_register_fundamental (g_type_fundamental_next (), "Scanner", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&scanner_type_id__volatile, scanner_type_id);
+ }
+ return scanner_type_id__volatile;
+}
+
+
+gpointer scanner_ref (gpointer instance) {
+ Scanner* self;
+ self = instance;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ return instance;
+#line 13306 "scanner.c"
+}
+
+
+void scanner_unref (gpointer instance) {
+ Scanner* self;
+ self = instance;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ SCANNER_GET_CLASS (self)->finalize (self);
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/scanner.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 13319 "scanner.c"
+ }
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/src/scanner.vala b/src/scanner.vala
new file mode 100644
index 0000000..5fb7f00
--- /dev/null
+++ b/src/scanner.vala
@@ -0,0 +1,1599 @@
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+/* TODO: Could indicate the start of the next page immediately after the last page is received (i.e. before the sane_cancel()) */
+
+public class ScanDevice
+{
+ public string name;
+ public string label;
+}
+
+public class ScanPageInfo
+{
+ /* Width, height in pixels */
+ public int width;
+ public int height;
+
+ /* Bit depth */
+ public int depth;
+
+ /* Number of colour channels */
+ public int n_channels;
+
+ /* Resolution */
+ public double dpi;
+
+ /* The device this page came from */
+ public string device;
+}
+
+public class ScanLine
+{
+ /* Line number */
+ public int number;
+
+ /* Number of lines in this packet */
+ public int n_lines;
+
+ /* Width in pixels and format */
+ public int width;
+ public int depth;
+
+ /* Channel for this line or -1 for all channels */
+ public int channel;
+
+ /* Raw line data */
+ public uchar[] data;
+ public int data_length;
+}
+
+public enum ScanMode
+{
+ DEFAULT,
+ COLOR,
+ GRAY,
+ LINEART
+}
+
+public enum ScanType
+{
+ SINGLE,
+ ADF_FRONT,
+ ADF_BACK,
+ ADF_BOTH
+}
+
+public class ScanOptions
+{
+ public int dpi;
+ public ScanMode scan_mode;
+ public int depth;
+ public ScanType type;
+ public int paper_width;
+ public int paper_height;
+ public int brightness;
+ public int contrast;
+}
+
+private class ScanJob
+{
+ public int id;
+ public string device;
+ public double dpi;
+ public ScanMode scan_mode;
+ public int depth;
+ public ScanType type;
+ public int page_width;
+ public int page_height;
+ public int brightness;
+ public int contrast;
+}
+
+private class Request {}
+
+private class RequestRedetect : Request {}
+
+private class RequestCancel : Request {}
+
+private class RequestStartScan : Request
+{
+ public ScanJob job;
+}
+
+private class RequestQuit : Request {}
+
+private class Credentials
+{
+ public string username;
+ public string password;
+}
+
+private enum ScanState
+{
+ IDLE = 0,
+ REDETECT,
+ OPEN,
+ GET_OPTION,
+ START,
+ GET_PARAMETERS,
+ READ
+}
+
+private class Notify
+{
+ public virtual void run (Scanner scanner) {}
+}
+
+private class NotifyScanningChanged : Notify
+{
+ public override void run (Scanner scanner) { scanner.scanning_changed (); }
+}
+
+private class NotifyUpdateDevices : Notify
+{
+ public NotifyUpdateDevices (owned List<ScanDevice> devices) { this.devices = (owned) devices; }
+ private List<ScanDevice> devices;
+ public override void run (Scanner scanner) { scanner.update_devices (devices); }
+}
+
+private class NotifyRequestAuthorization : Notify
+{
+ public NotifyRequestAuthorization (string resource) { this.resource = resource; }
+ private string resource;
+ public override void run (Scanner scanner) { scanner.request_authorization (resource); }
+}
+
+private class NotifyScanFailed : Notify
+{
+ public NotifyScanFailed (int error_code, string error_string) { this.error_code = error_code; this.error_string = error_string; }
+ private int error_code;
+ private string error_string;
+ public override void run (Scanner scanner) { scanner.scan_failed (error_code, error_string); }
+}
+
+private class NotifyDocumentDone : Notify
+{
+ public override void run (Scanner scanner) { scanner.document_done (); }
+}
+
+private class NotifyExpectPage : Notify
+{
+ public override void run (Scanner scanner) { scanner.expect_page (); }
+}
+
+private class NotifyGotPageInfo : Notify
+{
+ public NotifyGotPageInfo (int job_id, ScanPageInfo info) { this.job_id = job_id; this.info = info; }
+ private int job_id;
+ private ScanPageInfo info;
+ public override void run (Scanner scanner)
+ {
+ if (job_id >= scanner.first_job_id && job_id < scanner.job_id)
+ scanner.got_page_info (info);
+ }
+}
+
+private class NotifyPageDone : Notify
+{
+ public NotifyPageDone (int job_id) { this.job_id = job_id; }
+ private int job_id;
+ public override void run (Scanner scanner)
+ {
+ if (job_id >= scanner.first_job_id && job_id < scanner.job_id)
+ scanner.page_done ();
+ }
+}
+
+private class NotifyGotLine : Notify
+{
+ public NotifyGotLine (int job_id, ScanLine line) { this.job_id = job_id; this.line = line; }
+ private int job_id;
+ private ScanLine line;
+ public override void run (Scanner scanner)
+ {
+ if (job_id >= scanner.first_job_id && job_id < scanner.job_id)
+ scanner.got_line (line);
+ }
+}
+
+public class Scanner
+{
+ /* Singleton object */
+ private static Scanner scanner_object = null;
+
+ /* Thread communicating with SANE */
+ private Thread<void*> thread;
+
+ /* Queue of requests from main thread */
+ private AsyncQueue<Request> request_queue;
+
+ /* Queue of events to notify in main queue */
+ private AsyncQueue<Notify> notify_queue;
+
+ /* Queue of responses to authorization requests */
+ private AsyncQueue<Credentials> authorize_queue;
+
+ /* ID for the current job */
+ public int first_job_id;
+ public int job_id;
+
+ private string? default_device;
+
+ private ScanState state;
+ private bool need_redetect;
+
+ private List<ScanJob> job_queue;
+
+ /* Handle to SANE device */
+ private Sane.Handle handle;
+ private bool have_handle;
+ private string? current_device;
+
+ private Sane.Parameters parameters;
+
+ /* Last option read */
+ private Sane.Int option_index;
+
+ /* Table of options */
+ private HashTable<string, int> options;
+
+ /* Buffer for received line */
+ private uchar[] buffer;
+ private int n_used;
+
+ //private int bytes_remaining;
+ private int line_count;
+ private int pass_number;
+ private int page_number;
+ private int notified_page;
+
+ private bool scanning;
+
+ public signal void update_devices (List<ScanDevice> devices);
+ public signal void request_authorization (string resource);
+ public signal void expect_page ();
+ public signal void got_page_info (ScanPageInfo info);
+ public signal void got_line (ScanLine line);
+ public signal void scan_failed (int error_code, string error_string);
+ public signal void page_done ();
+ public signal void document_done ();
+ public signal void scanning_changed ();
+
+ private Scanner ()
+ {
+ request_queue = new AsyncQueue<Request> ();
+ notify_queue = new AsyncQueue<Notify> ();
+ authorize_queue = new AsyncQueue<Credentials> ();
+ }
+
+ public static Scanner get_instance ()
+ {
+ if (scanner_object == null)
+ scanner_object = new Scanner ();
+ return scanner_object;
+ }
+
+ private bool notify_idle_cb ()
+ {
+ var notification = notify_queue.pop ();
+ notification.run (this);
+ return false;
+ }
+
+ private void notify (Notify notification)
+ {
+ notify_queue.push (notification);
+ Idle.add (notify_idle_cb);
+ }
+
+ private void set_scanning (bool is_scanning)
+ {
+ if ((scanning && !is_scanning) || (!scanning && is_scanning))
+ {
+ scanning = is_scanning;
+ notify (new NotifyScanningChanged ());
+ }
+ }
+
+ private static int get_device_weight (string device)
+ {
+ /* NOTE: This is using trends in the naming of SANE devices, SANE should be able to provide this information better */
+
+ /* Use webcams as a last resort */
+ if (device.has_prefix ("vfl:"))
+ return 2;
+
+ /* Use locally connected devices first */
+ if (device.contains ("usb"))
+ return 0;
+
+ return 1;
+ }
+
+ private static int compare_devices (ScanDevice device1, ScanDevice device2)
+ {
+ /* TODO: Should do some fuzzy matching on the last selected device and set that to the default */
+
+ var weight1 = get_device_weight (device1.name);
+ var weight2 = get_device_weight (device2.name);
+ if (weight1 != weight2)
+ return weight1 - weight2;
+
+ return strcmp (device1.label, device2.label);
+ }
+
+ private void do_redetect ()
+ {
+ unowned Sane.Device[] device_list = null;
+ var status = Sane.get_devices (out device_list, false);
+ debug ("sane_get_devices () -> %s", Sane.status_to_string (status));
+ if (status != Sane.Status.GOOD)
+ {
+ warning ("Unable to get SANE devices: %s", Sane.strstatus(status));
+ need_redetect = false;
+ state = ScanState.IDLE;
+ return;
+ }
+
+ var devices = new List<ScanDevice> ();
+ for (var i = 0; device_list[i] != null; i++)
+ {
+ debug ("Device: name=\"%s\" vendor=\"%s\" model=\"%s\" type=\"%s\"",
+ device_list[i].name, device_list[i].vendor, device_list[i].model, device_list[i].type);
+
+ var scan_device = new ScanDevice ();
+ scan_device.name = device_list[i].name;
+
+ /* Abbreviate HP as it is a long string and does not match what is on the physical scanner */
+ var vendor = device_list[i].vendor;
+ if (vendor == "Hewlett-Packard")
+ vendor = "HP";
+
+ scan_device.label = "%s %s".printf (vendor, device_list[i].model);
+ /* Replace underscores in name */
+ scan_device.label.replace ("_", " ");
+
+ devices.append (scan_device);
+ }
+
+ /* Sort devices by priority */
+ devices.sort (compare_devices);
+
+ need_redetect = false;
+ state = ScanState.IDLE;
+
+ if (devices != null)
+ {
+ var device = devices.nth_data (0);
+ default_device = device.name;
+ }
+ else
+ default_device = null;
+
+ notify (new NotifyUpdateDevices ((owned) devices));
+ }
+
+ private int scale_int (int source_min, int source_max, Sane.OptionDescriptor option, int value)
+ {
+ var v = value;
+
+ return_val_if_fail (option.type == Sane.ValueType.INT, value);
+
+ if (option.constraint_type == Sane.ConstraintType.RANGE && option.range.max != option.range.min)
+ {
+ v -= source_min;
+ v *= (int) (option.range.max - option.range.min);
+ v /= (source_max - source_min);
+ v += (int) option.range.min;
+ debug ("scale_int: scaling %d [min: %d, max: %d] to %d [min: %d, max: %d]",
+ value, source_min, source_max, v, (int) option.range.min, (int) option.range.max);
+ }
+
+ return v;
+ }
+
+ private bool set_default_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index)
+ {
+ /* Check if supports automatic option */
+ if ((option.cap & Sane.Capability.AUTOMATIC) == 0)
+ return false;
+
+ var status = Sane.control_option (handle, option_index, Sane.Action.SET_AUTO, null, null);
+ debug ("sane_control_option (%d, SANE_ACTION_SET_AUTO) -> %s", (int) option_index, Sane.status_to_string (status));
+ if (status != Sane.Status.GOOD)
+ warning ("Error setting default option %s: %s", option.name, Sane.strstatus(status));
+
+ return status == Sane.Status.GOOD;
+ }
+
+ private void set_bool_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index, bool value, out bool result)
+ {
+ return_if_fail (option.type == Sane.ValueType.BOOL);
+
+ Sane.Bool v = (Sane.Bool) value;
+ var status = Sane.control_option (handle, option_index, Sane.Action.SET_VALUE, &v, null);
+ result = (bool) v;
+ debug ("sane_control_option (%d, SANE_ACTION_SET_VALUE, %s) -> (%s, %s)", (int) option_index, value ? "SANE_TRUE" : "SANE_FALSE", Sane.status_to_string (status), result ? "SANE_TRUE" : "SANE_FALSE");
+ }
+
+ private void set_int_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index, int value, out int result)
+ {
+ return_if_fail (option.type == Sane.ValueType.INT);
+
+ Sane.Int v = (Sane.Int) value;
+ if (option.constraint_type == Sane.ConstraintType.RANGE)
+ {
+ if (option.range.quant != 0)
+ v *= option.range.quant;
+ if (v < option.range.min)
+ v = option.range.min;
+ if (v > option.range.max)
+ v = option.range.max;
+ }
+ else if (option.constraint_type == Sane.ConstraintType.WORD_LIST)
+ {
+ int distance = int.MAX, nearest = 0;
+
+ /* Find nearest value to requested */
+ for (var i = 0; i < option.word_list[0]; i++)
+ {
+ var x = (int) option.word_list[i+1];
+ var d = (int) (x - v);
+ d = d.abs ();
+ if (d < distance)
+ {
+ distance = d;
+ nearest = x;
+ }
+ }
+ v = (Sane.Int) nearest;
+ }
+
+ var status = Sane.control_option (handle, option_index, Sane.Action.SET_VALUE, &v, null);
+ debug ("sane_control_option (%d, SANE_ACTION_SET_VALUE, %d) -> (%s, %d)", (int) option_index, value, Sane.status_to_string (status), (int) v);
+ result = (int) v;
+ }
+
+ private void set_fixed_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index, double value, out double result)
+ {
+ double v = value;
+ Sane.Fixed v_fixed;
+
+ return_if_fail (option.type == Sane.ValueType.FIXED);
+
+ if (option.constraint_type == Sane.ConstraintType.RANGE)
+ {
+ double min = Sane.UNFIX (option.range.min);
+ double max = Sane.UNFIX (option.range.max);
+
+ if (v < min)
+ v = min;
+ if (v > max)
+ v = max;
+ }
+ else if (option.constraint_type == Sane.ConstraintType.WORD_LIST)
+ {
+ double distance = double.MAX, nearest = 0.0;
+
+ /* Find nearest value to requested */
+ for (var i = 0; i < option.word_list[0]; i++)
+ {
+ double x = Sane.UNFIX (option.word_list[i+1]);
+ if (Math.fabs (x - v) < distance)
+ {
+ distance = Math.fabs (x - v);
+ nearest = x;
+ }
+ }
+ v = nearest;
+ }
+
+ v_fixed = Sane.FIX (v);
+ var status = Sane.control_option (handle, option_index, Sane.Action.SET_VALUE, &v_fixed, null);
+ debug ("sane_control_option (%d, SANE_ACTION_SET_VALUE, %f) -> (%s, %f)", (int) option_index, value, Sane.status_to_string (status), Sane.UNFIX (v_fixed));
+
+ result = Sane.UNFIX (v_fixed);
+ }
+
+ private void set_fixed_or_int_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index, double value, out double result)
+ {
+ if (option.type == Sane.ValueType.FIXED)
+ set_fixed_option (handle, option, option_index, value, out result);
+ else if (option.type == Sane.ValueType.INT)
+ {
+ int r;
+ set_int_option (handle, option, option_index, (int) Math.round (value), out r);
+ result = r;
+ }
+ else
+ {
+ result = 0.0;
+ warning ("Unable to set unsupported option type");
+ }
+ }
+
+ private void set_option_to_max (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index)
+ {
+ if (option.constraint_type != Sane.ConstraintType.RANGE)
+ return;
+
+ var status = Sane.control_option (handle, option_index, Sane.Action.SET_VALUE, &option.range.max, null);
+ debug ("sane_control_option (%d, SANE_ACTION_SET_VALUE, option.range.max) -> (%s)", (int) option_index, Sane.status_to_string (status));
+ }
+
+ private bool set_string_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index, string value, out string result)
+ {
+ result = "";
+
+ return_val_if_fail (option.type == Sane.ValueType.STRING, false);
+
+ var s = new char[option.size];
+ var i = 0;
+ for (; i < (option.size - 1) && value[i] != '\0'; i++)
+ s[i] = value[i];
+ s[i] = '\0';
+ var status = Sane.control_option (handle, option_index, Sane.Action.SET_VALUE, s, null);
+ result = (string) s;
+ debug ("sane_control_option (%d, SANE_ACTION_SET_VALUE, \"%s\") -> (%s, \"%s\")", (int) option_index, value, Sane.status_to_string (status), result);
+
+ return status == Sane.Status.GOOD;
+ }
+
+ private bool set_constrained_string_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index, string[] values, out string result)
+ {
+ return_val_if_fail (option.type == Sane.ValueType.STRING, false);
+ return_val_if_fail (option.constraint_type == Sane.ConstraintType.STRING_LIST, false);
+
+ for (var i = 0; values[i] != null; i++)
+ {
+ var j = 0;
+ for (; option.string_list[j] != null; j++)
+ {
+ if (values[i] == option.string_list[j])
+ break;
+ }
+
+ if (option.string_list[j] != null)
+ return set_string_option (handle, option, option_index, values[i], out result);
+ }
+
+ result = "";
+ return false;
+ }
+
+ private void log_option (Sane.Int index, Sane.OptionDescriptor option)
+ {
+ var s = "Option %d:".printf ((int) index);
+
+ if (option.name != "")
+ s += " name='%s'".printf (option.name);
+
+ if (option.title != "")
+ s += " title='%s'".printf (option.title);
+
+ switch (option.type)
+ {
+ case Sane.ValueType.BOOL:
+ s += " type=bool";
+ break;
+ case Sane.ValueType.INT:
+ s += " type=int";
+ break;
+ case Sane.ValueType.FIXED:
+ s += " type=fixed";
+ break;
+ case Sane.ValueType.STRING:
+ s += " type=string";
+ break;
+ case Sane.ValueType.BUTTON:
+ s += " type=button";
+ break;
+ case Sane.ValueType.GROUP:
+ s += " type=group";
+ break;
+ default:
+ s += " type=%d".printf (option.type);
+ break;
+ }
+
+ s += " size=%d".printf ((int) option.size);
+
+ switch (option.unit)
+ {
+ case Sane.Unit.NONE:
+ break;
+ case Sane.Unit.PIXEL:
+ s += " unit=pixels";
+ break;
+ case Sane.Unit.BIT:
+ s += " unit=bits";
+ break;
+ case Sane.Unit.MM:
+ s += " unit=mm";
+ break;
+ case Sane.Unit.DPI:
+ s += " unit=dpi";
+ break;
+ case Sane.Unit.PERCENT:
+ s += " unit=percent";
+ break;
+ case Sane.Unit.MICROSECOND:
+ s += " unit=microseconds";
+ break;
+ default:
+ s += " unit=%d".printf (option.unit);
+ break;
+ }
+
+ switch (option.constraint_type)
+ {
+ case Sane.ConstraintType.RANGE:
+ if (option.type == Sane.ValueType.FIXED)
+ s += " min=%f, max=%f, quant=%d".printf (Sane.UNFIX (option.range.min), Sane.UNFIX (option.range.max), (int) option.range.quant);
+ else
+ s += " min=%d, max=%d, quant=%d".printf ((int) option.range.min, (int) option.range.max, (int) option.range.quant);
+ break;
+ case Sane.ConstraintType.WORD_LIST:
+ s += " values=[";
+ for (var i = 0; i < option.word_list[0]; i++)
+ {
+ if (i != 0)
+ s += ", ";
+ if (option.type == Sane.ValueType.INT)
+ s += "%d".printf ((int) option.word_list[i+1]);
+ else
+ s += "%f".printf (Sane.UNFIX (option.word_list[i+1]));
+ }
+ s += "]";
+ break;
+ case Sane.ConstraintType.STRING_LIST:
+ s += " values=[";
+ for (var i = 0; option.string_list[i] != null; i++)
+ {
+ if (i != 0)
+ s += ", ";
+ s += "\"%s\"".printf (option.string_list[i]);
+ }
+ s += "]";
+ break;
+ default:
+ break;
+ }
+
+ var cap = option.cap;
+ if (cap != 0)
+ {
+ s += " cap=";
+ if ((cap & Sane.Capability.SOFT_SELECT) != 0)
+ {
+ if (s != "")
+ s += ",";
+ s += "soft-select";
+ cap &= ~Sane.Capability.SOFT_SELECT;
+ }
+ if ((cap & Sane.Capability.HARD_SELECT) != 0)
+ {
+ if (s != "")
+ s += ",";
+ s += "hard-select";
+ cap &= ~Sane.Capability.HARD_SELECT;
+ }
+ if ((cap & Sane.Capability.SOFT_DETECT) != 0)
+ {
+ if (s != "")
+ s += ",";
+ s += "soft-detect";
+ cap &= ~Sane.Capability.SOFT_DETECT;
+ }
+ if ((cap & Sane.Capability.EMULATED) != 0)
+ {
+ if (s != "")
+ s += ",";
+ s += "emulated";
+ cap &= ~Sane.Capability.EMULATED;
+ }
+ if ((cap & Sane.Capability.AUTOMATIC) != 0)
+ {
+ if (s != "")
+ s += ",";
+ s += "automatic";
+ cap &= ~Sane.Capability.AUTOMATIC;
+ }
+ if ((cap & Sane.Capability.INACTIVE) != 0)
+ {
+ if (s != "")
+ s += ",";
+ s += "inactive";
+ cap &= ~Sane.Capability.INACTIVE;
+ }
+ if ((cap & Sane.Capability.ADVANCED) != 0)
+ {
+ if (s != "")
+ s += ",";
+ s += "advanced";
+ cap &= ~Sane.Capability.ADVANCED;
+ }
+ /* Unknown capabilities */
+ if (cap != 0)
+ {
+ if (s != "")
+ s += ",";
+ s += "%x".printf ((int) cap);
+ }
+ }
+
+ debug ("%s", s);
+
+ if (option.desc != null)
+ debug (" Description: %s", option.desc);
+ }
+
+ private static void authorization_cb (string resource, char[] username, char[] password)
+ {
+ scanner_object.notify (new NotifyRequestAuthorization (resource));
+
+ var credentials = scanner_object.authorize_queue.pop ();
+ for (var i = 0; credentials.username[i] != '\0' && i < Sane.MAX_USERNAME_LEN; i++)
+ username[i] = credentials.username[i];
+ for (var i = 0; credentials.password[i] != '\0' && i < Sane.MAX_PASSWORD_LEN; i++)
+ password[i] = credentials.password[i];
+ }
+
+ public void authorize (string username, string password)
+ {
+ var credentials = new Credentials ();
+ credentials.username = username;
+ credentials.password = password;
+ authorize_queue.push (credentials);
+ }
+
+ private void close_device ()
+ {
+ if (have_handle)
+ {
+ Sane.cancel (handle);
+ debug ("sane_cancel ()");
+
+ Sane.close (handle);
+ debug ("sane_close ()");
+ have_handle = false;
+ options = null;
+ }
+
+ buffer = null;
+ job_queue = null;
+
+ set_scanning (false);
+ }
+
+ private void fail_scan (int error_code, string error_string)
+ {
+ close_device ();
+ state = ScanState.IDLE;
+ notify (new NotifyScanFailed (error_code, error_string));
+ }
+
+ private bool handle_requests ()
+ {
+ /* Redetect when idle */
+ if (state == ScanState.IDLE && need_redetect)
+ state = ScanState.REDETECT;
+
+ /* Process all requests */
+ int request_count = 0;
+ while (true)
+ {
+ Request request;
+ if ((state == ScanState.IDLE && request_count == 0) ||
+ request_queue.length () > 0)
+ request = request_queue.pop ();
+ else
+ return true;
+
+ debug ("Processing request");
+ request_count++;
+
+ if (request is RequestStartScan)
+ {
+ var r = (RequestStartScan) request;
+ job_queue.append (r.job);
+ }
+ else if (request is RequestCancel)
+ {
+ fail_scan (Sane.Status.CANCELLED, "Scan cancelled - do not report this error");
+ }
+ else if (request is RequestQuit)
+ {
+ close_device ();
+ return false;
+ }
+ }
+ }
+
+ private void do_open ()
+ {
+ var job = (ScanJob) job_queue.data;
+
+ line_count = 0;
+ pass_number = 0;
+ page_number = 0;
+ notified_page = -1;
+ option_index = 0;
+
+ if (job.device == null && default_device != null)
+ job.device = default_device;
+
+ if (job.device == null)
+ {
+ warning ("No scan device available");
+ fail_scan (0,
+ /* Error displayed when no scanners to scan with */
+ _("No scanners available. Please connect a scanner."));
+ return;
+ }
+
+ /* See if we can use the already open device */
+ if (have_handle)
+ {
+ if (current_device == job.device)
+ {
+ state = ScanState.GET_OPTION;
+ return;
+ }
+
+ Sane.close (handle);
+ debug ("sane_close ()");
+ have_handle = false;
+ }
+
+ current_device = null;
+
+ have_handle = false;
+ options = new HashTable <string, int> (str_hash, str_equal);
+ var status = Sane.open (job.device, out handle);
+ debug ("sane_open (\"%s\") -> %s", job.device, Sane.status_to_string (status));
+
+ if (status != Sane.Status.GOOD)
+ {
+ warning ("Unable to get open device: %s", Sane.strstatus (status));
+ fail_scan (status,
+ /* Error displayed when cannot connect to scanner */
+ _("Unable to connect to scanner"));
+ return;
+ }
+ have_handle = true;
+
+ current_device = job.device;
+ state = ScanState.GET_OPTION;
+ }
+
+ private void do_get_option ()
+ {
+ var job = (ScanJob) job_queue.data;
+
+ var option = Sane.get_option_descriptor (handle, option_index);
+ debug ("sane_get_option_descriptor (%d)", (int) option_index);
+ var index = option_index;
+ option_index++;
+
+ /* Options complete, apply settings */
+ if (option == null)
+ {
+ /* Pick source */
+ option = get_option_by_name (handle, Sane.NAME_SCAN_SOURCE, out index);
+ if (option == null)
+ {
+ debug ("SCAN_SOURCE not available, trying alternative \"doc-source\"");
+ option = get_option_by_name (handle, "doc-source", out index); /* Samsung unified driver. LP: #892915 */
+ }
+ if (option != null)
+ {
+ string[] flatbed_sources =
+ {
+ "Auto",
+ Sane.I18N ("Auto"),
+ "Flatbed",
+ Sane.I18N ("Flatbed"),
+ "FlatBed",
+ "Normal",
+ Sane.I18N ("Normal")
+ };
+
+ string[] adf_sources =
+ {
+ "Automatic Document Feeder",
+ Sane.I18N ("Automatic Document Feeder"),
+ "ADF",
+ "Automatic Document Feeder(left aligned)", /* Seen in the proprietary brother3 driver */
+ "Automatic Document Feeder(centrally aligned)", /* Seen in the proprietary brother3 driver */
+ "ADF Simplex" /* Samsung unified driver. LP: # 892915 */
+ };
+
+ string[] adf_front_sources =
+ {
+ "ADF Front",
+ Sane.I18N ("ADF Front")
+ };
+
+ string[] adf_back_sources =
+ {
+ "ADF Back",
+ Sane.I18N ("ADF Back")
+ };
+
+ string[] adf_duplex_sources =
+ {
+ "ADF Duplex",
+ Sane.I18N ("ADF Duplex"),
+ "ADF Duplex - Long-Edge Binding", /* Samsung unified driver. LP: # 892915 */
+ "ADF Duplex - Short-Edge Binding",
+ "Duplex", /* HP duplex scan support. LP: #1353599 */
+ "Automatic Document Feeder(centrally aligned,Duplex)", /* Brother duplex scan support. LP: #1343773 */
+ "Automatic Document Feeder(left aligned,Duplex)"
+ };
+
+ switch (job.type)
+ {
+ case ScanType.SINGLE:
+ if (!set_default_option (handle, option, index))
+ if (!set_constrained_string_option (handle, option, index, flatbed_sources, null))
+ warning ("Unable to set single page source, please file a bug");
+ break;
+ case ScanType.ADF_FRONT:
+ if (!set_constrained_string_option (handle, option, index, adf_front_sources, null))
+ if (!set_constrained_string_option (handle, option, index, adf_sources, null))
+ warning ("Unable to set front ADF source, please file a bug");
+ break;
+ case ScanType.ADF_BACK:
+ if (!set_constrained_string_option (handle, option, index, adf_back_sources, null))
+ if (!set_constrained_string_option (handle, option, index, adf_sources, null))
+ warning ("Unable to set back ADF source, please file a bug");
+ break;
+ case ScanType.ADF_BOTH:
+ if (!set_constrained_string_option (handle, option, index, adf_duplex_sources, null))
+ if (!set_constrained_string_option (handle, option, index, adf_sources, null))
+ warning ("Unable to set duplex ADF source, please file a bug");
+ break;
+ }
+ }
+
+ /* Scan mode (before resolution as it tends to affect that */
+ option = get_option_by_name (handle, Sane.NAME_SCAN_MODE, out index);
+ if (option != null)
+ {
+ /* The names of scan modes often used in drivers, as taken from the sane-backends source */
+ string[] color_scan_modes =
+ {
+ Sane.VALUE_SCAN_MODE_COLOR,
+ "Color",
+ "24bit Color", /* Seen in the proprietary brother3 driver */
+ "Color - 16 Million Colors" /* Samsung unified driver. LP: 892915 */
+ };
+ string[] gray_scan_modes =
+ {
+ Sane.VALUE_SCAN_MODE_GRAY,
+ "Gray",
+ "Grayscale",
+ Sane.I18N ("Grayscale"),
+ "True Gray", /* Seen in the proprietary brother3 driver */
+ "Grayscale - 256 Levels" /* Samsung unified driver. LP: 892915 */
+ };
+ string[] lineart_scan_modes =
+ {
+ Sane.VALUE_SCAN_MODE_LINEART,
+ "Lineart",
+ "LineArt",
+ Sane.I18N ("LineArt"),
+ "Black & White",
+ Sane.I18N ("Black & White"),
+ "Binary",
+ Sane.I18N ("Binary"),
+ "Thresholded",
+ Sane.VALUE_SCAN_MODE_GRAY,
+ "Gray",
+ "Grayscale",
+ Sane.I18N ("Grayscale"),
+ "True Gray", /* Seen in the proprietary brother3 driver */
+ "Black and White - Line Art", /* Samsung unified driver. LP: 892915 */
+ "Black and White - Halftone"
+ };
+
+ switch (job.scan_mode)
+ {
+ case ScanMode.COLOR:
+ if (!set_constrained_string_option (handle, option, index, color_scan_modes, null))
+ warning ("Unable to set Color mode, please file a bug");
+ break;
+ case ScanMode.GRAY:
+ if (!set_constrained_string_option (handle, option, index, gray_scan_modes, null))
+ warning ("Unable to set Gray mode, please file a bug");
+ break;
+ case ScanMode.LINEART:
+ if (!set_constrained_string_option (handle, option, index, lineart_scan_modes, null))
+ warning ("Unable to set Lineart mode, please file a bug");
+ break;
+ default:
+ break;
+ }
+ }
+
+ /* Duplex */
+ option = get_option_by_name (handle, "duplex", out index);
+ if (option != null)
+ {
+ if (option.type == Sane.ValueType.BOOL)
+ set_bool_option (handle, option, index, job.type == ScanType.ADF_BOTH, null);
+ }
+
+ /* Multi-page options */
+ option = get_option_by_name (handle, "batch-scan", out index);
+ if (option != null)
+ {
+ if (option.type == Sane.ValueType.BOOL)
+ set_bool_option (handle, option, index, job.type != ScanType.SINGLE, null);
+ }
+
+ /* Disable compression, we will compress after scanning */
+ option = get_option_by_name (handle, "compression", out index);
+ if (option != null)
+ {
+ string[] disable_compression_names =
+ {
+ Sane.I18N ("None"),
+ Sane.I18N ("none"),
+ "None",
+ "none"
+ };
+
+ if (!set_constrained_string_option (handle, option, index, disable_compression_names, null))
+ warning ("Unable to disable compression, please file a bug");
+ }
+
+ /* Set resolution and bit depth */
+ option = get_option_by_name (handle, Sane.NAME_SCAN_RESOLUTION, out index);
+ if (option != null)
+ {
+ set_fixed_or_int_option (handle, option, index, job.dpi, out job.dpi);
+ option = get_option_by_name (handle, Sane.NAME_BIT_DEPTH, out index);
+ if (option != null)
+ {
+ if (job.depth > 0)
+ set_int_option (handle, option, index, job.depth, null);
+ }
+ }
+
+ /* Set scan area */
+ option = get_option_by_name (handle, Sane.NAME_SCAN_BR_X, out index);
+ if (option != null)
+ {
+ if (job.page_width > 0)
+ set_fixed_or_int_option (handle, option, index, convert_page_size (option, job.page_width, job.dpi), null);
+ else
+ set_option_to_max (handle, option, index);
+ }
+ option = get_option_by_name (handle, Sane.NAME_SCAN_BR_Y, out index);
+ if (option != null)
+ {
+ if (job.page_height > 0)
+ set_fixed_or_int_option (handle, option, index, convert_page_size (option, job.page_height, job.dpi), null);
+ else
+ set_option_to_max (handle, option, index);
+ }
+
+ /* Set page size */
+ option = get_option_by_name (handle, Sane.NAME_PAGE_WIDTH, out index);
+ if (option != null && job.page_width > 0.0)
+ set_fixed_or_int_option (handle, option, index, convert_page_size (option, job.page_width, job.dpi), null);
+ option = get_option_by_name (handle, Sane.NAME_PAGE_HEIGHT, out index);
+ if (option != null && job.page_height > 0.0)
+ set_fixed_or_int_option (handle, option, index, convert_page_size (option, job.page_height, job.dpi), null);
+
+ option = get_option_by_name (handle, Sane.NAME_BRIGHTNESS, out index);
+ if (option != null)
+ {
+ if (job.brightness != 0)
+ {
+ var brightness = scale_int (-100, 100, option, job.brightness);
+ set_int_option (handle, option, index, brightness, null);
+ }
+ }
+ option = get_option_by_name (handle, Sane.NAME_CONTRAST, out index);
+ if (option != null)
+ {
+ if (job.contrast != 0)
+ {
+ var contrast = scale_int (-100, 100, option, job.contrast);
+ set_int_option (handle, option, index, contrast, null);
+ }
+ }
+
+ /* Test scanner options (hoping will not effect other scanners...) */
+ if (current_device == "test")
+ {
+ option = get_option_by_name (handle, "hand-scanner", out index);
+ if (option != null)
+ set_bool_option (handle, option, index, false, null);
+ option = get_option_by_name (handle, "three-pass", out index);
+ if (option != null)
+ set_bool_option (handle, option, index, false, null);
+ option = get_option_by_name (handle, "test-picture", out index);
+ if (option != null)
+ set_string_option (handle, option, index, "Color pattern", null);
+ option = get_option_by_name (handle, "read-delay", out index);
+ if (option != null)
+ set_bool_option (handle, option, index, true, null);
+ option = get_option_by_name (handle, "read-delay-duration", out index);
+ if (option != null)
+ set_int_option (handle, option, index, 200000, null);
+ }
+
+ state = ScanState.START;
+ return;
+ }
+
+ log_option (index, option);
+
+ /* Ignore groups */
+ if (option.type == Sane.ValueType.GROUP)
+ return;
+
+ /* Option disabled */
+ if ((option.cap & Sane.Capability.INACTIVE) != 0)
+ return;
+
+ /* Some options are unnammed (e.g. Option 0) */
+ if (option.name == null)
+ return;
+
+ options.insert (option.name, (int) index);
+ }
+
+ private double convert_page_size (Sane.OptionDescriptor option, double size, double dpi)
+ {
+ if (option.unit == Sane.Unit.PIXEL)
+ return dpi * size / 254.0;
+ else if (option.unit == Sane.Unit.MM)
+ return size / 10.0;
+ else
+ {
+ warning ("Unable to set unsupported unit type");
+ return 0.0f;
+ }
+ }
+
+ private Sane.OptionDescriptor? get_option_by_name (Sane.Handle handle, string name, out int index)
+ {
+ index = options.lookup (name);
+ if (index == 0)
+ return null;
+
+ return Sane.get_option_descriptor (handle, index);
+ }
+
+ private void do_complete_document ()
+ {
+ Sane.cancel (handle);
+ debug ("sane_cancel ()");
+
+ job_queue.remove_link (job_queue);
+
+ state = ScanState.IDLE;
+
+ /* Continue onto the next job */
+ if (job_queue != null)
+ {
+ state = ScanState.OPEN;
+ return;
+ }
+
+ /* Trigger timeout to close */
+ // TODO
+
+ notify (new NotifyDocumentDone ());
+ set_scanning (false);
+ }
+
+ private void do_start ()
+ {
+ Sane.Status status;
+
+ notify (new NotifyExpectPage ());
+
+ status = Sane.start (handle);
+ debug ("sane_start (page=%d, pass=%d) -> %s", page_number, pass_number, Sane.status_to_string (status));
+ if (status == Sane.Status.GOOD)
+ state = ScanState.GET_PARAMETERS;
+ else if (status == Sane.Status.NO_DOCS)
+ do_complete_document ();
+ else
+ {
+ warning ("Unable to start device: %s", Sane.strstatus (status));
+ fail_scan (status,
+ /* Error display when unable to start scan */
+ _("Unable to start scan"));
+ }
+ }
+
+ private void do_get_parameters ()
+ {
+ var status = Sane.get_parameters (handle, out parameters);
+ debug ("sane_get_parameters () -> %s", Sane.status_to_string (status));
+ if (status != Sane.Status.GOOD)
+ {
+ warning ("Unable to get device parameters: %s", Sane.strstatus (status));
+ fail_scan (status,
+ /* Error displayed when communication with scanner broken */
+ _("Error communicating with scanner"));
+ return;
+ }
+
+ var job = (ScanJob) job_queue.data;
+
+ debug ("Parameters: format=%s last_frame=%s bytes_per_line=%d pixels_per_line=%d lines=%d depth=%d",
+ Sane.frame_to_string (parameters.format),
+ parameters.last_frame ? "SANE_TRUE" : "SANE_FALSE",
+ parameters.bytes_per_line,
+ parameters.pixels_per_line,
+ parameters.lines,
+ parameters.depth);
+
+ var info = new ScanPageInfo ();
+ info.width = parameters.pixels_per_line;
+ info.height = parameters.lines;
+ info.depth = parameters.depth;
+ /* Reduce bit depth if requested lower than received */
+ // FIXME: This a hack and only works on 8 bit gray to 2 bit gray
+ if (parameters.depth == 8 && parameters.format == Sane.Frame.GRAY && job.depth == 2 && job.scan_mode == ScanMode.GRAY)
+ info.depth = job.depth;
+ info.n_channels = parameters.format == Sane.Frame.GRAY ? 1 : 3;
+ info.dpi = job.dpi; // FIXME: This is the requested DPI, not the actual DPI
+ info.device = current_device;
+
+ if (page_number != notified_page)
+ {
+ notify (new NotifyGotPageInfo (job.id, info));
+ notified_page = page_number;
+ }
+
+ /* Prepare for read */
+ var buffer_size = parameters.bytes_per_line + 1; /* Use +1 so buffer is not resized if driver returns one line per read */
+ buffer = new uchar[buffer_size];
+ n_used = 0;
+ line_count = 0;
+ pass_number = 0;
+ state = ScanState.READ;
+ }
+
+ private void do_complete_page ()
+ {
+ var job = (ScanJob) job_queue.data;
+
+ notify (new NotifyPageDone (job.id));
+
+ /* If multi-pass then scan another page */
+ if (!parameters.last_frame)
+ {
+ pass_number++;
+ state = ScanState.START;
+ return;
+ }
+
+ /* Go back for another page */
+ if (job.type != ScanType.SINGLE)
+ {
+ page_number++;
+ pass_number = 0;
+ notify (new NotifyPageDone (job.id));
+ state = ScanState.START;
+ return;
+ }
+
+ do_complete_document ();
+ }
+
+ private void do_read ()
+ {
+ var job = (ScanJob) job_queue.data;
+
+ /* Read as many bytes as we expect */
+ var n_to_read = buffer.length - n_used;
+
+ Sane.Int n_read;
+ var b = (uchar *) buffer;
+ var status = Sane.read (handle, (uint8[]) (b + n_used), (Sane.Int) n_to_read, out n_read);
+ debug ("sane_read (%d) -> (%s, %d)", n_to_read, Sane.status_to_string (status), (int) n_read);
+
+ /* Completed read */
+ if (status == Sane.Status.EOF)
+ {
+ if (parameters.lines > 0 && line_count != parameters.lines)
+ warning ("Scan completed with %d lines, expected %d lines", line_count, parameters.lines);
+ if (n_used > 0)
+ warning ("Scan complete with %d bytes of unused data", n_used);
+ do_complete_page ();
+ return;
+ }
+
+ /* Communication error */
+ if (status != Sane.Status.GOOD)
+ {
+ warning ("Unable to read frame from device: %s", Sane.strstatus (status));
+ fail_scan (status,
+ /* Error displayed when communication with scanner broken */
+ _("Error communicating with scanner"));
+ return;
+ }
+
+ bool full_read = false;
+ if (n_used == 0 && n_read == buffer.length)
+ full_read = true;
+ n_used += (int) n_read;
+
+ /* Feed out lines */
+ if (n_used >= parameters.bytes_per_line)
+ {
+ var line = new ScanLine ();
+ switch (parameters.format)
+ {
+ case Sane.Frame.GRAY:
+ line.channel = 0;
+ break;
+ case Sane.Frame.RGB:
+ line.channel = -1;
+ break;
+ case Sane.Frame.RED:
+ line.channel = 0;
+ break;
+ case Sane.Frame.GREEN:
+ line.channel = 1;
+ break;
+ case Sane.Frame.BLUE:
+ line.channel = 2;
+ break;
+ }
+ line.width = parameters.pixels_per_line;
+ line.depth = parameters.depth;
+ line.data = (owned) buffer;
+ line.data_length = parameters.bytes_per_line;
+ line.number = line_count;
+ line.n_lines = n_used / line.data_length;
+
+ line_count += line.n_lines;
+
+ /* Increase buffer size if did full read */
+ var buffer_size = line.data.length;
+ if (full_read)
+ buffer_size += parameters.bytes_per_line;
+
+ buffer = new uchar[buffer_size];
+ var n_remaining = n_used - (line.n_lines * line.data_length);
+ n_used = 0;
+ for (var i = 0; i < n_remaining; i++)
+ {
+ buffer[i] = line.data[i + (line.n_lines * line.data_length)];
+ n_used++;
+ }
+
+ /* Reduce bit depth if requested lower than received */
+ // FIXME: This a hack and only works on 8 bit gray to 2 bit gray
+ if (parameters.depth == 8 && parameters.format == Sane.Frame.GRAY &&
+ job.depth == 2 && job.scan_mode == ScanMode.GRAY)
+ {
+ uchar block = 0;
+ var write_offset = 0;
+ var block_shift = 6;
+ for (var i = 0; i < line.n_lines; i++)
+ {
+ var offset = i * line.data_length;
+ for (var x = 0; x < line.width; x++)
+ {
+ var p = line.data[offset + x];
+
+ uchar sample;
+ if (p >= 192)
+ sample = 3;
+ else if (p >= 128)
+ sample = 2;
+ else if (p >= 64)
+ sample = 1;
+ else
+ sample = 0;
+
+ block |= sample << block_shift;
+ if (block_shift == 0)
+ {
+ line.data[write_offset] = block;
+ write_offset++;
+ block = 0;
+ block_shift = 6;
+ }
+ else
+ block_shift -= 2;
+ }
+
+ /* Finish each line on a byte boundary */
+ if (block_shift != 6)
+ {
+ line.data[write_offset] = block;
+ write_offset++;
+ block = 0;
+ block_shift = 6;
+ }
+ }
+
+ line.data_length = (line.width * 2 + 7) / 8;
+ }
+
+ notify (new NotifyGotLine (job.id, line));
+ }
+ }
+
+ private void* scan_thread ()
+ {
+ state = ScanState.IDLE;
+
+ Sane.Int version_code;
+ var status = Sane.init (out version_code, authorization_cb);
+ debug ("sane_init () -> %s", Sane.status_to_string (status));
+ if (status != Sane.Status.GOOD)
+ {
+ warning ("Unable to initialize SANE backend: %s", Sane.strstatus(status));
+ return null;
+ }
+ debug ("SANE version %d.%d.%d",
+ Sane.VERSION_MAJOR(version_code),
+ Sane.VERSION_MINOR(version_code),
+ Sane.VERSION_BUILD(version_code));
+
+ /* Scan for devices on first start */
+ redetect ();
+
+ while (handle_requests ())
+ {
+ switch (state)
+ {
+ case ScanState.IDLE:
+ if (job_queue != null)
+ {
+ set_scanning (true);
+ state = ScanState.OPEN;
+ }
+ break;
+ case ScanState.REDETECT:
+ do_redetect ();
+ break;
+ case ScanState.OPEN:
+ do_open ();
+ break;
+ case ScanState.GET_OPTION:
+ do_get_option ();
+ break;
+ case ScanState.START:
+ do_start ();
+ break;
+ case ScanState.GET_PARAMETERS:
+ do_get_parameters ();
+ break;
+ case ScanState.READ:
+ do_read ();
+ break;
+ }
+ }
+
+ return null;
+ }
+
+ public void start ()
+ {
+ try
+ {
+ thread = new Thread<void*>.try ("scan-thread", scan_thread);
+ }
+ catch (Error e)
+ {
+ critical ("Unable to create thread: %s", e.message);
+ }
+ }
+
+ public void redetect ()
+ {
+ if (need_redetect)
+ return;
+ need_redetect = true;
+
+ debug ("Requesting redetection of scan devices");
+
+ request_queue.push (new RequestRedetect ());
+ }
+
+ public bool is_scanning ()
+ {
+ return scanning;
+ }
+
+ private string get_scan_mode_string (ScanMode mode)
+ {
+ switch (mode)
+ {
+ case ScanMode.DEFAULT:
+ return "ScanMode.DEFAULT";
+ case ScanMode.COLOR:
+ return "ScanMode.COLOR";
+ case ScanMode.GRAY:
+ return "ScanMode.GRAY";
+ case ScanMode.LINEART:
+ return "ScanMode.LINEART";
+ default:
+ return "%d".printf (mode);
+ }
+ }
+
+ private string get_scan_type_string (ScanType type)
+ {
+ switch (type)
+ {
+ case ScanType.SINGLE:
+ return "ScanType.SINGLE";
+ case ScanType.ADF_FRONT:
+ return "ScanType.ADF_FRONT";
+ case ScanType.ADF_BACK:
+ return "ScanType.ADF_BACK";
+ case ScanType.ADF_BOTH:
+ return "ScanType.ADF_BOTH";
+ default:
+ return "%d".printf (type);
+ }
+ }
+
+ public void scan (string? device, ScanOptions options)
+ {
+ debug ("Scanner.scan (\"%s\", dpi=%d, scan_mode=%s, depth=%d, type=%s, paper_width=%d, paper_height=%d, brightness=%d, contrast=%d)",
+ device != null ? device : "(null)", options.dpi, get_scan_mode_string (options.scan_mode), options.depth,
+ get_scan_type_string (options.type), options.paper_width, options.paper_height,
+ options.brightness, options.contrast);
+ var request = new RequestStartScan ();
+ request.job = new ScanJob ();
+ request.job.id = job_id++;
+ request.job.device = device;
+ request.job.dpi = options.dpi;
+ request.job.scan_mode = options.scan_mode;
+ request.job.depth = options.depth;
+ request.job.type = options.type;
+ request.job.page_width = options.paper_width;
+ request.job.page_height = options.paper_height;
+ request.job.brightness = options.brightness;
+ request.job.contrast = options.contrast;
+ request_queue.push (request);
+ }
+
+ public void cancel ()
+ {
+ first_job_id = job_id;
+ request_queue.push (new RequestCancel ());
+ }
+
+ public void free ()
+ {
+ debug ("Stopping scan thread");
+
+ request_queue.push (new RequestQuit ());
+
+ if (thread != null)
+ {
+ thread.join ();
+ thread = null;
+ }
+
+ Sane.exit ();
+ debug ("sane_exit ()");
+ }
+}
diff --git a/src/simple-scan.c b/src/simple-scan.c
new file mode 100644
index 0000000..144a78d
--- /dev/null
+++ b/src/simple-scan.c
@@ -0,0 +1,3965 @@
+/* simple-scan.c generated by valac 0.24.0, the Vala compiler
+ * generated from simple-scan.vala, do not modify */
+
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <gudev/gudev.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <gio/gio.h>
+#include "colord.h"
+#include <float.h>
+#include <math.h>
+#include "sane/sane.h"
+#include <glib/gi18n-lib.h>
+#include <glib/gstdio.h>
+#include <unistd.h>
+#include <locale.h>
+
+
+#define TYPE_SIMPLE_SCAN (simple_scan_get_type ())
+#define SIMPLE_SCAN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_SCAN, SimpleScan))
+#define SIMPLE_SCAN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_SCAN, SimpleScanClass))
+#define IS_SIMPLE_SCAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_SCAN))
+#define IS_SIMPLE_SCAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_SCAN))
+#define SIMPLE_SCAN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_SCAN, SimpleScanClass))
+
+typedef struct _SimpleScan SimpleScan;
+typedef struct _SimpleScanClass SimpleScanClass;
+typedef struct _SimpleScanPrivate SimpleScanPrivate;
+
+#define TYPE_SCAN_DEVICE (scan_device_get_type ())
+#define SCAN_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_DEVICE, ScanDevice))
+#define SCAN_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_DEVICE, ScanDeviceClass))
+#define IS_SCAN_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_DEVICE))
+#define IS_SCAN_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_DEVICE))
+#define SCAN_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_DEVICE, ScanDeviceClass))
+
+typedef struct _ScanDevice ScanDevice;
+typedef struct _ScanDeviceClass ScanDeviceClass;
+
+#define TYPE_USER_INTERFACE (user_interface_get_type ())
+#define USER_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_USER_INTERFACE, UserInterface))
+#define USER_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_USER_INTERFACE, UserInterfaceClass))
+#define IS_USER_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_USER_INTERFACE))
+#define IS_USER_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_USER_INTERFACE))
+#define USER_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_USER_INTERFACE, UserInterfaceClass))
+
+typedef struct _UserInterface UserInterface;
+typedef struct _UserInterfaceClass UserInterfaceClass;
+
+#define TYPE_SCANNER (scanner_get_type ())
+#define SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCANNER, Scanner))
+#define SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCANNER, ScannerClass))
+#define IS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCANNER))
+#define IS_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCANNER))
+#define SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCANNER, ScannerClass))
+
+typedef struct _Scanner Scanner;
+typedef struct _ScannerClass ScannerClass;
+
+#define TYPE_BOOK (book_get_type ())
+#define BOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOK, Book))
+#define BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOK, BookClass))
+#define IS_BOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOK))
+#define IS_BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOK))
+#define BOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOK, BookClass))
+
+typedef struct _Book Book;
+typedef struct _BookClass BookClass;
+#define _scan_device_unref0(var) ((var == NULL) ? NULL : (var = (scan_device_unref (var), NULL)))
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _scanner_unref0(var) ((var == NULL) ? NULL : (var = (scanner_unref (var), NULL)))
+#define _book_unref0(var) ((var == NULL) ? NULL : (var = (book_unref (var), NULL)))
+
+#define TYPE_SCAN_OPTIONS (scan_options_get_type ())
+#define SCAN_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_OPTIONS, ScanOptions))
+#define SCAN_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_OPTIONS, ScanOptionsClass))
+#define IS_SCAN_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_OPTIONS))
+#define IS_SCAN_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_OPTIONS))
+#define SCAN_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_OPTIONS, ScanOptionsClass))
+
+typedef struct _ScanOptions ScanOptions;
+typedef struct _ScanOptionsClass ScanOptionsClass;
+
+#define TYPE_SCAN_PAGE_INFO (scan_page_info_get_type ())
+#define SCAN_PAGE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_PAGE_INFO, ScanPageInfo))
+#define SCAN_PAGE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_PAGE_INFO, ScanPageInfoClass))
+#define IS_SCAN_PAGE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_PAGE_INFO))
+#define IS_SCAN_PAGE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_PAGE_INFO))
+#define SCAN_PAGE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_PAGE_INFO, ScanPageInfoClass))
+
+typedef struct _ScanPageInfo ScanPageInfo;
+typedef struct _ScanPageInfoClass ScanPageInfoClass;
+
+#define TYPE_SCAN_LINE (scan_line_get_type ())
+#define SCAN_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_LINE, ScanLine))
+#define SCAN_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_LINE, ScanLineClass))
+#define IS_SCAN_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_LINE))
+#define IS_SCAN_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_LINE))
+#define SCAN_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_LINE, ScanLineClass))
+
+typedef struct _ScanLine ScanLine;
+typedef struct _ScanLineClass ScanLineClass;
+typedef struct _ScanDevicePrivate ScanDevicePrivate;
+#define __g_list_free__scan_device_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__scan_device_unref0_ (var), NULL)))
+#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+
+#define TYPE_PAGE (page_get_type ())
+#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
+#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
+#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
+#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
+#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))
+
+typedef struct _Page Page;
+typedef struct _PageClass PageClass;
+
+#define TYPE_SCAN_DIRECTION (scan_direction_get_type ())
+#define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+typedef struct _ScanPageInfoPrivate ScanPageInfoPrivate;
+typedef struct _ScanOptionsPrivate ScanOptionsPrivate;
+
+#define TYPE_SCAN_MODE (scan_mode_get_type ())
+
+#define TYPE_SCAN_TYPE (scan_type_get_type ())
+#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
+#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
+#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
+#define _g_timer_destroy0(var) ((var == NULL) ? NULL : (var = (g_timer_destroy (var), NULL)))
+
+struct _SimpleScan {
+ GtkApplication parent_instance;
+ SimpleScanPrivate * priv;
+};
+
+struct _SimpleScanClass {
+ GtkApplicationClass parent_class;
+};
+
+struct _SimpleScanPrivate {
+ ScanDevice* default_device;
+ gboolean have_devices;
+ GUdevClient* udev_client;
+ UserInterface* ui;
+ Scanner* scanner;
+ Book* book;
+};
+
+struct _ScanDevice {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanDevicePrivate * priv;
+ gchar* name;
+ gchar* label;
+};
+
+struct _ScanDeviceClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanDevice *self);
+};
+
+typedef enum {
+ SCAN_DIRECTION_TOP_TO_BOTTOM,
+ SCAN_DIRECTION_LEFT_TO_RIGHT,
+ SCAN_DIRECTION_BOTTOM_TO_TOP,
+ SCAN_DIRECTION_RIGHT_TO_LEFT
+} ScanDirection;
+
+struct _ScanPageInfo {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanPageInfoPrivate * priv;
+ gint width;
+ gint height;
+ gint depth;
+ gint n_channels;
+ gdouble dpi;
+ gchar* device;
+};
+
+struct _ScanPageInfoClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanPageInfo *self);
+};
+
+typedef enum {
+ SCAN_MODE_DEFAULT,
+ SCAN_MODE_COLOR,
+ SCAN_MODE_GRAY,
+ SCAN_MODE_LINEART
+} ScanMode;
+
+typedef enum {
+ SCAN_TYPE_SINGLE,
+ SCAN_TYPE_ADF_FRONT,
+ SCAN_TYPE_ADF_BACK,
+ SCAN_TYPE_ADF_BOTH
+} ScanType;
+
+struct _ScanOptions {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanOptionsPrivate * priv;
+ gint dpi;
+ ScanMode scan_mode;
+ gint depth;
+ ScanType type;
+ gint paper_width;
+ gint paper_height;
+ gint brightness;
+ gint contrast;
+};
+
+struct _ScanOptionsClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanOptions *self);
+};
+
+
+static gpointer simple_scan_parent_class = NULL;
+static gboolean simple_scan_show_version;
+static gboolean simple_scan_show_version = FALSE;
+static gboolean simple_scan_debug_enabled;
+static gboolean simple_scan_debug_enabled = FALSE;
+static gchar* simple_scan_fix_pdf_filename;
+static gchar* simple_scan_fix_pdf_filename = NULL;
+static GTimer* simple_scan_log_timer;
+static GTimer* simple_scan_log_timer = NULL;
+static FILE* simple_scan_log_file;
+static FILE* simple_scan_log_file = NULL;
+
+GType simple_scan_get_type (void) G_GNUC_CONST;
+gpointer scan_device_ref (gpointer instance);
+void scan_device_unref (gpointer instance);
+GParamSpec* param_spec_scan_device (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_device (GValue* value, gpointer v_object);
+void value_take_scan_device (GValue* value, gpointer v_object);
+gpointer value_get_scan_device (const GValue* value);
+GType scan_device_get_type (void) G_GNUC_CONST;
+GType user_interface_get_type (void) G_GNUC_CONST;
+gpointer scanner_ref (gpointer instance);
+void scanner_unref (gpointer instance);
+GParamSpec* param_spec_scanner (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scanner (GValue* value, gpointer v_object);
+void value_take_scanner (GValue* value, gpointer v_object);
+gpointer value_get_scanner (const GValue* value);
+GType scanner_get_type (void) G_GNUC_CONST;
+gpointer book_ref (gpointer instance);
+void book_unref (gpointer instance);
+GParamSpec* param_spec_book (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_book (GValue* value, gpointer v_object);
+void value_take_book (GValue* value, gpointer v_object);
+gpointer value_get_book (const GValue* value);
+GType book_get_type (void) G_GNUC_CONST;
+#define SIMPLE_SCAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SIMPLE_SCAN, SimpleScanPrivate))
+enum {
+ SIMPLE_SCAN_DUMMY_PROPERTY
+};
+SimpleScan* simple_scan_new (ScanDevice* device);
+SimpleScan* simple_scan_construct (GType object_type, ScanDevice* device);
+static void simple_scan_real_startup (GApplication* base);
+UserInterface* user_interface_new (void);
+UserInterface* user_interface_construct (GType object_type);
+Book* user_interface_get_book (UserInterface* self);
+gpointer scan_options_ref (gpointer instance);
+void scan_options_unref (gpointer instance);
+GParamSpec* param_spec_scan_options (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_options (GValue* value, gpointer v_object);
+void value_take_scan_options (GValue* value, gpointer v_object);
+gpointer value_get_scan_options (const GValue* value);
+GType scan_options_get_type (void) G_GNUC_CONST;
+static void simple_scan_scan_cb (SimpleScan* self, UserInterface* ui, const gchar* device, ScanOptions* options);
+static void _simple_scan_scan_cb_user_interface_start_scan (UserInterface* _sender, const gchar* device, ScanOptions* options, gpointer self);
+static void simple_scan_cancel_cb (SimpleScan* self, UserInterface* ui);
+static void _simple_scan_cancel_cb_user_interface_stop_scan (UserInterface* _sender, gpointer self);
+static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gchar* profile, gint quality);
+static void _simple_scan_email_cb_user_interface_email (UserInterface* _sender, const gchar* profile, gint quality, gpointer self);
+Scanner* scanner_get_instance (void);
+static void simple_scan_update_scan_devices_cb (SimpleScan* self, Scanner* scanner, GList* devices);
+static void _simple_scan_update_scan_devices_cb_scanner_update_devices (Scanner* _sender, GList* devices, gpointer self);
+static void simple_scan_authorize_cb (SimpleScan* self, Scanner* scanner, const gchar* resource);
+static void _simple_scan_authorize_cb_scanner_request_authorization (Scanner* _sender, const gchar* resource, gpointer self);
+static void simple_scan_scanner_new_page_cb (SimpleScan* self, Scanner* scanner);
+static void _simple_scan_scanner_new_page_cb_scanner_expect_page (Scanner* _sender, gpointer self);
+gpointer scan_page_info_ref (gpointer instance);
+void scan_page_info_unref (gpointer instance);
+GParamSpec* param_spec_scan_page_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_page_info (GValue* value, gpointer v_object);
+void value_take_scan_page_info (GValue* value, gpointer v_object);
+gpointer value_get_scan_page_info (const GValue* value);
+GType scan_page_info_get_type (void) G_GNUC_CONST;
+static void simple_scan_scanner_page_info_cb (SimpleScan* self, Scanner* scanner, ScanPageInfo* info);
+static void _simple_scan_scanner_page_info_cb_scanner_got_page_info (Scanner* _sender, ScanPageInfo* info, gpointer self);
+gpointer scan_line_ref (gpointer instance);
+void scan_line_unref (gpointer instance);
+GParamSpec* param_spec_scan_line (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_line (GValue* value, gpointer v_object);
+void value_take_scan_line (GValue* value, gpointer v_object);
+gpointer value_get_scan_line (const GValue* value);
+GType scan_line_get_type (void) G_GNUC_CONST;
+static void simple_scan_scanner_line_cb (SimpleScan* self, Scanner* scanner, ScanLine* line);
+static void _simple_scan_scanner_line_cb_scanner_got_line (Scanner* _sender, ScanLine* line, gpointer self);
+static void simple_scan_scanner_page_done_cb (SimpleScan* self, Scanner* scanner);
+static void _simple_scan_scanner_page_done_cb_scanner_page_done (Scanner* _sender, gpointer self);
+static void simple_scan_scanner_document_done_cb (SimpleScan* self, Scanner* scanner);
+static void _simple_scan_scanner_document_done_cb_scanner_document_done (Scanner* _sender, gpointer self);
+static void simple_scan_scanner_failed_cb (SimpleScan* self, Scanner* scanner, gint error_code, const gchar* error_string);
+static void _simple_scan_scanner_failed_cb_scanner_scan_failed (Scanner* _sender, gint error_code, const gchar* error_string, gpointer self);
+static void simple_scan_scanner_scanning_changed_cb (SimpleScan* self, Scanner* scanner);
+static void _simple_scan_scanner_scanning_changed_cb_scanner_scanning_changed (Scanner* _sender, gpointer self);
+static void simple_scan_on_uevent (SimpleScan* self, GUdevClient* client, const gchar* action, GUdevDevice* device);
+static void _simple_scan_on_uevent_g_udev_client_uevent (GUdevClient* _sender, const gchar* action, GUdevDevice* device, gpointer self);
+void user_interface_set_scan_devices (UserInterface* self, GList* devices);
+void user_interface_set_selected_device (UserInterface* self, const gchar* value);
+static void _scan_device_unref0_ (gpointer var);
+static void _g_list_free__scan_device_unref0_ (GList* self);
+static void simple_scan_real_activate (GApplication* base);
+void user_interface_start (UserInterface* self);
+void scanner_start (Scanner* self);
+static void simple_scan_real_shutdown (GApplication* base);
+void scanner_free (Scanner* self);
+void user_interface_authorize (UserInterface* self, const gchar* resource, gchar** username, gchar** password);
+void scanner_authorize (Scanner* self, const gchar* username, const gchar* password);
+gpointer page_ref (gpointer instance);
+void page_unref (gpointer instance);
+GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_page (GValue* value, gpointer v_object);
+void value_take_page (GValue* value, gpointer v_object);
+gpointer value_get_page (const GValue* value);
+GType page_get_type (void) G_GNUC_CONST;
+static Page* simple_scan_append_page (SimpleScan* self);
+Page* book_get_page (Book* self, gint page_number);
+gboolean page_get_has_data (Page* self);
+void user_interface_set_selected_page (UserInterface* self, Page* value);
+void page_start (Page* self);
+GType scan_direction_get_type (void) G_GNUC_CONST;
+ScanDirection page_get_scan_direction (Page* self);
+gint page_get_width (Page* self);
+gint page_get_height (Page* self);
+gint page_get_dpi (Page* self);
+gboolean page_get_has_crop (Page* self);
+const gchar* page_get_crop_name (Page* self);
+gint page_get_crop_x (Page* self);
+gint page_get_crop_y (Page* self);
+gint page_get_crop_width (Page* self);
+gint page_get_crop_height (Page* self);
+Page* page_new (gint width, gint height, gint dpi, ScanDirection scan_direction);
+Page* page_construct (GType object_type, gint width, gint height, gint dpi, ScanDirection scan_direction);
+void book_append_page (Book* self, Page* page);
+void page_set_named_crop (Page* self, const gchar* name);
+void page_set_custom_crop (Page* self, gint width, gint height);
+void page_move_crop (Page* self, gint x, gint y);
+static gchar* simple_scan_get_profile_for_device (SimpleScan* self, const gchar* device_name);
+void page_set_page_info (Page* self, ScanPageInfo* info);
+void page_set_color_profile (Page* self, const gchar* value);
+guint book_get_n_pages (Book* self);
+void page_parse_scan_line (Page* self, ScanLine* line);
+void page_finish (Page* self);
+static void simple_scan_remove_empty_page (SimpleScan* self);
+void book_delete_page (Book* self, Page* page);
+void user_interface_show_error (UserInterface* self, const gchar* error_title, const gchar* error_text, gboolean change_scanner_hint);
+gboolean scanner_is_scanning (Scanner* self);
+void user_interface_set_scanning (UserInterface* self, gboolean value);
+GType scan_mode_get_type (void) G_GNUC_CONST;
+GType scan_type_get_type (void) G_GNUC_CONST;
+void user_interface_set_default_file_name (UserInterface* self, const gchar* value);
+void scanner_scan (Scanner* self, const gchar* device, ScanOptions* options);
+void scanner_cancel (Scanner* self);
+static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar* prefix, const gchar* extension);
+void user_interface_show_progress_dialog (UserInterface* self);
+void book_save (Book* self, const gchar* type, gint quality, GFile* file, GError** error);
+void user_interface_hide_progress_dialog (UserInterface* self);
+void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError** error);
+static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
+void scanner_redetect (Scanner* self);
+static void simple_scan_fix_pdf (const gchar* filename, GError** error);
+gint simple_scan_main (gchar** args, int args_length1);
+ScanDevice* scan_device_new (void);
+ScanDevice* scan_device_construct (GType object_type);
+static void _simple_scan_log_cb_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
+static void simple_scan_finalize (GObject* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+const GOptionEntry SIMPLE_SCAN_options[4] = {{"version", 'v', 0, G_OPTION_ARG_NONE, &simple_scan_show_version, "Show release version", NULL}, {"debug", 'd', 0, G_OPTION_ARG_NONE, &simple_scan_debug_enabled, "Print debugging messages", NULL}, {"fix-pdf", (gchar) 0, 0, G_OPTION_ARG_STRING, &simple_scan_fix_pdf_filename, "Fix PDF files generated with older versions of Simple Scan", "FILENAME..."}, {NULL}};
+
+static gpointer _scan_device_ref0 (gpointer self) {
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return self ? scan_device_ref (self) : NULL;
+#line 406 "simple-scan.c"
+}
+
+
+SimpleScan* simple_scan_construct (GType object_type, ScanDevice* device) {
+ SimpleScan * self = NULL;
+ ScanDevice* _tmp0_ = NULL;
+ ScanDevice* _tmp1_ = NULL;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self = (SimpleScan*) g_object_new (object_type, NULL);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = device;
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = _scan_device_ref0 (_tmp0_);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _scan_device_unref0 (self->priv->default_device);
+#line 41 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->default_device = _tmp1_;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return self;
+#line 426 "simple-scan.c"
+}
+
+
+SimpleScan* simple_scan_new (ScanDevice* device) {
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return simple_scan_construct (TYPE_SIMPLE_SCAN, device);
+#line 433 "simple-scan.c"
+}
+
+
+static gpointer _book_ref0 (gpointer self) {
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return self ? book_ref (self) : NULL;
+#line 440 "simple-scan.c"
+}
+
+
+static void _simple_scan_scan_cb_user_interface_start_scan (UserInterface* _sender, const gchar* device, ScanOptions* options, gpointer self) {
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_scan_cb ((SimpleScan*) self, _sender, device, options);
+#line 447 "simple-scan.c"
+}
+
+
+static void _simple_scan_cancel_cb_user_interface_stop_scan (UserInterface* _sender, gpointer self) {
+#line 51 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_cancel_cb ((SimpleScan*) self, _sender);
+#line 454 "simple-scan.c"
+}
+
+
+static void _simple_scan_email_cb_user_interface_email (UserInterface* _sender, const gchar* profile, gint quality, gpointer self) {
+#line 52 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_email_cb ((SimpleScan*) self, _sender, profile, quality);
+#line 461 "simple-scan.c"
+}
+
+
+static void _simple_scan_update_scan_devices_cb_scanner_update_devices (Scanner* _sender, GList* devices, gpointer self) {
+#line 55 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_update_scan_devices_cb ((SimpleScan*) self, _sender, devices);
+#line 468 "simple-scan.c"
+}
+
+
+static void _simple_scan_authorize_cb_scanner_request_authorization (Scanner* _sender, const gchar* resource, gpointer self) {
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_authorize_cb ((SimpleScan*) self, _sender, resource);
+#line 475 "simple-scan.c"
+}
+
+
+static void _simple_scan_scanner_new_page_cb_scanner_expect_page (Scanner* _sender, gpointer self) {
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_scanner_new_page_cb ((SimpleScan*) self, _sender);
+#line 482 "simple-scan.c"
+}
+
+
+static void _simple_scan_scanner_page_info_cb_scanner_got_page_info (Scanner* _sender, ScanPageInfo* info, gpointer self) {
+#line 58 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_scanner_page_info_cb ((SimpleScan*) self, _sender, info);
+#line 489 "simple-scan.c"
+}
+
+
+static void _simple_scan_scanner_line_cb_scanner_got_line (Scanner* _sender, ScanLine* line, gpointer self) {
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_scanner_line_cb ((SimpleScan*) self, _sender, line);
+#line 496 "simple-scan.c"
+}
+
+
+static void _simple_scan_scanner_page_done_cb_scanner_page_done (Scanner* _sender, gpointer self) {
+#line 60 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_scanner_page_done_cb ((SimpleScan*) self, _sender);
+#line 503 "simple-scan.c"
+}
+
+
+static void _simple_scan_scanner_document_done_cb_scanner_document_done (Scanner* _sender, gpointer self) {
+#line 61 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_scanner_document_done_cb ((SimpleScan*) self, _sender);
+#line 510 "simple-scan.c"
+}
+
+
+static void _simple_scan_scanner_failed_cb_scanner_scan_failed (Scanner* _sender, gint error_code, const gchar* error_string, gpointer self) {
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_scanner_failed_cb ((SimpleScan*) self, _sender, error_code, error_string);
+#line 517 "simple-scan.c"
+}
+
+
+static void _simple_scan_scanner_scanning_changed_cb_scanner_scanning_changed (Scanner* _sender, gpointer self) {
+#line 63 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_scanner_scanning_changed_cb ((SimpleScan*) self, _sender);
+#line 524 "simple-scan.c"
+}
+
+
+static void _simple_scan_on_uevent_g_udev_client_uevent (GUdevClient* _sender, const gchar* action, GUdevDevice* device, gpointer self) {
+#line 67 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_on_uevent ((SimpleScan*) self, _sender, action, device);
+#line 531 "simple-scan.c"
+}
+
+
+static void _scan_device_unref0_ (gpointer var) {
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ (var == NULL) ? NULL : (var = (scan_device_unref (var), NULL));
+#line 538 "simple-scan.c"
+}
+
+
+static void _g_list_free__scan_device_unref0_ (GList* self) {
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_list_foreach (self, (GFunc) _scan_device_unref0_, NULL);
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_list_free (self);
+#line 547 "simple-scan.c"
+}
+
+
+static void simple_scan_real_startup (GApplication* base) {
+ SimpleScan * self;
+ UserInterface* _tmp0_ = NULL;
+ UserInterface* _tmp1_ = NULL;
+ Book* _tmp2_ = NULL;
+ Book* _tmp3_ = NULL;
+ Book* _tmp4_ = NULL;
+ UserInterface* _tmp5_ = NULL;
+ UserInterface* _tmp6_ = NULL;
+ UserInterface* _tmp7_ = NULL;
+ Scanner* _tmp8_ = NULL;
+ Scanner* _tmp9_ = NULL;
+ Scanner* _tmp10_ = NULL;
+ Scanner* _tmp11_ = NULL;
+ Scanner* _tmp12_ = NULL;
+ Scanner* _tmp13_ = NULL;
+ Scanner* _tmp14_ = NULL;
+ Scanner* _tmp15_ = NULL;
+ Scanner* _tmp16_ = NULL;
+ Scanner* _tmp17_ = NULL;
+ gchar** subsystems = NULL;
+ gchar* _tmp18_ = NULL;
+ gchar** _tmp19_ = NULL;
+ gint subsystems_length1 = 0;
+ gint _subsystems_size_ = 0;
+ gchar** _tmp20_ = NULL;
+ gint _tmp20__length1 = 0;
+ GUdevClient* _tmp21_ = NULL;
+ GUdevClient* _tmp22_ = NULL;
+ ScanDevice* _tmp23_ = NULL;
+#line 44 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self = (SimpleScan*) base;
+#line 46 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ G_APPLICATION_CLASS (simple_scan_parent_class)->startup ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = user_interface_new ();
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_object_ref_sink (_tmp0_);
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (self->priv->ui);
+#line 48 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->ui = _tmp0_;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = self->priv->ui;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = user_interface_get_book (_tmp1_);
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = _tmp2_;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = _book_ref0 (_tmp3_);
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _book_unref0 (self->priv->book);
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->book = _tmp4_;
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = self->priv->ui;
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp5_, "start-scan", (GCallback) _simple_scan_scan_cb_user_interface_start_scan, self, 0);
+#line 51 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = self->priv->ui;
+#line 51 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp6_, "stop-scan", (GCallback) _simple_scan_cancel_cb_user_interface_stop_scan, self, 0);
+#line 52 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = self->priv->ui;
+#line 52 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp7_, "email", (GCallback) _simple_scan_email_cb_user_interface_email, self, 0);
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = scanner_get_instance ();
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _scanner_unref0 (self->priv->scanner);
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->scanner = _tmp8_;
+#line 55 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = self->priv->scanner;
+#line 55 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp9_, "update-devices", (GCallback) _simple_scan_update_scan_devices_cb_scanner_update_devices, self, 0);
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = self->priv->scanner;
+#line 56 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp10_, "request-authorization", (GCallback) _simple_scan_authorize_cb_scanner_request_authorization, self, 0);
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = self->priv->scanner;
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp11_, "expect-page", (GCallback) _simple_scan_scanner_new_page_cb_scanner_expect_page, self, 0);
+#line 58 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = self->priv->scanner;
+#line 58 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp12_, "got-page-info", (GCallback) _simple_scan_scanner_page_info_cb_scanner_got_page_info, self, 0);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp13_ = self->priv->scanner;
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp13_, "got-line", (GCallback) _simple_scan_scanner_line_cb_scanner_got_line, self, 0);
+#line 60 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp14_ = self->priv->scanner;
+#line 60 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp14_, "page-done", (GCallback) _simple_scan_scanner_page_done_cb_scanner_page_done, self, 0);
+#line 61 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp15_ = self->priv->scanner;
+#line 61 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp15_, "document-done", (GCallback) _simple_scan_scanner_document_done_cb_scanner_document_done, self, 0);
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp16_ = self->priv->scanner;
+#line 62 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp16_, "scan-failed", (GCallback) _simple_scan_scanner_failed_cb_scanner_scan_failed, self, 0);
+#line 63 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp17_ = self->priv->scanner;
+#line 63 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp17_, "scanning-changed", (GCallback) _simple_scan_scanner_scanning_changed_cb_scanner_scanning_changed, self, 0);
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = g_strdup ("usb");
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_ = g_new0 (gchar*, 2 + 1);
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_[0] = _tmp18_;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_[1] = NULL;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ subsystems = _tmp19_;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ subsystems_length1 = 2;
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _subsystems_size_ = subsystems_length1;
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp20_ = subsystems;
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp20__length1 = subsystems_length1;
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp21_ = g_udev_client_new (_tmp20_);
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (self->priv->udev_client);
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->udev_client = _tmp21_;
+#line 67 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp22_ = self->priv->udev_client;
+#line 67 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_signal_connect_object (_tmp22_, "uevent", (GCallback) _simple_scan_on_uevent_g_udev_client_uevent, self, 0);
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp23_ = self->priv->default_device;
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp23_ != NULL) {
+#line 691 "simple-scan.c"
+ GList* device_list = NULL;
+ ScanDevice* _tmp24_ = NULL;
+ ScanDevice* _tmp25_ = NULL;
+ UserInterface* _tmp26_ = NULL;
+ GList* _tmp27_ = NULL;
+ UserInterface* _tmp28_ = NULL;
+ ScanDevice* _tmp29_ = NULL;
+ const gchar* _tmp30_ = NULL;
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ device_list = NULL;
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp24_ = self->priv->default_device;
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp25_ = _scan_device_ref0 (_tmp24_);
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ device_list = g_list_append (device_list, _tmp25_);
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp26_ = self->priv->ui;
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp27_ = device_list;
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_set_scan_devices (_tmp26_, _tmp27_);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp28_ = self->priv->ui;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp29_ = self->priv->default_device;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp30_ = _tmp29_->name;
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_set_selected_device (_tmp28_, _tmp30_);
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ __g_list_free__scan_device_unref0_0 (device_list);
+#line 724 "simple-scan.c"
+ }
+#line 44 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ subsystems = (_vala_array_free (subsystems, subsystems_length1, (GDestroyNotify) g_free), NULL);
+#line 728 "simple-scan.c"
+}
+
+
+static void simple_scan_real_activate (GApplication* base) {
+ SimpleScan * self;
+ UserInterface* _tmp0_ = NULL;
+ Scanner* _tmp1_ = NULL;
+#line 79 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self = (SimpleScan*) base;
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ G_APPLICATION_CLASS (simple_scan_parent_class)->activate ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->ui;
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_start (_tmp0_);
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = self->priv->scanner;
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ scanner_start (_tmp1_);
+#line 748 "simple-scan.c"
+}
+
+
+static void simple_scan_real_shutdown (GApplication* base) {
+ SimpleScan * self;
+ Scanner* _tmp0_ = NULL;
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self = (SimpleScan*) base;
+#line 88 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ G_APPLICATION_CLASS (simple_scan_parent_class)->shutdown ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _book_unref0 (self->priv->book);
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->book = NULL;
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (self->priv->ui);
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->ui = NULL;
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (self->priv->udev_client);
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->udev_client = NULL;
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->scanner;
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ scanner_free (_tmp0_);
+#line 775 "simple-scan.c"
+}
+
+
+static void simple_scan_update_scan_devices_cb (SimpleScan* self, Scanner* scanner, GList* devices) {
+ GList* devices_copy = NULL;
+ GList* _tmp0_ = NULL;
+ GList* _tmp1_ = NULL;
+ ScanDevice* _tmp2_ = NULL;
+ GList* _tmp10_ = NULL;
+ guint _tmp11_ = 0U;
+ UserInterface* _tmp12_ = NULL;
+ GList* _tmp13_ = NULL;
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (scanner != NULL);
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = devices;
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = g_list_copy (_tmp0_);
+#line 97 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ devices_copy = _tmp1_;
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = self->priv->default_device;
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp2_ != NULL) {
+#line 802 "simple-scan.c"
+ gboolean default_in_list = FALSE;
+ GList* _tmp3_ = NULL;
+ gboolean _tmp8_ = FALSE;
+#line 102 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ default_in_list = FALSE;
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = devices_copy;
+#line 810 "simple-scan.c"
+ {
+ GList* device_collection = NULL;
+ GList* device_it = NULL;
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ device_collection = _tmp3_;
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ for (device_it = device_collection; device_it != NULL; device_it = device_it->next) {
+#line 818 "simple-scan.c"
+ ScanDevice* device = NULL;
+#line 103 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ device = (ScanDevice*) device_it->data;
+#line 822 "simple-scan.c"
+ {
+ ScanDevice* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+ ScanDevice* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = device;
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = _tmp4_->name;
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = self->priv->default_device;
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = _tmp6_->name;
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (g_strcmp0 (_tmp5_, _tmp7_) == 0) {
+#line 107 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ default_in_list = TRUE;
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 842 "simple-scan.c"
+ }
+ }
+ }
+ }
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = default_in_list;
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!_tmp8_) {
+#line 851 "simple-scan.c"
+ ScanDevice* _tmp9_ = NULL;
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = self->priv->default_device;
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ devices_copy = g_list_prepend (devices_copy, _tmp9_);
+#line 857 "simple-scan.c"
+ }
+ }
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = devices_copy;
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = g_list_length (_tmp10_);
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->have_devices = _tmp11_ > ((guint) 0);
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = self->priv->ui;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp13_ = devices_copy;
+#line 117 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_set_scan_devices (_tmp12_, _tmp13_);
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_list_free0 (devices_copy);
+#line 874 "simple-scan.c"
+}
+
+
+static void simple_scan_authorize_cb (SimpleScan* self, Scanner* scanner, const gchar* resource) {
+ gchar* username = NULL;
+ gchar* password = NULL;
+ UserInterface* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ Scanner* _tmp4_ = NULL;
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (scanner != NULL);
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (resource != NULL);
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->ui;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = resource;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_authorize (_tmp0_, _tmp1_, &_tmp2_, &_tmp3_);
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (username);
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ username = _tmp2_;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (password);
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ password = _tmp3_;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = scanner;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ scanner_authorize (_tmp4_, username, password);
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (password);
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (username);
+#line 914 "simple-scan.c"
+}
+
+
+static Page* simple_scan_append_page (SimpleScan* self) {
+ Page* result = NULL;
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ Page* _tmp3_ = NULL;
+ ScanDirection scan_direction = 0;
+ gboolean do_crop = FALSE;
+ gchar* named_crop = NULL;
+ gint width = 0;
+ gint height = 0;
+ gint dpi = 0;
+ gint cx = 0;
+ gint cy = 0;
+ gint cw = 0;
+ gint ch = 0;
+ Page* _tmp10_ = NULL;
+ gint _tmp43_ = 0;
+ gint _tmp44_ = 0;
+ gint _tmp45_ = 0;
+ ScanDirection _tmp46_ = 0;
+ Page* _tmp47_ = NULL;
+ Book* _tmp48_ = NULL;
+ Page* _tmp49_ = NULL;
+ gboolean _tmp50_ = FALSE;
+ UserInterface* _tmp60_ = NULL;
+ Page* _tmp61_ = NULL;
+ Page* _tmp62_ = NULL;
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->book;
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = book_get_page (_tmp0_, -1);
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp1_;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = page;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp3_ != NULL) {
+#line 959 "simple-scan.c"
+ Page* _tmp4_ = NULL;
+ gboolean _tmp5_ = FALSE;
+ gboolean _tmp6_ = FALSE;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = page;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = page_get_has_data (_tmp4_);
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = _tmp5_;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = !_tmp6_;
+#line 971 "simple-scan.c"
+ } else {
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = FALSE;
+#line 975 "simple-scan.c"
+ }
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp2_) {
+#line 979 "simple-scan.c"
+ UserInterface* _tmp7_ = NULL;
+ Page* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = self->priv->ui;
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = page;
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_set_selected_page (_tmp7_, _tmp8_);
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = page;
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_start (_tmp9_);
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = page;
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 997 "simple-scan.c"
+ }
+#line 139 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ scan_direction = SCAN_DIRECTION_TOP_TO_BOTTOM;
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ do_crop = FALSE;
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ named_crop = NULL;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ width = 100;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ height = 100;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ dpi = 100;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cx = 0;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cy = 0;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cw = 0;
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ ch = 0;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = page;
+#line 143 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp10_ != NULL) {
+#line 1023 "simple-scan.c"
+ Page* _tmp11_ = NULL;
+ ScanDirection _tmp12_ = 0;
+ ScanDirection _tmp13_ = 0;
+ Page* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ Page* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+ gint _tmp19_ = 0;
+ Page* _tmp20_ = NULL;
+ gint _tmp21_ = 0;
+ gint _tmp22_ = 0;
+ Page* _tmp23_ = NULL;
+ gboolean _tmp24_ = FALSE;
+ gboolean _tmp25_ = FALSE;
+ gboolean _tmp26_ = FALSE;
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = page;
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = page_get_scan_direction (_tmp11_);
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp13_ = _tmp12_;
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ scan_direction = _tmp13_;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp14_ = page;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp15_ = page_get_width (_tmp14_);
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp16_ = _tmp15_;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ width = _tmp16_;
+#line 147 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp17_ = page;
+#line 147 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = page_get_height (_tmp17_);
+#line 147 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_ = _tmp18_;
+#line 147 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ height = _tmp19_;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp20_ = page;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp21_ = page_get_dpi (_tmp20_);
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp22_ = _tmp21_;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ dpi = _tmp22_;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp23_ = page;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp24_ = page_get_has_crop (_tmp23_);
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp25_ = _tmp24_;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ do_crop = _tmp25_;
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp26_ = do_crop;
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp26_) {
+#line 1084 "simple-scan.c"
+ Page* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
+ const gchar* _tmp29_ = NULL;
+ gchar* _tmp30_ = NULL;
+ Page* _tmp31_ = NULL;
+ gint _tmp32_ = 0;
+ gint _tmp33_ = 0;
+ Page* _tmp34_ = NULL;
+ gint _tmp35_ = 0;
+ gint _tmp36_ = 0;
+ Page* _tmp37_ = NULL;
+ gint _tmp38_ = 0;
+ gint _tmp39_ = 0;
+ Page* _tmp40_ = NULL;
+ gint _tmp41_ = 0;
+ gint _tmp42_ = 0;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp27_ = page;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp28_ = page_get_crop_name (_tmp27_);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp29_ = _tmp28_;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp30_ = g_strdup (_tmp29_);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (named_crop);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ named_crop = _tmp30_;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp31_ = page;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp32_ = page_get_crop_x (_tmp31_);
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp33_ = _tmp32_;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cx = _tmp33_;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp34_ = page;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp35_ = page_get_crop_y (_tmp34_);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp36_ = _tmp35_;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cy = _tmp36_;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp37_ = page;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp38_ = page_get_crop_width (_tmp37_);
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp39_ = _tmp38_;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cw = _tmp39_;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp40_ = page;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp41_ = page_get_crop_height (_tmp40_);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp42_ = _tmp41_;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ ch = _tmp42_;
+#line 1145 "simple-scan.c"
+ }
+ }
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp43_ = width;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp44_ = height;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp45_ = dpi;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp46_ = scan_direction;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp47_ = page_new (_tmp43_, _tmp44_, _tmp45_, _tmp46_);
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _page_unref0 (page);
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp47_;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp48_ = self->priv->book;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp49_ = page;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ book_append_page (_tmp48_, _tmp49_);
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp50_ = do_crop;
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp50_) {
+#line 1172 "simple-scan.c"
+ const gchar* _tmp51_ = NULL;
+ Page* _tmp57_ = NULL;
+ gint _tmp58_ = 0;
+ gint _tmp59_ = 0;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp51_ = named_crop;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp51_ != NULL) {
+#line 1181 "simple-scan.c"
+ Page* _tmp52_ = NULL;
+ const gchar* _tmp53_ = NULL;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp52_ = page;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp53_ = named_crop;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_set_named_crop (_tmp52_, _tmp53_);
+#line 1190 "simple-scan.c"
+ } else {
+ Page* _tmp54_ = NULL;
+ gint _tmp55_ = 0;
+ gint _tmp56_ = 0;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp54_ = page;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp55_ = cw;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp56_ = ch;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_set_custom_crop (_tmp54_, _tmp55_, _tmp56_);
+#line 1203 "simple-scan.c"
+ }
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp57_ = page;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp58_ = cx;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp59_ = cy;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_move_crop (_tmp57_, _tmp58_, _tmp59_);
+#line 1213 "simple-scan.c"
+ }
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp60_ = self->priv->ui;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp61_ = page;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_set_selected_page (_tmp60_, _tmp61_);
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp62_ = page;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_start (_tmp62_);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = page;
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (named_crop);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 1231 "simple-scan.c"
+}
+
+
+static void simple_scan_scanner_new_page_cb (SimpleScan* self, Scanner* scanner) {
+ Page* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+#line 179 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 179 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (scanner != NULL);
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = simple_scan_append_page (self);
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = _tmp0_;
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _page_unref0 (_tmp1_);
+#line 1248 "simple-scan.c"
+}
+
+
+static gchar* simple_scan_get_profile_for_device (SimpleScan* self, const gchar* device_name) {
+ gchar* result = NULL;
+ gchar* device_id = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ CdClient* client = NULL;
+ CdClient* _tmp3_ = NULL;
+ CdDevice* device = NULL;
+ CdProfile* profile = NULL;
+ CdDevice* _tmp19_ = NULL;
+ CdProfile* _tmp20_ = NULL;
+ CdProfile* _tmp21_ = NULL;
+ CdProfile* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
+ const gchar* _tmp29_ = NULL;
+ CdProfile* _tmp31_ = NULL;
+ const gchar* _tmp32_ = NULL;
+ const gchar* _tmp33_ = NULL;
+ const gchar* _tmp34_ = NULL;
+ CdProfile* _tmp35_ = NULL;
+ const gchar* _tmp36_ = NULL;
+ const gchar* _tmp37_ = NULL;
+ gchar* _tmp38_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 184 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 184 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_val_if_fail (device_name != NULL, NULL);
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = device_name;
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = g_strdup_printf ("sane:%s", _tmp0_);
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ device_id = _tmp1_;
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = device_name;
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:188: Getting color profile for device %s", _tmp2_);
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = cd_client_new ();
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ client = _tmp3_;
+#line 1295 "simple-scan.c"
+ {
+ CdClient* _tmp4_ = NULL;
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = client;
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cd_client_connect_sync (_tmp4_, NULL, &_inner_error_);
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 1304 "simple-scan.c"
+ goto __catch4_g_error;
+ }
+ }
+ goto __finally4;
+ __catch4_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp5_ = NULL;
+ const gchar* _tmp6_ = NULL;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = e;
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = _tmp5_->message;
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:197: Failed to connect to colord: %s", _tmp6_);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = NULL;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 1334 "simple-scan.c"
+ }
+ __finally4:
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return NULL;
+#line 1349 "simple-scan.c"
+ }
+ {
+ CdDevice* _tmp7_ = NULL;
+ CdClient* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ CdDevice* _tmp10_ = NULL;
+ CdDevice* _tmp11_ = NULL;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = client;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = device_id;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = cd_client_find_device_by_property_sync (_tmp8_, CD_DEVICE_PROPERTY_SERIAL, _tmp9_, NULL, &_inner_error_);
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = _tmp10_;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 1367 "simple-scan.c"
+ goto __catch5_g_error;
+ }
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = _tmp7_;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = NULL;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ device = _tmp11_;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (_tmp7_);
+#line 1380 "simple-scan.c"
+ }
+ goto __finally5;
+ __catch5_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp12_ = NULL;
+ GError* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = device_name;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp13_ = e;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp14_ = _tmp13_->message;
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:208: Unable to find colord device %s: %s", _tmp12_, _tmp14_);
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = NULL;
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 1413 "simple-scan.c"
+ }
+ __finally5:
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return NULL;
+#line 1430 "simple-scan.c"
+ }
+ {
+ CdDevice* _tmp15_ = NULL;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp15_ = device;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cd_device_connect_sync (_tmp15_, NULL, &_inner_error_);
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 1440 "simple-scan.c"
+ goto __catch6_g_error;
+ }
+ }
+ goto __finally6;
+ __catch6_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp16_ = NULL;
+ GError* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp16_ = device_name;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp17_ = e;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = _tmp17_->message;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:218: Failed to get properties from the device %s: %s", _tmp16_, _tmp18_);
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = NULL;
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 1475 "simple-scan.c"
+ }
+ __finally6:
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return NULL;
+#line 1492 "simple-scan.c"
+ }
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_ = device;
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp20_ = cd_device_get_default_profile (_tmp19_);
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ profile = _tmp20_;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp21_ = profile;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp21_ == NULL) {
+#line 1504 "simple-scan.c"
+ const gchar* _tmp22_ = NULL;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp22_ = device_name;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:225: No default color profile for device: %s", _tmp22_);
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = NULL;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (profile);
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 1522 "simple-scan.c"
+ }
+ {
+ CdProfile* _tmp23_ = NULL;
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp23_ = profile;
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cd_profile_connect_sync (_tmp23_, NULL, &_inner_error_);
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 1532 "simple-scan.c"
+ goto __catch7_g_error;
+ }
+ }
+ goto __finally7;
+ __catch7_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp24_ = NULL;
+ GError* _tmp25_ = NULL;
+ const gchar* _tmp26_ = NULL;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp24_ = device_name;
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp25_ = e;
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp26_ = _tmp25_->message;
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:235: Failed to get properties from the profile %s: %s", _tmp24_, _tmp26_);
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = NULL;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (profile);
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 1569 "simple-scan.c"
+ }
+ __finally7:
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (profile);
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return NULL;
+#line 1588 "simple-scan.c"
+ }
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp27_ = profile;
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp28_ = cd_profile_get_filename (_tmp27_);
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp29_ = _tmp28_;
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp29_ == NULL) {
+#line 1598 "simple-scan.c"
+ const gchar* _tmp30_ = NULL;
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp30_ = device_name;
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:241: No icc color profile for the device %s", _tmp30_);
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = NULL;
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (profile);
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 1616 "simple-scan.c"
+ }
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp31_ = profile;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp32_ = cd_profile_get_filename (_tmp31_);
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp33_ = _tmp32_;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp34_ = device_name;
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:245: Using color profile %s for device %s", _tmp33_, _tmp34_);
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp35_ = profile;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp36_ = cd_profile_get_filename (_tmp35_);
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp37_ = _tmp36_;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp38_ = g_strdup (_tmp37_);
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = _tmp38_;
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (profile);
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (device);
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (client);
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (device_id);
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 1648 "simple-scan.c"
+}
+
+
+static void simple_scan_scanner_page_info_cb (SimpleScan* self, Scanner* scanner, ScanPageInfo* info) {
+ ScanPageInfo* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ ScanPageInfo* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ ScanPageInfo* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ Page* page = NULL;
+ Page* _tmp6_ = NULL;
+ ScanPageInfo* _tmp7_ = NULL;
+ ScanPageInfo* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+ gchar* _tmp11_ = NULL;
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (scanner != NULL);
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (info != NULL);
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = info;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = _tmp0_->width;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = info;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = _tmp2_->height;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = info;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = _tmp4_->depth;
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:254: Page is %d pixels wide, %d pixels high, %d bits " \
+"per pixel", _tmp1_, _tmp3_, _tmp5_);
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = simple_scan_append_page (self);
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp6_;
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = info;
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_set_page_info (page, _tmp7_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = info;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = _tmp8_->device;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = simple_scan_get_profile_for_device (self, _tmp9_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = _tmp10_;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_set_color_profile (page, _tmp11_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp11_);
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _page_unref0 (page);
+#line 1708 "simple-scan.c"
+}
+
+
+static void simple_scan_scanner_line_cb (SimpleScan* self, Scanner* scanner, ScanLine* line) {
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+ guint _tmp2_ = 0U;
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+ ScanLine* _tmp5_ = NULL;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (scanner != NULL);
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (line != NULL);
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->book;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = self->priv->book;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = book_get_n_pages (_tmp1_);
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = _tmp2_;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = book_get_page (_tmp0_, ((gint) _tmp3_) - 1);
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp4_;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = line;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_parse_scan_line (page, _tmp5_);
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _page_unref0 (page);
+#line 1744 "simple-scan.c"
+}
+
+
+static void simple_scan_scanner_page_done_cb (SimpleScan* self, Scanner* scanner) {
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+ guint _tmp2_ = 0U;
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (scanner != NULL);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->book;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = self->priv->book;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = book_get_n_pages (_tmp1_);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = _tmp2_;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = book_get_page (_tmp0_, ((gint) _tmp3_) - 1);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp4_;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_finish (page);
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _page_unref0 (page);
+#line 1775 "simple-scan.c"
+}
+
+
+static void simple_scan_remove_empty_page (SimpleScan* self) {
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+ guint _tmp2_ = 0U;
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_ = FALSE;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->book;
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = self->priv->book;
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = book_get_n_pages (_tmp1_);
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = _tmp2_;
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = book_get_page (_tmp0_, ((gint) _tmp3_) - 1);
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp4_;
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = page;
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = page_get_has_data (_tmp5_);
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = _tmp6_;
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!_tmp7_) {
+#line 1811 "simple-scan.c"
+ Book* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+#line 283 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = self->priv->book;
+#line 283 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = page;
+#line 283 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ book_delete_page (_tmp8_, _tmp9_);
+#line 1820 "simple-scan.c"
+ }
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _page_unref0 (page);
+#line 1824 "simple-scan.c"
+}
+
+
+static void simple_scan_scanner_document_done_cb (SimpleScan* self, Scanner* scanner) {
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (scanner != NULL);
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_remove_empty_page (self);
+#line 1835 "simple-scan.c"
+}
+
+
+static void simple_scan_scanner_failed_cb (SimpleScan* self, Scanner* scanner, gint error_code, const gchar* error_string) {
+ gint _tmp0_ = 0;
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (scanner != NULL);
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (error_string != NULL);
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_remove_empty_page (self);
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = error_code;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp0_ != ((gint) SANE_STATUS_CANCELLED)) {
+#line 1853 "simple-scan.c"
+ UserInterface* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = self->priv->ui;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = _ ("Failed to scan");
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = error_string;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = self->priv->have_devices;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_show_error (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
+#line 1868 "simple-scan.c"
+ }
+}
+
+
+static void simple_scan_scanner_scanning_changed_cb (SimpleScan* self, Scanner* scanner) {
+ UserInterface* _tmp0_ = NULL;
+ Scanner* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (scanner != NULL);
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->ui;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = scanner;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = scanner_is_scanning (_tmp1_);
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_set_scanning (_tmp0_, _tmp2_);
+#line 1889 "simple-scan.c"
+}
+
+
+static void simple_scan_scan_cb (SimpleScan* self, UserInterface* ui, const gchar* device, ScanOptions* options) {
+ ScanOptions* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ const gchar* _tmp2_ = NULL;
+ Scanner* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ gchar* filename_prefix = NULL;
+ const gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* extension = NULL;
+ ScanOptions* _tmp9_ = NULL;
+ ScanMode _tmp10_ = 0;
+ gchar* filename = NULL;
+ const gchar* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+ UserInterface* _tmp16_ = NULL;
+ Scanner* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+ ScanOptions* _tmp19_ = NULL;
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (ui != NULL);
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (options != NULL);
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = options;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = _tmp0_->dpi;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = device;
+#line 310 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:310: Requesting scan at %d dpi from device '%s'", _tmp1_, _tmp2_);
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = self->priv->scanner;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = scanner_is_scanning (_tmp3_);
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!_tmp4_) {
+#line 1933 "simple-scan.c"
+ Page* _tmp5_ = NULL;
+ Page* _tmp6_ = NULL;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = simple_scan_append_page (self);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = _tmp5_;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _page_unref0 (_tmp6_);
+#line 1942 "simple-scan.c"
+ }
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = _ ("Scanned Document");
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = g_strdup (_tmp7_);
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ filename_prefix = _tmp8_;
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = options;
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = _tmp9_->scan_mode;
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp10_ == SCAN_MODE_COLOR) {
+#line 1956 "simple-scan.c"
+ gchar* _tmp11_ = NULL;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = g_strdup ("jpg");
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (extension);
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ extension = _tmp11_;
+#line 1964 "simple-scan.c"
+ } else {
+ gchar* _tmp12_ = NULL;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = g_strdup ("pdf");
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (extension);
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ extension = _tmp12_;
+#line 1973 "simple-scan.c"
+ }
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp13_ = filename_prefix;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp14_ = extension;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp15_ = g_strdup_printf ("%s.%s", _tmp13_, _tmp14_);
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ filename = _tmp15_;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp16_ = ui;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_set_default_file_name (_tmp16_, filename);
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp17_ = self->priv->scanner;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = device;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_ = options;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ scanner_scan (_tmp17_, _tmp18_, _tmp19_);
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (filename);
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (extension);
+#line 308 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (filename_prefix);
+#line 2001 "simple-scan.c"
+}
+
+
+static void simple_scan_cancel_cb (SimpleScan* self, UserInterface* ui) {
+ Scanner* _tmp0_ = NULL;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (ui != NULL);
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->scanner;
+#line 329 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ scanner_cancel (_tmp0_);
+#line 2015 "simple-scan.c"
+}
+
+
+static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar* prefix, const gchar* extension) {
+ gchar* result = NULL;
+ gchar* filename = NULL;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* path = NULL;
+ GError * _inner_error_ = NULL;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_val_if_fail (prefix != NULL, NULL);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_val_if_fail (extension != NULL, NULL);
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = prefix;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = extension;
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = g_strdup_printf ("%sXXXXXX.%s", _tmp0_, _tmp1_);
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ filename = _tmp2_;
+#line 2041 "simple-scan.c"
+ {
+ gint fd = 0;
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = filename;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = g_file_open_tmp (_tmp3_, &_tmp4_, &_inner_error_);
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ path = _tmp4_;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fd = _tmp5_;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 2060 "simple-scan.c"
+ goto __catch8_g_error;
+ }
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = fd;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ close (_tmp6_);
+#line 2067 "simple-scan.c"
+ }
+ goto __finally8;
+ __catch8_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = e;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = _tmp7_->message;
+#line 346 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_warning ("simple-scan.vala:346: Error saving email attachment: %s", _tmp8_);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = NULL;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (filename);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 2095 "simple-scan.c"
+ }
+ __finally8:
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (filename);
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return NULL;
+#line 2110 "simple-scan.c"
+ }
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = path;
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (filename);
+#line 350 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 2118 "simple-scan.c"
+}
+
+
+static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gchar* profile, gint quality) {
+ gboolean saved = FALSE;
+ gchar* command_line = NULL;
+ gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ const gchar* _tmp42_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (ui != NULL);
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (profile != NULL);
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ saved = FALSE;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = g_strdup ("xdg-email");
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ command_line = _tmp0_;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = profile;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (g_strcmp0 (_tmp1_, "text") == 0) {
+#line 2145 "simple-scan.c"
+ gchar* path = NULL;
+ gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = simple_scan_get_temporary_filename (self, "scan", "pdf");
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ path = _tmp2_;
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = path;
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp3_ != NULL) {
+#line 2157 "simple-scan.c"
+ GFile* file = NULL;
+ const gchar* _tmp4_ = NULL;
+ GFile* _tmp5_ = NULL;
+ UserInterface* _tmp6_ = NULL;
+ const gchar* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+ gchar* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = path;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = g_file_new_for_path (_tmp4_);
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ file = _tmp5_;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = ui;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_show_progress_dialog (_tmp6_);
+#line 2177 "simple-scan.c"
+ {
+ Book* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ GFile* _tmp9_ = NULL;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = self->priv->book;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = quality;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = file;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ book_save (_tmp7_, "pdf", _tmp8_, _tmp9_, &_inner_error_);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 2192 "simple-scan.c"
+ goto __catch9_g_error;
+ }
+ }
+ goto __finally9;
+ __catch9_g_error:
+ {
+ GError* e = NULL;
+ UserInterface* _tmp10_ = NULL;
+ GError* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = ui;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_hide_progress_dialog (_tmp10_);
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = e;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = _tmp11_->message;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_warning ("simple-scan.vala:374: Unable to save email file: %s", _tmp12_);
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (file);
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (command_line);
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return;
+#line 2227 "simple-scan.c"
+ }
+ __finally9:
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (file);
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (command_line);
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return;
+#line 2244 "simple-scan.c"
+ }
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp13_ = command_line;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp14_ = path;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp15_ = g_strdup_printf (" --attach %s", _tmp14_);
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp16_ = _tmp15_;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp17_ = g_strconcat (_tmp13_, _tmp16_, NULL);
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (command_line);
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ command_line = _tmp17_;
+#line 377 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp16_);
+#line 363 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (file);
+#line 2264 "simple-scan.c"
+ }
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 2268 "simple-scan.c"
+ } else {
+ {
+ gint i = 0;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ i = 0;
+#line 2274 "simple-scan.c"
+ {
+ gboolean _tmp18_ = FALSE;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = TRUE;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ while (TRUE) {
+#line 2281 "simple-scan.c"
+ gint _tmp20_ = 0;
+ Book* _tmp21_ = NULL;
+ guint _tmp22_ = 0U;
+ guint _tmp23_ = 0U;
+ gchar* path = NULL;
+ gchar* _tmp24_ = NULL;
+ const gchar* _tmp25_ = NULL;
+ GFile* file = NULL;
+ const gchar* _tmp26_ = NULL;
+ GFile* _tmp27_ = NULL;
+ const gchar* _tmp36_ = NULL;
+ const gchar* _tmp37_ = NULL;
+ gchar* _tmp38_ = NULL;
+ gchar* _tmp39_ = NULL;
+ gchar* _tmp40_ = NULL;
+ gboolean _tmp41_ = FALSE;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!_tmp18_) {
+#line 2300 "simple-scan.c"
+ gint _tmp19_ = 0;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_ = i;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ i = _tmp19_ + 1;
+#line 2306 "simple-scan.c"
+ }
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = FALSE;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp20_ = i;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp21_ = self->priv->book;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp22_ = book_get_n_pages (_tmp21_);
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp23_ = _tmp22_;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!(((guint) _tmp20_) < _tmp23_)) {
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2322 "simple-scan.c"
+ }
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp24_ = simple_scan_get_temporary_filename (self, "scan", "jpg");
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ path = _tmp24_;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp25_ = path;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp25_ == NULL) {
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ saved = FALSE;
+#line 388 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 388 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2338 "simple-scan.c"
+ }
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp26_ = path;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp27_ = g_file_new_for_path (_tmp26_);
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ file = _tmp27_;
+#line 2346 "simple-scan.c"
+ {
+ Book* _tmp28_ = NULL;
+ gint _tmp29_ = 0;
+ Page* _tmp30_ = NULL;
+ Page* _tmp31_ = NULL;
+ gint _tmp32_ = 0;
+ GFile* _tmp33_ = NULL;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp28_ = self->priv->book;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp29_ = i;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp30_ = book_get_page (_tmp28_, _tmp29_);
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp31_ = _tmp30_;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp32_ = quality;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp33_ = file;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_save (_tmp31_, "jpeg", _tmp32_, _tmp33_, &_inner_error_);
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _page_unref0 (_tmp31_);
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 2372 "simple-scan.c"
+ goto __catch10_g_error;
+ }
+ }
+ goto __finally10;
+ __catch10_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp34_ = NULL;
+ const gchar* _tmp35_ = NULL;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 398 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp34_ = e;
+#line 398 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp35_ = _tmp34_->message;
+#line 398 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_warning ("simple-scan.vala:398: Unable to save email file: %s", _tmp35_);
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (file);
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (command_line);
+#line 399 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return;
+#line 2402 "simple-scan.c"
+ }
+ __finally10:
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (file);
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (command_line);
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return;
+#line 2419 "simple-scan.c"
+ }
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp36_ = command_line;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp37_ = path;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp38_ = g_strdup_printf (" --attach %s", _tmp37_);
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp39_ = _tmp38_;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp40_ = g_strconcat (_tmp36_, _tmp39_, NULL);
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (command_line);
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ command_line = _tmp40_;
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp39_);
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp41_ = saved;
+#line 403 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!_tmp41_) {
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (file);
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2447 "simple-scan.c"
+ }
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (file);
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 2453 "simple-scan.c"
+ }
+ }
+ }
+ }
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp42_ = command_line;
+#line 408 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:408: Launching email client: %s", _tmp42_);
+#line 2462 "simple-scan.c"
+ {
+ const gchar* _tmp43_ = NULL;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp43_ = command_line;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_spawn_command_line_async (_tmp43_, &_inner_error_);
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 2471 "simple-scan.c"
+ goto __catch11_g_error;
+ }
+ }
+ goto __finally11;
+ __catch11_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp44_ = NULL;
+ const gchar* _tmp45_ = NULL;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp44_ = e;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp45_ = _tmp44_->message;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_warning ("simple-scan.vala:415: Unable to start email: %s", _tmp45_);
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 2493 "simple-scan.c"
+ }
+ __finally11:
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (command_line);
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return;
+#line 2506 "simple-scan.c"
+ }
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (command_line);
+#line 2510 "simple-scan.c"
+}
+
+
+static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) {
+ gchar* prefix = NULL;
+ GLogLevelFlags _tmp0_ = 0;
+ FILE* _tmp8_ = NULL;
+ GTimer* _tmp9_ = NULL;
+ gdouble _tmp10_ = 0.0;
+ const gchar* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+ gboolean _tmp13_ = FALSE;
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (message != NULL);
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = log_level;
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ switch (_tmp0_ & G_LOG_LEVEL_MASK) {
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ case G_LOG_LEVEL_ERROR:
+#line 2531 "simple-scan.c"
+ {
+ gchar* _tmp1_ = NULL;
+#line 426 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = g_strdup ("ERROR:");
+#line 426 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (prefix);
+#line 426 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ prefix = _tmp1_;
+#line 427 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2542 "simple-scan.c"
+ }
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ case G_LOG_LEVEL_CRITICAL:
+#line 2546 "simple-scan.c"
+ {
+ gchar* _tmp2_ = NULL;
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = g_strdup ("CRITICAL:");
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (prefix);
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ prefix = _tmp2_;
+#line 430 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2557 "simple-scan.c"
+ }
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ case G_LOG_LEVEL_WARNING:
+#line 2561 "simple-scan.c"
+ {
+ gchar* _tmp3_ = NULL;
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = g_strdup ("WARNING:");
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (prefix);
+#line 432 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ prefix = _tmp3_;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2572 "simple-scan.c"
+ }
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ case G_LOG_LEVEL_MESSAGE:
+#line 2576 "simple-scan.c"
+ {
+ gchar* _tmp4_ = NULL;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = g_strdup ("MESSAGE:");
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (prefix);
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ prefix = _tmp4_;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2587 "simple-scan.c"
+ }
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ case G_LOG_LEVEL_INFO:
+#line 2591 "simple-scan.c"
+ {
+ gchar* _tmp5_ = NULL;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = g_strdup ("INFO:");
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (prefix);
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ prefix = _tmp5_;
+#line 439 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2602 "simple-scan.c"
+ }
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ case G_LOG_LEVEL_DEBUG:
+#line 2606 "simple-scan.c"
+ {
+ gchar* _tmp6_ = NULL;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = g_strdup ("DEBUG:");
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (prefix);
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ prefix = _tmp6_;
+#line 442 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2617 "simple-scan.c"
+ }
+ default:
+ {
+ gchar* _tmp7_ = NULL;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = g_strdup ("LOG:");
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (prefix);
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ prefix = _tmp7_;
+#line 445 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2630 "simple-scan.c"
+ }
+ }
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = simple_scan_log_file;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = simple_scan_log_timer;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = g_timer_elapsed (_tmp9_, NULL);
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = prefix;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = message;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp8_, "[%+.2fs] %s %s\n", _tmp10_, _tmp11_, _tmp12_);
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp13_ = simple_scan_debug_enabled;
+#line 449 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp13_) {
+#line 2649 "simple-scan.c"
+ FILE* _tmp14_ = NULL;
+ GTimer* _tmp15_ = NULL;
+ gdouble _tmp16_ = 0.0;
+ const gchar* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp14_ = stderr;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp15_ = simple_scan_log_timer;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp16_ = g_timer_elapsed (_tmp15_, NULL);
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp17_ = prefix;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = message;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp14_, "[%+.2fs] %s %s\n", _tmp16_, _tmp17_, _tmp18_);
+#line 2667 "simple-scan.c"
+ }
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (prefix);
+#line 2671 "simple-scan.c"
+}
+
+
+static void simple_scan_on_uevent (SimpleScan* self, GUdevClient* client, const gchar* action, GUdevDevice* device) {
+ Scanner* _tmp0_ = NULL;
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (self != NULL);
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (client != NULL);
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (action != NULL);
+#line 453 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (device != NULL);
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = self->priv->scanner;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ scanner_redetect (_tmp0_);
+#line 2689 "simple-scan.c"
+}
+
+
+static glong string_strnlen (gchar* str, glong maxlen) {
+ glong result = 0L;
+ gchar* end = NULL;
+ gchar* _tmp0_ = NULL;
+ glong _tmp1_ = 0L;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 1193 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = str;
+#line 1193 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = maxlen;
+#line 1193 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
+#line 1193 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ end = _tmp2_;
+#line 1194 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = end;
+#line 1194 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp3_ == NULL) {
+#line 2712 "simple-scan.c"
+ glong _tmp4_ = 0L;
+#line 1195 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = maxlen;
+#line 1195 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp4_;
+#line 1195 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 2720 "simple-scan.c"
+ } else {
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+#line 1197 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = end;
+#line 1197 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp6_ = str;
+#line 1197 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = (glong) (_tmp5_ - _tmp6_);
+#line 1197 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 2732 "simple-scan.c"
+ }
+}
+
+
+static gchar* string_substring (const gchar* self, glong offset, glong len) {
+ gchar* result = NULL;
+ glong string_length = 0L;
+ gboolean _tmp0_ = FALSE;
+ glong _tmp1_ = 0L;
+ glong _tmp8_ = 0L;
+ glong _tmp14_ = 0L;
+ glong _tmp17_ = 0L;
+ glong _tmp18_ = 0L;
+ glong _tmp19_ = 0L;
+ glong _tmp20_ = 0L;
+ glong _tmp21_ = 0L;
+ gchar* _tmp22_ = NULL;
+#line 1204 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = offset;
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp1_ >= ((glong) 0)) {
+#line 2756 "simple-scan.c"
+ glong _tmp2_ = 0L;
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = len;
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = _tmp2_ >= ((glong) 0);
+#line 2762 "simple-scan.c"
+ } else {
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = FALSE;
+#line 2766 "simple-scan.c"
+ }
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp0_) {
+#line 2770 "simple-scan.c"
+ glong _tmp3_ = 0L;
+ glong _tmp4_ = 0L;
+ glong _tmp5_ = 0L;
+#line 1208 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = offset;
+#line 1208 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = len;
+#line 1208 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
+#line 1208 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ string_length = _tmp5_;
+#line 2782 "simple-scan.c"
+ } else {
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+#line 1210 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp6_ = strlen (self);
+#line 1210 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp7_ = _tmp6_;
+#line 1210 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ string_length = (glong) _tmp7_;
+#line 2792 "simple-scan.c"
+ }
+#line 1213 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp8_ = offset;
+#line 1213 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp8_ < ((glong) 0)) {
+#line 2798 "simple-scan.c"
+ glong _tmp9_ = 0L;
+ glong _tmp10_ = 0L;
+ glong _tmp11_ = 0L;
+#line 1214 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp9_ = string_length;
+#line 1214 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp10_ = offset;
+#line 1214 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ offset = _tmp9_ + _tmp10_;
+#line 1215 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp11_ = offset;
+#line 1215 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
+#line 2812 "simple-scan.c"
+ } else {
+ glong _tmp12_ = 0L;
+ glong _tmp13_ = 0L;
+#line 1217 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp12_ = offset;
+#line 1217 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp13_ = string_length;
+#line 1217 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
+#line 2822 "simple-scan.c"
+ }
+#line 1219 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp14_ = len;
+#line 1219 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp14_ < ((glong) 0)) {
+#line 2828 "simple-scan.c"
+ glong _tmp15_ = 0L;
+ glong _tmp16_ = 0L;
+#line 1220 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp15_ = string_length;
+#line 1220 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp16_ = offset;
+#line 1220 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ len = _tmp15_ - _tmp16_;
+#line 2837 "simple-scan.c"
+ }
+#line 1222 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp17_ = offset;
+#line 1222 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp18_ = len;
+#line 1222 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp19_ = string_length;
+#line 1222 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp20_ = offset;
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp21_ = len;
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp22_;
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 2857 "simple-scan.c"
+}
+
+
+static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
+ guint8* data = NULL;
+ gint data_length1 = 0;
+ gint _data_size_ = 0;
+ const gchar* _tmp0_ = NULL;
+ guint8* _tmp1_ = NULL;
+ size_t _tmp2_;
+ FILE* fixed_file = NULL;
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ FILE* _tmp6_ = NULL;
+ FILE* _tmp7_ = NULL;
+ gint offset = 0;
+ gint line_number = 0;
+ gint xref_offset = 0;
+ gint xref_line = 0;
+ gint startxref_line = 0;
+ gint fixed_size = 0;
+ GString* line = NULL;
+ GString* _tmp8_ = NULL;
+ const gchar* _tmp102_ = NULL;
+ const gchar* _tmp103_ = NULL;
+ gchar* _tmp104_ = NULL;
+ gchar* _tmp105_ = NULL;
+ gint _tmp106_ = 0;
+ gboolean _tmp107_ = FALSE;
+ GError * _inner_error_ = NULL;
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_return_if_fail (filename != NULL);
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = filename;
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_file_get_contents (_tmp0_, (gchar**) (&_tmp1_), &_tmp2_, &_inner_error_);
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ data = (g_free (data), NULL);
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ data = _tmp1_;
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ data_length1 = _tmp2_;
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _data_size_ = data_length1;
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_propagate_error (error, _inner_error_);
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ data = (g_free (data), NULL);
+#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return;
+#line 2911 "simple-scan.c"
+ }
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = filename;
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = g_strconcat (_tmp3_, ".fixed", NULL);
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = _tmp4_;
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = g_fopen (_tmp5_, "w");
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = _tmp6_;
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp5_);
+#line 463 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fixed_file = _tmp7_;
+#line 465 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ offset = 0;
+#line 466 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ line_number = 0;
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ xref_offset = 0;
+#line 468 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ xref_line = -1;
+#line 469 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ startxref_line = -1;
+#line 470 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fixed_size = -1;
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = g_string_new ("");
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ line = _tmp8_;
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ while (TRUE) {
+#line 2945 "simple-scan.c"
+ gint _tmp9_ = 0;
+ gint end_offset = 0;
+ gint _tmp10_ = 0;
+ GString* _tmp11_ = NULL;
+ GString* _tmp19_ = NULL;
+ const gchar* _tmp20_ = NULL;
+ GString* _tmp22_ = NULL;
+ const gchar* _tmp23_ = NULL;
+ gboolean _tmp25_ = FALSE;
+ gint _tmp26_ = 0;
+ gint _tmp100_ = 0;
+ gint _tmp101_ = 0;
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = offset;
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!(_tmp9_ < data_length1)) {
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2964 "simple-scan.c"
+ }
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = offset;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ end_offset = _tmp10_;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = line;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_string_assign (_tmp11_, "");
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ while (TRUE) {
+#line 2976 "simple-scan.c"
+ gint _tmp12_ = 0;
+ guint8 c = 0U;
+ gint _tmp13_ = 0;
+ guint8 _tmp14_ = 0U;
+ GString* _tmp15_ = NULL;
+ guint8 _tmp16_ = 0U;
+ gint _tmp17_ = 0;
+ guint8 _tmp18_ = 0U;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = end_offset;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!(_tmp12_ < data_length1)) {
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 2991 "simple-scan.c"
+ }
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp13_ = end_offset;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp14_ = data[_tmp13_];
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ c = _tmp14_;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp15_ = line;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp16_ = c;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_string_append_c (_tmp15_, (gchar) _tmp16_);
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp17_ = end_offset;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ end_offset = _tmp17_ + 1;
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = c;
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp18_ == ((guint8) '\n')) {
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 3015 "simple-scan.c"
+ }
+ }
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_ = line;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp20_ = _tmp19_->str;
+#line 485 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (g_strcmp0 (_tmp20_, "startxref\n") == 0) {
+#line 3024 "simple-scan.c"
+ gint _tmp21_ = 0;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp21_ = line_number;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ startxref_line = _tmp21_;
+#line 3030 "simple-scan.c"
+ }
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp22_ = line;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp23_ = _tmp22_->str;
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (g_strcmp0 (_tmp23_, "xref\n") == 0) {
+#line 3038 "simple-scan.c"
+ gint _tmp24_ = 0;
+#line 489 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp24_ = line_number;
+#line 489 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ xref_line = _tmp24_;
+#line 3044 "simple-scan.c"
+ }
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp26_ = line_number;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp26_ < 2) {
+#line 3050 "simple-scan.c"
+ GString* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
+ gboolean _tmp29_ = FALSE;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp27_ = line;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp28_ = _tmp27_->str;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp29_ = g_str_has_prefix (_tmp28_, "%%");
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp25_ = _tmp29_;
+#line 3062 "simple-scan.c"
+ } else {
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp25_ = FALSE;
+#line 3066 "simple-scan.c"
+ }
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp25_) {
+#line 3070 "simple-scan.c"
+ gint _tmp30_ = 0;
+ FILE* _tmp31_ = NULL;
+ GString* _tmp32_ = NULL;
+ const gchar* _tmp33_ = NULL;
+ gchar* _tmp34_ = NULL;
+ gchar* _tmp35_ = NULL;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp30_ = xref_offset;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ xref_offset = _tmp30_ - 1;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp31_ = fixed_file;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp32_ = line;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp33_ = _tmp32_->str;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp34_ = string_substring (_tmp33_, (glong) 1, (glong) (-1));
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp35_ = _tmp34_;
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp31_, "%s", _tmp35_);
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp35_);
+#line 3095 "simple-scan.c"
+ } else {
+ gboolean _tmp36_ = FALSE;
+ gint _tmp37_ = 0;
+ gint _tmp38_ = 0;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp37_ = line_number;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp38_ = xref_line;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp37_ == (_tmp38_ + 1)) {
+#line 3106 "simple-scan.c"
+ GString* _tmp39_ = NULL;
+ const gchar* _tmp40_ = NULL;
+ gboolean _tmp41_ = FALSE;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp39_ = line;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp40_ = _tmp39_->str;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp41_ = g_str_has_prefix (_tmp40_, "1 ");
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp36_ = _tmp41_;
+#line 3118 "simple-scan.c"
+ } else {
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp36_ = FALSE;
+#line 3122 "simple-scan.c"
+ }
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp36_) {
+#line 3126 "simple-scan.c"
+ GString* _tmp42_ = NULL;
+ const gchar* _tmp43_ = NULL;
+ gchar* _tmp44_ = NULL;
+ gchar* _tmp45_ = NULL;
+ gint _tmp46_ = 0;
+ FILE* _tmp47_ = NULL;
+ gint _tmp48_ = 0;
+ FILE* _tmp49_ = NULL;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp42_ = line;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp43_ = _tmp42_->str;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp44_ = string_substring (_tmp43_, (glong) 2, (glong) (-1));
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp45_ = _tmp44_;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp46_ = atoi (_tmp45_);
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fixed_size = _tmp46_ + 1;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp45_);
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp47_ = fixed_file;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp48_ = fixed_size;
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp47_, "0 %d\n", _tmp48_);
+#line 503 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp49_ = fixed_file;
+#line 503 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp49_, "0000000000 65535 f \n");
+#line 3159 "simple-scan.c"
+ } else {
+ gboolean _tmp50_ = FALSE;
+ gint _tmp51_ = 0;
+ gint _tmp52_ = 0;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp51_ = line_number;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp52_ = xref_line;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp51_ > _tmp52_) {
+#line 3170 "simple-scan.c"
+ GString* _tmp53_ = NULL;
+ const gchar* _tmp54_ = NULL;
+ gboolean _tmp55_ = FALSE;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp53_ = line;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp54_ = _tmp53_->str;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp55_ = g_str_has_suffix (_tmp54_, " 0000 n\n");
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp50_ = _tmp55_;
+#line 3182 "simple-scan.c"
+ } else {
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp50_ = FALSE;
+#line 3186 "simple-scan.c"
+ }
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp50_) {
+#line 3190 "simple-scan.c"
+ FILE* _tmp56_ = NULL;
+ GString* _tmp57_ = NULL;
+ const gchar* _tmp58_ = NULL;
+ gint _tmp59_ = 0;
+ gint _tmp60_ = 0;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp56_ = fixed_file;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp57_ = line;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp58_ = _tmp57_->str;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp59_ = atoi (_tmp58_);
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp60_ = xref_offset;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp56_, "%010d 00000 n \n", _tmp59_ + _tmp60_);
+#line 3208 "simple-scan.c"
+ } else {
+ gboolean _tmp61_ = FALSE;
+ gint _tmp62_ = 0;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp62_ = startxref_line;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp62_ > 0) {
+#line 3216 "simple-scan.c"
+ gint _tmp63_ = 0;
+ gint _tmp64_ = 0;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp63_ = line_number;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp64_ = startxref_line;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp61_ = _tmp63_ == (_tmp64_ + 1);
+#line 3225 "simple-scan.c"
+ } else {
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp61_ = FALSE;
+#line 3229 "simple-scan.c"
+ }
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp61_) {
+#line 3233 "simple-scan.c"
+ FILE* _tmp65_ = NULL;
+ GString* _tmp66_ = NULL;
+ const gchar* _tmp67_ = NULL;
+ gint _tmp68_ = 0;
+ gint _tmp69_ = 0;
+ gchar* _tmp70_ = NULL;
+ gchar* _tmp71_ = NULL;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp65_ = fixed_file;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp66_ = line;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp67_ = _tmp66_->str;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp68_ = atoi (_tmp67_);
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp69_ = xref_offset;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp70_ = g_strdup_printf ("%d\n", _tmp68_ + _tmp69_);
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp71_ = _tmp70_;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp65_, "%s", _tmp71_);
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp71_);
+#line 3259 "simple-scan.c"
+ } else {
+ gboolean _tmp72_ = FALSE;
+ gint _tmp73_ = 0;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp73_ = fixed_size;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp73_ > 0) {
+#line 3267 "simple-scan.c"
+ GString* _tmp74_ = NULL;
+ const gchar* _tmp75_ = NULL;
+ gboolean _tmp76_ = FALSE;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp74_ = line;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp75_ = _tmp74_->str;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp76_ = g_str_has_prefix (_tmp75_, "/Size ");
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp72_ = _tmp76_;
+#line 3279 "simple-scan.c"
+ } else {
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp72_ = FALSE;
+#line 3283 "simple-scan.c"
+ }
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp72_) {
+#line 3287 "simple-scan.c"
+ FILE* _tmp77_ = NULL;
+ gint _tmp78_ = 0;
+ gchar* _tmp79_ = NULL;
+ gchar* _tmp80_ = NULL;
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp77_ = fixed_file;
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp78_ = fixed_size;
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp79_ = g_strdup_printf ("/Size %d\n", _tmp78_);
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp80_ = _tmp79_;
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp77_, "%s", _tmp80_);
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp80_);
+#line 3304 "simple-scan.c"
+ } else {
+ gboolean _tmp81_ = FALSE;
+ gint _tmp82_ = 0;
+ gint _tmp83_ = 0;
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp82_ = line_number;
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp83_ = startxref_line;
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp82_ == (_tmp83_ + 2)) {
+#line 3315 "simple-scan.c"
+ GString* _tmp84_ = NULL;
+ const gchar* _tmp85_ = NULL;
+ gboolean _tmp86_ = FALSE;
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp84_ = line;
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp85_ = _tmp84_->str;
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp86_ = g_str_has_prefix (_tmp85_, "%%%%");
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp81_ = _tmp86_;
+#line 3327 "simple-scan.c"
+ } else {
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp81_ = FALSE;
+#line 3331 "simple-scan.c"
+ }
+#line 518 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp81_) {
+#line 3335 "simple-scan.c"
+ FILE* _tmp87_ = NULL;
+ GString* _tmp88_ = NULL;
+ const gchar* _tmp89_ = NULL;
+ gchar* _tmp90_ = NULL;
+ gchar* _tmp91_ = NULL;
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp87_ = fixed_file;
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp88_ = line;
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp89_ = _tmp88_->str;
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp90_ = string_substring (_tmp89_, (glong) 2, (glong) (-1));
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp91_ = _tmp90_;
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp87_, "%s", _tmp91_);
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp91_);
+#line 3355 "simple-scan.c"
+ } else {
+ {
+ gint i = 0;
+ gint _tmp92_ = 0;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp92_ = offset;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ i = _tmp92_;
+#line 3364 "simple-scan.c"
+ {
+ gboolean _tmp93_ = FALSE;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp93_ = TRUE;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ while (TRUE) {
+#line 3371 "simple-scan.c"
+ gint _tmp95_ = 0;
+ gint _tmp96_ = 0;
+ FILE* _tmp97_ = NULL;
+ gint _tmp98_ = 0;
+ guint8 _tmp99_ = 0U;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!_tmp93_) {
+#line 3379 "simple-scan.c"
+ gint _tmp94_ = 0;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp94_ = i;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ i = _tmp94_ + 1;
+#line 3385 "simple-scan.c"
+ }
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp93_ = FALSE;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp95_ = i;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp96_ = end_offset;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!(_tmp95_ < _tmp96_)) {
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 3397 "simple-scan.c"
+ }
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp97_ = fixed_file;
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp98_ = i;
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp99_ = data[_tmp98_];
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fputc ((gchar) _tmp99_, _tmp97_);
+#line 3407 "simple-scan.c"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp100_ = line_number;
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ line_number = _tmp100_ + 1;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp101_ = end_offset;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ offset = _tmp101_;
+#line 3425 "simple-scan.c"
+ }
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp102_ = filename;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp103_ = filename;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp104_ = g_strconcat (_tmp103_, "~", NULL);
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp105_ = _tmp104_;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp106_ = g_rename (_tmp102_, _tmp105_);
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp107_ = _tmp106_ >= 0;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp105_);
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp107_) {
+#line 3443 "simple-scan.c"
+ const gchar* _tmp108_ = NULL;
+ gchar* _tmp109_ = NULL;
+ gchar* _tmp110_ = NULL;
+ const gchar* _tmp111_ = NULL;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp108_ = filename;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp109_ = g_strconcat (_tmp108_, ".fixed", NULL);
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp110_ = _tmp109_;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp111_ = filename;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_rename (_tmp110_, _tmp111_);
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp110_);
+#line 3460 "simple-scan.c"
+ }
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_string_free0 (line);
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _fclose0 (fixed_file);
+#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ data = (g_free (data), NULL);
+#line 3468 "simple-scan.c"
+}
+
+
+static void _simple_scan_log_cb_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_log_cb (log_domain, log_levels, message);
+#line 3475 "simple-scan.c"
+}
+
+
+gint simple_scan_main (gchar** args, int args_length1) {
+ gint result = 0;
+ GOptionContext* c = NULL;
+ const gchar* _tmp0_ = NULL;
+ GOptionContext* _tmp1_ = NULL;
+ GOptionContext* _tmp2_ = NULL;
+ GOptionContext* _tmp3_ = NULL;
+ GOptionGroup* _tmp4_ = NULL;
+ gboolean _tmp14_ = FALSE;
+ const gchar* _tmp16_ = NULL;
+ ScanDevice* device = NULL;
+ gchar** _tmp28_ = NULL;
+ gint _tmp28__length1 = 0;
+ GTimer* _tmp38_ = NULL;
+ gchar* path = NULL;
+ const gchar* _tmp39_ = NULL;
+ gchar* _tmp40_ = NULL;
+ const gchar* _tmp41_ = NULL;
+ const gchar* _tmp42_ = NULL;
+ gchar* _tmp43_ = NULL;
+ const gchar* _tmp44_ = NULL;
+ FILE* _tmp45_ = NULL;
+ pid_t _tmp46_ = 0;
+ SimpleScan* app = NULL;
+ ScanDevice* _tmp47_ = NULL;
+ SimpleScan* _tmp48_ = NULL;
+ SimpleScan* _tmp49_ = NULL;
+ gint _tmp50_ = 0;
+ GError * _inner_error_ = NULL;
+#line 535 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ setlocale (LC_ALL, "");
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#line 538 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ textdomain (GETTEXT_PACKAGE);
+#line 540 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ gtk_init (&args_length1, &args);
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp0_ = _ ("[DEVICE...] - Scanning utility");
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp1_ = g_option_context_new (_tmp0_);
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ c = _tmp1_;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = c;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_option_context_add_main_entries (_tmp2_, SIMPLE_SCAN_options, GETTEXT_PACKAGE);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = c;
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = gtk_get_option_group (TRUE);
+#line 545 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_option_context_add_group (_tmp3_, _tmp4_);
+#line 3534 "simple-scan.c"
+ {
+ GOptionContext* _tmp5_ = NULL;
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = c;
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_option_context_parse (_tmp5_, &args_length1, &args, &_inner_error_);
+#line 548 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 3543 "simple-scan.c"
+ goto __catch12_g_error;
+ }
+ }
+ goto __finally12;
+ __catch12_g_error:
+ {
+ GError* e = NULL;
+ FILE* _tmp6_ = NULL;
+ GError* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ FILE* _tmp9_ = NULL;
+ const gchar* _tmp10_ = NULL;
+ gchar** _tmp11_ = NULL;
+ gint _tmp11__length1 = 0;
+ const gchar* _tmp12_ = NULL;
+ FILE* _tmp13_ = NULL;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = stderr;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = e;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = _tmp7_->message;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp6_, "%s\n", _tmp8_);
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = stderr;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = _ ("Run '%s --help' to see a full list of available command line options.");
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11_ = args;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp11__length1 = args_length1;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = _tmp11_[0];
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp9_, _tmp10_, _tmp12_);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp13_ = stderr;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp13_, "\n");
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = EXIT_FAILURE;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_option_context_free0 (c);
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 3596 "simple-scan.c"
+ }
+ __finally12:
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_option_context_free0 (c);
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 546 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return 0;
+#line 3609 "simple-scan.c"
+ }
+#line 558 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp14_ = simple_scan_show_version;
+#line 558 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp14_) {
+#line 3615 "simple-scan.c"
+ FILE* _tmp15_ = NULL;
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp15_ = stderr;
+#line 561 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp15_, "simple-scan %s\n", VERSION);
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = EXIT_SUCCESS;
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_option_context_free0 (c);
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 3627 "simple-scan.c"
+ }
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp16_ = simple_scan_fix_pdf_filename;
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp16_ != NULL) {
+#line 3633 "simple-scan.c"
+ {
+ const gchar* _tmp17_ = NULL;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp17_ = simple_scan_fix_pdf_filename;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_fix_pdf (_tmp17_, &_inner_error_);
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 3642 "simple-scan.c"
+ goto __catch13_g_error;
+ }
+ {
+ gint i = 0;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ i = 1;
+#line 3649 "simple-scan.c"
+ {
+ gboolean _tmp18_ = FALSE;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = TRUE;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ while (TRUE) {
+#line 3656 "simple-scan.c"
+ gint _tmp20_ = 0;
+ gchar** _tmp21_ = NULL;
+ gint _tmp21__length1 = 0;
+ gchar** _tmp22_ = NULL;
+ gint _tmp22__length1 = 0;
+ gint _tmp23_ = 0;
+ const gchar* _tmp24_ = NULL;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!_tmp18_) {
+#line 3666 "simple-scan.c"
+ gint _tmp19_ = 0;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_ = i;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ i = _tmp19_ + 1;
+#line 3672 "simple-scan.c"
+ }
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp18_ = FALSE;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp20_ = i;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp21_ = args;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp21__length1 = args_length1;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!(_tmp20_ < _tmp21__length1)) {
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ break;
+#line 3686 "simple-scan.c"
+ }
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp22_ = args;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp22__length1 = args_length1;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp23_ = i;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp24_ = _tmp22_[_tmp23_];
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_fix_pdf (_tmp24_, &_inner_error_);
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 3700 "simple-scan.c"
+ goto __catch13_g_error;
+ }
+ }
+ }
+ }
+ }
+ goto __finally13;
+ __catch13_g_error:
+ {
+ GError* e = NULL;
+ FILE* _tmp25_ = NULL;
+ GError* _tmp26_ = NULL;
+ const gchar* _tmp27_ = NULL;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ e = _inner_error_;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _inner_error_ = NULL;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp25_ = stderr;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp26_ = e;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp27_ = _tmp26_->message;
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ fprintf (_tmp25_, "Error fixing PDF file: %s", _tmp27_);
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = EXIT_FAILURE;
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_error_free0 (e);
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_option_context_free0 (c);
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 3734 "simple-scan.c"
+ }
+ __finally13:
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_inner_error_ != NULL) {
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_option_context_free0 (c);
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_clear_error (&_inner_error_);
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return 0;
+#line 3747 "simple-scan.c"
+ }
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = EXIT_SUCCESS;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_option_context_free0 (c);
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 3755 "simple-scan.c"
+ }
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ device = NULL;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp28_ = args;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp28__length1 = args_length1;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp28__length1 > 1) {
+#line 3765 "simple-scan.c"
+ ScanDevice* _tmp29_ = NULL;
+ ScanDevice* _tmp30_ = NULL;
+ gchar** _tmp31_ = NULL;
+ gint _tmp31__length1 = 0;
+ const gchar* _tmp32_ = NULL;
+ gchar* _tmp33_ = NULL;
+ ScanDevice* _tmp34_ = NULL;
+ gchar** _tmp35_ = NULL;
+ gint _tmp35__length1 = 0;
+ const gchar* _tmp36_ = NULL;
+ gchar* _tmp37_ = NULL;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp29_ = scan_device_new ();
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _scan_device_unref0 (device);
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ device = _tmp29_;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp30_ = device;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp31_ = args;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp31__length1 = args_length1;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp32_ = _tmp31_[1];
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp33_ = g_strdup (_tmp32_);
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp30_->name);
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp30_->name = _tmp33_;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp34_ = device;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp35_ = args;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp35__length1 = args_length1;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp36_ = _tmp35_[1];
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp37_ = g_strdup (_tmp36_);
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (_tmp34_->label);
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp34_->label = _tmp37_;
+#line 3811 "simple-scan.c"
+ }
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp38_ = g_timer_new ();
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_timer_destroy0 (simple_scan_log_timer);
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_log_timer = _tmp38_;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp39_ = g_get_user_cache_dir ();
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp40_ = g_build_filename (_tmp39_, "simple-scan", NULL, NULL);
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ path = _tmp40_;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp41_ = path;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_mkdir_with_parents (_tmp41_, 0700);
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp42_ = g_get_user_cache_dir ();
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp43_ = g_build_filename (_tmp42_, "simple-scan", "simple-scan.log", NULL, NULL);
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ path = _tmp43_;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp44_ = path;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp45_ = g_fopen (_tmp44_, "w");
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _fclose0 (simple_scan_log_file);
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_log_file = _tmp45_;
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_log_set_default_handler (_simple_scan_log_cb_glog_func, NULL);
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp46_ = getpid ();
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:596: Starting Simple Scan %s, PID=%i", VERSION, (gint) _tmp46_);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp47_ = device;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp48_ = simple_scan_new (_tmp47_);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ app = _tmp48_;
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp49_ = app;
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp50_ = g_application_run ((GApplication*) _tmp49_, 0, NULL);
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ result = _tmp50_;
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (app);
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_free0 (path);
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _scan_device_unref0 (device);
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_option_context_free0 (c);
+#line 599 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return result;
+#line 3873 "simple-scan.c"
+}
+
+
+int main (int argc, char ** argv) {
+#if !GLIB_CHECK_VERSION (2,35,0)
+ g_type_init ();
+#endif
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return simple_scan_main (argv, argc);
+#line 3883 "simple-scan.c"
+}
+
+
+static void simple_scan_class_init (SimpleScanClass * klass) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ simple_scan_parent_class = g_type_class_peek_parent (klass);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_type_class_add_private (klass, sizeof (SimpleScanPrivate));
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ G_APPLICATION_CLASS (klass)->startup = simple_scan_real_startup;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ G_APPLICATION_CLASS (klass)->activate = simple_scan_real_activate;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ G_APPLICATION_CLASS (klass)->shutdown = simple_scan_real_shutdown;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ G_OBJECT_CLASS (klass)->finalize = simple_scan_finalize;
+#line 3900 "simple-scan.c"
+}
+
+
+static void simple_scan_instance_init (SimpleScan * self) {
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv = SIMPLE_SCAN_GET_PRIVATE (self);
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->default_device = NULL;
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self->priv->have_devices = FALSE;
+#line 3911 "simple-scan.c"
+}
+
+
+static void simple_scan_finalize (GObject* obj) {
+ SimpleScan * self;
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SIMPLE_SCAN, SimpleScan);
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _scan_device_unref0 (self->priv->default_device);
+#line 34 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (self->priv->udev_client);
+#line 35 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _g_object_unref0 (self->priv->ui);
+#line 36 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _scanner_unref0 (self->priv->scanner);
+#line 37 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _book_unref0 (self->priv->book);
+#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ G_OBJECT_CLASS (simple_scan_parent_class)->finalize (obj);
+#line 3931 "simple-scan.c"
+}
+
+
+GType simple_scan_get_type (void) {
+ static volatile gsize simple_scan_type_id__volatile = 0;
+ if (g_once_init_enter (&simple_scan_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (SimpleScanClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) simple_scan_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SimpleScan), 0, (GInstanceInitFunc) simple_scan_instance_init, NULL };
+ GType simple_scan_type_id;
+ simple_scan_type_id = g_type_register_static (GTK_TYPE_APPLICATION, "SimpleScan", &g_define_type_info, 0);
+ g_once_init_leave (&simple_scan_type_id__volatile, simple_scan_type_id);
+ }
+ return simple_scan_type_id__volatile;
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/src/simple-scan.vala b/src/simple-scan.vala
new file mode 100644
index 0000000..813f29b
--- /dev/null
+++ b/src/simple-scan.vala
@@ -0,0 +1,601 @@
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+public class SimpleScan : Gtk.Application
+{
+ static bool show_version;
+ static bool debug_enabled;
+ static string? fix_pdf_filename = null;
+ public static const OptionEntry[] options =
+ {
+ { "version", 'v', 0, OptionArg.NONE, ref show_version,
+ /* Help string for command line --version flag */
+ N_("Show release version"), null},
+ { "debug", 'd', 0, OptionArg.NONE, ref debug_enabled,
+ /* Help string for command line --debug flag */
+ N_("Print debugging messages"), null},
+ { "fix-pdf", 0, 0, OptionArg.STRING, ref fix_pdf_filename,
+ N_("Fix PDF files generated with older versions of Simple Scan"), "FILENAME..."},
+ { null }
+ };
+ private static Timer log_timer;
+ private static FileStream? log_file;
+
+ private ScanDevice? default_device = null;
+ private bool have_devices = false;
+ private GUdev.Client udev_client;
+ private UserInterface ui;
+ private Scanner scanner;
+ private Book book;
+
+ public SimpleScan (ScanDevice? device = null)
+ {
+ default_device = device;
+ }
+
+ public override void startup ()
+ {
+ base.startup ();
+
+ ui = new UserInterface ();
+ book = ui.book;
+ ui.start_scan.connect (scan_cb);
+ ui.stop_scan.connect (cancel_cb);
+ ui.email.connect (email_cb);
+
+ scanner = Scanner.get_instance ();
+ scanner.update_devices.connect (update_scan_devices_cb);
+ scanner.request_authorization.connect (authorize_cb);
+ scanner.expect_page.connect (scanner_new_page_cb);
+ scanner.got_page_info.connect (scanner_page_info_cb);
+ scanner.got_line.connect (scanner_line_cb);
+ scanner.page_done.connect (scanner_page_done_cb);
+ scanner.document_done.connect (scanner_document_done_cb);
+ scanner.scan_failed.connect (scanner_failed_cb);
+ scanner.scanning_changed.connect (scanner_scanning_changed_cb);
+
+ string[]? subsystems = { "usb", null };
+ udev_client = new GUdev.Client (subsystems);
+ udev_client.uevent.connect (on_uevent);
+
+ if (default_device != null)
+ {
+ List<ScanDevice> device_list = null;
+
+ device_list.append (default_device);
+ ui.set_scan_devices (device_list);
+ ui.selected_device = default_device.name;
+ }
+ }
+
+ public override void activate ()
+ {
+ base.activate ();
+ ui.start ();
+ scanner.start ();
+ }
+
+ public override void shutdown ()
+ {
+ base.shutdown ();
+ book = null;
+ ui = null;
+ udev_client = null;
+ scanner.free ();
+ }
+
+ private void update_scan_devices_cb (Scanner scanner, List<ScanDevice> devices)
+ {
+ var devices_copy = devices.copy ();
+
+ /* If the default device is not detected add it to the list */
+ if (default_device != null)
+ {
+ var default_in_list = false;
+ foreach (var device in devices_copy)
+ {
+ if (device.name == default_device.name)
+ {
+ default_in_list = true;
+ break;
+ }
+ }
+
+ if (!default_in_list)
+ devices_copy.prepend (default_device);
+ }
+
+ have_devices = devices_copy.length () > 0;
+ ui.set_scan_devices (devices_copy);
+ }
+
+ private void authorize_cb (Scanner scanner, string resource)
+ {
+ string username, password;
+ ui.authorize (resource, out username, out password);
+ scanner.authorize (username, password);
+ }
+
+ private Page append_page ()
+ {
+ /* Use current page if not used */
+ var page = book.get_page (-1);
+ if (page != null && !page.has_data)
+ {
+ ui.selected_page = page;
+ page.start ();
+ return page;
+ }
+
+ /* Copy info from previous page */
+ var scan_direction = ScanDirection.TOP_TO_BOTTOM;
+ bool do_crop = false;
+ string named_crop = null;
+ var width = 100, height = 100, dpi = 100, cx = 0, cy = 0, cw = 0, ch = 0;
+ if (page != null)
+ {
+ scan_direction = page.scan_direction;
+ width = page.width;
+ height = page.height;
+ dpi = page.dpi;
+
+ do_crop = page.has_crop;
+ if (do_crop)
+ {
+ named_crop = page.crop_name;
+ cx = page.crop_x;
+ cy = page.crop_y;
+ cw = page.crop_width;
+ ch = page.crop_height;
+ }
+ }
+
+ page = new Page (width, height, dpi, scan_direction);
+ book.append_page (page);
+ if (do_crop)
+ {
+ if (named_crop != null)
+ {
+ page.set_named_crop (named_crop);
+ }
+ else
+ page.set_custom_crop (cw, ch);
+ page.move_crop (cx, cy);
+ }
+ ui.selected_page = page;
+ page.start ();
+
+ return page;
+ }
+
+ private void scanner_new_page_cb (Scanner scanner)
+ {
+ append_page ();
+ }
+
+ private string? get_profile_for_device (string device_name)
+ {
+#if HAVE_COLORD
+ var device_id = "sane:%s".printf (device_name);
+ debug ("Getting color profile for device %s", device_name);
+
+ var client = new Colord.Client ();
+ try
+ {
+ client.connect_sync ();
+ }
+ catch (Error e)
+ {
+ debug ("Failed to connect to colord: %s", e.message);
+ return null;
+ }
+
+ Colord.Device device;
+ try
+ {
+ device = client.find_device_by_property_sync (Colord.DEVICE_PROPERTY_SERIAL, device_id);
+ }
+ catch (Error e)
+ {
+ debug ("Unable to find colord device %s: %s", device_name, e.message);
+ return null;
+ }
+
+ try
+ {
+ device.connect_sync ();
+ }
+ catch (Error e)
+ {
+ debug ("Failed to get properties from the device %s: %s", device_name, e.message);
+ return null;
+ }
+
+ var profile = device.get_default_profile ();
+ if (profile == null)
+ {
+ debug ("No default color profile for device: %s", device_name);
+ return null;
+ }
+
+ try
+ {
+ profile.connect_sync ();
+ }
+ catch (Error e)
+ {
+ debug ("Failed to get properties from the profile %s: %s", device_name, e.message);
+ return null;
+ }
+
+ if (profile.filename == null)
+ {
+ debug ("No icc color profile for the device %s", device_name);
+ return null;
+ }
+
+ debug ("Using color profile %s for device %s", profile.filename, device_name);
+ return profile.filename;
+#else
+ return null;
+#endif
+ }
+
+ private void scanner_page_info_cb (Scanner scanner, ScanPageInfo info)
+ {
+ debug ("Page is %d pixels wide, %d pixels high, %d bits per pixel",
+ info.width, info.height, info.depth);
+
+ /* Add a new page */
+ var page = append_page ();
+ page.set_page_info (info);
+
+ /* Get ICC color profile */
+ /* FIXME: The ICC profile could change */
+ /* FIXME: Don't do a D-bus call for each page, cache color profiles */
+ page.color_profile = get_profile_for_device (info.device);
+ }
+
+ private void scanner_line_cb (Scanner scanner, ScanLine line)
+ {
+ var page = book.get_page ((int) book.n_pages - 1);
+ page.parse_scan_line (line);
+ }
+
+ private void scanner_page_done_cb (Scanner scanner)
+ {
+ var page = book.get_page ((int) book.n_pages - 1);
+ page.finish ();
+ }
+
+ private void remove_empty_page ()
+ {
+ var page = book.get_page ((int) book.n_pages - 1);
+ if (!page.has_data)
+ book.delete_page (page);
+ }
+
+ private void scanner_document_done_cb (Scanner scanner)
+ {
+ remove_empty_page ();
+ }
+
+ private void scanner_failed_cb (Scanner scanner, int error_code, string error_string)
+ {
+ remove_empty_page ();
+ if (error_code != Sane.Status.CANCELLED)
+ {
+ ui.show_error (/* Title of error dialog when scan failed */
+ _("Failed to scan"),
+ error_string,
+ have_devices);
+ }
+ }
+
+ private void scanner_scanning_changed_cb (Scanner scanner)
+ {
+ ui.scanning = scanner.is_scanning ();
+ }
+
+ private void scan_cb (UserInterface ui, string? device, ScanOptions options)
+ {
+ debug ("Requesting scan at %d dpi from device '%s'", options.dpi, device);
+
+ if (!scanner.is_scanning ())
+ append_page ();
+
+ /* Default filename to use when saving document (and extension will be added, e.g. .jpg) */
+ string filename_prefix = _("Scanned Document");
+ string extension;
+ if (options.scan_mode == ScanMode.COLOR)
+ extension = "jpg";
+ else
+ extension = "pdf";
+ var filename = "%s.%s".printf (filename_prefix, extension);
+ ui.default_file_name = filename;
+ scanner.scan (device, options);
+ }
+
+ private void cancel_cb (UserInterface ui)
+ {
+ scanner.cancel ();
+ }
+
+ private string? get_temporary_filename (string prefix, string extension)
+ {
+ /* NOTE: I'm not sure if this is a 100% safe strategy to use g_file_open_tmp(), close and
+ * use the filename but it appears to work in practise */
+
+ var filename = "%sXXXXXX.%s".printf (prefix, extension);
+ string path;
+ try
+ {
+ var fd = FileUtils.open_tmp (filename, out path);
+ Posix.close (fd);
+ }
+ catch (Error e)
+ {
+ warning ("Error saving email attachment: %s", e.message);
+ return null;
+ }
+
+ return path;
+ }
+
+ private void email_cb (UserInterface ui, string profile, int quality)
+ {
+ var saved = false;
+ var command_line = "xdg-email";
+
+ /* Save text files as PDFs */
+ if (profile == "text")
+ {
+ /* Open a temporary file */
+ var path = get_temporary_filename ("scan", "pdf");
+ if (path != null)
+ {
+ var file = File.new_for_path (path);
+ ui.show_progress_dialog ();
+ try
+ {
+ book.save ("pdf", quality, file);
+ }
+ catch (Error e)
+ {
+ ui.hide_progress_dialog ();
+ warning ("Unable to save email file: %s", e.message);
+ return;
+ }
+ command_line += " --attach %s".printf (path);
+ }
+ }
+ else
+ {
+ for (var i = 0; i < book.n_pages; i++)
+ {
+ var path = get_temporary_filename ("scan", "jpg");
+ if (path == null)
+ {
+ saved = false;
+ break;
+ }
+
+ var file = File.new_for_path (path);
+ try
+ {
+ book.get_page (i).save ("jpeg", quality, file);
+ }
+ catch (Error e)
+ {
+ warning ("Unable to save email file: %s", e.message);
+ return;
+ }
+ command_line += " --attach %s".printf (path);
+
+ if (!saved)
+ break;
+ }
+ }
+
+ debug ("Launching email client: %s", command_line);
+ try
+ {
+ Process.spawn_command_line_async (command_line);
+ }
+ catch (Error e)
+ {
+ warning ("Unable to start email: %s", e.message);
+ }
+ }
+
+ private static void log_cb (string? log_domain, LogLevelFlags log_level, string message)
+ {
+ string prefix;
+
+ switch (log_level & LogLevelFlags.LEVEL_MASK)
+ {
+ case LogLevelFlags.LEVEL_ERROR:
+ prefix = "ERROR:";
+ break;
+ case LogLevelFlags.LEVEL_CRITICAL:
+ prefix = "CRITICAL:";
+ break;
+ case LogLevelFlags.LEVEL_WARNING:
+ prefix = "WARNING:";
+ break;
+ case LogLevelFlags.LEVEL_MESSAGE:
+ prefix = "MESSAGE:";
+ break;
+ case LogLevelFlags.LEVEL_INFO:
+ prefix = "INFO:";
+ break;
+ case LogLevelFlags.LEVEL_DEBUG:
+ prefix = "DEBUG:";
+ break;
+ default:
+ prefix = "LOG:";
+ break;
+ }
+
+ log_file.printf ("[%+.2fs] %s %s\n", log_timer.elapsed (), prefix, message);
+ if (debug_enabled)
+ stderr.printf ("[%+.2fs] %s %s\n", log_timer.elapsed (), prefix, message);
+ }
+
+ private void on_uevent (GUdev.Client client, string action, GUdev.Device device)
+ {
+ scanner.redetect ();
+ }
+
+ private static void fix_pdf (string filename) throws Error
+ {
+ uint8[] data;
+ FileUtils.get_data (filename, out data);
+
+ var fixed_file = FileStream.open (filename + ".fixed", "w");
+
+ var offset = 0;
+ var line_number = 0;
+ var xref_offset = 0;
+ var xref_line = -1;
+ var startxref_line = -1;
+ var fixed_size = -1;
+ var line = new StringBuilder ();
+ while (offset < data.length)
+ {
+ var end_offset = offset;
+ line.assign ("");
+ while (end_offset < data.length)
+ {
+ var c = data[end_offset];
+ line.append_c ((char) c);
+ end_offset++;
+ if (c == '\n')
+ break;
+ }
+
+ if (line.str == "startxref\n")
+ startxref_line = line_number;
+
+ if (line.str == "xref\n")
+ xref_line = line_number;
+
+ /* Fix PDF header and binary comment */
+ if (line_number < 2 && line.str.has_prefix ("%%"))
+ {
+ xref_offset--;
+ fixed_file.printf ("%s", line.str.substring (1));
+ }
+
+ /* Fix xref subsection count */
+ else if (line_number == xref_line + 1 && line.str.has_prefix ("1 "))
+ {
+ fixed_size = int.parse (line.str.substring (2)) + 1;
+ fixed_file.printf ("0 %d\n", fixed_size);
+ fixed_file.printf ("0000000000 65535 f \n");
+ }
+
+ /* Fix xref format */
+ else if (line_number > xref_line && line.str.has_suffix (" 0000 n\n"))
+ fixed_file.printf ("%010d 00000 n \n", int.parse (line.str) + xref_offset);
+
+ /* Fix xref offset */
+ else if (startxref_line > 0 && line_number == startxref_line + 1)
+ fixed_file.printf ("%d\n".printf (int.parse (line.str) + xref_offset));
+
+ else if (fixed_size > 0 && line.str.has_prefix ("/Size "))
+ fixed_file.printf ("/Size %d\n".printf (fixed_size));
+
+ /* Fix EOF marker */
+ else if (line_number == startxref_line + 2 && line.str.has_prefix ("%%%%"))
+ fixed_file.printf ("%s", line.str.substring (2));
+
+ else
+ for (var i = offset; i < end_offset; i++)
+ fixed_file.putc ((char) data[i]);
+
+ line_number++;
+ offset = end_offset;
+ }
+
+ if (FileUtils.rename (filename, filename + "~") >= 0)
+ FileUtils.rename (filename + ".fixed", filename);
+ }
+
+ public static int main (string[] args)
+ {
+ Intl.setlocale (LocaleCategory.ALL, "");
+ Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
+ Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ Intl.textdomain (GETTEXT_PACKAGE);
+
+ Gtk.init (ref args);
+
+ var c = new OptionContext (/* Arguments and description for --help text */
+ _("[DEVICE...] - Scanning utility"));
+ c.add_main_entries (options, GETTEXT_PACKAGE);
+ c.add_group (Gtk.get_option_group (true));
+ try
+ {
+ c.parse (ref args);
+ }
+ catch (Error e)
+ {
+ stderr.printf ("%s\n", e.message);
+ stderr.printf (/* Text printed out when an unknown command-line argument provided */
+ _("Run '%s --help' to see a full list of available command line options."), args[0]);
+ stderr.printf ("\n");
+ return Posix.EXIT_FAILURE;
+ }
+ if (show_version)
+ {
+ /* Note, not translated so can be easily parsed */
+ stderr.printf ("simple-scan %s\n", VERSION);
+ return Posix.EXIT_SUCCESS;
+ }
+ if (fix_pdf_filename != null)
+ {
+ try
+ {
+ fix_pdf (fix_pdf_filename);
+ for (var i = 1; i < args.length; i++)
+ fix_pdf (args[i]);
+ }
+ catch (Error e)
+ {
+ stderr.printf ("Error fixing PDF file: %s", e.message);
+ return Posix.EXIT_FAILURE;
+ }
+ return Posix.EXIT_SUCCESS;
+ }
+
+ ScanDevice? device = null;
+ if (args.length > 1)
+ {
+ device = new ScanDevice ();
+ device.name = args[1];
+ device.label = args[1];
+ }
+
+ /* Log to a file */
+ log_timer = new Timer ();
+ var path = Path.build_filename (Environment.get_user_cache_dir (), "simple-scan", null);
+ DirUtils.create_with_parents (path, 0700);
+ path = Path.build_filename (Environment.get_user_cache_dir (), "simple-scan", "simple-scan.log", null);
+ log_file = FileStream.open (path, "w");
+ Log.set_default_handler (log_cb);
+
+ debug ("Starting Simple Scan %s, PID=%i", VERSION, Posix.getpid ());
+
+ var app = new SimpleScan (device);
+ return app.run ();
+ }
+}
diff --git a/src/simple_scan_vala.stamp b/src/simple_scan_vala.stamp
new file mode 100644
index 0000000..859afb1
--- /dev/null
+++ b/src/simple_scan_vala.stamp
@@ -0,0 +1 @@
+stamp
diff --git a/src/ui.c b/src/ui.c
new file mode 100644
index 0000000..340b940
--- /dev/null
+++ b/src/ui.c
@@ -0,0 +1,11701 @@
+/* ui.c generated by valac 0.24.0, the Vala compiler
+ * generated from ui.vala, do not modify */
+
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>,
+ * Eduard Gotwig <g@ox.io>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <gio/gio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
+#include <gdk/gdk.h>
+#include <float.h>
+#include <math.h>
+#include <cairo.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib/gstdio.h>
+#include <unistd.h>
+
+
+#define TYPE_USER_INTERFACE (user_interface_get_type ())
+#define USER_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_USER_INTERFACE, UserInterface))
+#define USER_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_USER_INTERFACE, UserInterfaceClass))
+#define IS_USER_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_USER_INTERFACE))
+#define IS_USER_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_USER_INTERFACE))
+#define USER_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_USER_INTERFACE, UserInterfaceClass))
+
+typedef struct _UserInterface UserInterface;
+typedef struct _UserInterfaceClass UserInterfaceClass;
+typedef struct _UserInterfacePrivate UserInterfacePrivate;
+
+#define TYPE_PROGRESS_BAR_DIALOG (progress_bar_dialog_get_type ())
+#define PROGRESS_BAR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialog))
+#define PROGRESS_BAR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialogClass))
+#define IS_PROGRESS_BAR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROGRESS_BAR_DIALOG))
+#define IS_PROGRESS_BAR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROGRESS_BAR_DIALOG))
+#define PROGRESS_BAR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialogClass))
+
+typedef struct _ProgressBarDialog ProgressBarDialog;
+typedef struct _ProgressBarDialogClass ProgressBarDialogClass;
+
+#define TYPE_BOOK (book_get_type ())
+#define BOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOK, Book))
+#define BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOK, BookClass))
+#define IS_BOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOK))
+#define IS_BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOK))
+#define BOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOK, BookClass))
+
+typedef struct _Book Book;
+typedef struct _BookClass BookClass;
+
+#define TYPE_AUTOSAVE_MANAGER (autosave_manager_get_type ())
+#define AUTOSAVE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOSAVE_MANAGER, AutosaveManager))
+#define AUTOSAVE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOSAVE_MANAGER, AutosaveManagerClass))
+#define IS_AUTOSAVE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOSAVE_MANAGER))
+#define IS_AUTOSAVE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOSAVE_MANAGER))
+#define AUTOSAVE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOSAVE_MANAGER, AutosaveManagerClass))
+
+typedef struct _AutosaveManager AutosaveManager;
+typedef struct _AutosaveManagerClass AutosaveManagerClass;
+
+#define TYPE_BOOK_VIEW (book_view_get_type ())
+#define BOOK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOK_VIEW, BookView))
+#define BOOK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOK_VIEW, BookViewClass))
+#define IS_BOOK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOK_VIEW))
+#define IS_BOOK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOK_VIEW))
+#define BOOK_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOK_VIEW, BookViewClass))
+
+typedef struct _BookView BookView;
+typedef struct _BookViewClass BookViewClass;
+
+#define TYPE_SCAN_DIRECTION (scan_direction_get_type ())
+
+#define TYPE_PAGE (page_get_type ())
+#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
+#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
+#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
+#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
+#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))
+
+typedef struct _Page Page;
+typedef struct _PageClass PageClass;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _book_unref0(var) ((var == NULL) ? NULL : (var = (book_unref (var), NULL)))
+#define _autosave_manager_unref0(var) ((var == NULL) ? NULL : (var = (autosave_manager_unref (var), NULL)))
+#define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL)))
+
+#define TYPE_SCAN_DEVICE (scan_device_get_type ())
+#define SCAN_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_DEVICE, ScanDevice))
+#define SCAN_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_DEVICE, ScanDeviceClass))
+#define IS_SCAN_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_DEVICE))
+#define IS_SCAN_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_DEVICE))
+#define SCAN_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_DEVICE, ScanDeviceClass))
+
+typedef struct _ScanDevice ScanDevice;
+typedef struct _ScanDeviceClass ScanDeviceClass;
+typedef struct _ScanDevicePrivate ScanDevicePrivate;
+#define _scan_device_unref0(var) ((var == NULL) ? NULL : (var = (scan_device_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+
+#define TYPE_SCAN_TYPE (scan_type_get_type ())
+
+#define TYPE_SCAN_OPTIONS (scan_options_get_type ())
+#define SCAN_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_OPTIONS, ScanOptions))
+#define SCAN_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_OPTIONS, ScanOptionsClass))
+#define IS_SCAN_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_OPTIONS))
+#define IS_SCAN_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_OPTIONS))
+#define SCAN_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_OPTIONS, ScanOptionsClass))
+
+typedef struct _ScanOptions ScanOptions;
+typedef struct _ScanOptionsClass ScanOptionsClass;
+
+#define TYPE_SCAN_MODE (scan_mode_get_type ())
+typedef struct _ScanOptionsPrivate ScanOptionsPrivate;
+#define _scan_options_unref0(var) ((var == NULL) ? NULL : (var = (scan_options_unref (var), NULL)))
+typedef struct _Block1Data Block1Data;
+
+#define TYPE_PAGE_ICON (page_icon_get_type ())
+#define PAGE_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_ICON, PageIcon))
+#define PAGE_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_ICON, PageIconClass))
+#define IS_PAGE_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_ICON))
+#define IS_PAGE_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_ICON))
+#define PAGE_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_ICON, PageIconClass))
+
+typedef struct _PageIcon PageIcon;
+typedef struct _PageIconClass PageIconClass;
+#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))
+#define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL)))
+typedef struct _ProgressBarDialogPrivate ProgressBarDialogPrivate;
+typedef struct _PageIconPrivate PageIconPrivate;
+
+struct _UserInterface {
+ GtkApplicationWindow parent_instance;
+ UserInterfacePrivate * priv;
+};
+
+struct _UserInterfaceClass {
+ GtkApplicationWindowClass parent_class;
+};
+
+typedef enum {
+ SCAN_DIRECTION_TOP_TO_BOTTOM,
+ SCAN_DIRECTION_LEFT_TO_RIGHT,
+ SCAN_DIRECTION_BOTTOM_TO_TOP,
+ SCAN_DIRECTION_RIGHT_TO_LEFT
+} ScanDirection;
+
+struct _UserInterfacePrivate {
+ GSettings* settings;
+ GtkMenuBar* menubar;
+ GtkToolbar* toolbar;
+ GtkMenu* page_menu;
+ GtkBox* main_vbox;
+ GtkInfoBar* info_bar;
+ GtkImage* info_bar_image;
+ GtkLabel* info_bar_label;
+ GtkButton* info_bar_close_button;
+ GtkButton* info_bar_change_scanner_button;
+ GtkRadioMenuItem* custom_crop_menuitem;
+ GtkRadioMenuItem* a4_menuitem;
+ GtkRadioMenuItem* a5_menuitem;
+ GtkRadioMenuItem* a6_menuitem;
+ GtkRadioMenuItem* letter_menuitem;
+ GtkRadioMenuItem* legal_menuitem;
+ GtkRadioMenuItem* four_by_six_menuitem;
+ GtkRadioMenuItem* no_crop_menuitem;
+ GtkMenuItem* page_move_left_menuitem;
+ GtkMenuItem* page_move_right_menuitem;
+ GtkMenuItem* page_delete_menuitem;
+ GtkMenuItem* crop_rotate_menuitem;
+ GtkMenuItem* save_menuitem;
+ GtkMenuItem* save_as_menuitem;
+ GtkMenuItem* copy_to_clipboard_menuitem;
+ GtkButton* save_button;
+ GtkToolButton* save_toolbutton;
+ GtkMenuItem* stop_scan_menuitem;
+ GtkToolButton* stop_toolbutton;
+ GtkToggleButton* crop_button;
+ GtkToggleToolButton* crop_toolbutton;
+ GtkButton* stop_button;
+ GtkButton* scan_button;
+ GtkRadioMenuItem* text_button_menuitem;
+ GtkRadioMenuItem* text_button_hb_menuitem;
+ GtkRadioMenuItem* text_menuitem;
+ GtkRadioMenuItem* photo_button_menuitem;
+ GtkRadioMenuItem* photo_button_hb_menuitem;
+ GtkRadioMenuItem* photo_menuitem;
+ GtkDialog* authorize_dialog;
+ GtkLabel* authorize_label;
+ GtkEntry* username_entry;
+ GtkEntry* password_entry;
+ GtkDialog* preferences_dialog;
+ GtkComboBox* device_combo;
+ GtkComboBox* text_dpi_combo;
+ GtkComboBox* photo_dpi_combo;
+ GtkComboBox* page_side_combo;
+ GtkComboBox* paper_size_combo;
+ GtkScale* brightness_scale;
+ GtkScale* contrast_scale;
+ GtkScale* quality_scale;
+ GtkListStore* device_model;
+ GtkListStore* text_dpi_model;
+ GtkListStore* photo_dpi_model;
+ GtkListStore* page_side_model;
+ GtkListStore* paper_size_model;
+ GtkAdjustment* brightness_adjustment;
+ GtkAdjustment* contrast_adjustment;
+ GtkAdjustment* quality_adjustment;
+ gboolean setting_devices;
+ gboolean user_selected_device;
+ GtkFileChooserDialog* save_dialog;
+ ProgressBarDialog* progress_dialog;
+ gboolean have_error;
+ gchar* error_title;
+ gchar* error_text;
+ gboolean error_change_scanner_hint;
+ Book* _book;
+ gchar* book_uri;
+ AutosaveManager* autosave_manager;
+ BookView* book_view;
+ gboolean updating_page_menu;
+ gint default_page_width;
+ gint default_page_height;
+ gint default_page_dpi;
+ ScanDirection default_page_scan_direction;
+ gchar* document_hint;
+ gchar* _default_file_name;
+ gboolean scanning_;
+ gint window_width;
+ gint window_height;
+ gboolean window_is_maximized;
+ guint save_state_timeout;
+};
+
+struct _ScanDevice {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanDevicePrivate * priv;
+ gchar* name;
+ gchar* label;
+};
+
+struct _ScanDeviceClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanDevice *self);
+};
+
+typedef enum {
+ SCAN_TYPE_SINGLE,
+ SCAN_TYPE_ADF_FRONT,
+ SCAN_TYPE_ADF_BACK,
+ SCAN_TYPE_ADF_BOTH
+} ScanType;
+
+typedef enum {
+ SCAN_MODE_DEFAULT,
+ SCAN_MODE_COLOR,
+ SCAN_MODE_GRAY,
+ SCAN_MODE_LINEART
+} ScanMode;
+
+struct _ScanOptions {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ ScanOptionsPrivate * priv;
+ gint dpi;
+ ScanMode scan_mode;
+ gint depth;
+ ScanType type;
+ gint paper_width;
+ gint paper_height;
+ gint brightness;
+ gint contrast;
+};
+
+struct _ScanOptionsClass {
+ GTypeClass parent_class;
+ void (*finalize) (ScanOptions *self);
+};
+
+struct _Block1Data {
+ int _ref_count_;
+ UserInterface* self;
+ GtkWindow* dialog;
+};
+
+struct _ProgressBarDialog {
+ GtkWindow parent_instance;
+ ProgressBarDialogPrivate * priv;
+};
+
+struct _ProgressBarDialogClass {
+ GtkWindowClass parent_class;
+};
+
+struct _ProgressBarDialogPrivate {
+ GtkProgressBar* bar;
+};
+
+struct _PageIcon {
+ GtkDrawingArea parent_instance;
+ PageIconPrivate * priv;
+};
+
+struct _PageIconClass {
+ GtkDrawingAreaClass parent_class;
+};
+
+struct _PageIconPrivate {
+ gchar* text;
+ gdouble r;
+ gdouble g;
+ gdouble b;
+};
+
+
+static gpointer user_interface_parent_class = NULL;
+static gpointer progress_bar_dialog_parent_class = NULL;
+static gpointer page_icon_parent_class = NULL;
+
+GType user_interface_get_type (void) G_GNUC_CONST;
+GType progress_bar_dialog_get_type (void) G_GNUC_CONST;
+gpointer book_ref (gpointer instance);
+void book_unref (gpointer instance);
+GParamSpec* param_spec_book (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_book (GValue* value, gpointer v_object);
+void value_take_book (GValue* value, gpointer v_object);
+gpointer value_get_book (const GValue* value);
+GType book_get_type (void) G_GNUC_CONST;
+gpointer autosave_manager_ref (gpointer instance);
+void autosave_manager_unref (gpointer instance);
+GParamSpec* param_spec_autosave_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_autosave_manager (GValue* value, gpointer v_object);
+void value_take_autosave_manager (GValue* value, gpointer v_object);
+gpointer value_get_autosave_manager (const GValue* value);
+GType autosave_manager_get_type (void) G_GNUC_CONST;
+GType book_view_get_type (void) G_GNUC_CONST;
+GType scan_direction_get_type (void) G_GNUC_CONST;
+#define USER_INTERFACE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_USER_INTERFACE, UserInterfacePrivate))
+enum {
+ USER_INTERFACE_DUMMY_PROPERTY,
+ USER_INTERFACE_BOOK,
+ USER_INTERFACE_SELECTED_PAGE,
+ USER_INTERFACE_DEFAULT_FILE_NAME,
+ USER_INTERFACE_SCANNING,
+ USER_INTERFACE_BRIGHTNESS,
+ USER_INTERFACE_CONTRAST,
+ USER_INTERFACE_QUALITY,
+ USER_INTERFACE_SELECTED_DEVICE
+};
+Book* user_interface_get_book (UserInterface* self);
+gpointer page_ref (gpointer instance);
+void page_unref (gpointer instance);
+GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_page (GValue* value, gpointer v_object);
+void value_take_page (GValue* value, gpointer v_object);
+gpointer value_get_page (const GValue* value);
+GType page_get_type (void) G_GNUC_CONST;
+static void user_interface_page_added_cb (UserInterface* self, Book* book, Page* page);
+static void _user_interface_page_added_cb_book_page_added (Book* _sender, Page* page, gpointer self);
+static void user_interface_reordered_cb (UserInterface* self, Book* book);
+static void _user_interface_reordered_cb_book_reordered (Book* _sender, gpointer self);
+static void user_interface_page_removed_cb (UserInterface* self, Book* book, Page* page);
+static void _user_interface_page_removed_cb_book_page_removed (Book* _sender, Page* page, gpointer self);
+#define USER_INTERFACE_DEFAULT_TEXT_DPI 150
+#define USER_INTERFACE_DEFAULT_PHOTO_DPI 300
+void user_interface_new_document_activate_cb (UserInterface* self);
+static void _user_interface_new_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+void user_interface_reorder_document_activate_cb (UserInterface* self);
+static void _user_interface_reorder_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+void user_interface_save_document_activate_cb (UserInterface* self);
+static void _user_interface_save_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+void user_interface_save_as_document_activate_cb (UserInterface* self);
+static void _user_interface_save_as_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+void user_interface_email_document_activate_cb (UserInterface* self);
+static void _user_interface_email_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+void user_interface_print_document_activate_cb (UserInterface* self);
+static void _user_interface_print_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+void user_interface_preferences_activate_cb (UserInterface* self);
+static void _user_interface_preferences_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+void user_interface_help_contents_activate_cb (UserInterface* self);
+static void _user_interface_help_contents_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+void user_interface_about_activate_cb (UserInterface* self);
+static void _user_interface_about_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+void user_interface_quit_activate_cb (UserInterface* self);
+static void _user_interface_quit_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
+UserInterface* user_interface_new (void);
+UserInterface* user_interface_construct (GType object_type);
+Book* book_new (void);
+Book* book_construct (GType object_type);
+static void user_interface_set_book (UserInterface* self, Book* value);
+static void user_interface_load (UserInterface* self);
+AutosaveManager* autosave_manager_new (void);
+AutosaveManager* autosave_manager_construct (GType object_type);
+void autosave_manager_set_book (AutosaveManager* self, Book* value);
+void autosave_manager_load (AutosaveManager* self);
+guint book_get_n_pages (Book* self);
+static void user_interface_add_default_page (UserInterface* self);
+void book_set_needs_saving (Book* self, gboolean value);
+Page* book_get_page (Book* self, gint page_number);
+void book_view_set_selected_page (BookView* self, Page* value);
+static void user_interface_needs_saving_cb (UserInterface* self, Book* book);
+static void _user_interface_needs_saving_cb_book_needs_saving_changed (Book* _sender, gpointer self);
+static gboolean user_interface_find_scan_device (UserInterface* self, const gchar* device, GtkTreeIter* iter);
+static void user_interface_show_error_dialog (UserInterface* self, const gchar* error_title, const gchar* error_text);
+void user_interface_authorize (UserInterface* self, const gchar* resource, gchar** username, gchar** password);
+static void user_interface_device_combo_changed_cb (UserInterface* self, GtkWidget* widget);
+gchar* user_interface_get_selected_device (UserInterface* self);
+static void _user_interface_device_combo_changed_cb_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
+static void user_interface_update_info_bar (UserInterface* self);
+gpointer scan_device_ref (gpointer instance);
+void scan_device_unref (gpointer instance);
+GParamSpec* param_spec_scan_device (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_device (GValue* value, gpointer v_object);
+void value_take_scan_device (GValue* value, gpointer v_object);
+gpointer value_get_scan_device (const GValue* value);
+GType scan_device_get_type (void) G_GNUC_CONST;
+void user_interface_set_scan_devices (UserInterface* self, GList* devices);
+Page* page_new (gint width, gint height, gint dpi, ScanDirection scan_direction);
+Page* page_construct (GType object_type, gint width, gint height, gint dpi, ScanDirection scan_direction);
+void book_append_page (Book* self, Page* page);
+static void user_interface_on_file_type_changed (UserInterface* self, GtkTreeSelection* selection);
+static gchar* user_interface_get_selected_extension (UserInterface* self, GtkTreeSelection* selection);
+static gchar* user_interface_choose_file_location (UserInterface* self);
+const gchar* user_interface_get_default_file_name (UserInterface* self);
+static void _user_interface_on_file_type_changed_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self);
+static gboolean user_interface_save_document (UserInterface* self, gboolean force_choose_location);
+void user_interface_show_progress_dialog (UserInterface* self);
+void book_save (Book* self, const gchar* type, gint quality, GFile* file, GError** error);
+gint user_interface_get_quality (UserInterface* self);
+void user_interface_hide_progress_dialog (UserInterface* self);
+void user_interface_show_error (UserInterface* self, const gchar* error_title, const gchar* error_text, gboolean change_scanner_hint);
+static gboolean user_interface_prompt_to_save (UserInterface* self, const gchar* title, const gchar* discard_label);
+gboolean book_get_needs_saving (Book* self);
+static void user_interface_clear_document (UserInterface* self);
+void book_clear (Book* self);
+static void user_interface_new_document (UserInterface* self);
+gboolean user_interface_get_scanning (UserInterface* self);
+static void user_interface_new_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_new_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
+static void user_interface_set_document_hint (UserInterface* self, const gchar* document_hint, gboolean save);
+static void user_interface_text_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_text_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+static void user_interface_photo_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_photo_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+GType scan_type_get_type (void) G_GNUC_CONST;
+static void user_interface_set_page_side (UserInterface* self, ScanType page_side);
+static void user_interface_set_paper_size (UserInterface* self, gint width, gint height);
+static gint user_interface_get_text_dpi (UserInterface* self);
+static gint user_interface_get_photo_dpi (UserInterface* self);
+static ScanType user_interface_get_page_side (UserInterface* self);
+static gboolean user_interface_get_paper_size (UserInterface* self, gint* width, gint* height);
+gpointer scan_options_ref (gpointer instance);
+void scan_options_unref (gpointer instance);
+GParamSpec* param_spec_scan_options (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_scan_options (GValue* value, gpointer v_object);
+void value_take_scan_options (GValue* value, gpointer v_object);
+gpointer value_get_scan_options (const GValue* value);
+GType scan_options_get_type (void) G_GNUC_CONST;
+static ScanOptions* user_interface_make_scan_options (UserInterface* self);
+ScanOptions* scan_options_new (void);
+ScanOptions* scan_options_construct (GType object_type);
+GType scan_mode_get_type (void) G_GNUC_CONST;
+gint user_interface_get_brightness (UserInterface* self);
+gint user_interface_get_contrast (UserInterface* self);
+static void user_interface_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_scan_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_stop_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_stop_scan_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
+static void user_interface_continuous_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_continuous_scan_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_preferences_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_preferences_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static gboolean user_interface_preferences_dialog_delete_event_cb (UserInterface* self, GtkWidget* widget, GdkEventAny* event);
+static gboolean _user_interface_preferences_dialog_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self);
+static void user_interface_preferences_dialog_response_cb (UserInterface* self, GtkWidget* widget, gint response_id);
+static void _user_interface_preferences_dialog_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
+static void user_interface_update_page_menu (UserInterface* self);
+Page* book_view_get_selected_page (BookView* self);
+guint book_get_page_index (Book* self, Page* page);
+static void user_interface_page_selected_cb (UserInterface* self, BookView* view, Page* page);
+gboolean page_get_has_crop (Page* self);
+const gchar* page_get_crop_name (Page* self);
+static void user_interface_show_page_cb (UserInterface* self, BookView* view, Page* page);
+gchar* get_temporary_filename (const gchar* prefix, const gchar* extension);
+void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError** error);
+static void user_interface_show_page_menu_cb (UserInterface* self, BookView* view);
+static void user_interface_rotate_left_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+void page_rotate_left (Page* self);
+static void _user_interface_rotate_left_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
+static void user_interface_rotate_right_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+void page_rotate_right (Page* self);
+static void _user_interface_rotate_right_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
+static void user_interface_set_crop (UserInterface* self, const gchar* crop_name);
+void page_set_no_crop (Page* self);
+gint page_get_width (Page* self);
+gint page_get_height (Page* self);
+void page_set_custom_crop (Page* self, gint width, gint height);
+void page_move_crop (Page* self, gint x, gint y);
+void page_set_named_crop (Page* self, const gchar* name);
+static void user_interface_no_crop_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_no_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+static void user_interface_custom_crop_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_custom_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+static void user_interface_crop_button_toggled_cb (UserInterface* self, GtkToggleButton* widget);
+static void _user_interface_crop_button_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self);
+static void user_interface_crop_toolbutton_toggled_cb (UserInterface* self, GtkToggleToolButton* widget);
+static void _user_interface_crop_toolbutton_toggled_cb_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self);
+static void user_interface_four_by_six_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_four_by_six_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+static void user_interface_legal_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_legal_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+static void user_interface_letter_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_letter_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+static void user_interface_a6_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_a6_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+static void user_interface_a5_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_a5_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+static void user_interface_a4_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget);
+static void _user_interface_a4_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self);
+static void user_interface_crop_rotate_menuitem_activate_cb (UserInterface* self, GtkWidget* widget);
+void page_rotate_crop (Page* self);
+static void _user_interface_crop_rotate_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_page_move_left_menuitem_activate_cb (UserInterface* self, GtkWidget* widget);
+void book_move_page (Book* self, Page* page, guint location);
+static void _user_interface_page_move_left_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_page_move_right_menuitem_activate_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_page_move_right_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_page_delete_menuitem_activate_cb (UserInterface* self, GtkWidget* widget);
+Book* book_view_get_book (BookView* self);
+void book_delete_page (Book* self, Page* page);
+static void _user_interface_page_delete_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_reorder_document (UserInterface* self);
+static Block1Data* block1_data_ref (Block1Data* _data1_);
+static void block1_data_unref (void * _userdata_);
+static gboolean __lambda4_ (Block1Data* _data1_, GdkEventKey* e);
+static gboolean ___lambda4__gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
+static GtkButton* user_interface_make_reorder_button (UserInterface* self, const gchar* text, const gchar* items);
+static void __lambda5_ (Block1Data* _data1_);
+void book_combine_sides (Book* self);
+static void ___lambda5__gtk_button_clicked (GtkButton* _sender, gpointer self);
+static void __lambda6_ (Block1Data* _data1_);
+void book_combine_sides_reverse (Book* self);
+static void ___lambda6__gtk_button_clicked (GtkButton* _sender, gpointer self);
+static void __lambda7_ (Block1Data* _data1_);
+void book_reverse (Book* self);
+static void ___lambda7__gtk_button_clicked (GtkButton* _sender, gpointer self);
+static void __lambda8_ (Block1Data* _data1_);
+static void ___lambda8__gtk_button_clicked (GtkButton* _sender, gpointer self);
+static void user_interface_reorder_menuitem_activate_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_reorder_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static GtkBox* user_interface_make_reorder_box (UserInterface* self, const gchar* items);
+GType page_icon_get_type (void) G_GNUC_CONST;
+PageIcon* page_icon_new (const gchar* text, gdouble r, gdouble g, gdouble b);
+PageIcon* page_icon_construct (GType object_type, const gchar* text, gdouble r, gdouble g, gdouble b);
+static void user_interface_save_file_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_save_file_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
+static void user_interface_copy_to_clipboard_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+void page_copy_to_clipboard (Page* self, GtkWindow* window);
+static void _user_interface_copy_to_clipboard_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_save_as_file_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_save_as_file_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_draw_page (UserInterface* self, GtkPrintOperation* operation, GtkPrintContext* print_context, gint page_number);
+gboolean page_get_is_landscape (Page* self);
+gint page_get_dpi (Page* self);
+GdkPixbuf* page_get_image (Page* self, gboolean apply_crop);
+static void user_interface_email_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_email_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_print_document (UserInterface* self);
+static void _user_interface_draw_page_gtk_print_operation_draw_page (GtkPrintOperation* _sender, GtkPrintContext* context, gint page_nr, gpointer self);
+static void user_interface_print_button_clicked_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_print_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_launch_help (UserInterface* self);
+static void user_interface_help_contents_menuitem_activate_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_help_contents_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static void user_interface_show_about (UserInterface* self);
+static void user_interface_about_menuitem_activate_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_about_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static gboolean user_interface_on_quit (UserInterface* self);
+static void user_interface_save_state (UserInterface* self, gboolean force);
+void autosave_manager_cleanup (AutosaveManager* self);
+static void user_interface_quit_menuitem_activate_cb (UserInterface* self, GtkWidget* widget);
+static void _user_interface_quit_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
+static gboolean user_interface_simple_scan_window_configure_event_cb (UserInterface* self, GtkWidget* widget, GdkEventConfigure* event);
+static gboolean _user_interface_simple_scan_window_configure_event_cb_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self);
+static void user_interface_info_bar_response_cb (UserInterface* self, GtkInfoBar* widget, gint response_id);
+static gboolean user_interface_simple_scan_window_window_state_event_cb (UserInterface* self, GtkWidget* widget, GdkEventWindowState* event);
+static gboolean _user_interface_simple_scan_window_window_state_event_cb_gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self);
+static gboolean user_interface_window_delete_event_cb (UserInterface* self, GtkWidget* widget, GdkEventAny* event);
+static gboolean _user_interface_window_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self);
+static void user_interface_page_size_changed_cb (UserInterface* self, Page* page);
+static void user_interface_page_scan_direction_changed_cb (UserInterface* self, Page* page);
+ScanDirection page_get_scan_direction (Page* self);
+static void _user_interface_page_size_changed_cb_page_size_changed (Page* _sender, gpointer self);
+static void _user_interface_page_scan_direction_changed_cb_page_scan_direction_changed (Page* _sender, gpointer self);
+static void user_interface_set_dpi_combo (UserInterface* self, GtkComboBox* combo, gint default_dpi, gint current_dpi);
+static gboolean user_interface_get_shell_shows_menubar (UserInterface* self);
+static void _user_interface_info_bar_response_cb_gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self);
+static void __lambda10_ (UserInterface* self);
+static void ___lambda10__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
+static void __lambda11_ (UserInterface* self);
+static void ___lambda11__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
+static void __lambda12_ (UserInterface* self);
+static void ___lambda12__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
+static void __lambda13_ (UserInterface* self);
+static void ___lambda13__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
+void user_interface_set_brightness (UserInterface* self, gint value);
+static void __lambda14_ (UserInterface* self);
+static void ___lambda14__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self);
+void user_interface_set_contrast (UserInterface* self, gint value);
+static void __lambda15_ (UserInterface* self);
+static void ___lambda15__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self);
+void user_interface_set_quality (UserInterface* self, gint value);
+static void __lambda16_ (UserInterface* self);
+static void ___lambda16__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self);
+BookView* book_view_new (Book* book);
+BookView* book_view_construct (GType object_type, Book* book);
+static void _user_interface_page_selected_cb_book_view_page_selected (BookView* _sender, Page* page, gpointer self);
+static void _user_interface_show_page_cb_book_view_show_page (BookView* _sender, Page* page, gpointer self);
+static void _user_interface_show_page_menu_cb_book_view_show_menu (BookView* _sender, gpointer self);
+static void user_interface_load_state (UserInterface* self);
+ProgressBarDialog* progress_bar_dialog_new (GtkApplicationWindow* parent, const gchar* title);
+ProgressBarDialog* progress_bar_dialog_construct (GType object_type, GtkApplicationWindow* parent, const gchar* title);
+static void user_interface_book_saving_cb (UserInterface* self, gint page_number);
+static void _user_interface_book_saving_cb_book_saving (Book* _sender, gint i, gpointer self);
+static gchar* user_interface_get_state_filename (UserInterface* self);
+static gint user_interface_state_get_integer (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, gint _default_);
+static gboolean user_interface_state_get_boolean (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, gboolean _default_);
+static gchar* user_interface_state_get_string (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, const gchar* _default_);
+static gboolean ___lambda9_ (UserInterface* self);
+static gboolean ____lambda9__gsource_func (gpointer self);
+static gboolean ___lambda17_ (UserInterface* self);
+static gboolean ____lambda17__gsource_func (gpointer self);
+void progress_bar_dialog_set_fraction (ProgressBarDialog* self, gdouble value);
+void progress_bar_dialog_set_message (ProgressBarDialog* self, const gchar* value);
+void user_interface_start (UserInterface* self);
+Page* user_interface_get_selected_page (UserInterface* self);
+void user_interface_set_selected_page (UserInterface* self, Page* value);
+void user_interface_set_default_file_name (UserInterface* self, const gchar* value);
+void user_interface_set_scanning (UserInterface* self, gboolean value);
+void user_interface_set_selected_device (UserInterface* self, const gchar* value);
+static void g_cclosure_user_marshal_VOID__STRING_SCAN_OPTIONS (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
+static void g_cclosure_user_marshal_VOID__STRING_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
+static void user_interface_finalize (GObject* obj);
+static void _vala_user_interface_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+static void _vala_user_interface_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
+#define PROGRESS_BAR_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialogPrivate))
+enum {
+ PROGRESS_BAR_DIALOG_DUMMY_PROPERTY,
+ PROGRESS_BAR_DIALOG_FRACTION,
+ PROGRESS_BAR_DIALOG_MESSAGE
+};
+gdouble progress_bar_dialog_get_fraction (ProgressBarDialog* self);
+const gchar* progress_bar_dialog_get_message (ProgressBarDialog* self);
+static void progress_bar_dialog_finalize (GObject* obj);
+static void _vala_progress_bar_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+static void _vala_progress_bar_dialog_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
+#define PAGE_ICON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PAGE_ICON, PageIconPrivate))
+enum {
+ PAGE_ICON_DUMMY_PROPERTY
+};
+#define PAGE_ICON_MINIMUM_WIDTH 20
+static void page_icon_real_get_preferred_width (GtkWidget* base, gint* minimum_width, gint* natural_width);
+static void page_icon_real_get_preferred_height (GtkWidget* base, gint* minimum_height, gint* natural_height);
+static void page_icon_real_get_preferred_height_for_width (GtkWidget* base, gint width, gint* minimum_height, gint* natural_height);
+static void page_icon_real_get_preferred_width_for_height (GtkWidget* base, gint height, gint* minimum_width, gint* natural_width);
+static gboolean page_icon_real_draw (GtkWidget* base, cairo_t* c);
+static void page_icon_finalize (GObject* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+static const GActionEntry USER_INTERFACE_action_entries[10] = {{"new_document", _user_interface_new_document_activate_cb_gsimple_action_activate_callback}, {"reorder", _user_interface_reorder_document_activate_cb_gsimple_action_activate_callback}, {"save", _user_interface_save_document_activate_cb_gsimple_action_activate_callback}, {"save_as", _user_interface_save_as_document_activate_cb_gsimple_action_activate_callback}, {"email", _user_interface_email_document_activate_cb_gsimple_action_activate_callback}, {"print", _user_interface_print_document_activate_cb_gsimple_action_activate_callback}, {"preferences", _user_interface_preferences_activate_cb_gsimple_action_activate_callback}, {"help", _user_interface_help_contents_activate_cb_gsimple_action_activate_callback}, {"about", _user_interface_about_activate_cb_gsimple_action_activate_callback}, {"quit", _user_interface_quit_activate_cb_gsimple_action_activate_callback}};
+
+static void _user_interface_page_added_cb_book_page_added (Book* _sender, Page* page, gpointer self) {
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_page_added_cb ((UserInterface*) self, _sender, page);
+#line 690 "ui.c"
+}
+
+
+static void _user_interface_reordered_cb_book_reordered (Book* _sender, gpointer self) {
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_reordered_cb ((UserInterface*) self, _sender);
+#line 697 "ui.c"
+}
+
+
+static void _user_interface_page_removed_cb_book_page_removed (Book* _sender, Page* page, gpointer self) {
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_page_removed_cb ((UserInterface*) self, _sender, page);
+#line 704 "ui.c"
+}
+
+
+static void _user_interface_new_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_new_document_activate_cb ((UserInterface*) self);
+#line 711 "ui.c"
+}
+
+
+static void _user_interface_reorder_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_reorder_document_activate_cb ((UserInterface*) self);
+#line 718 "ui.c"
+}
+
+
+static void _user_interface_save_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_document_activate_cb ((UserInterface*) self);
+#line 725 "ui.c"
+}
+
+
+static void _user_interface_save_as_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_as_document_activate_cb ((UserInterface*) self);
+#line 732 "ui.c"
+}
+
+
+static void _user_interface_email_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_email_document_activate_cb ((UserInterface*) self);
+#line 739 "ui.c"
+}
+
+
+static void _user_interface_print_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_print_document_activate_cb ((UserInterface*) self);
+#line 746 "ui.c"
+}
+
+
+static void _user_interface_preferences_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_preferences_activate_cb ((UserInterface*) self);
+#line 753 "ui.c"
+}
+
+
+static void _user_interface_help_contents_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_help_contents_activate_cb ((UserInterface*) self);
+#line 760 "ui.c"
+}
+
+
+static void _user_interface_about_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_about_activate_cb ((UserInterface*) self);
+#line 767 "ui.c"
+}
+
+
+static void _user_interface_quit_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
+#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_quit_activate_cb ((UserInterface*) self);
+#line 774 "ui.c"
+}
+
+
+static void _user_interface_needs_saving_cb_book_needs_saving_changed (Book* _sender, gpointer self) {
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_needs_saving_cb ((UserInterface*) self, _sender);
+#line 781 "ui.c"
+}
+
+
+UserInterface* user_interface_construct (GType object_type) {
+ UserInterface * self = NULL;
+ GSettings* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+ Book* _tmp2_ = NULL;
+ Book* _tmp3_ = NULL;
+ Book* _tmp4_ = NULL;
+ Book* _tmp5_ = NULL;
+ AutosaveManager* _tmp6_ = NULL;
+ AutosaveManager* _tmp7_ = NULL;
+ Book* _tmp8_ = NULL;
+ AutosaveManager* _tmp9_ = NULL;
+ Book* _tmp10_ = NULL;
+ guint _tmp11_ = 0U;
+ guint _tmp12_ = 0U;
+ Book* _tmp18_ = NULL;
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = (UserInterface*) g_object_new (object_type, NULL);
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = g_settings_new ("org.gnome.SimpleScan");
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->settings);
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->settings = _tmp0_;
+#line 263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book_new ();
+#line 263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_book (self, _tmp2_);
+#line 263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _book_unref0 (_tmp2_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->_book;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp3_, "page-added", (GCallback) _user_interface_page_added_cb_book_page_added, self, 0);
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->_book;
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp4_, "reordered", (GCallback) _user_interface_reordered_cb_book_reordered, self, 0);
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->_book;
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp5_, "page-removed", (GCallback) _user_interface_page_removed_cb_book_page_removed, self, 0);
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_load (self);
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = autosave_manager_new ();
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _autosave_manager_unref0 (self->priv->autosave_manager);
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->autosave_manager = _tmp6_;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = self->priv->autosave_manager;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = self->priv->_book;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ autosave_manager_set_book (_tmp7_, _tmp8_);
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = self->priv->autosave_manager;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ autosave_manager_load (_tmp9_);
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = self->priv->_book;
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = book_get_n_pages (_tmp10_);
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = _tmp11_;
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp12_ == ((guint) 0)) {
+#line 855 "ui.c"
+ Book* _tmp13_ = NULL;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_add_default_page (self);
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = self->priv->_book;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_set_needs_saving (_tmp13_, FALSE);
+#line 863 "ui.c"
+ } else {
+ BookView* _tmp14_ = NULL;
+ Book* _tmp15_ = NULL;
+ Page* _tmp16_ = NULL;
+ Page* _tmp17_ = NULL;
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = self->priv->book_view;
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = self->priv->_book;
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = book_get_page (_tmp15_, 0);
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = _tmp16_;
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_view_set_selected_page (_tmp14_, _tmp17_);
+#line 280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (_tmp17_);
+#line 881 "ui.c"
+ }
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = self->priv->_book;
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp18_, "needs-saving-changed", (GCallback) _user_interface_needs_saving_cb_book_needs_saving_changed, self, 0);
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return self;
+#line 889 "ui.c"
+}
+
+
+UserInterface* user_interface_new (void) {
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return user_interface_construct (TYPE_USER_INTERFACE);
+#line 896 "ui.c"
+}
+
+
+static gboolean user_interface_find_scan_device (UserInterface* self, const gchar* device, GtkTreeIter* iter) {
+ GtkTreeIter _vala_iter = {0};
+ gboolean result = FALSE;
+ gboolean have_iter = FALSE;
+ GtkListStore* _tmp0_ = NULL;
+ GtkTreeIter _tmp1_ = {0};
+ gboolean _tmp2_ = FALSE;
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (device != NULL, FALSE);
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ have_iter = FALSE;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->device_model;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp0_, &_tmp1_);
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_iter = _tmp1_;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 921 "ui.c"
+ {
+ gboolean _tmp3_ = FALSE;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = TRUE;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ while (TRUE) {
+#line 928 "ui.c"
+ gchar* d = NULL;
+ GtkListStore* _tmp8_ = NULL;
+ GtkTreeIter _tmp9_ = {0};
+ const gchar* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp3_) {
+#line 936 "ui.c"
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = have_iter;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp5_) {
+#line 943 "ui.c"
+ GtkListStore* _tmp6_ = NULL;
+ gboolean _tmp7_ = FALSE;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = self->priv->device_model;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp6_, &_vala_iter);
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = _tmp7_;
+#line 952 "ui.c"
+ } else {
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = FALSE;
+#line 956 "ui.c"
+ }
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp4_) {
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 962 "ui.c"
+ }
+ }
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = FALSE;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = self->priv->device_model;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = _vala_iter;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp8_, &_tmp9_, 0, &d, -1, -1);
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = d;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = device;
+#line 301 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp10_, _tmp11_) == 0) {
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ have_iter = TRUE;
+#line 981 "ui.c"
+ }
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (d);
+#line 985 "ui.c"
+ }
+ }
+ }
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = have_iter;
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (iter) {
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *iter = _vala_iter;
+#line 995 "ui.c"
+ }
+#line 306 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 999 "ui.c"
+}
+
+
+static void user_interface_show_error_dialog (UserInterface* self, const gchar* error_title, const gchar* error_text) {
+ GtkMessageDialog* dialog = NULL;
+ const gchar* _tmp0_ = NULL;
+ GtkMessageDialog* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (error_title != NULL);
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (error_text != NULL);
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = error_title;
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, "%s", _tmp0_);
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp1_);
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dialog = _tmp1_;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _ ("_Close");
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_dialog_add_button ((GtkDialog*) dialog, _tmp2_, 0);
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = error_text;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_message_dialog_format_secondary_text (dialog, "%s", _tmp3_);
+#line 318 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_destroy ((GtkWidget*) dialog);
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (dialog);
+#line 1035 "ui.c"
+}
+
+
+void user_interface_authorize (UserInterface* self, const gchar* resource, gchar** username, gchar** password) {
+ gchar* _vala_username = NULL;
+ gchar* _vala_password = NULL;
+ gchar* description = NULL;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ GtkEntry* _tmp3_ = NULL;
+ GtkEntry* _tmp4_ = NULL;
+ GtkLabel* _tmp5_ = NULL;
+ GtkDialog* _tmp6_ = NULL;
+ GtkDialog* _tmp7_ = NULL;
+ GtkDialog* _tmp8_ = NULL;
+ GtkEntry* _tmp9_ = NULL;
+ const gchar* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ GtkEntry* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ const gchar* _tmp15_ = NULL;
+ gchar* _tmp16_ = NULL;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (resource != NULL);
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = _ ("Username and password required to access '%s'");
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = resource;
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = g_strdup_printf (_tmp0_, _tmp1_);
+#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ description = _tmp2_;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->username_entry;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_entry_set_text (_tmp3_, "");
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->password_entry;
+#line 327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_entry_set_text (_tmp4_, "");
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->authorize_label;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_label_set_text (_tmp5_, description);
+#line 330 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = self->priv->authorize_dialog;
+#line 330 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp6_, TRUE);
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = self->priv->authorize_dialog;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_dialog_run (_tmp7_);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = self->priv->authorize_dialog;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp8_, FALSE);
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = self->priv->username_entry;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = gtk_entry_get_text (_tmp9_);
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = _tmp10_;
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = g_strdup (_tmp11_);
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_vala_username);
+#line 334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_username = _tmp12_;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = self->priv->password_entry;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = gtk_entry_get_text (_tmp13_);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = _tmp14_;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = g_strdup (_tmp15_);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_vala_password);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_password = _tmp16_;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (description);
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (username) {
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *username = _vala_username;
+#line 1126 "ui.c"
+ } else {
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_vala_username);
+#line 1130 "ui.c"
+ }
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (password) {
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *password = _vala_password;
+#line 1136 "ui.c"
+ } else {
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_vala_password);
+#line 1140 "ui.c"
+ }
+}
+
+
+static void user_interface_device_combo_changed_cb (UserInterface* self, GtkWidget* widget) {
+ gboolean _tmp0_ = FALSE;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->setting_devices;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_) {
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 1161 "ui.c"
+ }
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->user_selected_device = TRUE;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_selected_device (self);
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = _tmp3_ != NULL;
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp3_);
+#line 344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp4_) {
+#line 1177 "ui.c"
+ GSettings* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->settings;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = user_interface_get_selected_device (self);
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = _tmp6_;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _tmp7_;
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_string (_tmp5_, "selected-device", _tmp8_);
+#line 345 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp8_);
+#line 1194 "ui.c"
+ }
+}
+
+
+static void _user_interface_device_combo_changed_cb_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_device_combo_changed_cb ((UserInterface*) self, _sender);
+#line 1202 "ui.c"
+}
+
+
+static void user_interface_update_info_bar (UserInterface* self) {
+ GtkMessageType type = 0;
+ gchar* title = NULL;
+ gchar* text = NULL;
+ gchar* image_id = NULL;
+ gboolean show_close_button = FALSE;
+ gboolean show_change_scanner_button = FALSE;
+ gboolean _tmp0_ = FALSE;
+ GtkInfoBar* _tmp15_ = NULL;
+ GtkMessageType _tmp16_ = 0;
+ GtkImage* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+ gchar* message = NULL;
+ const gchar* _tmp19_ = NULL;
+ const gchar* _tmp20_ = NULL;
+ gchar* _tmp21_ = NULL;
+ GtkLabel* _tmp22_ = NULL;
+ const gchar* _tmp23_ = NULL;
+ GtkButton* _tmp24_ = NULL;
+ gboolean _tmp25_ = FALSE;
+ GtkButton* _tmp26_ = NULL;
+ gboolean _tmp27_ = FALSE;
+ GtkInfoBar* _tmp28_ = NULL;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ show_close_button = FALSE;
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ show_change_scanner_button = FALSE;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->have_error;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_) {
+#line 1239 "ui.c"
+ gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+#line 357 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ type = GTK_MESSAGE_ERROR;
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = g_strdup ("dialog-error");
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (image_id);
+#line 358 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ image_id = _tmp1_;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = self->priv->error_title;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (title);
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ title = _tmp3_;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->error_text;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = g_strdup (_tmp4_);
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (text);
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ text = _tmp5_;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ show_close_button = TRUE;
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = self->priv->error_change_scanner_hint;
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ show_change_scanner_button = _tmp6_;
+#line 1276 "ui.c"
+ } else {
+ GtkListStore* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+#line 364 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = self->priv->device_model;
+#line 364 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = gtk_tree_model_iter_n_children ((GtkTreeModel*) _tmp7_, NULL);
+#line 364 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp8_ == 0) {
+#line 1286 "ui.c"
+ gchar* _tmp9_ = NULL;
+ const gchar* _tmp10_ = NULL;
+ gchar* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ type = GTK_MESSAGE_WARNING;
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = g_strdup ("dialog-warning");
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (image_id);
+#line 367 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ image_id = _tmp9_;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = _ ("No scanners detected");
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = g_strdup (_tmp10_);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (title);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ title = _tmp11_;
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = _ ("Please check your scanner is connected and powered on");
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = g_strdup (_tmp12_);
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (text);
+#line 371 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ text = _tmp13_;
+#line 1316 "ui.c"
+ } else {
+ GtkInfoBar* _tmp14_ = NULL;
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = self->priv->info_bar;
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp14_, FALSE);
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (image_id);
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (text);
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (title);
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 1331 "ui.c"
+ }
+ }
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = self->priv->info_bar;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = type;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_info_bar_set_message_type (_tmp15_, _tmp16_);
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = self->priv->info_bar_image;
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = image_id;
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_image_set_from_icon_name (_tmp17_, _tmp18_, GTK_ICON_SIZE_DIALOG);
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = title;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = text;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = g_strdup_printf ("<big><b>%s</b></big>\n\n%s", _tmp19_, _tmp20_);
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ message = _tmp21_;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = self->priv->info_bar_label;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = message;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_label_set_markup (_tmp22_, _tmp23_);
+#line 383 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = self->priv->info_bar_close_button;
+#line 383 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = show_close_button;
+#line 383 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp24_, _tmp25_);
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = self->priv->info_bar_change_scanner_button;
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = show_change_scanner_button;
+#line 384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp26_, _tmp27_);
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = self->priv->info_bar;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp28_, TRUE);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (message);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (image_id);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (text);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (title);
+#line 1384 "ui.c"
+}
+
+
+static gpointer _scan_device_ref0 (gpointer self) {
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return self ? scan_device_ref (self) : NULL;
+#line 1391 "ui.c"
+}
+
+
+void user_interface_set_scan_devices (UserInterface* self, GList* devices) {
+ gboolean have_selection = FALSE;
+ gint index = 0;
+ GtkTreeIter iter = {0};
+ gboolean _tmp0_ = FALSE;
+ GList* _tmp4_ = NULL;
+ gboolean _tmp51_ = FALSE;
+ gboolean _tmp52_ = FALSE;
+#line 388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 390 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ have_selection = FALSE;
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->setting_devices = TRUE;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->user_selected_device;
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_) {
+#line 1413 "ui.c"
+ GtkComboBox* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+#line 398 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->device_combo;
+#line 398 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_combo_box_get_active (_tmp1_);
+#line 398 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 398 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ have_selection = _tmp3_ >= 0;
+#line 1425 "ui.c"
+ }
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ index = 0;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = devices;
+#line 1431 "ui.c"
+ {
+ GList* device_collection = NULL;
+ GList* device_it = NULL;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ device_collection = _tmp4_;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ for (device_it = device_collection; device_it != NULL; device_it = device_it->next) {
+#line 1439 "ui.c"
+ ScanDevice* _tmp5_ = NULL;
+ ScanDevice* device = NULL;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _scan_device_ref0 ((ScanDevice*) device_it->data);
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ device = _tmp5_;
+#line 1446 "ui.c"
+ {
+ gint n_delete = 0;
+ GtkListStore* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ GtkTreeIter _tmp8_ = {0};
+ gboolean _tmp9_ = FALSE;
+ gint _tmp21_ = 0;
+ gint _tmp44_ = 0;
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ n_delete = -1;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = self->priv->device_model;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = index;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) _tmp6_, &_tmp8_, NULL, _tmp7_);
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp8_;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp9_) {
+#line 1467 "ui.c"
+ gint i = 0;
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ i = 0;
+#line 1471 "ui.c"
+ {
+ gboolean _tmp10_ = FALSE;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = TRUE;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ while (TRUE) {
+#line 1478 "ui.c"
+ gchar* name = NULL;
+ gboolean matched = FALSE;
+ GtkListStore* _tmp13_ = NULL;
+ GtkTreeIter _tmp14_ = {0};
+ const gchar* _tmp15_ = NULL;
+ ScanDevice* _tmp16_ = NULL;
+ const gchar* _tmp17_ = NULL;
+ gboolean _tmp18_ = FALSE;
+ gint _tmp20_ = 0;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp10_) {
+#line 1490 "ui.c"
+ GtkListStore* _tmp11_ = NULL;
+ gboolean _tmp12_ = FALSE;
+#line 424 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = self->priv->device_model;
+#line 424 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp11_, &iter);
+#line 424 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp12_) {
+#line 424 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 1501 "ui.c"
+ }
+ }
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = FALSE;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = self->priv->device_model;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = iter;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp13_, &_tmp14_, 0, &name, -1, -1);
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = name;
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = device;
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = _tmp16_->name;
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ matched = g_strcmp0 (_tmp15_, _tmp17_) == 0;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = matched;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp18_) {
+#line 1524 "ui.c"
+ gint _tmp19_ = 0;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = i;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ n_delete = _tmp19_;
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (name);
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 1534 "ui.c"
+ }
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = i;
+#line 423 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ i = _tmp20_ + 1;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (name);
+#line 1542 "ui.c"
+ }
+ }
+ }
+#line 428 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = n_delete;
+#line 428 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp21_ >= 0) {
+#line 1550 "ui.c"
+ gint i = 0;
+ GtkListStore* _tmp22_ = NULL;
+ GtkTreeIter _tmp23_ = {0};
+ ScanDevice* _tmp24_ = NULL;
+ const gchar* _tmp25_ = NULL;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = self->priv->device_model;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = iter;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = device;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = _tmp24_->label;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp22_, &_tmp23_, 1, _tmp25_, -1, -1);
+#line 1566 "ui.c"
+ {
+ gboolean _tmp26_ = FALSE;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ i = 0;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = TRUE;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ while (TRUE) {
+#line 1575 "ui.c"
+ gint _tmp28_ = 0;
+ gint _tmp29_ = 0;
+ GtkListStore* _tmp30_ = NULL;
+ gint _tmp31_ = 0;
+ GtkTreeIter _tmp32_ = {0};
+ GtkListStore* _tmp33_ = NULL;
+ GtkTreeIter _tmp34_ = {0};
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp26_) {
+#line 1585 "ui.c"
+ gint _tmp27_ = 0;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = i;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ i = _tmp27_ + 1;
+#line 1591 "ui.c"
+ }
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = FALSE;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = i;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = n_delete;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!(_tmp28_ < _tmp29_)) {
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 1603 "ui.c"
+ }
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = self->priv->device_model;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = index;
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_iter_nth_child ((GtkTreeModel*) _tmp30_, &_tmp32_, NULL, _tmp31_);
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp32_;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp33_ = self->priv->device_model;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp34_ = iter;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_remove (_tmp33_, &_tmp34_);
+#line 1619 "ui.c"
+ }
+ }
+ } else {
+ GtkListStore* _tmp35_ = NULL;
+ gint _tmp36_ = 0;
+ GtkTreeIter _tmp37_ = {0};
+ GtkListStore* _tmp38_ = NULL;
+ GtkTreeIter _tmp39_ = {0};
+ ScanDevice* _tmp40_ = NULL;
+ const gchar* _tmp41_ = NULL;
+ ScanDevice* _tmp42_ = NULL;
+ const gchar* _tmp43_ = NULL;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp35_ = self->priv->device_model;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp36_ = index;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_insert (_tmp35_, &_tmp37_, _tmp36_);
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp37_;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp38_ = self->priv->device_model;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp39_ = iter;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp40_ = device;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp41_ = _tmp40_->name;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp42_ = device;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp43_ = _tmp42_->label;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp38_, &_tmp39_, 0, _tmp41_, 1, _tmp43_, -1, -1);
+#line 1654 "ui.c"
+ }
+#line 446 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp44_ = index;
+#line 446 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ index = _tmp44_ + 1;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _scan_device_unref0 (device);
+#line 1662 "ui.c"
+ }
+ }
+ }
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ while (TRUE) {
+#line 1668 "ui.c"
+ GtkListStore* _tmp45_ = NULL;
+ gint _tmp46_ = 0;
+ GtkTreeIter _tmp47_ = {0};
+ gboolean _tmp48_ = FALSE;
+ GtkListStore* _tmp49_ = NULL;
+ GtkTreeIter _tmp50_ = {0};
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp45_ = self->priv->device_model;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp46_ = index;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp48_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) _tmp45_, &_tmp47_, NULL, _tmp46_);
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp47_;
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp48_) {
+#line 450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 1687 "ui.c"
+ }
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp49_ = self->priv->device_model;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp50_ = iter;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_remove (_tmp49_, &_tmp50_);
+#line 1695 "ui.c"
+ }
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp52_ = have_selection;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp52_) {
+#line 1701 "ui.c"
+ GList* _tmp53_ = NULL;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp53_ = devices;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp51_ = _tmp53_ != NULL;
+#line 1707 "ui.c"
+ } else {
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp51_ = FALSE;
+#line 1711 "ui.c"
+ }
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp51_) {
+#line 1715 "ui.c"
+ GtkComboBox* _tmp54_ = NULL;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp54_ = self->priv->device_combo;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_combo_box_set_active (_tmp54_, 0);
+#line 1721 "ui.c"
+ }
+#line 457 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->setting_devices = FALSE;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_update_info_bar (self);
+#line 1727 "ui.c"
+}
+
+
+static void user_interface_add_default_page (UserInterface* self) {
+ Page* page = NULL;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ ScanDirection _tmp3_ = 0;
+ Page* _tmp4_ = NULL;
+ Book* _tmp5_ = NULL;
+ BookView* _tmp6_ = NULL;
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 464 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->default_page_width;
+#line 464 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->default_page_height;
+#line 464 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = self->priv->default_page_dpi;
+#line 464 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->default_page_scan_direction;
+#line 464 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page_new (_tmp0_, _tmp1_, _tmp2_, _tmp3_);
+#line 464 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp4_;
+#line 468 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->_book;
+#line 468 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_append_page (_tmp5_, page);
+#line 469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = self->priv->book_view;
+#line 469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_view_set_selected_page (_tmp6_, page);
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 1764 "ui.c"
+}
+
+
+static gint string_last_index_of_char (const gchar* self, gunichar c, gint start_index) {
+ gint result = 0;
+ gchar* _result_ = NULL;
+ gint _tmp0_ = 0;
+ gunichar _tmp1_ = 0U;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 930 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, 0);
+#line 931 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = start_index;
+#line 931 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = c;
+#line 931 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) (-1), _tmp1_);
+#line 931 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _result_ = _tmp2_;
+#line 933 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = _result_;
+#line 933 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp3_ != NULL) {
+#line 1789 "ui.c"
+ gchar* _tmp4_ = NULL;
+#line 934 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = _result_;
+#line 934 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = (gint) (_tmp4_ - ((gchar*) self));
+#line 934 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 1797 "ui.c"
+ } else {
+#line 936 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = -1;
+#line 936 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 1803 "ui.c"
+ }
+}
+
+
+static gchar* string_slice (const gchar* self, glong start, glong end) {
+ gchar* result = NULL;
+ glong string_length = 0L;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ glong _tmp2_ = 0L;
+ glong _tmp5_ = 0L;
+ gboolean _tmp8_ = FALSE;
+ glong _tmp9_ = 0L;
+ gboolean _tmp12_ = FALSE;
+ glong _tmp13_ = 0L;
+ glong _tmp16_ = 0L;
+ glong _tmp17_ = 0L;
+ glong _tmp18_ = 0L;
+ glong _tmp19_ = 0L;
+ glong _tmp20_ = 0L;
+ gchar* _tmp21_ = NULL;
+#line 1226 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1227 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = strlen (self);
+#line 1227 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = _tmp0_;
+#line 1227 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ string_length = (glong) _tmp1_;
+#line 1228 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = start;
+#line 1228 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp2_ < ((glong) 0)) {
+#line 1837 "ui.c"
+ glong _tmp3_ = 0L;
+ glong _tmp4_ = 0L;
+#line 1229 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = string_length;
+#line 1229 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = start;
+#line 1229 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ start = _tmp3_ + _tmp4_;
+#line 1846 "ui.c"
+ }
+#line 1231 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = end;
+#line 1231 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp5_ < ((glong) 0)) {
+#line 1852 "ui.c"
+ glong _tmp6_ = 0L;
+ glong _tmp7_ = 0L;
+#line 1232 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp6_ = string_length;
+#line 1232 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp7_ = end;
+#line 1232 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ end = _tmp6_ + _tmp7_;
+#line 1861 "ui.c"
+ }
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp9_ = start;
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp9_ >= ((glong) 0)) {
+#line 1867 "ui.c"
+ glong _tmp10_ = 0L;
+ glong _tmp11_ = 0L;
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp10_ = start;
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp11_ = string_length;
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp8_ = _tmp10_ <= _tmp11_;
+#line 1876 "ui.c"
+ } else {
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp8_ = FALSE;
+#line 1880 "ui.c"
+ }
+#line 1234 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp8_, NULL);
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp13_ = end;
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp13_ >= ((glong) 0)) {
+#line 1888 "ui.c"
+ glong _tmp14_ = 0L;
+ glong _tmp15_ = 0L;
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp14_ = end;
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp15_ = string_length;
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp12_ = _tmp14_ <= _tmp15_;
+#line 1897 "ui.c"
+ } else {
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp12_ = FALSE;
+#line 1901 "ui.c"
+ }
+#line 1235 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp12_, NULL);
+#line 1236 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp16_ = start;
+#line 1236 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp17_ = end;
+#line 1236 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp18_ = start;
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp19_ = end;
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp20_ = start;
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp21_;
+#line 1237 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 1923 "ui.c"
+}
+
+
+static void user_interface_on_file_type_changed (UserInterface* self, GtkTreeSelection* selection) {
+ gchar* extension = NULL;
+ GtkTreeSelection* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* path = NULL;
+ GtkFileChooserDialog* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar* filename = NULL;
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gint extension_index = 0;
+ const gchar* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+ const gchar* _tmp12_ = NULL;
+ const gchar* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ GtkFileChooserDialog* _tmp15_ = NULL;
+ const gchar* _tmp16_ = NULL;
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (selection != NULL);
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = selection;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_selected_extension (self, _tmp0_);
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ extension = _tmp1_;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = self->priv->save_dialog;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp2_);
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ path = _tmp3_;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = path;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = g_path_get_basename (_tmp4_);
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ filename = _tmp5_;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = filename;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = string_last_index_of_char (_tmp6_, (gunichar) '.', 0);
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ extension_index = _tmp7_;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = extension_index;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp8_ >= 0) {
+#line 1978 "ui.c"
+ const gchar* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gchar* _tmp11_ = NULL;
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = filename;
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = extension_index;
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = string_slice (_tmp9_, (glong) 0, (glong) _tmp10_);
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (filename);
+#line 481 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ filename = _tmp11_;
+#line 1992 "ui.c"
+ }
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = filename;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = extension;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = g_strconcat (_tmp12_, _tmp13_, NULL);
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (filename);
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ filename = _tmp14_;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = self->priv->save_dialog;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = filename;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_chooser_set_current_name ((GtkFileChooser*) _tmp15_, _tmp16_);
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (filename);
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (extension);
+#line 2016 "ui.c"
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 2023 "ui.c"
+}
+
+
+static gchar* user_interface_get_selected_extension (UserInterface* self, GtkTreeSelection* selection) {
+ gchar* result = NULL;
+ GtkTreeModel* model = NULL;
+ GtkTreeIter iter = {0};
+ gchar* extension = NULL;
+ gchar* _tmp0_ = NULL;
+ GtkTreeSelection* _tmp1_ = NULL;
+ GtkTreeModel* _tmp2_ = NULL;
+ GtkTreeIter _tmp3_ = {0};
+ gboolean _tmp4_ = FALSE;
+ GtkTreeModel* _tmp5_ = NULL;
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 486 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (selection != NULL, NULL);
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = g_strdup ("");
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ extension = _tmp0_;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = selection;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = gtk_tree_selection_get_selected (_tmp1_, &_tmp2_, &_tmp3_);
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (model);
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _g_object_ref0 (_tmp2_);
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ model = _tmp5_;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp3_;
+#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp4_) {
+#line 2060 "ui.c"
+ GtkTreeModel* _tmp6_ = NULL;
+ GtkTreeIter _tmp7_ = {0};
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = model;
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = iter;
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get (_tmp6_, &_tmp7_, 1, &extension, -1, -1);
+#line 2069 "ui.c"
+ }
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = extension;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (model);
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 2077 "ui.c"
+}
+
+
+static glong string_strnlen (gchar* str, glong maxlen) {
+ glong result = 0L;
+ gchar* end = NULL;
+ gchar* _tmp0_ = NULL;
+ glong _tmp1_ = 0L;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 1193 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = str;
+#line 1193 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = maxlen;
+#line 1193 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
+#line 1193 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ end = _tmp2_;
+#line 1194 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = end;
+#line 1194 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp3_ == NULL) {
+#line 2100 "ui.c"
+ glong _tmp4_ = 0L;
+#line 1195 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = maxlen;
+#line 1195 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp4_;
+#line 1195 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 2108 "ui.c"
+ } else {
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+#line 1197 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = end;
+#line 1197 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp6_ = str;
+#line 1197 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = (glong) (_tmp5_ - _tmp6_);
+#line 1197 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 2120 "ui.c"
+ }
+}
+
+
+static gchar* string_substring (const gchar* self, glong offset, glong len) {
+ gchar* result = NULL;
+ glong string_length = 0L;
+ gboolean _tmp0_ = FALSE;
+ glong _tmp1_ = 0L;
+ glong _tmp8_ = 0L;
+ glong _tmp14_ = 0L;
+ glong _tmp17_ = 0L;
+ glong _tmp18_ = 0L;
+ glong _tmp19_ = 0L;
+ glong _tmp20_ = 0L;
+ glong _tmp21_ = 0L;
+ gchar* _tmp22_ = NULL;
+#line 1204 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = offset;
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp1_ >= ((glong) 0)) {
+#line 2144 "ui.c"
+ glong _tmp2_ = 0L;
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp2_ = len;
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = _tmp2_ >= ((glong) 0);
+#line 2150 "ui.c"
+ } else {
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = FALSE;
+#line 2154 "ui.c"
+ }
+#line 1206 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp0_) {
+#line 2158 "ui.c"
+ glong _tmp3_ = 0L;
+ glong _tmp4_ = 0L;
+ glong _tmp5_ = 0L;
+#line 1208 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp3_ = offset;
+#line 1208 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp4_ = len;
+#line 1208 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
+#line 1208 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ string_length = _tmp5_;
+#line 2170 "ui.c"
+ } else {
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+#line 1210 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp6_ = strlen (self);
+#line 1210 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp7_ = _tmp6_;
+#line 1210 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ string_length = (glong) _tmp7_;
+#line 2180 "ui.c"
+ }
+#line 1213 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp8_ = offset;
+#line 1213 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp8_ < ((glong) 0)) {
+#line 2186 "ui.c"
+ glong _tmp9_ = 0L;
+ glong _tmp10_ = 0L;
+ glong _tmp11_ = 0L;
+#line 1214 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp9_ = string_length;
+#line 1214 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp10_ = offset;
+#line 1214 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ offset = _tmp9_ + _tmp10_;
+#line 1215 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp11_ = offset;
+#line 1215 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
+#line 2200 "ui.c"
+ } else {
+ glong _tmp12_ = 0L;
+ glong _tmp13_ = 0L;
+#line 1217 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp12_ = offset;
+#line 1217 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp13_ = string_length;
+#line 1217 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
+#line 2210 "ui.c"
+ }
+#line 1219 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp14_ = len;
+#line 1219 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ if (_tmp14_ < ((glong) 0)) {
+#line 2216 "ui.c"
+ glong _tmp15_ = 0L;
+ glong _tmp16_ = 0L;
+#line 1220 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp15_ = string_length;
+#line 1220 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp16_ = offset;
+#line 1220 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ len = _tmp15_ - _tmp16_;
+#line 2225 "ui.c"
+ }
+#line 1222 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp17_ = offset;
+#line 1222 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp18_ = len;
+#line 1222 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp19_ = string_length;
+#line 1222 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp20_ = offset;
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp21_ = len;
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp22_;
+#line 1223 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 2245 "ui.c"
+}
+
+
+static void _user_interface_on_file_type_changed_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_on_file_type_changed ((UserInterface*) self, _sender);
+#line 2252 "ui.c"
+}
+
+
+static gchar* user_interface_choose_file_location (UserInterface* self) {
+ gchar* result = NULL;
+ gchar* directory = NULL;
+ GSettings* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ const gchar* _tmp3_ = NULL;
+ const gchar* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ GtkFileChooserDialog* _tmp10_ = NULL;
+ GtkFileChooserDialog* _tmp11_ = NULL;
+ GtkFileChooserDialog* _tmp12_ = NULL;
+ GtkFileChooserDialog* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ GtkFileChooserDialog* _tmp15_ = NULL;
+ const gchar* _tmp16_ = NULL;
+ GtkFileFilter* filter = NULL;
+ GtkFileFilter* _tmp17_ = NULL;
+ GtkFileFilter* _tmp18_ = NULL;
+ const gchar* _tmp19_ = NULL;
+ GtkFileFilter* _tmp20_ = NULL;
+ GtkFileFilter* _tmp21_ = NULL;
+ GtkFileChooserDialog* _tmp22_ = NULL;
+ GtkFileFilter* _tmp23_ = NULL;
+ GtkFileFilter* _tmp24_ = NULL;
+ GtkFileFilter* _tmp25_ = NULL;
+ GtkFileFilter* _tmp26_ = NULL;
+ const gchar* _tmp27_ = NULL;
+ GtkFileFilter* _tmp28_ = NULL;
+ GtkFileChooserDialog* _tmp29_ = NULL;
+ GtkFileFilter* _tmp30_ = NULL;
+ GtkFileFilter* _tmp31_ = NULL;
+ GtkExpander* expander = NULL;
+ const gchar* _tmp32_ = NULL;
+ GtkExpander* _tmp33_ = NULL;
+ GtkExpander* _tmp34_ = NULL;
+ GtkFileChooserDialog* _tmp35_ = NULL;
+ GtkExpander* _tmp36_ = NULL;
+ gchar* default_extension = NULL;
+ gchar* _tmp37_ = NULL;
+ gint index = 0;
+ const gchar* _tmp38_ = NULL;
+ gint _tmp39_ = 0;
+ gint _tmp40_ = 0;
+ GtkListStore* file_type_store = NULL;
+ GtkListStore* _tmp44_ = NULL;
+ GtkTreeIter iter = {0};
+ GtkListStore* _tmp45_ = NULL;
+ GtkTreeIter _tmp46_ = {0};
+ GtkListStore* _tmp47_ = NULL;
+ GtkTreeIter _tmp48_ = {0};
+ const gchar* _tmp49_ = NULL;
+ GtkListStore* _tmp50_ = NULL;
+ GtkTreeIter _tmp51_ = {0};
+ GtkListStore* _tmp52_ = NULL;
+ GtkTreeIter _tmp53_ = {0};
+ const gchar* _tmp54_ = NULL;
+ GtkListStore* _tmp55_ = NULL;
+ GtkTreeIter _tmp56_ = {0};
+ GtkListStore* _tmp57_ = NULL;
+ GtkTreeIter _tmp58_ = {0};
+ const gchar* _tmp59_ = NULL;
+ GtkTreeView* file_type_view = NULL;
+ GtkListStore* _tmp60_ = NULL;
+ GtkTreeView* _tmp61_ = NULL;
+ GtkTreeView* _tmp62_ = NULL;
+ GtkTreeView* _tmp63_ = NULL;
+ GtkTreeViewColumn* column = NULL;
+ GtkCellRendererText* _tmp64_ = NULL;
+ GtkCellRendererText* _tmp65_ = NULL;
+ GtkTreeViewColumn* _tmp66_ = NULL;
+ GtkTreeViewColumn* _tmp67_ = NULL;
+ GtkTreeView* _tmp68_ = NULL;
+ GtkTreeViewColumn* _tmp69_ = NULL;
+ GtkExpander* _tmp70_ = NULL;
+ GtkTreeView* _tmp71_ = NULL;
+ GtkListStore* _tmp72_ = NULL;
+ GtkTreeIter _tmp73_ = {0};
+ gboolean _tmp74_ = FALSE;
+ GtkTreeView* _tmp85_ = NULL;
+ GtkTreeSelection* _tmp86_ = NULL;
+ GtkExpander* _tmp87_ = NULL;
+ gint response = 0;
+ GtkFileChooserDialog* _tmp88_ = NULL;
+ gint _tmp89_ = 0;
+ gchar* uri = NULL;
+ gint _tmp90_ = 0;
+ GSettings* _tmp110_ = NULL;
+ GtkFileChooserDialog* _tmp111_ = NULL;
+ gchar* _tmp112_ = NULL;
+ gchar* _tmp113_ = NULL;
+ GtkTreeView* _tmp114_ = NULL;
+ GtkTreeSelection* _tmp115_ = NULL;
+ guint _tmp116_ = 0U;
+ GtkFileChooserDialog* _tmp117_ = NULL;
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ directory = NULL;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->settings;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = g_settings_get_string (_tmp0_, "save-directory");
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (directory);
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ directory = _tmp1_;
+#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = directory;
+#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp3_ == NULL) {
+#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = TRUE;
+#line 2370 "ui.c"
+ } else {
+ const gchar* _tmp4_ = NULL;
+#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = directory;
+#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = g_strcmp0 (_tmp4_, "") == 0;
+#line 2377 "ui.c"
+ }
+#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 2381 "ui.c"
+ const gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+#line 504 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
+#line 504 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = g_strdup (_tmp5_);
+#line 504 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (directory);
+#line 504 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ directory = _tmp6_;
+#line 2392 "ui.c"
+ }
+#line 506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = _ ("Save As...");
+#line 506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _ ("_Cancel");
+#line 506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = _ ("_Save");
+#line 506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp7_, (GtkWindow*) self, GTK_FILE_CHOOSER_ACTION_SAVE, _tmp8_, GTK_RESPONSE_CANCEL, _tmp9_, GTK_RESPONSE_ACCEPT, NULL, NULL);
+#line 506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp10_);
+#line 506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->save_dialog);
+#line 506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->save_dialog = _tmp10_;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = self->priv->save_dialog;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_chooser_set_do_overwrite_confirmation ((GtkFileChooser*) _tmp11_, TRUE);
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = self->priv->save_dialog;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_chooser_set_local_only ((GtkFileChooser*) _tmp12_, FALSE);
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = self->priv->save_dialog;
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = directory;
+#line 515 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_chooser_set_current_folder ((GtkFileChooser*) _tmp13_, _tmp14_);
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = self->priv->save_dialog;
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = self->priv->_default_file_name;
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_chooser_set_current_name ((GtkFileChooser*) _tmp15_, _tmp16_);
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = gtk_file_filter_new ();
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp17_);
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ filter = _tmp17_;
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = filter;
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = _ ("Image Files");
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_filter_set_name (_tmp18_, _tmp19_);
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = filter;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_filter_add_pixbuf_formats (_tmp20_);
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = filter;
+#line 523 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_filter_add_mime_type (_tmp21_, "application/pdf");
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = self->priv->save_dialog;
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = filter;
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = _g_object_ref0 (_tmp23_);
+#line 524 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_chooser_add_filter ((GtkFileChooser*) _tmp22_, _tmp24_);
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = gtk_file_filter_new ();
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp25_);
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (filter);
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ filter = _tmp25_;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = filter;
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = _ ("All Files");
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_filter_set_name (_tmp26_, _tmp27_);
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = filter;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_filter_add_pattern (_tmp28_, "*");
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = self->priv->save_dialog;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = filter;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = _g_object_ref0 (_tmp30_);
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_chooser_add_filter ((GtkFileChooser*) _tmp29_, _tmp31_);
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp32_ = _ ("Select File _Type");
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp33_ = (GtkExpander*) gtk_expander_new_with_mnemonic (_tmp32_);
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp33_);
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ expander = _tmp33_;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp34_ = expander;
+#line 533 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_expander_set_spacing (_tmp34_, 5);
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp35_ = self->priv->save_dialog;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp36_ = expander;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_file_chooser_set_extra_widget ((GtkFileChooser*) _tmp35_, (GtkWidget*) _tmp36_);
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp37_ = g_strdup ("");
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ default_extension = _tmp37_;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp38_ = self->priv->_default_file_name;
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp39_ = string_last_index_of_char (_tmp38_, (gunichar) '.', 0);
+#line 537 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ index = _tmp39_;
+#line 538 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp40_ = index;
+#line 538 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp40_ >= 0) {
+#line 2514 "ui.c"
+ const gchar* _tmp41_ = NULL;
+ gint _tmp42_ = 0;
+ gchar* _tmp43_ = NULL;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp41_ = self->priv->_default_file_name;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp42_ = index;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp43_ = string_substring (_tmp41_, (glong) _tmp42_, (glong) (-1));
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (default_extension);
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ default_extension = _tmp43_;
+#line 2528 "ui.c"
+ }
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp44_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ file_type_store = _tmp44_;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp45_ = file_type_store;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp45_, &_tmp46_);
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp46_;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp47_ = file_type_store;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp48_ = iter;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp49_ = _ ("PDF (multi-page document)");
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp47_, &_tmp48_, 0, _tmp49_, 1, ".pdf", -1, -1);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp50_ = file_type_store;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp50_, &_tmp51_);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp51_;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp52_ = file_type_store;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp53_ = iter;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp54_ = _ ("JPEG (compressed)");
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp52_, &_tmp53_, 0, _tmp54_, 1, ".jpg", -1, -1);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp55_ = file_type_store;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp55_, &_tmp56_);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp56_;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp57_ = file_type_store;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp58_ = iter;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp59_ = _ ("PNG (lossless)");
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp57_, &_tmp58_, 0, _tmp59_, 1, ".png", -1, -1);
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp60_ = file_type_store;
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp61_ = (GtkTreeView*) gtk_tree_view_new_with_model ((GtkTreeModel*) _tmp60_);
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp61_);
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ file_type_view = _tmp61_;
+#line 563 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp62_ = file_type_view;
+#line 563 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_view_set_headers_visible (_tmp62_, FALSE);
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp63_ = file_type_view;
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_view_set_rules_hint (_tmp63_, TRUE);
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp64_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp64_);
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp65_ = _tmp64_;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp66_ = gtk_tree_view_column_new_with_attributes ("", (GtkCellRenderer*) _tmp65_, "text", 0, NULL, NULL);
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp66_);
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp67_ = _tmp66_;
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (_tmp65_);
+#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ column = _tmp67_;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp68_ = file_type_view;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp69_ = column;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_view_append_column (_tmp68_, _tmp69_);
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp70_ = expander;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp71_ = file_type_view;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_container_add ((GtkContainer*) _tmp70_, (GtkWidget*) _tmp71_);
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp72_ = file_type_store;
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp74_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp72_, &_tmp73_);
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp73_;
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp74_) {
+#line 2628 "ui.c"
+ {
+ gboolean _tmp75_ = FALSE;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp75_ = TRUE;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ while (TRUE) {
+#line 2635 "ui.c"
+ gchar* e = NULL;
+ GtkListStore* _tmp78_ = NULL;
+ GtkTreeIter _tmp79_ = {0};
+ const gchar* _tmp80_ = NULL;
+ const gchar* _tmp81_ = NULL;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp75_) {
+#line 2643 "ui.c"
+ GtkListStore* _tmp76_ = NULL;
+ gboolean _tmp77_ = FALSE;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp76_ = file_type_store;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp77_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp76_, &iter);
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp77_) {
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 2654 "ui.c"
+ }
+ }
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp75_ = FALSE;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp78_ = file_type_store;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp79_ = iter;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp78_, &_tmp79_, 1, &e, -1, -1);
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp80_ = default_extension;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp81_ = e;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp80_, _tmp81_) == 0) {
+#line 2671 "ui.c"
+ GtkTreeView* _tmp82_ = NULL;
+ GtkTreeSelection* _tmp83_ = NULL;
+ GtkTreeIter _tmp84_ = {0};
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp82_ = file_type_view;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp83_ = gtk_tree_view_get_selection (_tmp82_);
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp84_ = iter;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_selection_select_iter (_tmp83_, &_tmp84_);
+#line 2683 "ui.c"
+ }
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (e);
+#line 2687 "ui.c"
+ }
+ }
+ }
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp85_ = file_type_view;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp86_ = gtk_tree_view_get_selection (_tmp85_);
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp86_, "changed", (GCallback) _user_interface_on_file_type_changed_gtk_tree_selection_changed, self, 0);
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp87_ = expander;
+#line 583 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_show_all ((GtkWidget*) _tmp87_);
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp88_ = self->priv->save_dialog;
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp89_ = gtk_dialog_run ((GtkDialog*) _tmp88_);
+#line 585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ response = _tmp89_;
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ uri = NULL;
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp90_ = response;
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp90_ == ((gint) GTK_RESPONSE_ACCEPT)) {
+#line 2713 "ui.c"
+ GtkTreeSelection* selection = NULL;
+ GtkTreeView* _tmp91_ = NULL;
+ GtkTreeSelection* _tmp92_ = NULL;
+ GtkTreeSelection* _tmp93_ = NULL;
+ gchar* extension = NULL;
+ GtkTreeSelection* _tmp94_ = NULL;
+ gchar* _tmp95_ = NULL;
+ gchar* path = NULL;
+ GtkFileChooserDialog* _tmp96_ = NULL;
+ gchar* _tmp97_ = NULL;
+ gchar* filename = NULL;
+ const gchar* _tmp98_ = NULL;
+ gchar* _tmp99_ = NULL;
+ gint extension_index = 0;
+ const gchar* _tmp100_ = NULL;
+ gint _tmp101_ = 0;
+ gint _tmp102_ = 0;
+ const gchar* _tmp106_ = NULL;
+ GFile* _tmp107_ = NULL;
+ GFile* _tmp108_ = NULL;
+ gchar* _tmp109_ = NULL;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp91_ = file_type_view;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp92_ = gtk_tree_view_get_selection (_tmp91_);
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp93_ = _g_object_ref0 (_tmp92_);
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ selection = _tmp93_;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp94_ = selection;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp95_ = user_interface_get_selected_extension (self, _tmp94_);
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ extension = _tmp95_;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp96_ = self->priv->save_dialog;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp97_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp96_);
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ path = _tmp97_;
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp98_ = path;
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp99_ = g_path_get_basename (_tmp98_);
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ filename = _tmp99_;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp100_ = filename;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp101_ = string_last_index_of_char (_tmp100_, (gunichar) '.', 0);
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ extension_index = _tmp101_;
+#line 597 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp102_ = extension_index;
+#line 597 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp102_ < 0) {
+#line 2771 "ui.c"
+ const gchar* _tmp103_ = NULL;
+ const gchar* _tmp104_ = NULL;
+ gchar* _tmp105_ = NULL;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp103_ = path;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp104_ = extension;
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp105_ = g_strconcat (_tmp103_, _tmp104_, NULL);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ path = _tmp105_;
+#line 2785 "ui.c"
+ }
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp106_ = path;
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp107_ = g_file_new_for_path (_tmp106_);
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp108_ = _tmp107_;
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp109_ = g_file_get_uri (_tmp108_);
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri);
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ uri = _tmp109_;
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (_tmp108_);
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (filename);
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (extension);
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (selection);
+#line 2809 "ui.c"
+ }
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp110_ = self->priv->settings;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp111_ = self->priv->save_dialog;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp112_ = gtk_file_chooser_get_current_folder ((GtkFileChooser*) _tmp111_);
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp113_ = _tmp112_;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_string (_tmp110_, "save-directory", _tmp113_);
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp113_);
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp114_ = file_type_view;
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp115_ = gtk_tree_view_get_selection (_tmp114_);
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_parse_name ("changed", GTK_TYPE_TREE_SELECTION, &_tmp116_, NULL, FALSE);
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_handlers_disconnect_matched (_tmp115_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp116_, 0, NULL, (GCallback) _user_interface_on_file_type_changed_gtk_tree_selection_changed, self);
+#line 606 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp117_ = self->priv->save_dialog;
+#line 606 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_destroy ((GtkWidget*) _tmp117_);
+#line 607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->save_dialog);
+#line 607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->save_dialog = NULL;
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = uri;
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (column);
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (file_type_view);
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (file_type_store);
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (default_extension);
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (expander);
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (filter);
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (directory);
+#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 2857 "ui.c"
+}
+
+
+static gboolean user_interface_save_document (UserInterface* self, gboolean force_choose_location) {
+ gboolean result = FALSE;
+ gchar* uri = NULL;
+ gboolean _tmp0_ = FALSE;
+ const gchar* _tmp1_ = NULL;
+ const gchar* _tmp6_ = NULL;
+ GFile* file = NULL;
+ const gchar* _tmp7_ = NULL;
+ GFile* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ gchar* uri_lower = NULL;
+ const gchar* _tmp10_ = NULL;
+ gchar* _tmp11_ = NULL;
+ gchar* format = NULL;
+ gchar* _tmp12_ = NULL;
+ const gchar* _tmp13_ = NULL;
+ gboolean _tmp14_ = FALSE;
+ const gchar* _tmp38_ = NULL;
+ gchar* _tmp39_ = NULL;
+ Book* _tmp40_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->book_uri;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp1_ != NULL) {
+#line 2888 "ui.c"
+ gboolean _tmp2_ = FALSE;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = force_choose_location;
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = !_tmp2_;
+#line 2894 "ui.c"
+ } else {
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = FALSE;
+#line 2898 "ui.c"
+ }
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_) {
+#line 2902 "ui.c"
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->book_uri;
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = g_strdup (_tmp3_);
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri);
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ uri = _tmp4_;
+#line 2913 "ui.c"
+ } else {
+ gchar* _tmp5_ = NULL;
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = user_interface_choose_file_location (self);
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri);
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ uri = _tmp5_;
+#line 2922 "ui.c"
+ }
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = uri;
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp6_ == NULL) {
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri);
+#line 620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 2934 "ui.c"
+ }
+#line 622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = uri;
+#line 622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = g_file_new_for_uri (_tmp7_);
+#line 622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ file = _tmp8_;
+#line 624 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = uri;
+#line 624 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_debug ("ui.vala:624: Saving to '%s'", _tmp9_);
+#line 626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = uri;
+#line 626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = g_utf8_strdown (_tmp10_, (gssize) (-1));
+#line 626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ uri_lower = _tmp11_;
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = g_strdup ("jpeg");
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ format = _tmp12_;
+#line 628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = uri_lower;
+#line 628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = g_str_has_suffix (_tmp13_, ".pdf");
+#line 628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp14_) {
+#line 2962 "ui.c"
+ gchar* _tmp15_ = NULL;
+#line 629 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = g_strdup ("pdf");
+#line 629 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (format);
+#line 629 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ format = _tmp15_;
+#line 2970 "ui.c"
+ } else {
+ const gchar* _tmp16_ = NULL;
+ gboolean _tmp17_ = FALSE;
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = uri_lower;
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = g_str_has_suffix (_tmp16_, ".ps");
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp17_) {
+#line 2980 "ui.c"
+ gchar* _tmp18_ = NULL;
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = g_strdup ("ps");
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (format);
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ format = _tmp18_;
+#line 2988 "ui.c"
+ } else {
+ const gchar* _tmp19_ = NULL;
+ gboolean _tmp20_ = FALSE;
+#line 632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = uri_lower;
+#line 632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = g_str_has_suffix (_tmp19_, ".png");
+#line 632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp20_) {
+#line 2998 "ui.c"
+ gchar* _tmp21_ = NULL;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = g_strdup ("png");
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (format);
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ format = _tmp21_;
+#line 3006 "ui.c"
+ } else {
+ gboolean _tmp22_ = FALSE;
+ const gchar* _tmp23_ = NULL;
+ gboolean _tmp24_ = FALSE;
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = uri_lower;
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = g_str_has_suffix (_tmp23_, ".tif");
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp24_) {
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = TRUE;
+#line 3019 "ui.c"
+ } else {
+ const gchar* _tmp25_ = NULL;
+ gboolean _tmp26_ = FALSE;
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = uri_lower;
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = g_str_has_suffix (_tmp25_, ".tiff");
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = _tmp26_;
+#line 3029 "ui.c"
+ }
+#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp22_) {
+#line 3033 "ui.c"
+ gchar* _tmp27_ = NULL;
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = g_strdup ("tiff");
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (format);
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ format = _tmp27_;
+#line 3041 "ui.c"
+ }
+ }
+ }
+ }
+#line 637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_show_progress_dialog (self);
+#line 3048 "ui.c"
+ {
+ Book* _tmp28_ = NULL;
+ const gchar* _tmp29_ = NULL;
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+ GFile* _tmp32_ = NULL;
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = self->priv->_book;
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = format;
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = user_interface_get_quality (self);
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = _tmp30_;
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp32_ = file;
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_save (_tmp28_, _tmp29_, _tmp31_, _tmp32_, &_inner_error_);
+#line 640 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 3069 "ui.c"
+ goto __catch16_g_error;
+ }
+ }
+ goto __finally16;
+ __catch16_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp33_ = NULL;
+ const gchar* _tmp34_ = NULL;
+ const gchar* _tmp35_ = NULL;
+ GError* _tmp36_ = NULL;
+ const gchar* _tmp37_ = NULL;
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ e = _inner_error_;
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 644 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_hide_progress_dialog (self);
+#line 645 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp33_ = e;
+#line 645 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp34_ = _tmp33_->message;
+#line 645 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_warning ("ui.vala:645: Error saving file: %s", _tmp34_);
+#line 646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp35_ = _ ("Failed to save file");
+#line 646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp36_ = e;
+#line 646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp37_ = _tmp36_->message;
+#line 646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_show_error (self, _tmp35_, _tmp37_, FALSE);
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_error_free0 (e);
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (format);
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri_lower);
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (file);
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri);
+#line 650 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3116 "ui.c"
+ }
+ __finally16:
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (format);
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri_lower);
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (file);
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri);
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return FALSE;
+#line 3135 "ui.c"
+ }
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp38_ = uri;
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp39_ = g_strdup (_tmp38_);
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->book_uri);
+#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->book_uri = _tmp39_;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp40_ = self->priv->_book;
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_set_needs_saving (_tmp40_, FALSE);
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = TRUE;
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (format);
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri_lower);
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (file);
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (uri);
+#line 655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3161 "ui.c"
+}
+
+
+static gboolean user_interface_prompt_to_save (UserInterface* self, const gchar* title, const gchar* discard_label) {
+ gboolean result = FALSE;
+ Book* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+ GtkMessageDialog* dialog = NULL;
+ const gchar* _tmp3_ = NULL;
+ GtkMessageDialog* _tmp4_ = NULL;
+ GtkMessageDialog* _tmp5_ = NULL;
+ const gchar* _tmp6_ = NULL;
+ GtkMessageDialog* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ GtkMessageDialog* _tmp9_ = NULL;
+ const gchar* _tmp10_ = NULL;
+ GtkMessageDialog* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+ gint response = 0;
+ GtkMessageDialog* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ GtkMessageDialog* _tmp15_ = NULL;
+ gint _tmp16_ = 0;
+#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (title != NULL, FALSE);
+#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (discard_label != NULL, FALSE);
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->_book;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book_get_needs_saving (_tmp0_);
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp2_) {
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = TRUE;
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3204 "ui.c"
+ }
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = title;
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, "%s", _tmp3_);
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp4_);
+#line 663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dialog = _tmp4_;
+#line 668 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = dialog;
+#line 668 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = _ ("If you don't save, changes will be permanently lost.");
+#line 668 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_message_dialog_format_secondary_text (_tmp5_, "%s", _tmp6_);
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = dialog;
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = discard_label;
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_dialog_add_button ((GtkDialog*) _tmp7_, _tmp8_, (gint) GTK_RESPONSE_NO);
+#line 672 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = dialog;
+#line 672 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = _ ("_Cancel");
+#line 672 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_dialog_add_button ((GtkDialog*) _tmp9_, _tmp10_, (gint) GTK_RESPONSE_CANCEL);
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = dialog;
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = _ ("_Save");
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_dialog_add_button ((GtkDialog*) _tmp11_, _tmp12_, (gint) GTK_RESPONSE_YES);
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = dialog;
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = gtk_dialog_run ((GtkDialog*) _tmp13_);
+#line 675 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ response = _tmp14_;
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = dialog;
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_destroy ((GtkWidget*) _tmp15_);
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = response;
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (_tmp16_) {
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case GTK_RESPONSE_YES:
+#line 3254 "ui.c"
+ {
+ gboolean _tmp17_ = FALSE;
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = user_interface_save_document (self, FALSE);
+#line 681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp17_) {
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = TRUE;
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (dialog);
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3267 "ui.c"
+ } else {
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (dialog);
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3275 "ui.c"
+ }
+ }
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case GTK_RESPONSE_CANCEL:
+#line 3280 "ui.c"
+ {
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (dialog);
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3288 "ui.c"
+ }
+ default:
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case GTK_RESPONSE_NO:
+#line 3293 "ui.c"
+ {
+#line 689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = TRUE;
+#line 689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (dialog);
+#line 689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3301 "ui.c"
+ }
+ }
+#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (dialog);
+#line 3306 "ui.c"
+}
+
+
+static void user_interface_clear_document (UserInterface* self) {
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+ GtkMenuItem* _tmp2_ = NULL;
+ GtkMenuItem* _tmp3_ = NULL;
+#line 693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->_book;
+#line 695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_clear (_tmp0_);
+#line 696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_add_default_page (self);
+#line 697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->book_uri);
+#line 697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->book_uri = NULL;
+#line 698 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->_book;
+#line 698 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_set_needs_saving (_tmp1_, FALSE);
+#line 699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = self->priv->save_as_menuitem;
+#line 699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE);
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->copy_to_clipboard_menuitem;
+#line 700 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, FALSE);
+#line 3339 "ui.c"
+}
+
+
+static void user_interface_new_document (UserInterface* self) {
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+ gboolean _tmp4_ = FALSE;
+#line 703 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 705 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = _ ("Save current document?");
+#line 705 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = _ ("Discard Changes");
+#line 705 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = user_interface_prompt_to_save (self, _tmp0_, _tmp1_);
+#line 705 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp2_) {
+#line 709 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 3361 "ui.c"
+ }
+#line 711 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = user_interface_get_scanning (self);
+#line 711 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = _tmp3_;
+#line 711 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp4_) {
+#line 712 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_emit_by_name (self, "stop-scan");
+#line 3371 "ui.c"
+ }
+#line 713 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_clear_document (self);
+#line 3375 "ui.c"
+}
+
+
+static void user_interface_new_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+#line 717 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 717 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 719 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_new_document (self);
+#line 3386 "ui.c"
+}
+
+
+static void _user_interface_new_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_new_button_clicked_cb ((UserInterface*) self, _sender);
+#line 3393 "ui.c"
+}
+
+
+void user_interface_new_document_activate_cb (UserInterface* self) {
+#line 722 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 724 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_new_document (self);
+#line 3402 "ui.c"
+}
+
+
+static void user_interface_set_document_hint (UserInterface* self, const gchar* document_hint, gboolean save) {
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ gboolean _tmp10_ = FALSE;
+#line 727 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 727 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (document_hint != NULL);
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = document_hint;
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->document_hint);
+#line 729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->document_hint = _tmp1_;
+#line 731 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = document_hint;
+#line 731 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp2_, "text") == 0) {
+#line 3427 "ui.c"
+ GtkRadioMenuItem* _tmp3_ = NULL;
+ GtkRadioMenuItem* _tmp4_ = NULL;
+ GtkRadioMenuItem* _tmp5_ = NULL;
+#line 733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->text_button_menuitem;
+#line 733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp3_, TRUE);
+#line 734 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->text_button_hb_menuitem;
+#line 734 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp4_, TRUE);
+#line 735 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->text_menuitem;
+#line 735 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp5_, TRUE);
+#line 3443 "ui.c"
+ } else {
+ const gchar* _tmp6_ = NULL;
+#line 737 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = document_hint;
+#line 737 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp6_, "photo") == 0) {
+#line 3450 "ui.c"
+ GtkRadioMenuItem* _tmp7_ = NULL;
+ GtkRadioMenuItem* _tmp8_ = NULL;
+ GtkRadioMenuItem* _tmp9_ = NULL;
+#line 739 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = self->priv->photo_button_menuitem;
+#line 739 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp7_, TRUE);
+#line 740 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = self->priv->photo_button_hb_menuitem;
+#line 740 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp8_, TRUE);
+#line 741 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = self->priv->photo_menuitem;
+#line 741 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp9_, TRUE);
+#line 3466 "ui.c"
+ }
+ }
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = save;
+#line 744 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp10_) {
+#line 3473 "ui.c"
+ GSettings* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = self->priv->settings;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = document_hint;
+#line 745 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_string (_tmp11_, "document-type", _tmp12_);
+#line 3482 "ui.c"
+ }
+}
+
+
+static void user_interface_text_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 749 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 749 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 752 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_document_hint (self, "text", TRUE);
+#line 3505 "ui.c"
+ }
+}
+
+
+static void _user_interface_text_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_text_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 3513 "ui.c"
+}
+
+
+static void user_interface_photo_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 756 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 756 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 758 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 758 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 758 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 758 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 759 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_document_hint (self, "photo", TRUE);
+#line 3535 "ui.c"
+ }
+}
+
+
+static void _user_interface_photo_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_photo_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 3543 "ui.c"
+}
+
+
+static void user_interface_set_page_side (UserInterface* self, ScanType page_side) {
+ GtkTreeIter iter = {0};
+ GtkListStore* _tmp0_ = NULL;
+ GtkTreeIter _tmp1_ = {0};
+ gboolean _tmp2_ = FALSE;
+#line 762 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 766 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->page_side_model;
+#line 766 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp0_, &_tmp1_);
+#line 766 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp1_;
+#line 766 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 3562 "ui.c"
+ {
+ gboolean _tmp3_ = FALSE;
+#line 768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = TRUE;
+#line 768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ while (TRUE) {
+#line 3569 "ui.c"
+ gint s = 0;
+ GtkListStore* _tmp6_ = NULL;
+ GtkTreeIter _tmp7_ = {0};
+ gint _tmp8_ = 0;
+ ScanType _tmp9_ = 0;
+#line 768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp3_) {
+#line 3577 "ui.c"
+ GtkListStore* _tmp4_ = NULL;
+ gboolean _tmp5_ = FALSE;
+#line 777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->page_side_model;
+#line 777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp4_, &iter);
+#line 777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp5_) {
+#line 777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 3588 "ui.c"
+ }
+ }
+#line 768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = FALSE;
+#line 771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = self->priv->page_side_model;
+#line 771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = iter;
+#line 771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp6_, &_tmp7_, 0, &s, -1, -1);
+#line 772 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = s;
+#line 772 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = page_side;
+#line 772 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp8_ == ((gint) _tmp9_)) {
+#line 3605 "ui.c"
+ GtkComboBox* _tmp10_ = NULL;
+ GtkTreeIter _tmp11_ = {0};
+#line 774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = self->priv->page_side_combo;
+#line 774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = iter;
+#line 774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_combo_box_set_active_iter (_tmp10_, &_tmp11_);
+#line 775 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 3616 "ui.c"
+ }
+ }
+ }
+ }
+}
+
+
+static void user_interface_set_paper_size (UserInterface* self, gint width, gint height) {
+ GtkTreeIter iter = {0};
+ gboolean have_iter = FALSE;
+ gboolean _tmp14_ = FALSE;
+ gboolean _tmp18_ = FALSE;
+#line 781 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 3631 "ui.c"
+ {
+ GtkListStore* _tmp0_ = NULL;
+ GtkTreeIter _tmp1_ = {0};
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+#line 786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->paper_size_model;
+#line 786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp0_, &_tmp1_);
+#line 786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp1_;
+#line 786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ have_iter = _tmp2_;
+#line 786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = TRUE;
+#line 786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ while (TRUE) {
+#line 3649 "ui.c"
+ gboolean _tmp6_ = FALSE;
+ gint w = 0;
+ gint h = 0;
+ GtkListStore* _tmp7_ = NULL;
+ GtkTreeIter _tmp8_ = {0};
+ gboolean _tmp9_ = FALSE;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+#line 786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp3_) {
+#line 3660 "ui.c"
+ GtkListStore* _tmp4_ = NULL;
+ gboolean _tmp5_ = FALSE;
+#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->paper_size_model;
+#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp4_, &iter);
+#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ have_iter = _tmp5_;
+#line 3669 "ui.c"
+ }
+#line 786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = FALSE;
+#line 787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = have_iter;
+#line 787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp6_) {
+#line 787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 3679 "ui.c"
+ }
+#line 791 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = self->priv->paper_size_model;
+#line 791 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = iter;
+#line 791 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp7_, &_tmp8_, 0, &w, 1, &h, -1, -1);
+#line 792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = w;
+#line 792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = width;
+#line 792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp10_ == _tmp11_) {
+#line 3693 "ui.c"
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+#line 792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = h;
+#line 792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = height;
+#line 792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = _tmp12_ == _tmp13_;
+#line 3702 "ui.c"
+ } else {
+#line 792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = FALSE;
+#line 3706 "ui.c"
+ }
+#line 792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp9_) {
+#line 793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 3712 "ui.c"
+ }
+ }
+ }
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = have_iter;
+#line 796 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp14_) {
+#line 3720 "ui.c"
+ GtkListStore* _tmp15_ = NULL;
+ GtkTreeIter _tmp16_ = {0};
+ gboolean _tmp17_ = FALSE;
+#line 797 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = self->priv->paper_size_model;
+#line 797 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp15_, &_tmp16_);
+#line 797 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp16_;
+#line 797 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ have_iter = _tmp17_;
+#line 3732 "ui.c"
+ }
+#line 798 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = have_iter;
+#line 798 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp18_) {
+#line 3738 "ui.c"
+ GtkComboBox* _tmp19_ = NULL;
+ GtkTreeIter _tmp20_ = {0};
+#line 799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = self->priv->paper_size_combo;
+#line 799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = iter;
+#line 799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_combo_box_set_active_iter (_tmp19_, &_tmp20_);
+#line 3747 "ui.c"
+ }
+}
+
+
+static gint user_interface_get_text_dpi (UserInterface* self) {
+ gint result = 0;
+ GtkTreeIter iter = {0};
+ gint dpi = 0;
+ GtkComboBox* _tmp0_ = NULL;
+ GtkTreeIter _tmp1_ = {0};
+ gboolean _tmp2_ = FALSE;
+#line 802 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 805 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dpi = USER_INTERFACE_DEFAULT_TEXT_DPI;
+#line 807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->text_dpi_combo;
+#line 807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_);
+#line 807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp1_;
+#line 807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 3771 "ui.c"
+ GtkListStore* _tmp3_ = NULL;
+ GtkTreeIter _tmp4_ = {0};
+#line 808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->text_dpi_model;
+#line 808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = iter;
+#line 808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &dpi, -1, -1);
+#line 3780 "ui.c"
+ }
+#line 810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = dpi;
+#line 810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3786 "ui.c"
+}
+
+
+static gint user_interface_get_photo_dpi (UserInterface* self) {
+ gint result = 0;
+ GtkTreeIter iter = {0};
+ gint dpi = 0;
+ GtkComboBox* _tmp0_ = NULL;
+ GtkTreeIter _tmp1_ = {0};
+ gboolean _tmp2_ = FALSE;
+#line 813 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 816 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dpi = USER_INTERFACE_DEFAULT_PHOTO_DPI;
+#line 818 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->photo_dpi_combo;
+#line 818 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_);
+#line 818 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp1_;
+#line 818 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 3809 "ui.c"
+ GtkListStore* _tmp3_ = NULL;
+ GtkTreeIter _tmp4_ = {0};
+#line 819 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->photo_dpi_model;
+#line 819 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = iter;
+#line 819 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &dpi, -1, -1);
+#line 3818 "ui.c"
+ }
+#line 821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = dpi;
+#line 821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3824 "ui.c"
+}
+
+
+static ScanType user_interface_get_page_side (UserInterface* self) {
+ ScanType result = 0;
+ GtkTreeIter iter = {0};
+ gint page_side = 0;
+ GtkComboBox* _tmp0_ = NULL;
+ GtkTreeIter _tmp1_ = {0};
+ gboolean _tmp2_ = FALSE;
+ gint _tmp5_ = 0;
+#line 824 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 827 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_side = (gint) SCAN_TYPE_ADF_BOTH;
+#line 829 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->page_side_combo;
+#line 829 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_);
+#line 829 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp1_;
+#line 829 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 3848 "ui.c"
+ GtkListStore* _tmp3_ = NULL;
+ GtkTreeIter _tmp4_ = {0};
+#line 830 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->page_side_model;
+#line 830 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = iter;
+#line 830 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &page_side, -1, -1);
+#line 3857 "ui.c"
+ }
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = page_side;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = (ScanType) _tmp5_;
+#line 832 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3865 "ui.c"
+}
+
+
+static gboolean user_interface_get_paper_size (UserInterface* self, gint* width, gint* height) {
+ gint _vala_width = 0;
+ gint _vala_height = 0;
+ gboolean result = FALSE;
+ GtkTreeIter iter = {0};
+ gint _tmp0_ = 0;
+ GtkComboBox* _tmp1_ = NULL;
+ GtkTreeIter _tmp2_ = {0};
+ gboolean _tmp3_ = FALSE;
+#line 835 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 839 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_height = 0;
+#line 839 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = _vala_height;
+#line 839 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_width = _tmp0_;
+#line 840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->paper_size_combo;
+#line 840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = gtk_combo_box_get_active_iter (_tmp1_, &_tmp2_);
+#line 840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp2_;
+#line 840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp3_) {
+#line 3894 "ui.c"
+ GtkListStore* _tmp4_ = NULL;
+ GtkTreeIter _tmp5_ = {0};
+#line 842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->paper_size_model;
+#line 842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = iter;
+#line 842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &_vala_width, 1, &_vala_height, -1, -1);
+#line 843 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = TRUE;
+#line 843 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (width) {
+#line 843 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *width = _vala_width;
+#line 3909 "ui.c"
+ }
+#line 843 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (height) {
+#line 843 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *height = _vala_height;
+#line 3915 "ui.c"
+ }
+#line 843 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3919 "ui.c"
+ }
+#line 846 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 846 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (width) {
+#line 846 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *width = _vala_width;
+#line 3927 "ui.c"
+ }
+#line 846 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (height) {
+#line 846 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *height = _vala_height;
+#line 3933 "ui.c"
+ }
+#line 846 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 3937 "ui.c"
+}
+
+
+static ScanOptions* user_interface_make_scan_options (UserInterface* self) {
+ ScanOptions* result = NULL;
+ ScanOptions* options = NULL;
+ ScanOptions* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ ScanOptions* _tmp10_ = NULL;
+ ScanOptions* _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+ ScanOptions* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ ScanOptions* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+ gint _tmp19_ = 0;
+#line 849 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 851 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = scan_options_new ();
+#line 851 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ options = _tmp0_;
+#line 852 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->document_hint;
+#line 852 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp1_, "text") == 0) {
+#line 3966 "ui.c"
+ ScanOptions* _tmp2_ = NULL;
+ ScanOptions* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ ScanOptions* _tmp5_ = NULL;
+#line 854 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = options;
+#line 854 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_->scan_mode = SCAN_MODE_GRAY;
+#line 855 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = options;
+#line 855 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = user_interface_get_text_dpi (self);
+#line 855 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_->dpi = _tmp4_;
+#line 856 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = options;
+#line 856 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_->depth = 2;
+#line 3985 "ui.c"
+ } else {
+ ScanOptions* _tmp6_ = NULL;
+ ScanOptions* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ ScanOptions* _tmp9_ = NULL;
+#line 860 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = options;
+#line 860 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_->scan_mode = SCAN_MODE_COLOR;
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = options;
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = user_interface_get_photo_dpi (self);
+#line 861 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_->dpi = _tmp8_;
+#line 862 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = options;
+#line 862 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_->depth = 8;
+#line 4005 "ui.c"
+ }
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = options;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = options;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_get_paper_size (self, &_tmp12_, &_tmp13_);
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_->paper_width = _tmp12_;
+#line 864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_->paper_height = _tmp13_;
+#line 865 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = options;
+#line 865 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = user_interface_get_brightness (self);
+#line 865 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = _tmp15_;
+#line 865 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_->brightness = _tmp16_;
+#line 866 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = options;
+#line 866 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = user_interface_get_contrast (self);
+#line 866 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = _tmp18_;
+#line 866 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_->contrast = _tmp19_;
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = options;
+#line 868 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 4037 "ui.c"
+}
+
+
+static void user_interface_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+ ScanOptions* options = NULL;
+ ScanOptions* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 872 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 872 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 874 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = user_interface_make_scan_options (self);
+#line 874 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ options = _tmp0_;
+#line 875 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ options->type = SCAN_TYPE_SINGLE;
+#line 876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_selected_device (self);
+#line 876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_emit_by_name (self, "start-scan", _tmp3_, options);
+#line 876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp3_);
+#line 872 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _scan_options_unref0 (options);
+#line 4069 "ui.c"
+}
+
+
+static void _user_interface_scan_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_scan_button_clicked_cb ((UserInterface*) self, _sender);
+#line 4076 "ui.c"
+}
+
+
+static void user_interface_stop_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+#line 880 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 880 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 882 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_emit_by_name (self, "stop-scan");
+#line 4087 "ui.c"
+}
+
+
+static void _user_interface_stop_scan_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_stop_scan_button_clicked_cb ((UserInterface*) self, _sender);
+#line 4094 "ui.c"
+}
+
+
+static void user_interface_continuous_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+#line 886 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 886 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = user_interface_get_scanning (self);
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = _tmp0_;
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp1_) {
+#line 889 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_emit_by_name (self, "stop-scan");
+#line 4113 "ui.c"
+ } else {
+ ScanOptions* options = NULL;
+ ScanOptions* _tmp2_ = NULL;
+ ScanOptions* _tmp3_ = NULL;
+ ScanType _tmp4_ = 0;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ ScanOptions* _tmp8_ = NULL;
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = user_interface_make_scan_options (self);
+#line 892 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ options = _tmp2_;
+#line 893 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = options;
+#line 893 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = user_interface_get_page_side (self);
+#line 893 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_->type = _tmp4_;
+#line 894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = user_interface_get_selected_device (self);
+#line 894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = _tmp5_;
+#line 894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = _tmp6_;
+#line 894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = options;
+#line 894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_emit_by_name (self, "start-scan", _tmp7_, _tmp8_);
+#line 894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp7_);
+#line 888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _scan_options_unref0 (options);
+#line 4147 "ui.c"
+ }
+}
+
+
+static void _user_interface_continuous_scan_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_continuous_scan_button_clicked_cb ((UserInterface*) self, _sender);
+#line 4155 "ui.c"
+}
+
+
+static void user_interface_preferences_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+ GtkDialog* _tmp0_ = NULL;
+#line 899 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 899 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 901 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->preferences_dialog;
+#line 901 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_present ((GtkWindow*) _tmp0_);
+#line 4169 "ui.c"
+}
+
+
+static void _user_interface_preferences_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_preferences_button_clicked_cb ((UserInterface*) self, _sender);
+#line 4176 "ui.c"
+}
+
+
+void user_interface_preferences_activate_cb (UserInterface* self) {
+ GtkDialog* _tmp0_ = NULL;
+#line 904 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 906 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->preferences_dialog;
+#line 906 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_present ((GtkWindow*) _tmp0_);
+#line 4188 "ui.c"
+}
+
+
+static gboolean user_interface_preferences_dialog_delete_event_cb (UserInterface* self, GtkWidget* widget, GdkEventAny* event) {
+ gboolean result = FALSE;
+#line 910 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 910 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 910 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (event != NULL, FALSE);
+#line 912 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = TRUE;
+#line 912 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 4204 "ui.c"
+}
+
+
+static gboolean _user_interface_preferences_dialog_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) {
+ gboolean result;
+ result = user_interface_preferences_dialog_delete_event_cb ((UserInterface*) self, _sender, event);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 4213 "ui.c"
+}
+
+
+static void user_interface_preferences_dialog_response_cb (UserInterface* self, GtkWidget* widget, gint response_id) {
+ GtkDialog* _tmp0_ = NULL;
+#line 916 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 916 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 918 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->preferences_dialog;
+#line 918 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
+#line 4227 "ui.c"
+}
+
+
+static void _user_interface_preferences_dialog_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_preferences_dialog_response_cb ((UserInterface*) self, _sender, response_id);
+#line 4234 "ui.c"
+}
+
+
+static gpointer _page_ref0 (gpointer self) {
+#line 923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return self ? page_ref (self) : NULL;
+#line 4241 "ui.c"
+}
+
+
+static void user_interface_update_page_menu (UserInterface* self) {
+ Page* page = NULL;
+ BookView* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->book_view;
+#line 923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book_view_get_selected_page (_tmp0_);
+#line 923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _page_ref0 (_tmp2_);
+#line 923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp3_;
+#line 924 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page;
+#line 924 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp4_ == NULL) {
+#line 4268 "ui.c"
+ GtkMenuItem* _tmp5_ = NULL;
+ GtkMenuItem* _tmp6_ = NULL;
+#line 926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->page_move_left_menuitem;
+#line 926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, FALSE);
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = self->priv->page_move_right_menuitem;
+#line 927 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, FALSE);
+#line 4279 "ui.c"
+ } else {
+ guint index = 0U;
+ Book* _tmp7_ = NULL;
+ Page* _tmp8_ = NULL;
+ guint _tmp9_ = 0U;
+ GtkMenuItem* _tmp10_ = NULL;
+ guint _tmp11_ = 0U;
+ GtkMenuItem* _tmp12_ = NULL;
+ guint _tmp13_ = 0U;
+ Book* _tmp14_ = NULL;
+ guint _tmp15_ = 0U;
+ guint _tmp16_ = 0U;
+#line 931 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = self->priv->_book;
+#line 931 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = page;
+#line 931 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = book_get_page_index (_tmp7_, _tmp8_);
+#line 931 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ index = _tmp9_;
+#line 932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = self->priv->page_move_left_menuitem;
+#line 932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = index;
+#line 932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp10_, _tmp11_ > ((guint) 0));
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = self->priv->page_move_right_menuitem;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = index;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = self->priv->_book;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = book_get_n_pages (_tmp14_);
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = _tmp15_;
+#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp12_, _tmp13_ < (_tmp16_ - 1));
+#line 4318 "ui.c"
+ }
+#line 921 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 4322 "ui.c"
+}
+
+
+static void user_interface_page_selected_cb (UserInterface* self, BookView* view, Page* page) {
+ Page* _tmp0_ = NULL;
+ GtkRadioMenuItem* menuitem = NULL;
+ GtkRadioMenuItem* _tmp1_ = NULL;
+ GtkRadioMenuItem* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+ GtkRadioMenuItem* _tmp31_ = NULL;
+ GtkToggleButton* _tmp32_ = NULL;
+ Page* _tmp33_ = NULL;
+ gboolean _tmp34_ = FALSE;
+ gboolean _tmp35_ = FALSE;
+ GtkToggleToolButton* _tmp36_ = NULL;
+ Page* _tmp37_ = NULL;
+ gboolean _tmp38_ = FALSE;
+ gboolean _tmp39_ = FALSE;
+#line 937 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 937 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (view != NULL);
+#line 939 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = page;
+#line 939 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_ == NULL) {
+#line 940 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 4353 "ui.c"
+ }
+#line 942 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->updating_page_menu = TRUE;
+#line 944 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_update_page_menu (self);
+#line 946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->no_crop_menuitem;
+#line 946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _g_object_ref0 (_tmp1_);
+#line 946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ menuitem = _tmp2_;
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = page;
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page_get_has_crop (_tmp3_);
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _tmp4_;
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp5_) {
+#line 4373 "ui.c"
+ gchar* crop_name = NULL;
+ Page* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+ const gchar* _tmp10_ = NULL;
+#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = page;
+#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = page_get_crop_name (_tmp6_);
+#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _tmp7_;
+#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = g_strdup (_tmp8_);
+#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ crop_name = _tmp9_;
+#line 950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = crop_name;
+#line 950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp10_ != NULL) {
+#line 4394 "ui.c"
+ const gchar* _tmp11_ = NULL;
+#line 952 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = crop_name;
+#line 952 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp11_, "A4") == 0) {
+#line 4400 "ui.c"
+ GtkRadioMenuItem* _tmp12_ = NULL;
+ GtkRadioMenuItem* _tmp13_ = NULL;
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = self->priv->a4_menuitem;
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = _g_object_ref0 (_tmp12_);
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (menuitem);
+#line 953 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ menuitem = _tmp13_;
+#line 4411 "ui.c"
+ } else {
+ const gchar* _tmp14_ = NULL;
+#line 954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = crop_name;
+#line 954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp14_, "A5") == 0) {
+#line 4418 "ui.c"
+ GtkRadioMenuItem* _tmp15_ = NULL;
+ GtkRadioMenuItem* _tmp16_ = NULL;
+#line 955 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = self->priv->a5_menuitem;
+#line 955 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = _g_object_ref0 (_tmp15_);
+#line 955 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (menuitem);
+#line 955 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ menuitem = _tmp16_;
+#line 4429 "ui.c"
+ } else {
+ const gchar* _tmp17_ = NULL;
+#line 956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = crop_name;
+#line 956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp17_, "A6") == 0) {
+#line 4436 "ui.c"
+ GtkRadioMenuItem* _tmp18_ = NULL;
+ GtkRadioMenuItem* _tmp19_ = NULL;
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = self->priv->a6_menuitem;
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = _g_object_ref0 (_tmp18_);
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (menuitem);
+#line 957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ menuitem = _tmp19_;
+#line 4447 "ui.c"
+ } else {
+ const gchar* _tmp20_ = NULL;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = crop_name;
+#line 958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp20_, "letter") == 0) {
+#line 4454 "ui.c"
+ GtkRadioMenuItem* _tmp21_ = NULL;
+ GtkRadioMenuItem* _tmp22_ = NULL;
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = self->priv->letter_menuitem;
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = _g_object_ref0 (_tmp21_);
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (menuitem);
+#line 959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ menuitem = _tmp22_;
+#line 4465 "ui.c"
+ } else {
+ const gchar* _tmp23_ = NULL;
+#line 960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = crop_name;
+#line 960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp23_, "legal") == 0) {
+#line 4472 "ui.c"
+ GtkRadioMenuItem* _tmp24_ = NULL;
+ GtkRadioMenuItem* _tmp25_ = NULL;
+#line 961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = self->priv->legal_menuitem;
+#line 961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = _g_object_ref0 (_tmp24_);
+#line 961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (menuitem);
+#line 961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ menuitem = _tmp25_;
+#line 4483 "ui.c"
+ } else {
+ const gchar* _tmp26_ = NULL;
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = crop_name;
+#line 962 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp26_, "4x6") == 0) {
+#line 4490 "ui.c"
+ GtkRadioMenuItem* _tmp27_ = NULL;
+ GtkRadioMenuItem* _tmp28_ = NULL;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = self->priv->four_by_six_menuitem;
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = _g_object_ref0 (_tmp27_);
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (menuitem);
+#line 963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ menuitem = _tmp28_;
+#line 4501 "ui.c"
+ }
+ }
+ }
+ }
+ }
+ }
+ } else {
+ GtkRadioMenuItem* _tmp29_ = NULL;
+ GtkRadioMenuItem* _tmp30_ = NULL;
+#line 966 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = self->priv->custom_crop_menuitem;
+#line 966 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = _g_object_ref0 (_tmp29_);
+#line 966 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (menuitem);
+#line 966 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ menuitem = _tmp30_;
+#line 4519 "ui.c"
+ }
+#line 947 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (crop_name);
+#line 4523 "ui.c"
+ }
+#line 969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = menuitem;
+#line 969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp31_, TRUE);
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp32_ = self->priv->crop_button;
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp33_ = page;
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp34_ = page_get_has_crop (_tmp33_);
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp35_ = _tmp34_;
+#line 970 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_toggle_button_set_active (_tmp32_, _tmp35_);
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp36_ = self->priv->crop_toolbutton;
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp37_ = page;
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp38_ = page_get_has_crop (_tmp37_);
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp39_ = _tmp38_;
+#line 971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_toggle_tool_button_set_active (_tmp36_, _tmp39_);
+#line 973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->updating_page_menu = FALSE;
+#line 937 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (menuitem);
+#line 4553 "ui.c"
+}
+
+
+static void user_interface_show_page_cb (UserInterface* self, BookView* view, Page* page) {
+ gchar* path = NULL;
+ gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ GFile* file = NULL;
+ const gchar* _tmp2_ = NULL;
+ GFile* _tmp3_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (view != NULL);
+#line 976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (page != NULL);
+#line 978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = get_temporary_filename ("scanned-page", "tiff");
+#line 978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ path = _tmp0_;
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = path;
+#line 979 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp1_ == NULL) {
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 980 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 4583 "ui.c"
+ }
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = path;
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = g_file_new_for_path (_tmp2_);
+#line 981 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ file = _tmp3_;
+#line 4591 "ui.c"
+ {
+ Page* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ GFile* _tmp7_ = NULL;
+#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page;
+#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = user_interface_get_quality (self);
+#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = _tmp5_;
+#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = file;
+#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_save (_tmp4_, "tiff", _tmp6_, _tmp7_, &_inner_error_);
+#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 4609 "ui.c"
+ goto __catch17_g_error;
+ }
+ }
+ goto __finally17;
+ __catch17_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp8_ = NULL;
+ GError* _tmp9_ = NULL;
+ const gchar* _tmp10_ = NULL;
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ e = _inner_error_;
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 989 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _ ("Unable to save image for preview");
+#line 989 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = e;
+#line 989 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = _tmp9_->message;
+#line 989 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_show_error_dialog (self, _tmp8_, _tmp10_);
+#line 992 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_error_free0 (e);
+#line 992 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (file);
+#line 992 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 992 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 4640 "ui.c"
+ }
+ __finally17:
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (file);
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 4655 "ui.c"
+ }
+ {
+ GdkScreen* _tmp11_ = NULL;
+ GdkScreen* _tmp12_ = NULL;
+ GFile* _tmp13_ = NULL;
+ gchar* _tmp14_ = NULL;
+ gchar* _tmp15_ = NULL;
+ guint32 _tmp16_ = 0U;
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = gtk_window_get_screen ((GtkWindow*) self);
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = _tmp11_;
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = file;
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = g_file_get_uri (_tmp13_);
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = _tmp14_;
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = gtk_get_current_event_time ();
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_show_uri (_tmp12_, _tmp15_, _tmp16_, &_inner_error_);
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp15_);
+#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 4682 "ui.c"
+ goto __catch18_g_error;
+ }
+ }
+ goto __finally18;
+ __catch18_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp17_ = NULL;
+ GError* _tmp18_ = NULL;
+ const gchar* _tmp19_ = NULL;
+#line 995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ e = _inner_error_;
+#line 995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 1001 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = _ ("Unable to open image preview application");
+#line 1001 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = e;
+#line 1001 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = _tmp18_->message;
+#line 1001 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_show_error_dialog (self, _tmp17_, _tmp19_);
+#line 995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_error_free0 (e);
+#line 4707 "ui.c"
+ }
+ __finally18:
+#line 995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (file);
+#line 995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 4722 "ui.c"
+ }
+#line 976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (file);
+#line 976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 4728 "ui.c"
+}
+
+
+static void user_interface_show_page_menu_cb (UserInterface* self, BookView* view) {
+ GtkMenu* _tmp0_ = NULL;
+ guint32 _tmp1_ = 0U;
+#line 1007 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1007 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (view != NULL);
+#line 1009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->page_menu;
+#line 1009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_get_current_event_time ();
+#line 1009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_menu_popup (_tmp0_, NULL, NULL, NULL, NULL, (guint) 3, _tmp1_);
+#line 4745 "ui.c"
+}
+
+
+static void user_interface_rotate_left_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+ gboolean _tmp0_ = FALSE;
+ Page* page = NULL;
+ BookView* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1015 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->updating_page_menu;
+#line 1015 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_) {
+#line 1016 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 4767 "ui.c"
+ }
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->book_view;
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = book_view_get_selected_page (_tmp1_);
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = _page_ref0 (_tmp3_);
+#line 1017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp4_;
+#line 1018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = page;
+#line 1018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp5_ != NULL) {
+#line 4783 "ui.c"
+ Page* _tmp6_ = NULL;
+#line 1019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = page;
+#line 1019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_rotate_left (_tmp6_);
+#line 4789 "ui.c"
+ }
+#line 1013 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 4793 "ui.c"
+}
+
+
+static void _user_interface_rotate_left_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_rotate_left_button_clicked_cb ((UserInterface*) self, _sender);
+#line 4800 "ui.c"
+}
+
+
+static void user_interface_rotate_right_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+ gboolean _tmp0_ = FALSE;
+ Page* page = NULL;
+ BookView* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+#line 1023 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1023 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1025 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->updating_page_menu;
+#line 1025 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_) {
+#line 1026 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 4822 "ui.c"
+ }
+#line 1027 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->book_view;
+#line 1027 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = book_view_get_selected_page (_tmp1_);
+#line 1027 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 1027 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = _page_ref0 (_tmp3_);
+#line 1027 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp4_;
+#line 1028 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = page;
+#line 1028 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp5_ != NULL) {
+#line 4838 "ui.c"
+ Page* _tmp6_ = NULL;
+#line 1029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = page;
+#line 1029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_rotate_right (_tmp6_);
+#line 4844 "ui.c"
+ }
+#line 1023 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 4848 "ui.c"
+}
+
+
+static void _user_interface_rotate_right_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_rotate_right_button_clicked_cb ((UserInterface*) self, _sender);
+#line 4855 "ui.c"
+}
+
+
+static void user_interface_set_crop (UserInterface* self, const gchar* crop_name) {
+ GtkMenuItem* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ Page* page = NULL;
+ BookView* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+ Page* _tmp6_ = NULL;
+ Page* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+#line 1032 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1034 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->crop_rotate_menuitem;
+#line 1034 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = crop_name;
+#line 1034 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp1_ != NULL);
+#line 1036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = self->priv->updating_page_menu;
+#line 1036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 1037 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 4884 "ui.c"
+ }
+#line 1039 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->book_view;
+#line 1039 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = book_view_get_selected_page (_tmp3_);
+#line 1039 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _tmp4_;
+#line 1039 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = _page_ref0 (_tmp5_);
+#line 1039 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp6_;
+#line 1040 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = page;
+#line 1040 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp7_ == NULL) {
+#line 1042 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_warning ("ui.vala:1042: Trying to set crop but no selected page");
+#line 1043 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 1043 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 4906 "ui.c"
+ }
+#line 1046 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = crop_name;
+#line 1046 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp8_ == NULL) {
+#line 4912 "ui.c"
+ Page* _tmp9_ = NULL;
+#line 1047 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = page;
+#line 1047 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_set_no_crop (_tmp9_);
+#line 4918 "ui.c"
+ } else {
+ const gchar* _tmp10_ = NULL;
+#line 1048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = crop_name;
+#line 1048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_strcmp0 (_tmp10_, "custom") == 0) {
+#line 4925 "ui.c"
+ gint width = 0;
+ Page* _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+ gint height = 0;
+ Page* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gint crop_width = 0;
+ gint _tmp17_ = 0;
+ gint crop_height = 0;
+ gint _tmp18_ = 0;
+ Page* _tmp19_ = NULL;
+ gint _tmp20_ = 0;
+ gint _tmp21_ = 0;
+ Page* _tmp22_ = NULL;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+ gint _tmp26_ = 0;
+#line 1050 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = page;
+#line 1050 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = page_get_width (_tmp11_);
+#line 1050 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = _tmp12_;
+#line 1050 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ width = _tmp13_;
+#line 1051 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = page;
+#line 1051 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = page_get_height (_tmp14_);
+#line 1051 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = _tmp15_;
+#line 1051 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ height = _tmp16_;
+#line 1052 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = width;
+#line 1052 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ crop_width = (gint) ((_tmp17_ * 0.8) + 0.5);
+#line 1053 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = height;
+#line 1053 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ crop_height = (gint) ((_tmp18_ * 0.8) + 0.5);
+#line 1054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = page;
+#line 1054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = crop_width;
+#line 1054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = crop_height;
+#line 1054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_set_custom_crop (_tmp19_, _tmp20_, _tmp21_);
+#line 1055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = page;
+#line 1055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = width;
+#line 1055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = crop_width;
+#line 1055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = height;
+#line 1055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = crop_height;
+#line 1055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_move_crop (_tmp22_, (_tmp23_ - _tmp24_) / 2, (_tmp25_ - _tmp26_) / 2);
+#line 4990 "ui.c"
+ } else {
+ Page* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
+#line 1058 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = page;
+#line 1058 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = crop_name;
+#line 1058 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_set_named_crop (_tmp27_, _tmp28_);
+#line 5000 "ui.c"
+ }
+ }
+#line 1032 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 5005 "ui.c"
+}
+
+
+static void user_interface_no_crop_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 1062 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1062 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 1064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 1064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 1065 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_crop (self, NULL);
+#line 5027 "ui.c"
+ }
+}
+
+
+static void _user_interface_no_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_no_crop_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 5035 "ui.c"
+}
+
+
+static void user_interface_custom_crop_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 1069 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1069 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1071 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 1071 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 1071 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1071 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 1072 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_crop (self, "custom");
+#line 5057 "ui.c"
+ }
+}
+
+
+static void _user_interface_custom_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_custom_crop_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 5065 "ui.c"
+}
+
+
+static void user_interface_crop_button_toggled_cb (UserInterface* self, GtkToggleButton* widget) {
+ gboolean _tmp0_ = FALSE;
+ GtkToggleButton* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+#line 1076 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1076 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1078 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->updating_page_menu;
+#line 1078 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_) {
+#line 1079 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 5084 "ui.c"
+ }
+#line 1081 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = widget;
+#line 1081 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_toggle_button_get_active (_tmp1_);
+#line 1081 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 1081 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp3_) {
+#line 5094 "ui.c"
+ GtkRadioMenuItem* _tmp4_ = NULL;
+#line 1082 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->custom_crop_menuitem;
+#line 1082 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp4_, TRUE);
+#line 5100 "ui.c"
+ } else {
+ GtkRadioMenuItem* _tmp5_ = NULL;
+#line 1084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->no_crop_menuitem;
+#line 1084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp5_, TRUE);
+#line 5107 "ui.c"
+ }
+}
+
+
+static void _user_interface_crop_button_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_crop_button_toggled_cb ((UserInterface*) self, _sender);
+#line 5115 "ui.c"
+}
+
+
+static void user_interface_crop_toolbutton_toggled_cb (UserInterface* self, GtkToggleToolButton* widget) {
+ gboolean _tmp0_ = FALSE;
+ GtkToggleToolButton* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+#line 1088 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1088 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1090 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->updating_page_menu;
+#line 1090 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_) {
+#line 1091 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 5134 "ui.c"
+ }
+#line 1093 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = widget;
+#line 1093 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_toggle_tool_button_get_active (_tmp1_);
+#line 1093 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 1093 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp3_) {
+#line 5144 "ui.c"
+ GtkRadioMenuItem* _tmp4_ = NULL;
+#line 1094 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->custom_crop_menuitem;
+#line 1094 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp4_, TRUE);
+#line 5150 "ui.c"
+ } else {
+ GtkRadioMenuItem* _tmp5_ = NULL;
+#line 1096 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->no_crop_menuitem;
+#line 1096 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp5_, TRUE);
+#line 5157 "ui.c"
+ }
+}
+
+
+static void _user_interface_crop_toolbutton_toggled_cb_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_crop_toolbutton_toggled_cb ((UserInterface*) self, _sender);
+#line 5165 "ui.c"
+}
+
+
+static void user_interface_four_by_six_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 1100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 1102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 1102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 1103 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_crop (self, "4x6");
+#line 5187 "ui.c"
+ }
+}
+
+
+static void _user_interface_four_by_six_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_four_by_six_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 5195 "ui.c"
+}
+
+
+static void user_interface_legal_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 1107 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1107 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1109 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 1109 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 1109 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1109 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 1110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_crop (self, "legal");
+#line 5217 "ui.c"
+ }
+}
+
+
+static void _user_interface_legal_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_legal_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 5225 "ui.c"
+}
+
+
+static void user_interface_letter_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 1114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1116 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 1116 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 1116 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1116 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 1117 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_crop (self, "letter");
+#line 5247 "ui.c"
+ }
+}
+
+
+static void _user_interface_letter_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_letter_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 5255 "ui.c"
+}
+
+
+static void user_interface_a6_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 1121 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1121 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1123 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 1123 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 1123 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1123 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 1124 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_crop (self, "A6");
+#line 5277 "ui.c"
+ }
+}
+
+
+static void _user_interface_a6_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_a6_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 5285 "ui.c"
+}
+
+
+static void user_interface_a5_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 1128 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1128 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 1130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 1130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 1131 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_crop (self, "A5");
+#line 5307 "ui.c"
+ }
+}
+
+
+static void _user_interface_a5_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_a5_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 5315 "ui.c"
+}
+
+
+static void user_interface_a4_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) {
+ GtkCheckMenuItem* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 1135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = widget;
+#line 1137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_check_menu_item_get_active (_tmp0_);
+#line 1137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 1138 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_crop (self, "A4");
+#line 5337 "ui.c"
+ }
+}
+
+
+static void _user_interface_a4_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_a4_menuitem_toggled_cb ((UserInterface*) self, _sender);
+#line 5345 "ui.c"
+}
+
+
+static void user_interface_crop_rotate_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) {
+ Page* page = NULL;
+ BookView* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+#line 1142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1144 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->book_view;
+#line 1144 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book_view_get_selected_page (_tmp0_);
+#line 1144 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1144 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _page_ref0 (_tmp2_);
+#line 1144 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp3_;
+#line 1145 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page;
+#line 1145 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp4_ == NULL) {
+#line 1146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 1146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 5379 "ui.c"
+ }
+#line 1147 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = page;
+#line 1147 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_rotate_crop (_tmp5_);
+#line 1142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 5387 "ui.c"
+}
+
+
+static void _user_interface_crop_rotate_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_crop_rotate_menuitem_activate_cb ((UserInterface*) self, _sender);
+#line 5394 "ui.c"
+}
+
+
+static void user_interface_page_move_left_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) {
+ Page* page = NULL;
+ BookView* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ guint index = 0U;
+ Book* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+ guint _tmp6_ = 0U;
+ guint _tmp7_ = 0U;
+#line 1151 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1151 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->book_view;
+#line 1153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book_view_get_selected_page (_tmp0_);
+#line 1153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _page_ref0 (_tmp2_);
+#line 1153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp3_;
+#line 1154 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->_book;
+#line 1154 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = page;
+#line 1154 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = book_get_page_index (_tmp4_, _tmp5_);
+#line 1154 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ index = _tmp6_;
+#line 1155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = index;
+#line 1155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp7_ > ((guint) 0)) {
+#line 5435 "ui.c"
+ Book* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+ guint _tmp10_ = 0U;
+#line 1156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = self->priv->_book;
+#line 1156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = page;
+#line 1156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = index;
+#line 1156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_move_page (_tmp8_, _tmp9_, _tmp10_ - 1);
+#line 5447 "ui.c"
+ }
+#line 1151 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 5451 "ui.c"
+}
+
+
+static void _user_interface_page_move_left_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_page_move_left_menuitem_activate_cb ((UserInterface*) self, _sender);
+#line 5458 "ui.c"
+}
+
+
+static void user_interface_page_move_right_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) {
+ Page* page = NULL;
+ BookView* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ guint index = 0U;
+ Book* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+ guint _tmp6_ = 0U;
+ guint _tmp7_ = 0U;
+ Book* _tmp8_ = NULL;
+ guint _tmp9_ = 0U;
+ guint _tmp10_ = 0U;
+#line 1160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->book_view;
+#line 1162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book_view_get_selected_page (_tmp0_);
+#line 1162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _page_ref0 (_tmp2_);
+#line 1162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp3_;
+#line 1163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->_book;
+#line 1163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = page;
+#line 1163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = book_get_page_index (_tmp4_, _tmp5_);
+#line 1163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ index = _tmp6_;
+#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = index;
+#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = self->priv->_book;
+#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = book_get_n_pages (_tmp8_);
+#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = _tmp9_;
+#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp7_ < (_tmp10_ - 1)) {
+#line 5508 "ui.c"
+ Book* _tmp11_ = NULL;
+ Page* _tmp12_ = NULL;
+ Book* _tmp13_ = NULL;
+ Page* _tmp14_ = NULL;
+ guint _tmp15_ = 0U;
+#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = self->priv->_book;
+#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = page;
+#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = self->priv->_book;
+#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = page;
+#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = book_get_page_index (_tmp13_, _tmp14_);
+#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_move_page (_tmp11_, _tmp12_, _tmp15_ + 1);
+#line 5526 "ui.c"
+ }
+#line 1160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 5530 "ui.c"
+}
+
+
+static void _user_interface_page_move_right_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_page_move_right_menuitem_activate_cb ((UserInterface*) self, _sender);
+#line 5537 "ui.c"
+}
+
+
+static void user_interface_page_delete_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) {
+ BookView* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+ Book* _tmp2_ = NULL;
+ BookView* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+#line 1169 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1169 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->book_view;
+#line 1171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book_view_get_book (_tmp0_);
+#line 1171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->book_view;
+#line 1171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = book_view_get_selected_page (_tmp3_);
+#line 1171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _tmp4_;
+#line 1171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_delete_page (_tmp2_, _tmp5_);
+#line 5566 "ui.c"
+}
+
+
+static void _user_interface_page_delete_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_page_delete_menuitem_activate_cb ((UserInterface*) self, _sender);
+#line 5573 "ui.c"
+}
+
+
+static Block1Data* block1_data_ref (Block1Data* _data1_) {
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_atomic_int_inc (&_data1_->_ref_count_);
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return _data1_;
+#line 5582 "ui.c"
+}
+
+
+static void block1_data_unref (void * _userdata_) {
+ Block1Data* _data1_;
+ _data1_ = (Block1Data*) _userdata_;
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
+#line 5591 "ui.c"
+ UserInterface* self;
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = _data1_->self;
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (_data1_->dialog);
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self);
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_slice_free (Block1Data, _data1_);
+#line 5601 "ui.c"
+ }
+}
+
+
+static gboolean __lambda4_ (Block1Data* _data1_, GdkEventKey* e) {
+ UserInterface* self;
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+ GdkEventKey* _tmp1_ = NULL;
+ GdkModifierType _tmp2_ = 0;
+#line 1183 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = _data1_->self;
+#line 1183 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (e != NULL, FALSE);
+#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = e;
+#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_->state;
+#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_ == 0) {
+#line 5622 "ui.c"
+ GdkEventKey* _tmp3_ = NULL;
+ guint _tmp4_ = 0U;
+#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = e;
+#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = _tmp3_->keyval;
+#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = _tmp4_ == ((guint) GDK_KEY_Escape);
+#line 5631 "ui.c"
+ } else {
+#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = FALSE;
+#line 5635 "ui.c"
+ }
+#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_) {
+#line 1187 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_destroy ((GtkWidget*) _data1_->dialog);
+#line 1188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = TRUE;
+#line 1188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 5645 "ui.c"
+ }
+#line 1191 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 1191 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 5651 "ui.c"
+}
+
+
+static gboolean ___lambda4__gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
+ gboolean result;
+ result = __lambda4_ (self, event);
+#line 1183 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 5660 "ui.c"
+}
+
+
+static void __lambda5_ (Block1Data* _data1_) {
+ UserInterface* self;
+ Book* _tmp0_ = NULL;
+#line 1205 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = _data1_->self;
+#line 1207 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->_book;
+#line 1207 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_combine_sides (_tmp0_);
+#line 1208 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_destroy ((GtkWidget*) _data1_->dialog);
+#line 5675 "ui.c"
+}
+
+
+static void ___lambda5__gtk_button_clicked (GtkButton* _sender, gpointer self) {
+#line 1205 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda5_ (self);
+#line 5682 "ui.c"
+}
+
+
+static void __lambda6_ (Block1Data* _data1_) {
+ UserInterface* self;
+ Book* _tmp0_ = NULL;
+#line 1215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = _data1_->self;
+#line 1217 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->_book;
+#line 1217 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_combine_sides_reverse (_tmp0_);
+#line 1218 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_destroy ((GtkWidget*) _data1_->dialog);
+#line 5697 "ui.c"
+}
+
+
+static void ___lambda6__gtk_button_clicked (GtkButton* _sender, gpointer self) {
+#line 1215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda6_ (self);
+#line 5704 "ui.c"
+}
+
+
+static void __lambda7_ (Block1Data* _data1_) {
+ UserInterface* self;
+ Book* _tmp0_ = NULL;
+#line 1225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = _data1_->self;
+#line 1227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->_book;
+#line 1227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_reverse (_tmp0_);
+#line 1228 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_destroy ((GtkWidget*) _data1_->dialog);
+#line 5719 "ui.c"
+}
+
+
+static void ___lambda7__gtk_button_clicked (GtkButton* _sender, gpointer self) {
+#line 1225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda7_ (self);
+#line 5726 "ui.c"
+}
+
+
+static void __lambda8_ (Block1Data* _data1_) {
+ UserInterface* self;
+#line 1235 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = _data1_->self;
+#line 1237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_destroy ((GtkWidget*) _data1_->dialog);
+#line 5736 "ui.c"
+}
+
+
+static void ___lambda8__gtk_button_clicked (GtkButton* _sender, gpointer self) {
+#line 1235 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda8_ (self);
+#line 5743 "ui.c"
+}
+
+
+static void user_interface_reorder_document (UserInterface* self) {
+ Block1Data* _data1_;
+ GtkWindow* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ GtkGrid* g = NULL;
+ GtkGrid* _tmp2_ = NULL;
+ GtkButton* b = NULL;
+ const gchar* _tmp3_ = NULL;
+ GtkButton* _tmp4_ = NULL;
+ GtkButton* _tmp5_ = NULL;
+ GtkButton* _tmp6_ = NULL;
+ GtkButton* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ GtkButton* _tmp9_ = NULL;
+ GtkButton* _tmp10_ = NULL;
+ GtkButton* _tmp11_ = NULL;
+ GtkButton* _tmp12_ = NULL;
+ const gchar* _tmp13_ = NULL;
+ GtkButton* _tmp14_ = NULL;
+ GtkButton* _tmp15_ = NULL;
+ GtkButton* _tmp16_ = NULL;
+ GtkButton* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+ GtkButton* _tmp19_ = NULL;
+ GtkButton* _tmp20_ = NULL;
+ GtkButton* _tmp21_ = NULL;
+ GtkButton* _tmp22_ = NULL;
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _data1_ = g_slice_new0 (Block1Data);
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _data1_->_ref_count_ = 1;
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _data1_->self = g_object_ref (self);
+#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = (GtkWindow*) gtk_window_new (GTK_WINDOW_TOPLEVEL);
+#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp0_);
+#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _data1_->dialog = _tmp0_;
+#line 1177 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_type_hint (_data1_->dialog, GDK_WINDOW_TYPE_HINT_DIALOG);
+#line 1178 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_modal (_data1_->dialog, TRUE);
+#line 1179 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_container_set_border_width ((GtkContainer*) _data1_->dialog, (guint) 12);
+#line 1181 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = _ ("Reorder Pages");
+#line 1181 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_title (_data1_->dialog, _tmp1_);
+#line 1182 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_transient_for (_data1_->dialog, (GtkWindow*) self);
+#line 1183 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_data ((GtkWidget*) _data1_->dialog, "key-press-event", (GCallback) ___lambda4__gtk_widget_key_press_event, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
+#line 1193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _data1_->dialog, TRUE);
+#line 1195 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = (GtkGrid*) gtk_grid_new ();
+#line 1195 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp2_);
+#line 1195 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g = _tmp2_;
+#line 1196 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_grid_set_row_homogeneous (g, TRUE);
+#line 1197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_grid_set_row_spacing (g, 6);
+#line 1198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_grid_set_column_homogeneous (g, TRUE);
+#line 1199 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_grid_set_column_spacing (g, 6);
+#line 1200 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) g, TRUE);
+#line 1201 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_container_add ((GtkContainer*) _data1_->dialog, (GtkWidget*) g);
+#line 1204 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _ ("Combine sides");
+#line 1204 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = user_interface_make_reorder_button (self, _tmp3_, "F1F2F3B1B2B3-F1B1F2B2F3B3");
+#line 1204 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = _tmp4_;
+#line 1205 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = b;
+#line 1205 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_data (_tmp5_, "clicked", (GCallback) ___lambda5__gtk_button_clicked, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
+#line 1210 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = b;
+#line 1210 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp6_, TRUE);
+#line 1211 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = b;
+#line 1211 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_grid_attach (g, (GtkWidget*) _tmp7_, 0, 0, 1, 1);
+#line 1214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _ ("Combine sides (reverse)");
+#line 1214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = user_interface_make_reorder_button (self, _tmp8_, "F1F2F3B3B2B1-F1B1F2B2F3B3");
+#line 1214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (b);
+#line 1214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = _tmp9_;
+#line 1215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = b;
+#line 1215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_data (_tmp10_, "clicked", (GCallback) ___lambda6__gtk_button_clicked, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
+#line 1220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = b;
+#line 1220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE);
+#line 1221 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = b;
+#line 1221 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_grid_attach (g, (GtkWidget*) _tmp12_, 1, 0, 1, 1);
+#line 1224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = _ ("Reverse");
+#line 1224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = user_interface_make_reorder_button (self, _tmp13_, "C1C2C3C4C5C6-C6C5C4C3C2C1");
+#line 1224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (b);
+#line 1224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = _tmp14_;
+#line 1225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = b;
+#line 1225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_data (_tmp15_, "clicked", (GCallback) ___lambda7__gtk_button_clicked, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
+#line 1230 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = b;
+#line 1230 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp16_, TRUE);
+#line 1231 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = b;
+#line 1231 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_grid_attach (g, (GtkWidget*) _tmp17_, 0, 2, 1, 1);
+#line 1234 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = _ ("Keep unchanged");
+#line 1234 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = user_interface_make_reorder_button (self, _tmp18_, "C1C2C3C4C5C6-C1C2C3C4C5C6");
+#line 1234 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (b);
+#line 1234 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = _tmp19_;
+#line 1235 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = b;
+#line 1235 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_data (_tmp20_, "clicked", (GCallback) ___lambda8__gtk_button_clicked, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
+#line 1239 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = b;
+#line 1239 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp21_, TRUE);
+#line 1240 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = b;
+#line 1240 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_grid_attach (g, (GtkWidget*) _tmp22_, 1, 2, 1, 1);
+#line 1242 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_present (_data1_->dialog);
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (b);
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (g);
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ block1_data_unref (_data1_);
+#line 1174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _data1_ = NULL;
+#line 5910 "ui.c"
+}
+
+
+void user_interface_reorder_document_activate_cb (UserInterface* self) {
+#line 1245 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1247 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_reorder_document (self);
+#line 5919 "ui.c"
+}
+
+
+static void user_interface_reorder_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) {
+#line 1251 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1251 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1253 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_reorder_document (self);
+#line 5930 "ui.c"
+}
+
+
+static void _user_interface_reorder_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_reorder_menuitem_activate_cb ((UserInterface*) self, _sender);
+#line 5937 "ui.c"
+}
+
+
+static GtkButton* user_interface_make_reorder_button (UserInterface* self, const gchar* text, const gchar* items) {
+ GtkButton* result = NULL;
+ GtkButton* b = NULL;
+ GtkButton* _tmp0_ = NULL;
+ GtkBox* vbox = NULL;
+ GtkBox* _tmp1_ = NULL;
+ GtkLabel* label = NULL;
+ const gchar* _tmp2_ = NULL;
+ GtkLabel* _tmp3_ = NULL;
+ GtkBox* rb = NULL;
+ const gchar* _tmp4_ = NULL;
+ GtkBox* _tmp5_ = NULL;
+#line 1256 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1256 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (text != NULL, NULL);
+#line 1256 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (items != NULL, NULL);
+#line 1258 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = (GtkButton*) gtk_button_new ();
+#line 1258 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp0_);
+#line 1258 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = _tmp0_;
+#line 1260 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#line 1260 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp1_);
+#line 1260 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ vbox = _tmp1_;
+#line 1261 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) vbox, TRUE);
+#line 1262 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_container_add ((GtkContainer*) b, (GtkWidget*) vbox);
+#line 1264 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = text;
+#line 1264 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = (GtkLabel*) gtk_label_new (_tmp2_);
+#line 1264 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp3_);
+#line 1264 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ label = _tmp3_;
+#line 1265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) label, TRUE);
+#line 1266 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (vbox, (GtkWidget*) label, TRUE, TRUE, (guint) 0);
+#line 1268 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = items;
+#line 1268 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = user_interface_make_reorder_box (self, _tmp4_);
+#line 1268 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ rb = _tmp5_;
+#line 1269 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) rb, TRUE);
+#line 1270 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (vbox, (GtkWidget*) rb, TRUE, TRUE, (guint) 0);
+#line 1272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = b;
+#line 1272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (rb);
+#line 1272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (label);
+#line 1272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (vbox);
+#line 1272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 6007 "ui.c"
+}
+
+
+static gchar string_get (const gchar* self, glong index) {
+ gchar result = '\0';
+ glong _tmp0_ = 0L;
+ gchar _tmp1_ = '\0';
+#line 996 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, '\0');
+#line 997 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp0_ = index;
+#line 997 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ _tmp1_ = ((gchar*) self)[_tmp0_];
+#line 997 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ result = _tmp1_;
+#line 997 "/usr/share/vala-0.24/vapi/glib-2.0.vapi"
+ return result;
+#line 6025 "ui.c"
+}
+
+
+static GtkBox* user_interface_make_reorder_box (UserInterface* self, const gchar* items) {
+ GtkBox* result = NULL;
+ GtkBox* box = NULL;
+ GtkBox* _tmp0_ = NULL;
+ GtkBox* _tmp1_ = NULL;
+ GtkBox* page_box = NULL;
+#line 1275 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1275 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (items != NULL, NULL);
+#line 1277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#line 1277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp0_);
+#line 1277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ box = _tmp0_;
+#line 1278 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = box;
+#line 1278 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp1_, TRUE);
+#line 1280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_box = NULL;
+#line 6051 "ui.c"
+ {
+ gint i = 0;
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ i = 0;
+#line 6056 "ui.c"
+ {
+ gboolean _tmp2_ = FALSE;
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = TRUE;
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ while (TRUE) {
+#line 6063 "ui.c"
+ const gchar* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gchar _tmp6_ = '\0';
+ const gchar* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ gchar _tmp9_ = '\0';
+ gchar side = '\0';
+ const gchar* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ gchar _tmp16_ = '\0';
+ gint _tmp17_ = 0;
+ const gchar* _tmp18_ = NULL;
+ gint _tmp19_ = 0;
+ gchar _tmp20_ = '\0';
+ GtkBox* _tmp21_ = NULL;
+ gdouble r = 0.0;
+ gdouble g = 0.0;
+ gdouble b = 0.0;
+ gchar _tmp26_ = '\0';
+ gdouble _tmp33_ = 0.0;
+ gdouble _tmp34_ = 0.0;
+ gdouble _tmp35_ = 0.0;
+ gdouble _tmp36_ = 0.0;
+ gdouble _tmp37_ = 0.0;
+ gdouble _tmp38_ = 0.0;
+ PageIcon* icon = NULL;
+ const gchar* _tmp39_ = NULL;
+ gint _tmp40_ = 0;
+ gchar _tmp41_ = '\0';
+ gchar* _tmp42_ = NULL;
+ gchar* _tmp43_ = NULL;
+ gdouble _tmp44_ = 0.0;
+ gdouble _tmp45_ = 0.0;
+ gdouble _tmp46_ = 0.0;
+ PageIcon* _tmp47_ = NULL;
+ PageIcon* _tmp48_ = NULL;
+ PageIcon* _tmp49_ = NULL;
+ GtkBox* _tmp50_ = NULL;
+ PageIcon* _tmp51_ = NULL;
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp2_) {
+#line 6105 "ui.c"
+ gint _tmp3_ = 0;
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = i;
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ i = _tmp3_ + 1;
+#line 6111 "ui.c"
+ }
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = FALSE;
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = items;
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = i;
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = string_get (_tmp4_, (glong) _tmp5_);
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!(_tmp6_ != '\0')) {
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 6125 "ui.c"
+ }
+#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = items;
+#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = i;
+#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = string_get (_tmp7_, (glong) _tmp8_);
+#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp9_ == '-') {
+#line 6135 "ui.c"
+ GtkArrow* a = NULL;
+ GtkArrow* _tmp10_ = NULL;
+ GtkArrow* _tmp11_ = NULL;
+ GtkBox* _tmp12_ = NULL;
+ GtkArrow* _tmp13_ = NULL;
+#line 1285 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = (GtkArrow*) gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
+#line 1285 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp10_);
+#line 1285 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ a = _tmp10_;
+#line 1286 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = a;
+#line 1286 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE);
+#line 1287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = box;
+#line 1287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = a;
+#line 1287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (_tmp12_, (GtkWidget*) _tmp13_, FALSE, FALSE, (guint) 0);
+#line 1288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (page_box);
+#line 1288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_box = NULL;
+#line 1289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (a);
+#line 1289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ continue;
+#line 6165 "ui.c"
+ }
+#line 1293 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = items;
+#line 1293 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = i;
+#line 1293 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = string_get (_tmp14_, (glong) _tmp15_);
+#line 1293 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ side = _tmp16_;
+#line 1294 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = i;
+#line 1294 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ i = _tmp17_ + 1;
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = items;
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = i;
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = string_get (_tmp18_, (glong) _tmp19_);
+#line 1295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp20_ == '\0') {
+#line 1296 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 6189 "ui.c"
+ }
+#line 1298 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = page_box;
+#line 1298 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp21_ == NULL) {
+#line 6195 "ui.c"
+ GtkBox* _tmp22_ = NULL;
+ GtkBox* _tmp23_ = NULL;
+ GtkBox* _tmp24_ = NULL;
+ GtkBox* _tmp25_ = NULL;
+#line 1300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
+#line 1300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp22_);
+#line 1300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (page_box);
+#line 1300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_box = _tmp22_;
+#line 1301 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = page_box;
+#line 1301 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp23_, TRUE);
+#line 1302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = box;
+#line 1302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = page_box;
+#line 1302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (_tmp24_, (GtkWidget*) _tmp25_, FALSE, FALSE, (guint) 0);
+#line 6218 "ui.c"
+ }
+#line 1306 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ r = 1.0;
+#line 1307 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g = 1.0;
+#line 1308 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = 1.0;
+#line 1309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = side;
+#line 1309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (_tmp26_) {
+#line 1309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case 'F':
+#line 6232 "ui.c"
+ {
+#line 1313 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ r = 0x75 / 255.0;
+#line 1314 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g = 0x50 / 255.0;
+#line 1315 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = 0x7B / 255.0;
+#line 1316 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 6242 "ui.c"
+ }
+#line 1309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case 'B':
+#line 6246 "ui.c"
+ {
+#line 1319 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ r = 0xF5 / 255.0;
+#line 1320 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g = 0x79 / 255.0;
+#line 1321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = 0.0;
+#line 1322 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 6256 "ui.c"
+ }
+#line 1309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case 'C':
+#line 6260 "ui.c"
+ {
+ gdouble p = 0.0;
+ const gchar* _tmp27_ = NULL;
+ gint _tmp28_ = 0;
+ gchar _tmp29_ = '\0';
+ gdouble _tmp30_ = 0.0;
+ gdouble _tmp31_ = 0.0;
+ gdouble _tmp32_ = 0.0;
+#line 1325 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = items;
+#line 1325 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = i;
+#line 1325 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = string_get (_tmp27_, (glong) _tmp28_);
+#line 1325 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ p = (_tmp29_ - '1') / 5.0;
+#line 1326 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = p;
+#line 1326 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = p;
+#line 1326 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ r = ((0xED / 255.0) * (1 - _tmp30_)) + (0xCC * _tmp31_);
+#line 1327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp32_ = p;
+#line 1327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g = (0xD4 / 255.0) * (1 - _tmp32_);
+#line 1328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = (gdouble) 0;
+#line 1329 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 6291 "ui.c"
+ }
+ default:
+#line 1309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 6296 "ui.c"
+ }
+#line 1333 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp33_ = r;
+#line 1333 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp34_ = r;
+#line 1333 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ r = _tmp33_ + ((1.0 - _tmp34_) * 0.7);
+#line 1334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp35_ = g;
+#line 1334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp36_ = g;
+#line 1334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g = _tmp35_ + ((1.0 - _tmp36_) * 0.7);
+#line 1335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp37_ = b;
+#line 1335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp38_ = b;
+#line 1335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ b = _tmp37_ + ((1.0 - _tmp38_) * 0.7);
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp39_ = items;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp40_ = i;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp41_ = string_get (_tmp39_, (glong) _tmp40_);
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp42_ = g_strdup_printf ("%c", (gint) _tmp41_);
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp43_ = _tmp42_;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp44_ = r;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp45_ = g;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp46_ = b;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp47_ = page_icon_new (_tmp43_, _tmp44_, _tmp45_, _tmp46_);
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp47_);
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp48_ = _tmp47_;
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp43_);
+#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ icon = _tmp48_;
+#line 1338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp49_ = icon;
+#line 1338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp49_, TRUE);
+#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp50_ = page_box;
+#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp51_ = icon;
+#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (_tmp50_, (GtkWidget*) _tmp51_, FALSE, FALSE, (guint) 0);
+#line 1281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (icon);
+#line 6354 "ui.c"
+ }
+ }
+ }
+#line 1342 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = box;
+#line 1342 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (page_box);
+#line 1342 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 6364 "ui.c"
+}
+
+
+static void user_interface_save_file_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+#line 1346 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1346 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_document (self, FALSE);
+#line 6375 "ui.c"
+}
+
+
+static void _user_interface_save_file_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_file_button_clicked_cb ((UserInterface*) self, _sender);
+#line 6382 "ui.c"
+}
+
+
+void user_interface_save_document_activate_cb (UserInterface* self) {
+#line 1351 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1353 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_document (self, FALSE);
+#line 6391 "ui.c"
+}
+
+
+static void user_interface_copy_to_clipboard_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+ Page* page = NULL;
+ BookView* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+#line 1357 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1357 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->book_view;
+#line 1359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book_view_get_selected_page (_tmp0_);
+#line 1359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _page_ref0 (_tmp2_);
+#line 1359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp3_;
+#line 1360 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page;
+#line 1360 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp4_ != NULL) {
+#line 6420 "ui.c"
+ Page* _tmp5_ = NULL;
+#line 1361 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = page;
+#line 1361 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_copy_to_clipboard (_tmp5_, (GtkWindow*) self);
+#line 6426 "ui.c"
+ }
+#line 1357 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 6430 "ui.c"
+}
+
+
+static void _user_interface_copy_to_clipboard_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_copy_to_clipboard_button_clicked_cb ((UserInterface*) self, _sender);
+#line 6437 "ui.c"
+}
+
+
+static void user_interface_save_as_file_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1365 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1367 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_document (self, TRUE);
+#line 6448 "ui.c"
+}
+
+
+static void _user_interface_save_as_file_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_as_file_button_clicked_cb ((UserInterface*) self, _sender);
+#line 6455 "ui.c"
+}
+
+
+void user_interface_save_as_document_activate_cb (UserInterface* self) {
+#line 1370 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1372 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_document (self, TRUE);
+#line 6464 "ui.c"
+}
+
+
+static gpointer _cairo_reference0 (gpointer self) {
+#line 1379 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return self ? cairo_reference (self) : NULL;
+#line 6471 "ui.c"
+}
+
+
+static void user_interface_draw_page (UserInterface* self, GtkPrintOperation* operation, GtkPrintContext* print_context, gint page_number) {
+ cairo_t* context = NULL;
+ GtkPrintContext* _tmp0_ = NULL;
+ cairo_t* _tmp1_ = NULL;
+ cairo_t* _tmp2_ = NULL;
+ Page* page = NULL;
+ Book* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ Page* _tmp5_ = NULL;
+ gboolean is_landscape = FALSE;
+ GtkPrintContext* _tmp6_ = NULL;
+ gdouble _tmp7_ = 0.0;
+ GtkPrintContext* _tmp8_ = NULL;
+ gdouble _tmp9_ = 0.0;
+ Page* _tmp10_ = NULL;
+ gboolean _tmp11_ = FALSE;
+ gboolean _tmp12_ = FALSE;
+ gboolean _tmp13_ = FALSE;
+ cairo_t* _tmp18_ = NULL;
+ GtkPrintContext* _tmp19_ = NULL;
+ gdouble _tmp20_ = 0.0;
+ Page* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ gint _tmp23_ = 0;
+ GtkPrintContext* _tmp24_ = NULL;
+ gdouble _tmp25_ = 0.0;
+ Page* _tmp26_ = NULL;
+ gint _tmp27_ = 0;
+ gint _tmp28_ = 0;
+ GdkPixbuf* image = NULL;
+ Page* _tmp29_ = NULL;
+ GdkPixbuf* _tmp30_ = NULL;
+ cairo_t* _tmp31_ = NULL;
+ cairo_t* _tmp32_ = NULL;
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (operation != NULL);
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (print_context != NULL);
+#line 1379 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = print_context;
+#line 1379 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_print_context_get_cairo_context (_tmp0_);
+#line 1379 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _cairo_reference0 (_tmp1_);
+#line 1379 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ context = _tmp2_;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->_book;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page_number;
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = book_get_page (_tmp3_, _tmp4_);
+#line 1380 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page = _tmp5_;
+#line 1383 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ is_landscape = FALSE;
+#line 1384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = print_context;
+#line 1384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = gtk_print_context_get_width (_tmp6_);
+#line 1384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = print_context;
+#line 1384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = gtk_print_context_get_height (_tmp8_);
+#line 1384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp7_ > _tmp9_) {
+#line 1385 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ is_landscape = TRUE;
+#line 6545 "ui.c"
+ }
+#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = page;
+#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = page_get_is_landscape (_tmp10_);
+#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = _tmp11_;
+#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = is_landscape;
+#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp12_ != _tmp13_) {
+#line 6557 "ui.c"
+ cairo_t* _tmp14_ = NULL;
+ GtkPrintContext* _tmp15_ = NULL;
+ gdouble _tmp16_ = 0.0;
+ cairo_t* _tmp17_ = NULL;
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = context;
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = print_context;
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = gtk_print_context_get_width (_tmp15_);
+#line 1388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_translate (_tmp14_, _tmp16_, (gdouble) 0);
+#line 1389 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = context;
+#line 1389 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_rotate (_tmp17_, G_PI_2);
+#line 6574 "ui.c"
+ }
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = context;
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = print_context;
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = gtk_print_context_get_dpi_x (_tmp19_);
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = page;
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = page_get_dpi (_tmp21_);
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = _tmp22_;
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = print_context;
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = gtk_print_context_get_dpi_y (_tmp24_);
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = page;
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = page_get_dpi (_tmp26_);
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = _tmp27_;
+#line 1392 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_scale (_tmp18_, _tmp20_ / _tmp23_, _tmp25_ / _tmp28_);
+#line 1395 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = page;
+#line 1395 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = page_get_image (_tmp29_, TRUE);
+#line 1395 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ image = _tmp30_;
+#line 1396 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = context;
+#line 1396 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gdk_cairo_set_source_pixbuf (_tmp31_, image, (gdouble) 0, (gdouble) 0);
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp32_ = context;
+#line 1397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_paint (_tmp32_);
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (image);
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _page_unref0 (page);
+#line 1375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _cairo_destroy0 (context);
+#line 6620 "ui.c"
+}
+
+
+static void user_interface_email_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+ const gchar* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+#line 1401 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1401 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1403 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->document_hint;
+#line 1403 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_quality (self);
+#line 1403 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1403 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_emit_by_name (self, "email", _tmp0_, _tmp2_);
+#line 6640 "ui.c"
+}
+
+
+static void _user_interface_email_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_email_button_clicked_cb ((UserInterface*) self, _sender);
+#line 6647 "ui.c"
+}
+
+
+void user_interface_email_document_activate_cb (UserInterface* self) {
+ const gchar* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+#line 1406 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1408 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->document_hint;
+#line 1408 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_quality (self);
+#line 1408 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1408 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_emit_by_name (self, "email", _tmp0_, _tmp2_);
+#line 6665 "ui.c"
+}
+
+
+static void _user_interface_draw_page_gtk_print_operation_draw_page (GtkPrintOperation* _sender, GtkPrintContext* context, gint page_nr, gpointer self) {
+#line 1415 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_draw_page ((UserInterface*) self, _sender, context, page_nr);
+#line 6672 "ui.c"
+}
+
+
+static void user_interface_print_document (UserInterface* self) {
+ GtkPrintOperation* print = NULL;
+ GtkPrintOperation* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+ guint _tmp2_ = 0U;
+ guint _tmp3_ = 0U;
+ guint _tmp6_ = 0U;
+ GError * _inner_error_ = NULL;
+#line 1411 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1413 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = gtk_print_operation_new ();
+#line 1413 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ print = _tmp0_;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->_book;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = book_get_n_pages (_tmp1_);
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 1414 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_set (print, "n-pages", (gint) _tmp3_, NULL);
+#line 1415 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (print, "draw-page", (GCallback) _user_interface_draw_page_gtk_print_operation_draw_page, self, 0);
+#line 6700 "ui.c"
+ {
+#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, (GtkWindow*) self, &_inner_error_);
+#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 6706 "ui.c"
+ goto __catch19_g_error;
+ }
+ }
+ goto __finally19;
+ __catch19_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ e = _inner_error_;
+#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 1423 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = e;
+#line 1423 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _tmp4_->message;
+#line 1423 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_warning ("ui.vala:1423: Error printing: %s", _tmp5_);
+#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_error_free0 (e);
+#line 6728 "ui.c"
+ }
+ __finally19:
+#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (print);
+#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 6741 "ui.c"
+ }
+#line 1426 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_parse_name ("draw-page", GTK_TYPE_PRINT_OPERATION, &_tmp6_, NULL, FALSE);
+#line 1426 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_handlers_disconnect_matched (print, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _user_interface_draw_page_gtk_print_operation_draw_page, self);
+#line 1411 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (print);
+#line 6749 "ui.c"
+}
+
+
+static void user_interface_print_button_clicked_cb (UserInterface* self, GtkWidget* widget) {
+#line 1430 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1430 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1432 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_print_document (self);
+#line 6760 "ui.c"
+}
+
+
+static void _user_interface_print_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_print_button_clicked_cb ((UserInterface*) self, _sender);
+#line 6767 "ui.c"
+}
+
+
+void user_interface_print_document_activate_cb (UserInterface* self) {
+#line 1435 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1437 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_print_document (self);
+#line 6776 "ui.c"
+}
+
+
+static void user_interface_launch_help (UserInterface* self) {
+ GError * _inner_error_ = NULL;
+#line 1440 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 6784 "ui.c"
+ {
+ GdkScreen* _tmp0_ = NULL;
+ GdkScreen* _tmp1_ = NULL;
+ guint32 _tmp2_ = 0U;
+#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = gtk_window_get_screen ((GtkWindow*) self);
+#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = _tmp0_;
+#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_get_current_event_time ();
+#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_show_uri (_tmp1_, "help:simple-scan", _tmp2_, &_inner_error_);
+#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 6799 "ui.c"
+ goto __catch20_g_error;
+ }
+ }
+ goto __finally20;
+ __catch20_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp3_ = NULL;
+ GError* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+#line 1442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ e = _inner_error_;
+#line 1442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 1448 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _ ("Unable to open help file");
+#line 1448 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = e;
+#line 1448 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _tmp4_->message;
+#line 1448 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_show_error_dialog (self, _tmp3_, _tmp5_);
+#line 1442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_error_free0 (e);
+#line 6824 "ui.c"
+ }
+ __finally20:
+#line 1442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 1442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 6835 "ui.c"
+ }
+}
+
+
+static void user_interface_help_contents_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) {
+#line 1455 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1455 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1457 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_launch_help (self);
+#line 6847 "ui.c"
+}
+
+
+static void _user_interface_help_contents_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_help_contents_menuitem_activate_cb ((UserInterface*) self, _sender);
+#line 6854 "ui.c"
+}
+
+
+void user_interface_help_contents_activate_cb (UserInterface* self) {
+#line 1460 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_launch_help (self);
+#line 6863 "ui.c"
+}
+
+
+static void user_interface_show_about (UserInterface* self) {
+ gchar** authors = NULL;
+ gchar* _tmp0_ = NULL;
+ gchar** _tmp1_ = NULL;
+ gint authors_length1 = 0;
+ gint _authors_size_ = 0;
+ gchar* license = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar* title = NULL;
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gchar* description = NULL;
+ const gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+#line 1465 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = g_strdup ("Robert Ancell <robert.ancell@canonical.com>");
+#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = g_new0 (gchar*, 1 + 1);
+#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_[0] = _tmp0_;
+#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ authors = _tmp1_;
+#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ authors_length1 = 1;
+#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _authors_size_ = authors_length1;
+#line 1470 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _ ("This program is free software: you can redistribute it and/or modify\n" \
+"it under the terms of the GNU General Public License as published by\n" \
+"the Free Software Foundation, either version 3 of the License, or\n" \
+"(at your option) any later version.\n" \
+"\n" \
+"This program is distributed in the hope that it will be useful,\n" \
+"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" \
+"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" \
+"GNU General Public License for more details.\n" \
+"\n" \
+"You should have received a copy of the GNU General Public License\n" \
+"along with this program. If not, see <http://www.gnu.org/licenses/>.");
+#line 1470 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 1470 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ license = _tmp3_;
+#line 1473 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = _ ("About Simple Scan");
+#line 1473 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = g_strdup (_tmp4_);
+#line 1473 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ title = _tmp5_;
+#line 1476 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = _ ("Simple document scanning tool");
+#line 1476 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = g_strdup (_tmp6_);
+#line 1476 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ description = _tmp7_;
+#line 1478 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _ ("translator-credits");
+#line 1478 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_show_about_dialog ((GtkWindow*) self, "title", title, "program-name", "Simple Scan", "version", VERSION, "comments", description, "logo-icon-name", "scanner", "authors", authors, "translator-credits", _tmp8_, "website", "https://launchpad.net/simple-scan", "copyright", "Copyright © 2009-2011 Canonical Ltd.", "license", license, "wrap-license", TRUE, NULL, NULL);
+#line 1465 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (description);
+#line 1465 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (title);
+#line 1465 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (license);
+#line 1465 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ authors = (_vala_array_free (authors, authors_length1, (GDestroyNotify) g_free), NULL);
+#line 6927 "ui.c"
+}
+
+
+static void user_interface_about_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) {
+#line 1494 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1494 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_show_about (self);
+#line 6938 "ui.c"
+}
+
+
+static void _user_interface_about_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_about_menuitem_activate_cb ((UserInterface*) self, _sender);
+#line 6945 "ui.c"
+}
+
+
+void user_interface_about_activate_cb (UserInterface* self) {
+#line 1499 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1501 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_show_about (self);
+#line 6954 "ui.c"
+}
+
+
+static gboolean user_interface_on_quit (UserInterface* self) {
+ gboolean result = FALSE;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ guint _tmp3_ = 0U;
+ AutosaveManager* _tmp4_ = NULL;
+#line 1504 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 1506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = _ ("Save document before quitting?");
+#line 1506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = _ ("Quit without Saving");
+#line 1506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = user_interface_prompt_to_save (self, _tmp0_, _tmp1_);
+#line 1506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp2_) {
+#line 1510 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 1510 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 6979 "ui.c"
+ }
+#line 1512 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_destroy ((GtkWidget*) self);
+#line 1514 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->save_state_timeout;
+#line 1514 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp3_ != ((guint) 0)) {
+#line 1515 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_state (self, TRUE);
+#line 6989 "ui.c"
+ }
+#line 1517 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->autosave_manager;
+#line 1517 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ autosave_manager_cleanup (_tmp4_);
+#line 1519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = TRUE;
+#line 1519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 6999 "ui.c"
+}
+
+
+static void user_interface_quit_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) {
+#line 1523 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1523 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_on_quit (self);
+#line 7010 "ui.c"
+}
+
+
+static void _user_interface_quit_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_quit_menuitem_activate_cb ((UserInterface*) self, _sender);
+#line 7017 "ui.c"
+}
+
+
+void user_interface_quit_activate_cb (UserInterface* self) {
+#line 1528 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1530 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_on_quit (self);
+#line 7026 "ui.c"
+}
+
+
+static gboolean user_interface_simple_scan_window_configure_event_cb (UserInterface* self, GtkWidget* widget, GdkEventConfigure* event) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 1534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 1534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 1534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (event != NULL, FALSE);
+#line 1536 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->window_is_maximized;
+#line 1536 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp0_) {
+#line 7043 "ui.c"
+ GdkEventConfigure* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+ GdkEventConfigure* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+#line 1538 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = event;
+#line 1538 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_->width;
+#line 1538 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->window_width = _tmp2_;
+#line 1539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = event;
+#line 1539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = _tmp3_->height;
+#line 1539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->window_height = _tmp4_;
+#line 1540 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_state (self, FALSE);
+#line 7062 "ui.c"
+ }
+#line 1543 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 1543 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 7068 "ui.c"
+}
+
+
+static gboolean _user_interface_simple_scan_window_configure_event_cb_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self) {
+ gboolean result;
+ result = user_interface_simple_scan_window_configure_event_cb ((UserInterface*) self, _sender, event);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 7077 "ui.c"
+}
+
+
+static void user_interface_info_bar_response_cb (UserInterface* self, GtkInfoBar* widget, gint response_id) {
+ gint _tmp0_ = 0;
+#line 1546 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1546 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (widget != NULL);
+#line 1548 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = response_id;
+#line 1548 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp0_ == 1) {
+#line 7091 "ui.c"
+ GtkComboBox* _tmp1_ = NULL;
+ GtkDialog* _tmp2_ = NULL;
+#line 1550 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->device_combo;
+#line 1550 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_grab_focus ((GtkWidget*) _tmp1_);
+#line 1551 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = self->priv->preferences_dialog;
+#line 1551 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_present ((GtkWindow*) _tmp2_);
+#line 7102 "ui.c"
+ } else {
+#line 1555 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->have_error = FALSE;
+#line 1556 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->error_title);
+#line 1556 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->error_title = NULL;
+#line 1557 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->error_text);
+#line 1557 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->error_text = NULL;
+#line 1558 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_update_info_bar (self);
+#line 7116 "ui.c"
+ }
+}
+
+
+static gboolean user_interface_simple_scan_window_window_state_event_cb (UserInterface* self, GtkWidget* widget, GdkEventWindowState* event) {
+ gboolean result = FALSE;
+ GdkEventWindowState* _tmp0_ = NULL;
+ GdkWindowState _tmp1_ = 0;
+#line 1563 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 1563 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 1563 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (event != NULL, FALSE);
+#line 1565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = event;
+#line 1565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = _tmp0_->changed_mask;
+#line 1565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if ((_tmp1_ & GDK_WINDOW_STATE_MAXIMIZED) != 0) {
+#line 7137 "ui.c"
+ GdkEventWindowState* _tmp2_ = NULL;
+ GdkWindowState _tmp3_ = 0;
+#line 1567 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = event;
+#line 1567 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_->new_window_state;
+#line 1567 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->window_is_maximized = (_tmp3_ & GDK_WINDOW_STATE_MAXIMIZED) != 0;
+#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_state (self, FALSE);
+#line 7148 "ui.c"
+ }
+#line 1570 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 1570 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 7154 "ui.c"
+}
+
+
+static gboolean _user_interface_simple_scan_window_window_state_event_cb_gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self) {
+ gboolean result;
+ result = user_interface_simple_scan_window_window_state_event_cb ((UserInterface*) self, _sender, event);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 7163 "ui.c"
+}
+
+
+static gboolean user_interface_window_delete_event_cb (UserInterface* self, GtkWidget* widget, GdkEventAny* event) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 1574 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 1574 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (widget != NULL, FALSE);
+#line 1574 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (event != NULL, FALSE);
+#line 1576 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = user_interface_on_quit (self);
+#line 1576 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = !_tmp0_;
+#line 1576 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 7182 "ui.c"
+}
+
+
+static gboolean _user_interface_window_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) {
+ gboolean result;
+ result = user_interface_window_delete_event_cb ((UserInterface*) self, _sender, event);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 7191 "ui.c"
+}
+
+
+static void user_interface_page_size_changed_cb (UserInterface* self, Page* page) {
+ Page* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ Page* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ Page* _tmp6_ = NULL;
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+#line 1579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (page != NULL);
+#line 1581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = page;
+#line 1581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = page_get_width (_tmp0_);
+#line 1581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_width = _tmp2_;
+#line 1582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = page;
+#line 1582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page_get_height (_tmp3_);
+#line 1582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _tmp4_;
+#line 1582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_height = _tmp5_;
+#line 1583 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = page;
+#line 1583 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = page_get_dpi (_tmp6_);
+#line 1583 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _tmp7_;
+#line 1583 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_dpi = _tmp8_;
+#line 1584 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_state (self, FALSE);
+#line 7235 "ui.c"
+}
+
+
+static void user_interface_page_scan_direction_changed_cb (UserInterface* self, Page* page) {
+ Page* _tmp0_ = NULL;
+ ScanDirection _tmp1_ = 0;
+ ScanDirection _tmp2_ = 0;
+#line 1587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (page != NULL);
+#line 1589 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = page;
+#line 1589 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = page_get_scan_direction (_tmp0_);
+#line 1589 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1589 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_scan_direction = _tmp2_;
+#line 1590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_state (self, FALSE);
+#line 7257 "ui.c"
+}
+
+
+static void _user_interface_page_size_changed_cb_page_size_changed (Page* _sender, gpointer self) {
+#line 1597 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_page_size_changed_cb ((UserInterface*) self, _sender);
+#line 7264 "ui.c"
+}
+
+
+static void _user_interface_page_scan_direction_changed_cb_page_scan_direction_changed (Page* _sender, gpointer self) {
+#line 1598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_page_scan_direction_changed_cb ((UserInterface*) self, _sender);
+#line 7271 "ui.c"
+}
+
+
+static void user_interface_page_added_cb (UserInterface* self, Book* book, Page* page) {
+ Page* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ ScanDirection _tmp2_ = 0;
+ ScanDirection _tmp3_ = 0;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+#line 1593 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1593 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (book != NULL);
+#line 1593 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (page != NULL);
+#line 1595 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = page;
+#line 1595 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_page_size_changed_cb (self, _tmp0_);
+#line 1596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = page;
+#line 1596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = page_get_scan_direction (_tmp1_);
+#line 1596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 1596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_scan_direction = _tmp3_;
+#line 1597 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page;
+#line 1597 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp4_, "size-changed", (GCallback) _user_interface_page_size_changed_cb_page_size_changed, self, 0);
+#line 1598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = page;
+#line 1598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp5_, "scan-direction-changed", (GCallback) _user_interface_page_scan_direction_changed_cb_page_scan_direction_changed, self, 0);
+#line 1600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_update_page_menu (self);
+#line 7310 "ui.c"
+}
+
+
+static void user_interface_reordered_cb (UserInterface* self, Book* book) {
+#line 1603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (book != NULL);
+#line 1605 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_update_page_menu (self);
+#line 7321 "ui.c"
+}
+
+
+static void user_interface_page_removed_cb (UserInterface* self, Book* book, Page* page) {
+ Page* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+ Page* _tmp2_ = NULL;
+ guint _tmp3_ = 0U;
+ Book* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+ guint _tmp6_ = 0U;
+#line 1608 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1608 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (book != NULL);
+#line 1608 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (page != NULL);
+#line 1610 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = page;
+#line 1610 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_parse_name ("size-changed", TYPE_PAGE, &_tmp1_, NULL, FALSE);
+#line 1610 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _user_interface_page_size_changed_cb_page_size_changed, self);
+#line 1611 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = page;
+#line 1611 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_parse_name ("scan-direction-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE);
+#line 1611 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _user_interface_page_scan_direction_changed_cb_page_scan_direction_changed, self);
+#line 1614 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = book;
+#line 1614 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = book_get_n_pages (_tmp4_);
+#line 1614 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = _tmp5_;
+#line 1614 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp6_ == ((guint) 1)) {
+#line 1615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_add_default_page (self);
+#line 7361 "ui.c"
+ }
+#line 1617 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_update_page_menu (self);
+#line 7365 "ui.c"
+}
+
+
+static void user_interface_set_dpi_combo (UserInterface* self, GtkComboBox* combo, gint default_dpi, gint current_dpi) {
+ GtkCellRendererText* renderer = NULL;
+ GtkCellRendererText* _tmp0_ = NULL;
+ GtkComboBox* _tmp1_ = NULL;
+ GtkCellRendererText* _tmp2_ = NULL;
+ GtkComboBox* _tmp3_ = NULL;
+ GtkCellRendererText* _tmp4_ = NULL;
+ GtkListStore* model = NULL;
+ GtkComboBox* _tmp5_ = NULL;
+ GtkTreeModel* _tmp6_ = NULL;
+ GtkTreeModel* _tmp7_ = NULL;
+ GtkListStore* _tmp8_ = NULL;
+ gint* scan_resolutions = NULL;
+ gint* _tmp9_ = NULL;
+ gint scan_resolutions_length1 = 0;
+ gint _scan_resolutions_size_ = 0;
+ gint* _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+#line 1620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (combo != NULL);
+#line 1622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
+#line 1622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp0_);
+#line 1622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ renderer = _tmp0_;
+#line 1623 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = combo;
+#line 1623 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = renderer;
+#line 1623 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp1_, (GtkCellRenderer*) _tmp2_, TRUE);
+#line 1624 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = combo;
+#line 1624 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = renderer;
+#line 1624 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp3_, (GtkCellRenderer*) _tmp4_, "text", 1);
+#line 1626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = combo;
+#line 1626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = gtk_combo_box_get_model (_tmp5_);
+#line 1626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = _tmp6_;
+#line 1626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, GTK_TYPE_LIST_STORE) ? ((GtkListStore*) _tmp7_) : NULL);
+#line 1626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ model = _tmp8_;
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = g_new0 (gint, 6);
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_[0] = 75;
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_[1] = 150;
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_[2] = 300;
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_[3] = 600;
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_[4] = 1200;
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_[5] = 2400;
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ scan_resolutions = _tmp9_;
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ scan_resolutions_length1 = 6;
+#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _scan_resolutions_size_ = scan_resolutions_length1;
+#line 1628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = scan_resolutions;
+#line 1628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10__length1 = scan_resolutions_length1;
+#line 7443 "ui.c"
+ {
+ gint* dpi_collection = NULL;
+ gint dpi_collection_length1 = 0;
+ gint _dpi_collection_size_ = 0;
+ gint dpi_it = 0;
+#line 1628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dpi_collection = _tmp10_;
+#line 1628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dpi_collection_length1 = _tmp10__length1;
+#line 1628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ for (dpi_it = 0; dpi_it < _tmp10__length1; dpi_it = dpi_it + 1) {
+#line 7455 "ui.c"
+ gint dpi = 0;
+#line 1628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dpi = dpi_collection[dpi_it];
+#line 7459 "ui.c"
+ {
+ gchar* label = NULL;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ GtkTreeIter iter = {0};
+ GtkListStore* _tmp27_ = NULL;
+ GtkTreeIter _tmp28_ = {0};
+ GtkListStore* _tmp29_ = NULL;
+ GtkTreeIter _tmp30_ = {0};
+ gint _tmp31_ = 0;
+ const gchar* _tmp32_ = NULL;
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+#line 1631 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = dpi;
+#line 1631 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = default_dpi;
+#line 1631 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp11_ == _tmp12_) {
+#line 7479 "ui.c"
+ const gchar* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gchar* _tmp15_ = NULL;
+#line 1633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = _ ("%d dpi (default)");
+#line 1633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = dpi;
+#line 1633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = g_strdup_printf (_tmp13_, _tmp14_);
+#line 1633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (label);
+#line 1633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ label = _tmp15_;
+#line 7493 "ui.c"
+ } else {
+ gint _tmp16_ = 0;
+#line 1634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = dpi;
+#line 1634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp16_ == 75) {
+#line 7500 "ui.c"
+ const gchar* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+ gchar* _tmp19_ = NULL;
+#line 1636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = _ ("%d dpi (draft)");
+#line 1636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = dpi;
+#line 1636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = g_strdup_printf (_tmp17_, _tmp18_);
+#line 1636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (label);
+#line 1636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ label = _tmp19_;
+#line 7514 "ui.c"
+ } else {
+ gint _tmp20_ = 0;
+#line 1637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = dpi;
+#line 1637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp20_ == 1200) {
+#line 7521 "ui.c"
+ const gchar* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ gchar* _tmp23_ = NULL;
+#line 1639 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = _ ("%d dpi (high resolution)");
+#line 1639 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = dpi;
+#line 1639 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = g_strdup_printf (_tmp21_, _tmp22_);
+#line 1639 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (label);
+#line 1639 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ label = _tmp23_;
+#line 7535 "ui.c"
+ } else {
+ const gchar* _tmp24_ = NULL;
+ gint _tmp25_ = 0;
+ gchar* _tmp26_ = NULL;
+#line 1642 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = _ ("%d dpi");
+#line 1642 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = dpi;
+#line 1642 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = g_strdup_printf (_tmp24_, _tmp25_);
+#line 1642 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (label);
+#line 1642 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ label = _tmp26_;
+#line 7550 "ui.c"
+ }
+ }
+ }
+#line 1645 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = model;
+#line 1645 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp27_, &_tmp28_);
+#line 1645 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp28_;
+#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = model;
+#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = iter;
+#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = dpi;
+#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp32_ = label;
+#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp29_, &_tmp30_, 0, _tmp31_, 1, _tmp32_, -1, -1);
+#line 1648 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp33_ = dpi;
+#line 1648 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp34_ = current_dpi;
+#line 1648 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp33_ == _tmp34_) {
+#line 7576 "ui.c"
+ GtkComboBox* _tmp35_ = NULL;
+ GtkTreeIter _tmp36_ = {0};
+#line 1649 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp35_ = combo;
+#line 1649 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp36_ = iter;
+#line 1649 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_combo_box_set_active_iter (_tmp35_, &_tmp36_);
+#line 7585 "ui.c"
+ }
+#line 1628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (label);
+#line 7589 "ui.c"
+ }
+ }
+ }
+#line 1620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ scan_resolutions = (g_free (scan_resolutions), NULL);
+#line 1620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (model);
+#line 1620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (renderer);
+#line 7599 "ui.c"
+}
+
+
+static void user_interface_needs_saving_cb (UserInterface* self, Book* book) {
+ GtkMenuItem* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+ GtkButton* _tmp4_ = NULL;
+ Book* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_ = FALSE;
+ GtkToolButton* _tmp8_ = NULL;
+ Book* _tmp9_ = NULL;
+ gboolean _tmp10_ = FALSE;
+ gboolean _tmp11_ = FALSE;
+ Book* _tmp12_ = NULL;
+ gboolean _tmp13_ = FALSE;
+ gboolean _tmp14_ = FALSE;
+ GtkMenuItem* _tmp16_ = NULL;
+#line 1653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (book != NULL);
+#line 1655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->save_menuitem;
+#line 1655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book;
+#line 1655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = book_get_needs_saving (_tmp1_);
+#line 1655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 1655 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp3_);
+#line 1656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->save_button;
+#line 1656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = book;
+#line 1656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = book_get_needs_saving (_tmp5_);
+#line 1656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = _tmp6_;
+#line 1656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, _tmp7_);
+#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = self->priv->save_toolbutton;
+#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = book;
+#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = book_get_needs_saving (_tmp9_);
+#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = _tmp10_;
+#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, _tmp11_);
+#line 1658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = book;
+#line 1658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = book_get_needs_saving (_tmp12_);
+#line 1658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = _tmp13_;
+#line 1658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp14_) {
+#line 7662 "ui.c"
+ GtkMenuItem* _tmp15_ = NULL;
+#line 1659 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = self->priv->save_as_menuitem;
+#line 1659 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp15_, TRUE);
+#line 7668 "ui.c"
+ }
+#line 1660 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = self->priv->copy_to_clipboard_menuitem;
+#line 1660 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp16_, TRUE);
+#line 7674 "ui.c"
+}
+
+
+static void _user_interface_info_bar_response_cb_gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self) {
+#line 1730 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_info_bar_response_cb ((UserInterface*) self, _sender, response_id);
+#line 7681 "ui.c"
+}
+
+
+static void __lambda10_ (UserInterface* self) {
+ GSettings* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+#line 1772 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->settings;
+#line 1772 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_text_dpi (self);
+#line 1772 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_int (_tmp0_, "text-dpi", _tmp1_);
+#line 7694 "ui.c"
+}
+
+
+static void ___lambda10__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
+#line 1772 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda10_ ((UserInterface*) self);
+#line 7701 "ui.c"
+}
+
+
+static void __lambda11_ (UserInterface* self) {
+ GSettings* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->settings;
+#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_photo_dpi (self);
+#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_int (_tmp0_, "photo-dpi", _tmp1_);
+#line 7714 "ui.c"
+}
+
+
+static void ___lambda11__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
+#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda11_ ((UserInterface*) self);
+#line 7721 "ui.c"
+}
+
+
+static void __lambda12_ (UserInterface* self) {
+ GSettings* _tmp0_ = NULL;
+ ScanType _tmp1_ = 0;
+#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->settings;
+#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_page_side (self);
+#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_enum (_tmp0_, "page-side", (gint) _tmp1_);
+#line 7734 "ui.c"
+}
+
+
+static void ___lambda12__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
+#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda12_ ((UserInterface*) self);
+#line 7741 "ui.c"
+}
+
+
+static void __lambda13_ (UserInterface* self) {
+ gint w = 0;
+ gint h = 0;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ GSettings* _tmp2_ = NULL;
+ GSettings* _tmp3_ = NULL;
+#line 1798 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_get_paper_size (self, &_tmp0_, &_tmp1_);
+#line 1798 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ w = _tmp0_;
+#line 1798 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ h = _tmp1_;
+#line 1799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = self->priv->settings;
+#line 1799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_int (_tmp2_, "paper-width", w);
+#line 1800 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->settings;
+#line 1800 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_int (_tmp3_, "paper-height", h);
+#line 7766 "ui.c"
+}
+
+
+static void ___lambda13__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
+#line 1795 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda13_ ((UserInterface*) self);
+#line 7773 "ui.c"
+}
+
+
+static void __lambda14_ (UserInterface* self) {
+ GSettings* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+#line 1811 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->settings;
+#line 1811 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_brightness (self);
+#line 1811 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1811 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_int (_tmp0_, "brightness", _tmp2_);
+#line 7789 "ui.c"
+}
+
+
+static void ___lambda14__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) {
+#line 1811 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda14_ ((UserInterface*) self);
+#line 7796 "ui.c"
+}
+
+
+static void __lambda15_ (UserInterface* self) {
+ GSettings* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+#line 1821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->settings;
+#line 1821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_contrast (self);
+#line 1821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_int (_tmp0_, "contrast", _tmp2_);
+#line 7812 "ui.c"
+}
+
+
+static void ___lambda15__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) {
+#line 1821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda15_ ((UserInterface*) self);
+#line 7819 "ui.c"
+}
+
+
+static void __lambda16_ (UserInterface* self) {
+ GSettings* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+#line 1831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->settings;
+#line 1831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = user_interface_get_quality (self);
+#line 1831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_settings_set_int (_tmp0_, "jpeg-quality", _tmp2_);
+#line 7835 "ui.c"
+}
+
+
+static void ___lambda16__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) {
+#line 1831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ __lambda16_ ((UserInterface*) self);
+#line 7842 "ui.c"
+}
+
+
+static void _user_interface_page_selected_cb_book_view_page_selected (BookView* _sender, Page* page, gpointer self) {
+#line 1847 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_page_selected_cb ((UserInterface*) self, _sender, page);
+#line 7849 "ui.c"
+}
+
+
+static void _user_interface_show_page_cb_book_view_show_page (BookView* _sender, Page* page, gpointer self) {
+#line 1848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_show_page_cb ((UserInterface*) self, _sender, page);
+#line 7856 "ui.c"
+}
+
+
+static void _user_interface_show_page_menu_cb_book_view_show_menu (BookView* _sender, gpointer self) {
+#line 1849 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_show_page_menu_cb ((UserInterface*) self, _sender);
+#line 7863 "ui.c"
+}
+
+
+static void _user_interface_book_saving_cb_book_saving (Book* _sender, gint i, gpointer self) {
+#line 1868 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_book_saving_cb ((UserInterface*) self, i);
+#line 7870 "ui.c"
+}
+
+
+static void user_interface_load (UserInterface* self) {
+ GtkIconTheme* _tmp0_ = NULL;
+ GtkApplication* app = NULL;
+ GApplication* _tmp1_ = NULL;
+ GtkApplication* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ gboolean _tmp4_ = FALSE;
+ GtkApplication* _tmp54_ = NULL;
+ GtkInfoBar* _tmp55_ = NULL;
+ GtkInfoBar* _tmp56_ = NULL;
+ GtkBox* _tmp57_ = NULL;
+ GtkInfoBar* _tmp58_ = NULL;
+ GtkBox* hbox = NULL;
+ GtkBox* _tmp59_ = NULL;
+ GtkContainer* content_area = NULL;
+ GtkInfoBar* _tmp60_ = NULL;
+ GtkContainer* _tmp61_ = NULL;
+ GtkContainer* _tmp62_ = NULL;
+ GtkContainer* _tmp63_ = NULL;
+ GtkBox* _tmp64_ = NULL;
+ GtkBox* _tmp65_ = NULL;
+ GtkImage* _tmp66_ = NULL;
+ GtkBox* _tmp67_ = NULL;
+ GtkImage* _tmp68_ = NULL;
+ GtkImage* _tmp69_ = NULL;
+ GtkLabel* _tmp70_ = NULL;
+ GtkLabel* _tmp71_ = NULL;
+ GtkBox* _tmp72_ = NULL;
+ GtkLabel* _tmp73_ = NULL;
+ GtkLabel* _tmp74_ = NULL;
+ GtkInfoBar* _tmp75_ = NULL;
+ const gchar* _tmp76_ = NULL;
+ GtkButton* _tmp77_ = NULL;
+ GtkButton* _tmp78_ = NULL;
+ GtkInfoBar* _tmp79_ = NULL;
+ const gchar* _tmp80_ = NULL;
+ GtkButton* _tmp81_ = NULL;
+ GtkButton* _tmp82_ = NULL;
+ GtkTreeIter iter = {0};
+ GtkListStore* _tmp83_ = NULL;
+ GtkTreeIter _tmp84_ = {0};
+ GtkListStore* _tmp85_ = NULL;
+ GtkTreeIter _tmp86_ = {0};
+ const gchar* _tmp87_ = NULL;
+ GtkListStore* _tmp88_ = NULL;
+ GtkTreeIter _tmp89_ = {0};
+ GtkListStore* _tmp90_ = NULL;
+ GtkTreeIter _tmp91_ = {0};
+ GtkListStore* _tmp92_ = NULL;
+ GtkTreeIter _tmp93_ = {0};
+ GtkListStore* _tmp94_ = NULL;
+ GtkTreeIter _tmp95_ = {0};
+ GtkListStore* _tmp96_ = NULL;
+ GtkTreeIter _tmp97_ = {0};
+ GtkListStore* _tmp98_ = NULL;
+ GtkTreeIter _tmp99_ = {0};
+ GtkListStore* _tmp100_ = NULL;
+ GtkTreeIter _tmp101_ = {0};
+ GtkListStore* _tmp102_ = NULL;
+ GtkTreeIter _tmp103_ = {0};
+ GtkListStore* _tmp104_ = NULL;
+ GtkTreeIter _tmp105_ = {0};
+ GtkListStore* _tmp106_ = NULL;
+ GtkTreeIter _tmp107_ = {0};
+ GtkListStore* _tmp108_ = NULL;
+ GtkTreeIter _tmp109_ = {0};
+ GtkListStore* _tmp110_ = NULL;
+ GtkTreeIter _tmp111_ = {0};
+ gint dpi = 0;
+ GSettings* _tmp112_ = NULL;
+ gint _tmp113_ = 0;
+ gint _tmp114_ = 0;
+ GtkComboBox* _tmp115_ = NULL;
+ gint _tmp116_ = 0;
+ GtkComboBox* _tmp117_ = NULL;
+ GSettings* _tmp118_ = NULL;
+ gint _tmp119_ = 0;
+ gint _tmp120_ = 0;
+ GtkComboBox* _tmp121_ = NULL;
+ gint _tmp122_ = 0;
+ GtkComboBox* _tmp123_ = NULL;
+ GtkCellRendererText* renderer = NULL;
+ GtkCellRendererText* _tmp124_ = NULL;
+ GtkComboBox* _tmp125_ = NULL;
+ GtkCellRendererText* _tmp126_ = NULL;
+ GtkComboBox* _tmp127_ = NULL;
+ GtkCellRendererText* _tmp128_ = NULL;
+ GtkCellRendererText* _tmp129_ = NULL;
+ GtkComboBox* _tmp130_ = NULL;
+ GtkCellRendererText* _tmp131_ = NULL;
+ GtkComboBox* _tmp132_ = NULL;
+ GtkCellRendererText* _tmp133_ = NULL;
+ GSettings* _tmp134_ = NULL;
+ gint _tmp135_ = 0;
+ GtkComboBox* _tmp136_ = NULL;
+ GtkCellRendererText* _tmp137_ = NULL;
+ GtkComboBox* _tmp138_ = NULL;
+ GtkCellRendererText* _tmp139_ = NULL;
+ GtkComboBox* _tmp140_ = NULL;
+ GtkCellRendererText* _tmp141_ = NULL;
+ gint paper_width = 0;
+ GSettings* _tmp142_ = NULL;
+ gint _tmp143_ = 0;
+ gint paper_height = 0;
+ GSettings* _tmp144_ = NULL;
+ gint _tmp145_ = 0;
+ gint _tmp146_ = 0;
+ gint _tmp147_ = 0;
+ GtkComboBox* _tmp148_ = NULL;
+ gdouble lower = 0.0;
+ GtkAdjustment* _tmp149_ = NULL;
+ gdouble _tmp150_ = 0.0;
+ gdouble _tmp151_ = 0.0;
+ gchar* darker_label = NULL;
+ const gchar* _tmp152_ = NULL;
+ gchar* _tmp153_ = NULL;
+ gdouble upper = 0.0;
+ GtkAdjustment* _tmp154_ = NULL;
+ gdouble _tmp155_ = 0.0;
+ gdouble _tmp156_ = 0.0;
+ gchar* lighter_label = NULL;
+ const gchar* _tmp157_ = NULL;
+ gchar* _tmp158_ = NULL;
+ GtkScale* _tmp159_ = NULL;
+ gdouble _tmp160_ = 0.0;
+ const gchar* _tmp161_ = NULL;
+ GtkScale* _tmp162_ = NULL;
+ GtkScale* _tmp163_ = NULL;
+ gdouble _tmp164_ = 0.0;
+ const gchar* _tmp165_ = NULL;
+ GSettings* _tmp166_ = NULL;
+ gint _tmp167_ = 0;
+ GtkAdjustment* _tmp168_ = NULL;
+ GtkAdjustment* _tmp169_ = NULL;
+ gdouble _tmp170_ = 0.0;
+ gdouble _tmp171_ = 0.0;
+ gchar* less_label = NULL;
+ const gchar* _tmp172_ = NULL;
+ gchar* _tmp173_ = NULL;
+ GtkAdjustment* _tmp174_ = NULL;
+ gdouble _tmp175_ = 0.0;
+ gdouble _tmp176_ = 0.0;
+ gchar* more_label = NULL;
+ const gchar* _tmp177_ = NULL;
+ gchar* _tmp178_ = NULL;
+ GtkScale* _tmp179_ = NULL;
+ gdouble _tmp180_ = 0.0;
+ const gchar* _tmp181_ = NULL;
+ GtkScale* _tmp182_ = NULL;
+ GtkScale* _tmp183_ = NULL;
+ gdouble _tmp184_ = 0.0;
+ const gchar* _tmp185_ = NULL;
+ GSettings* _tmp186_ = NULL;
+ gint _tmp187_ = 0;
+ GtkAdjustment* _tmp188_ = NULL;
+ GtkAdjustment* _tmp189_ = NULL;
+ gdouble _tmp190_ = 0.0;
+ gdouble _tmp191_ = 0.0;
+ gchar* minimum_label = NULL;
+ const gchar* _tmp192_ = NULL;
+ gchar* _tmp193_ = NULL;
+ GtkAdjustment* _tmp194_ = NULL;
+ gdouble _tmp195_ = 0.0;
+ gdouble _tmp196_ = 0.0;
+ gchar* maximum_label = NULL;
+ const gchar* _tmp197_ = NULL;
+ gchar* _tmp198_ = NULL;
+ GtkScale* _tmp199_ = NULL;
+ gdouble _tmp200_ = 0.0;
+ const gchar* _tmp201_ = NULL;
+ GtkScale* _tmp202_ = NULL;
+ GtkScale* _tmp203_ = NULL;
+ gdouble _tmp204_ = 0.0;
+ const gchar* _tmp205_ = NULL;
+ GSettings* _tmp206_ = NULL;
+ gint _tmp207_ = 0;
+ GtkAdjustment* _tmp208_ = NULL;
+ gchar* device = NULL;
+ GSettings* _tmp209_ = NULL;
+ gchar* _tmp210_ = NULL;
+ const gchar* _tmp211_ = NULL;
+ gchar* document_type = NULL;
+ GSettings* _tmp217_ = NULL;
+ gchar* _tmp218_ = NULL;
+ const gchar* _tmp219_ = NULL;
+ Book* _tmp221_ = NULL;
+ BookView* _tmp222_ = NULL;
+ BookView* _tmp223_ = NULL;
+ GtkBox* _tmp224_ = NULL;
+ BookView* _tmp225_ = NULL;
+ BookView* _tmp226_ = NULL;
+ BookView* _tmp227_ = NULL;
+ BookView* _tmp228_ = NULL;
+ BookView* _tmp229_ = NULL;
+ GtkDialog* _tmp230_ = NULL;
+ GtkDialog* _tmp231_ = NULL;
+ gint _tmp232_ = 0;
+ gint _tmp233_ = 0;
+ gint _tmp234_ = 0;
+ gint _tmp235_ = 0;
+ gboolean _tmp236_ = FALSE;
+ const gchar* _tmp237_ = NULL;
+ ProgressBarDialog* _tmp238_ = NULL;
+ Book* _tmp239_ = NULL;
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1675 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = gtk_icon_theme_get_default ();
+#line 1675 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_icon_theme_append_search_path (_tmp0_, ICON_DIR);
+#line 1677 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_default_icon_name ("scanner");
+#line 1679 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = g_application_get_default ();
+#line 1679 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GTK_TYPE_APPLICATION) ? ((GtkApplication*) _tmp1_) : NULL);
+#line 1679 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ app = _tmp2_;
+#line 1681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = user_interface_get_shell_shows_menubar (self);
+#line 1681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = _tmp3_;
+#line 1681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp4_) {
+#line 8098 "ui.c"
+ GtkApplication* _tmp5_ = NULL;
+ GMenu* appmenu = NULL;
+ GMenu* _tmp6_ = NULL;
+ GMenu* section = NULL;
+ GMenu* _tmp7_ = NULL;
+ GMenu* _tmp8_ = NULL;
+ GMenu* _tmp9_ = NULL;
+ GMenu* _tmp10_ = NULL;
+ const gchar* _tmp11_ = NULL;
+ GMenu* _tmp12_ = NULL;
+ GMenu* _tmp13_ = NULL;
+ GMenu* _tmp14_ = NULL;
+ GMenu* menu = NULL;
+ GMenu* _tmp15_ = NULL;
+ GMenu* _tmp16_ = NULL;
+ const gchar* _tmp17_ = NULL;
+ GMenu* _tmp18_ = NULL;
+ GMenu* _tmp19_ = NULL;
+ const gchar* _tmp20_ = NULL;
+ GMenu* _tmp21_ = NULL;
+ const gchar* _tmp22_ = NULL;
+ GMenu* _tmp23_ = NULL;
+ const gchar* _tmp24_ = NULL;
+ GMenu* _tmp25_ = NULL;
+ const gchar* _tmp26_ = NULL;
+ GMenu* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
+ GMenu* _tmp29_ = NULL;
+ GMenu* _tmp30_ = NULL;
+ GMenu* _tmp31_ = NULL;
+ GMenu* _tmp32_ = NULL;
+ const gchar* _tmp33_ = NULL;
+ GMenu* _tmp34_ = NULL;
+ GMenu* _tmp35_ = NULL;
+ GMenu* _tmp36_ = NULL;
+ GMenu* _tmp37_ = NULL;
+ const gchar* _tmp38_ = NULL;
+ GMenu* _tmp39_ = NULL;
+ const gchar* _tmp40_ = NULL;
+ GMenu* _tmp41_ = NULL;
+ const gchar* _tmp42_ = NULL;
+ GtkApplication* _tmp43_ = NULL;
+ GMenu* _tmp44_ = NULL;
+ GtkApplication* _tmp45_ = NULL;
+ GtkApplication* _tmp46_ = NULL;
+ GtkApplication* _tmp47_ = NULL;
+ GtkApplication* _tmp48_ = NULL;
+ GtkApplication* _tmp49_ = NULL;
+ GtkApplication* _tmp50_ = NULL;
+ GtkApplication* _tmp51_ = NULL;
+#line 1683 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = app;
+#line 1683 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_action_map_add_action_entries ((GActionMap*) _tmp5_, USER_INTERFACE_action_entries, G_N_ELEMENTS (USER_INTERFACE_action_entries), self);
+#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = g_menu_new ();
+#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ appmenu = _tmp6_;
+#line 1686 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = g_menu_new ();
+#line 1686 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ section = _tmp7_;
+#line 1687 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = appmenu;
+#line 1687 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = section;
+#line 1687 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append_section (_tmp8_, NULL, (GMenuModel*) _tmp9_);
+#line 1688 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = section;
+#line 1688 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = _ ("New Document");
+#line 1688 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp10_, _tmp11_, "app.new_document");
+#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = g_menu_new ();
+#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (section);
+#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ section = _tmp12_;
+#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = appmenu;
+#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = section;
+#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append_section (_tmp13_, NULL, (GMenuModel*) _tmp14_);
+#line 1692 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = g_menu_new ();
+#line 1692 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ menu = _tmp15_;
+#line 1693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = section;
+#line 1693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = _ ("Document");
+#line 1693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = menu;
+#line 1693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append_submenu (_tmp16_, _tmp17_, (GMenuModel*) _tmp18_);
+#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = menu;
+#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = _ ("Reorder Pages");
+#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp19_, _tmp20_, "app.reorder");
+#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = menu;
+#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = _ ("Save");
+#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp21_, _tmp22_, "app.save");
+#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = menu;
+#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = _ ("Save As...");
+#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp23_, _tmp24_, "app.save_as");
+#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = menu;
+#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = _ ("Email...");
+#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp25_, _tmp26_, "app.email");
+#line 1698 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = menu;
+#line 1698 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = _ ("Print...");
+#line 1698 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp27_, _tmp28_, "app.print");
+#line 1700 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = g_menu_new ();
+#line 1700 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (section);
+#line 1700 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ section = _tmp29_;
+#line 1701 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = appmenu;
+#line 1701 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = section;
+#line 1701 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append_section (_tmp30_, NULL, (GMenuModel*) _tmp31_);
+#line 1702 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp32_ = section;
+#line 1702 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp33_ = _ ("Preferences");
+#line 1702 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp32_, _tmp33_, "app.preferences");
+#line 1704 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp34_ = g_menu_new ();
+#line 1704 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (section);
+#line 1704 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ section = _tmp34_;
+#line 1705 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp35_ = appmenu;
+#line 1705 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp36_ = section;
+#line 1705 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append_section (_tmp35_, NULL, (GMenuModel*) _tmp36_);
+#line 1706 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp37_ = section;
+#line 1706 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp38_ = _ ("Help");
+#line 1706 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp37_, _tmp38_, "app.help");
+#line 1707 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp39_ = section;
+#line 1707 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp40_ = _ ("About");
+#line 1707 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp39_, _tmp40_, "app.about");
+#line 1708 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp41_ = section;
+#line 1708 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp42_ = _ ("Quit");
+#line 1708 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_menu_append (_tmp41_, _tmp42_, "app.quit");
+#line 1710 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp43_ = app;
+#line 1710 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp44_ = appmenu;
+#line 1710 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_application_set_app_menu (_tmp43_, (GMenuModel*) _tmp44_);
+#line 1712 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp45_ = app;
+#line 1712 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_application_add_accelerator (_tmp45_, "<Ctrl>N", "app.new_document", NULL);
+#line 1713 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp46_ = app;
+#line 1713 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_application_add_accelerator (_tmp46_, "<Ctrl>S", "app.save", NULL);
+#line 1714 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp47_ = app;
+#line 1714 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_application_add_accelerator (_tmp47_, "<Shift><Ctrl>S", "app.save_as", NULL);
+#line 1715 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp48_ = app;
+#line 1715 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_application_add_accelerator (_tmp48_, "<Ctrl>E", "app.email", NULL);
+#line 1716 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp49_ = app;
+#line 1716 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_application_add_accelerator (_tmp49_, "<Ctrl>P", "app.print", NULL);
+#line 1717 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp50_ = app;
+#line 1717 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_application_add_accelerator (_tmp50_, "F1", "app.help", NULL);
+#line 1718 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp51_ = app;
+#line 1718 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_application_add_accelerator (_tmp51_, "<Ctrl>Q", "app.quit", NULL);
+#line 1681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (menu);
+#line 1681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (section);
+#line 1681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (appmenu);
+#line 8315 "ui.c"
+ } else {
+ GtkMenuBar* _tmp52_ = NULL;
+ GtkToolbar* _tmp53_ = NULL;
+#line 1722 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_titlebar ((GtkWindow*) self, NULL);
+#line 1723 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp52_ = self->priv->menubar;
+#line 1723 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp52_, TRUE);
+#line 1724 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp53_ = self->priv->toolbar;
+#line 1724 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp53_, TRUE);
+#line 8329 "ui.c"
+ }
+#line 1726 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp54_ = app;
+#line 1726 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_application_add_window (_tmp54_, (GtkWindow*) self);
+#line 1729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp55_ = (GtkInfoBar*) gtk_info_bar_new ();
+#line 1729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp55_);
+#line 1729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar);
+#line 1729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->info_bar = _tmp55_;
+#line 1730 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp56_ = self->priv->info_bar;
+#line 1730 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp56_, "response", (GCallback) _user_interface_info_bar_response_cb_gtk_info_bar_response, self, 0);
+#line 1731 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp57_ = self->priv->main_vbox;
+#line 1731 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp58_ = self->priv->info_bar;
+#line 1731 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (_tmp57_, (GtkWidget*) _tmp58_, FALSE, TRUE, (guint) 0);
+#line 1732 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp59_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+#line 1732 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp59_);
+#line 1732 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ hbox = _tmp59_;
+#line 1733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp60_ = self->priv->info_bar;
+#line 1733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp61_ = gtk_info_bar_get_content_area (_tmp60_);
+#line 1733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp62_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp61_, GTK_TYPE_CONTAINER) ? ((GtkContainer*) _tmp61_) : NULL);
+#line 1733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ content_area = _tmp62_;
+#line 1734 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp63_ = content_area;
+#line 1734 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp64_ = hbox;
+#line 1734 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_container_add (_tmp63_, (GtkWidget*) _tmp64_);
+#line 1735 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp65_ = hbox;
+#line 1735 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp65_, TRUE);
+#line 1737 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp66_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG);
+#line 1737 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp66_);
+#line 1737 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar_image);
+#line 1737 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->info_bar_image = _tmp66_;
+#line 1738 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp67_ = hbox;
+#line 1738 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp68_ = self->priv->info_bar_image;
+#line 1738 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (_tmp67_, (GtkWidget*) _tmp68_, FALSE, TRUE, (guint) 0);
+#line 1739 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp69_ = self->priv->info_bar_image;
+#line 1739 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp69_, TRUE);
+#line 1741 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp70_ = (GtkLabel*) gtk_label_new (NULL);
+#line 1741 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp70_);
+#line 1741 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar_label);
+#line 1741 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->info_bar_label = _tmp70_;
+#line 1742 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp71_ = self->priv->info_bar_label;
+#line 1742 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_misc_set_alignment ((GtkMisc*) _tmp71_, 0.0f, 0.5f);
+#line 1743 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp72_ = hbox;
+#line 1743 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp73_ = self->priv->info_bar_label;
+#line 1743 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (_tmp72_, (GtkWidget*) _tmp73_, TRUE, TRUE, (guint) 0);
+#line 1744 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp74_ = self->priv->info_bar_label;
+#line 1744 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp74_, TRUE);
+#line 1746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp75_ = self->priv->info_bar;
+#line 1746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp76_ = _ ("_Close");
+#line 1746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp77_ = gtk_info_bar_add_button (_tmp75_, _tmp76_, (gint) GTK_RESPONSE_CLOSE);
+#line 1746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp78_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp77_, GTK_TYPE_BUTTON) ? ((GtkButton*) _tmp77_) : NULL);
+#line 1746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar_close_button);
+#line 1746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->info_bar_close_button = _tmp78_;
+#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp79_ = self->priv->info_bar;
+#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp80_ = _ ("Change _Scanner");
+#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp81_ = gtk_info_bar_add_button (_tmp79_, _tmp80_, 1);
+#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp82_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp81_, GTK_TYPE_BUTTON) ? ((GtkButton*) _tmp81_) : NULL);
+#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar_change_scanner_button);
+#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->info_bar_change_scanner_button = _tmp82_;
+#line 1751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp83_ = self->priv->paper_size_model;
+#line 1751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp83_, &_tmp84_);
+#line 1751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp84_;
+#line 1752 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp85_ = self->priv->paper_size_model;
+#line 1752 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp86_ = iter;
+#line 1752 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp87_ = _ ("Automatic");
+#line 1752 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp85_, &_tmp86_, 0, 0, 1, 0, 2, _tmp87_, -1, -1);
+#line 1755 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp88_ = self->priv->paper_size_model;
+#line 1755 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp88_, &_tmp89_);
+#line 1755 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp89_;
+#line 1756 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp90_ = self->priv->paper_size_model;
+#line 1756 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp91_ = iter;
+#line 1756 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp90_, &_tmp91_, 0, 1050, 1, 1480, 2, "A6", -1, -1);
+#line 1757 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp92_ = self->priv->paper_size_model;
+#line 1757 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp92_, &_tmp93_);
+#line 1757 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp93_;
+#line 1758 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp94_ = self->priv->paper_size_model;
+#line 1758 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp95_ = iter;
+#line 1758 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp94_, &_tmp95_, 0, 1480, 1, 2100, 2, "A5", -1, -1);
+#line 1759 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp96_ = self->priv->paper_size_model;
+#line 1759 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp96_, &_tmp97_);
+#line 1759 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp97_;
+#line 1760 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp98_ = self->priv->paper_size_model;
+#line 1760 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp99_ = iter;
+#line 1760 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp98_, &_tmp99_, 0, 2100, 1, 2970, 2, "A4", -1, -1);
+#line 1761 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp100_ = self->priv->paper_size_model;
+#line 1761 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp100_, &_tmp101_);
+#line 1761 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp101_;
+#line 1762 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp102_ = self->priv->paper_size_model;
+#line 1762 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp103_ = iter;
+#line 1762 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp102_, &_tmp103_, 0, 2159, 1, 2794, 2, "Letter", -1, -1);
+#line 1763 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp104_ = self->priv->paper_size_model;
+#line 1763 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp104_, &_tmp105_);
+#line 1763 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp105_;
+#line 1764 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp106_ = self->priv->paper_size_model;
+#line 1764 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp107_ = iter;
+#line 1764 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp106_, &_tmp107_, 0, 2159, 1, 3556, 2, "Legal", -1, -1);
+#line 1765 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp108_ = self->priv->paper_size_model;
+#line 1765 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_append (_tmp108_, &_tmp109_);
+#line 1765 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp109_;
+#line 1766 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp110_ = self->priv->paper_size_model;
+#line 1766 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp111_ = iter;
+#line 1766 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_list_store_set (_tmp110_, &_tmp111_, 0, 1016, 1, 1524, 2, "4×6", -1, -1);
+#line 1768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp112_ = self->priv->settings;
+#line 1768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp113_ = g_settings_get_int (_tmp112_, "text-dpi");
+#line 1768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dpi = _tmp113_;
+#line 1769 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp114_ = dpi;
+#line 1769 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp114_ <= 0) {
+#line 1770 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dpi = USER_INTERFACE_DEFAULT_TEXT_DPI;
+#line 8539 "ui.c"
+ }
+#line 1771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp115_ = self->priv->text_dpi_combo;
+#line 1771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp116_ = dpi;
+#line 1771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_dpi_combo (self, _tmp115_, USER_INTERFACE_DEFAULT_TEXT_DPI, _tmp116_);
+#line 1772 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp117_ = self->priv->text_dpi_combo;
+#line 1772 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp117_, "changed", (GCallback) ___lambda10__gtk_combo_box_changed, self, 0);
+#line 1773 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp118_ = self->priv->settings;
+#line 1773 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp119_ = g_settings_get_int (_tmp118_, "photo-dpi");
+#line 1773 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dpi = _tmp119_;
+#line 1774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp120_ = dpi;
+#line 1774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp120_ <= 0) {
+#line 1775 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ dpi = USER_INTERFACE_DEFAULT_PHOTO_DPI;
+#line 8563 "ui.c"
+ }
+#line 1776 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp121_ = self->priv->photo_dpi_combo;
+#line 1776 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp122_ = dpi;
+#line 1776 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_dpi_combo (self, _tmp121_, USER_INTERFACE_DEFAULT_PHOTO_DPI, _tmp122_);
+#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp123_ = self->priv->photo_dpi_combo;
+#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp123_, "changed", (GCallback) ___lambda11__gtk_combo_box_changed, self, 0);
+#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp124_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
+#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp124_);
+#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ renderer = _tmp124_;
+#line 1780 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp125_ = self->priv->device_combo;
+#line 1780 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp126_ = renderer;
+#line 1780 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp125_, (GtkCellRenderer*) _tmp126_, TRUE);
+#line 1781 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp127_ = self->priv->device_combo;
+#line 1781 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp128_ = renderer;
+#line 1781 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp127_, (GtkCellRenderer*) _tmp128_, "text", 1);
+#line 1783 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp129_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
+#line 1783 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp129_);
+#line 1783 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (renderer);
+#line 1783 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ renderer = _tmp129_;
+#line 1784 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp130_ = self->priv->page_side_combo;
+#line 1784 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp131_ = renderer;
+#line 1784 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp130_, (GtkCellRenderer*) _tmp131_, TRUE);
+#line 1785 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp132_ = self->priv->page_side_combo;
+#line 1785 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp133_ = renderer;
+#line 1785 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp132_, (GtkCellRenderer*) _tmp133_, "text", 1);
+#line 1786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp134_ = self->priv->settings;
+#line 1786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp135_ = g_settings_get_enum (_tmp134_, "page-side");
+#line 1786 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_page_side (self, (ScanType) _tmp135_);
+#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp136_ = self->priv->page_side_combo;
+#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp136_, "changed", (GCallback) ___lambda12__gtk_combo_box_changed, self, 0);
+#line 1789 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp137_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
+#line 1789 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp137_);
+#line 1789 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (renderer);
+#line 1789 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ renderer = _tmp137_;
+#line 1790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp138_ = self->priv->paper_size_combo;
+#line 1790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp139_ = renderer;
+#line 1790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp138_, (GtkCellRenderer*) _tmp139_, TRUE);
+#line 1791 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp140_ = self->priv->paper_size_combo;
+#line 1791 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp141_ = renderer;
+#line 1791 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp140_, (GtkCellRenderer*) _tmp141_, "text", 2);
+#line 1792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp142_ = self->priv->settings;
+#line 1792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp143_ = g_settings_get_int (_tmp142_, "paper-width");
+#line 1792 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ paper_width = _tmp143_;
+#line 1793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp144_ = self->priv->settings;
+#line 1793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp145_ = g_settings_get_int (_tmp144_, "paper-height");
+#line 1793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ paper_height = _tmp145_;
+#line 1794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp146_ = paper_width;
+#line 1794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp147_ = paper_height;
+#line 1794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_paper_size (self, _tmp146_, _tmp147_);
+#line 1795 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp148_ = self->priv->paper_size_combo;
+#line 1795 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp148_, "changed", (GCallback) ___lambda13__gtk_combo_box_changed, self, 0);
+#line 1803 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp149_ = self->priv->brightness_adjustment;
+#line 1803 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp150_ = gtk_adjustment_get_lower (_tmp149_);
+#line 1803 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp151_ = _tmp150_;
+#line 1803 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ lower = _tmp151_;
+#line 1804 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp152_ = _ ("Darker");
+#line 1804 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp153_ = g_strdup_printf ("<small>%s</small>", _tmp152_);
+#line 1804 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ darker_label = _tmp153_;
+#line 1805 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp154_ = self->priv->brightness_adjustment;
+#line 1805 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp155_ = gtk_adjustment_get_upper (_tmp154_);
+#line 1805 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp156_ = _tmp155_;
+#line 1805 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ upper = _tmp156_;
+#line 1806 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp157_ = _ ("Lighter");
+#line 1806 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp158_ = g_strdup_printf ("<small>%s</small>", _tmp157_);
+#line 1806 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ lighter_label = _tmp158_;
+#line 1807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp159_ = self->priv->brightness_scale;
+#line 1807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp160_ = lower;
+#line 1807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp161_ = darker_label;
+#line 1807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_scale_add_mark (_tmp159_, _tmp160_, GTK_POS_BOTTOM, _tmp161_);
+#line 1808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp162_ = self->priv->brightness_scale;
+#line 1808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_scale_add_mark (_tmp162_, (gdouble) 0, GTK_POS_BOTTOM, NULL);
+#line 1809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp163_ = self->priv->brightness_scale;
+#line 1809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp164_ = upper;
+#line 1809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp165_ = lighter_label;
+#line 1809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_scale_add_mark (_tmp163_, _tmp164_, GTK_POS_BOTTOM, _tmp165_);
+#line 1810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp166_ = self->priv->settings;
+#line 1810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp167_ = g_settings_get_int (_tmp166_, "brightness");
+#line 1810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_brightness (self, _tmp167_);
+#line 1811 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp168_ = self->priv->brightness_adjustment;
+#line 1811 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp168_, "value-changed", (GCallback) ___lambda14__gtk_adjustment_value_changed, self, 0);
+#line 1813 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp169_ = self->priv->contrast_adjustment;
+#line 1813 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp170_ = gtk_adjustment_get_lower (_tmp169_);
+#line 1813 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp171_ = _tmp170_;
+#line 1813 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ lower = _tmp171_;
+#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp172_ = _ ("Less");
+#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp173_ = g_strdup_printf ("<small>%s</small>", _tmp172_);
+#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ less_label = _tmp173_;
+#line 1815 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp174_ = self->priv->contrast_adjustment;
+#line 1815 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp175_ = gtk_adjustment_get_upper (_tmp174_);
+#line 1815 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp176_ = _tmp175_;
+#line 1815 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ upper = _tmp176_;
+#line 1816 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp177_ = _ ("More");
+#line 1816 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp178_ = g_strdup_printf ("<small>%s</small>", _tmp177_);
+#line 1816 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ more_label = _tmp178_;
+#line 1817 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp179_ = self->priv->contrast_scale;
+#line 1817 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp180_ = lower;
+#line 1817 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp181_ = less_label;
+#line 1817 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_scale_add_mark (_tmp179_, _tmp180_, GTK_POS_BOTTOM, _tmp181_);
+#line 1818 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp182_ = self->priv->contrast_scale;
+#line 1818 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_scale_add_mark (_tmp182_, (gdouble) 0, GTK_POS_BOTTOM, NULL);
+#line 1819 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp183_ = self->priv->contrast_scale;
+#line 1819 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp184_ = upper;
+#line 1819 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp185_ = more_label;
+#line 1819 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_scale_add_mark (_tmp183_, _tmp184_, GTK_POS_BOTTOM, _tmp185_);
+#line 1820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp186_ = self->priv->settings;
+#line 1820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp187_ = g_settings_get_int (_tmp186_, "contrast");
+#line 1820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_contrast (self, _tmp187_);
+#line 1821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp188_ = self->priv->contrast_adjustment;
+#line 1821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp188_, "value-changed", (GCallback) ___lambda15__gtk_adjustment_value_changed, self, 0);
+#line 1823 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp189_ = self->priv->quality_adjustment;
+#line 1823 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp190_ = gtk_adjustment_get_lower (_tmp189_);
+#line 1823 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp191_ = _tmp190_;
+#line 1823 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ lower = _tmp191_;
+#line 1824 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp192_ = _ ("Minimum");
+#line 1824 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp193_ = g_strdup_printf ("<small>%s</small>", _tmp192_);
+#line 1824 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ minimum_label = _tmp193_;
+#line 1825 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp194_ = self->priv->quality_adjustment;
+#line 1825 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp195_ = gtk_adjustment_get_upper (_tmp194_);
+#line 1825 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp196_ = _tmp195_;
+#line 1825 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ upper = _tmp196_;
+#line 1826 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp197_ = _ ("Maximum");
+#line 1826 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp198_ = g_strdup_printf ("<small>%s</small>", _tmp197_);
+#line 1826 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ maximum_label = _tmp198_;
+#line 1827 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp199_ = self->priv->quality_scale;
+#line 1827 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp200_ = lower;
+#line 1827 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp201_ = minimum_label;
+#line 1827 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_scale_add_mark (_tmp199_, _tmp200_, GTK_POS_BOTTOM, _tmp201_);
+#line 1828 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp202_ = self->priv->quality_scale;
+#line 1828 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_scale_add_mark (_tmp202_, (gdouble) 75, GTK_POS_BOTTOM, NULL);
+#line 1829 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp203_ = self->priv->quality_scale;
+#line 1829 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp204_ = upper;
+#line 1829 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp205_ = maximum_label;
+#line 1829 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_scale_add_mark (_tmp203_, _tmp204_, GTK_POS_BOTTOM, _tmp205_);
+#line 1830 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp206_ = self->priv->settings;
+#line 1830 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp207_ = g_settings_get_int (_tmp206_, "jpeg-quality");
+#line 1830 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_quality (self, _tmp207_);
+#line 1831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp208_ = self->priv->quality_adjustment;
+#line 1831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp208_, "value-changed", (GCallback) ___lambda16__gtk_adjustment_value_changed, self, 0);
+#line 1833 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp209_ = self->priv->settings;
+#line 1833 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp210_ = g_settings_get_string (_tmp209_, "selected-device");
+#line 1833 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ device = _tmp210_;
+#line 1834 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp211_ = device;
+#line 1834 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp211_ != NULL) {
+#line 8849 "ui.c"
+ const gchar* _tmp212_ = NULL;
+ GtkTreeIter _tmp213_ = {0};
+ gboolean _tmp214_ = FALSE;
+#line 1836 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp212_ = device;
+#line 1836 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp214_ = user_interface_find_scan_device (self, _tmp212_, &_tmp213_);
+#line 1836 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp213_;
+#line 1836 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp214_) {
+#line 8861 "ui.c"
+ GtkComboBox* _tmp215_ = NULL;
+ GtkTreeIter _tmp216_ = {0};
+#line 1837 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp215_ = self->priv->device_combo;
+#line 1837 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp216_ = iter;
+#line 1837 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_combo_box_set_active_iter (_tmp215_, &_tmp216_);
+#line 8870 "ui.c"
+ }
+ }
+#line 1840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp217_ = self->priv->settings;
+#line 1840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp218_ = g_settings_get_string (_tmp217_, "document-type");
+#line 1840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ document_type = _tmp218_;
+#line 1841 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp219_ = document_type;
+#line 1841 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp219_ != NULL) {
+#line 8883 "ui.c"
+ const gchar* _tmp220_ = NULL;
+#line 1842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp220_ = document_type;
+#line 1842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_document_hint (self, _tmp220_, FALSE);
+#line 8889 "ui.c"
+ }
+#line 1844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp221_ = self->priv->_book;
+#line 1844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp222_ = book_view_new (_tmp221_);
+#line 1844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp222_);
+#line 1844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->book_view);
+#line 1844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->book_view = _tmp222_;
+#line 1845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp223_ = self->priv->book_view;
+#line 1845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_container_set_border_width ((GtkContainer*) _tmp223_, (guint) 18);
+#line 1846 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp224_ = self->priv->main_vbox;
+#line 1846 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp225_ = self->priv->book_view;
+#line 1846 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_end (_tmp224_, (GtkWidget*) _tmp225_, TRUE, TRUE, (guint) 0);
+#line 1847 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp226_ = self->priv->book_view;
+#line 1847 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp226_, "page-selected", (GCallback) _user_interface_page_selected_cb_book_view_page_selected, self, 0);
+#line 1848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp227_ = self->priv->book_view;
+#line 1848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp227_, "show-page", (GCallback) _user_interface_show_page_cb_book_view_show_page, self, 0);
+#line 1849 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp228_ = self->priv->book_view;
+#line 1849 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp228_, "show-menu", (GCallback) _user_interface_show_page_menu_cb_book_view_show_menu, self, 0);
+#line 1850 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp229_ = self->priv->book_view;
+#line 1850 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp229_, TRUE);
+#line 1852 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp230_ = self->priv->authorize_dialog;
+#line 1852 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_transient_for ((GtkWindow*) _tmp230_, (GtkWindow*) self);
+#line 1853 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp231_ = self->priv->preferences_dialog;
+#line 1853 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_transient_for ((GtkWindow*) _tmp231_, (GtkWindow*) self);
+#line 1856 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_load_state (self);
+#line 1859 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp232_ = self->priv->window_width;
+#line 1859 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp233_ = self->priv->window_height;
+#line 1859 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_debug ("ui.vala:1859: Restoring window to %dx%d pixels", _tmp232_, _tmp233_);
+#line 1860 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp234_ = self->priv->window_width;
+#line 1860 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp235_ = self->priv->window_height;
+#line 1860 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_default_size ((GtkWindow*) self, _tmp234_, _tmp235_);
+#line 1861 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp236_ = self->priv->window_is_maximized;
+#line 1861 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp236_) {
+#line 1863 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_debug ("ui.vala:1863: Restoring window to maximized");
+#line 1864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_maximize ((GtkWindow*) self);
+#line 8957 "ui.c"
+ }
+#line 1867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp237_ = _ ("Saving document...");
+#line 1867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp238_ = progress_bar_dialog_new ((GtkApplicationWindow*) self, _tmp237_);
+#line 1867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp238_);
+#line 1867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->progress_dialog);
+#line 1867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->progress_dialog = _tmp238_;
+#line 1868 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp239_ = self->priv->_book;
+#line 1868 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_connect_object (_tmp239_, "saving", (GCallback) _user_interface_book_saving_cb_book_saving, self, 0);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (document_type);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (device);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (maximum_label);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (minimum_label);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (more_label);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (less_label);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (lighter_label);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (darker_label);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (renderer);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (content_area);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (hbox);
+#line 1673 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (app);
+#line 8997 "ui.c"
+}
+
+
+static void user_interface_load_state (UserInterface* self) {
+ gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ GKeyFile* f = NULL;
+ GKeyFile* _tmp3_ = NULL;
+ GKeyFile* _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+ GKeyFile* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ GKeyFile* _tmp17_ = NULL;
+ gboolean _tmp18_ = FALSE;
+ GKeyFile* _tmp19_ = NULL;
+ gint _tmp20_ = 0;
+ GKeyFile* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ GKeyFile* _tmp23_ = NULL;
+ gint _tmp24_ = 0;
+ GKeyFile* _tmp25_ = NULL;
+ gchar* _tmp26_ = NULL;
+ gchar* _tmp27_ = NULL;
+ GQuark _tmp29_ = 0U;
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ static GQuark _tmp28_label0 = 0;
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ static GQuark _tmp28_label1 = 0;
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ static GQuark _tmp28_label2 = 0;
+#line 9031 "ui.c"
+ GError * _inner_error_ = NULL;
+#line 1876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = user_interface_get_state_filename (self);
+#line 1878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = _tmp0_;
+#line 1878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 1878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_debug ("ui.vala:1878: Loading state from %s", _tmp2_);
+#line 1878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp2_);
+#line 1880 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = g_key_file_new ();
+#line 1880 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ f = _tmp3_;
+#line 9049 "ui.c"
+ {
+ GKeyFile* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+#line 1883 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = f;
+#line 1883 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = user_interface_get_state_filename (self);
+#line 1883 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = _tmp5_;
+#line 1883 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = _tmp6_;
+#line 1883 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_load_from_file (_tmp4_, _tmp7_, G_KEY_FILE_NONE, &_inner_error_);
+#line 1883 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp7_);
+#line 1883 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 9069 "ui.c"
+ goto __catch21_g_error;
+ }
+ }
+ goto __finally21;
+ __catch21_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp8_ = NULL;
+#line 1881 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ e = _inner_error_;
+#line 1881 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 1887 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = e;
+#line 1887 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!g_error_matches (_tmp8_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
+#line 9086 "ui.c"
+ GError* _tmp9_ = NULL;
+ const gchar* _tmp10_ = NULL;
+#line 1888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = e;
+#line 1888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = _tmp9_->message;
+#line 1888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_warning ("ui.vala:1888: Failed to load state: %s", _tmp10_);
+#line 9095 "ui.c"
+ }
+#line 1881 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_error_free0 (e);
+#line 9099 "ui.c"
+ }
+ __finally21:
+#line 1881 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 1881 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_key_file_unref0 (f);
+#line 1881 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1881 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1881 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 9112 "ui.c"
+ }
+#line 1890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = f;
+#line 1890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = user_interface_state_get_integer (self, _tmp11_, "window", "width", 600);
+#line 1890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->window_width = _tmp12_;
+#line 1891 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = self->priv->window_width;
+#line 1891 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp13_ <= 0) {
+#line 1892 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->window_width = 600;
+#line 9126 "ui.c"
+ }
+#line 1893 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = f;
+#line 1893 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = user_interface_state_get_integer (self, _tmp14_, "window", "height", 400);
+#line 1893 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->window_height = _tmp15_;
+#line 1894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = self->priv->window_height;
+#line 1894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp16_ <= 0) {
+#line 1895 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->window_height = 400;
+#line 9140 "ui.c"
+ }
+#line 1896 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = f;
+#line 1896 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = user_interface_state_get_boolean (self, _tmp17_, "window", "is-maximized", FALSE);
+#line 1896 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->window_is_maximized = _tmp18_;
+#line 1897 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = f;
+#line 1897 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = user_interface_state_get_integer (self, _tmp19_, "last-page", "width", 595);
+#line 1897 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_width = _tmp20_;
+#line 1898 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = f;
+#line 1898 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = user_interface_state_get_integer (self, _tmp21_, "last-page", "height", 842);
+#line 1898 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_height = _tmp22_;
+#line 1899 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = f;
+#line 1899 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = user_interface_state_get_integer (self, _tmp23_, "last-page", "dpi", 72);
+#line 1899 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_dpi = _tmp24_;
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = f;
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = user_interface_state_get_string (self, _tmp25_, "last-page", "scan-direction", "top-to-bottom");
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = _tmp26_;
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = (NULL == _tmp27_) ? 0 : g_quark_from_string (_tmp27_);
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_free (_tmp27_);
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp29_ == ((0 != _tmp28_label0) ? _tmp28_label0 : (_tmp28_label0 = g_quark_from_static_string ("bottom-to-top")))) {
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (0) {
+#line 9180 "ui.c"
+ default:
+ {
+#line 1907 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_scan_direction = SCAN_DIRECTION_BOTTOM_TO_TOP;
+#line 1908 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9187 "ui.c"
+ }
+ }
+ } else if (_tmp29_ == ((0 != _tmp28_label1) ? _tmp28_label1 : (_tmp28_label1 = g_quark_from_static_string ("left-to-right")))) {
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (0) {
+#line 9193 "ui.c"
+ default:
+ {
+#line 1910 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_scan_direction = SCAN_DIRECTION_LEFT_TO_RIGHT;
+#line 1911 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9200 "ui.c"
+ }
+ }
+ } else if (_tmp29_ == ((0 != _tmp28_label2) ? _tmp28_label2 : (_tmp28_label2 = g_quark_from_static_string ("right-to-left")))) {
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (0) {
+#line 9206 "ui.c"
+ default:
+ {
+#line 1913 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_scan_direction = SCAN_DIRECTION_RIGHT_TO_LEFT;
+#line 1914 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9213 "ui.c"
+ }
+ }
+ } else {
+#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (0) {
+#line 9219 "ui.c"
+ default:
+ {
+#line 1904 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->default_page_scan_direction = SCAN_DIRECTION_TOP_TO_BOTTOM;
+#line 1905 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9226 "ui.c"
+ }
+ }
+ }
+#line 1876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_key_file_unref0 (f);
+#line 9232 "ui.c"
+}
+
+
+static gint user_interface_state_get_integer (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, gint _default_) {
+ gint result = 0;
+ GError * _inner_error_ = NULL;
+#line 1918 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 1918 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (f != NULL, 0);
+#line 1918 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (group_name != NULL, 0);
+#line 1918 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (key != NULL, 0);
+#line 9247 "ui.c"
+ {
+ gint _tmp0_ = 0;
+ GKeyFile* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = f;
+#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = group_name;
+#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = key;
+#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = g_key_file_get_integer (_tmp1_, _tmp2_, _tmp3_, &_inner_error_);
+#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = _tmp4_;
+#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 9266 "ui.c"
+ goto __catch22_g_error;
+ }
+#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp0_;
+#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9273 "ui.c"
+ }
+ goto __finally22;
+ __catch22_g_error:
+ {
+ gint _tmp5_ = 0;
+#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 1926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _default_;
+#line 1926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp5_;
+#line 1926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9289 "ui.c"
+ }
+ __finally22:
+#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return 0;
+#line 9298 "ui.c"
+}
+
+
+static gboolean user_interface_state_get_boolean (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, gboolean _default_) {
+ gboolean result = FALSE;
+ GError * _inner_error_ = NULL;
+#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (f != NULL, FALSE);
+#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (group_name != NULL, FALSE);
+#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (key != NULL, FALSE);
+#line 9313 "ui.c"
+ {
+ gboolean _tmp0_ = FALSE;
+ GKeyFile* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = f;
+#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = group_name;
+#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = key;
+#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = g_key_file_get_boolean (_tmp1_, _tmp2_, _tmp3_, &_inner_error_);
+#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = _tmp4_;
+#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 9332 "ui.c"
+ goto __catch23_g_error;
+ }
+#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp0_;
+#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9339 "ui.c"
+ }
+ goto __finally23;
+ __catch23_g_error:
+ {
+ gboolean _tmp5_ = FALSE;
+#line 1932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 1938 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _default_;
+#line 1938 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp5_;
+#line 1938 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9355 "ui.c"
+ }
+ __finally23:
+#line 1932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return FALSE;
+#line 9364 "ui.c"
+}
+
+
+static gchar* user_interface_state_get_string (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, const gchar* _default_) {
+ gchar* result = NULL;
+ GError * _inner_error_ = NULL;
+#line 1942 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1942 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (f != NULL, NULL);
+#line 1942 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (group_name != NULL, NULL);
+#line 1942 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (key != NULL, NULL);
+#line 1942 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (_default_ != NULL, NULL);
+#line 9381 "ui.c"
+ {
+ gchar* _tmp0_ = NULL;
+ GKeyFile* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = f;
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = group_name;
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = key;
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = g_key_file_get_string (_tmp1_, _tmp2_, _tmp3_, &_inner_error_);
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = _tmp4_;
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 9401 "ui.c"
+ goto __catch24_g_error;
+ }
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _tmp0_;
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = NULL;
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp5_;
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp0_);
+#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9414 "ui.c"
+ }
+ goto __finally24;
+ __catch24_g_error:
+ {
+ const gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+#line 1944 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1944 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 1950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = _default_;
+#line 1950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = g_strdup (_tmp6_);
+#line 1950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp7_;
+#line 1950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9433 "ui.c"
+ }
+ __finally24:
+#line 1944 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1944 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1944 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return NULL;
+#line 9442 "ui.c"
+}
+
+
+static gboolean ___lambda9_ (UserInterface* self) {
+ gboolean result = FALSE;
+#line 1962 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_save_state (self, TRUE);
+#line 1963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->save_state_timeout = (guint) 0;
+#line 1964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 1964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9456 "ui.c"
+}
+
+
+static gboolean ____lambda9__gsource_func (gpointer self) {
+ gboolean result;
+ result = ___lambda9_ ((UserInterface*) self);
+#line 1960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9465 "ui.c"
+}
+
+
+static void user_interface_save_state (UserInterface* self, gboolean force) {
+ gboolean _tmp0_ = FALSE;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ GKeyFile* f = NULL;
+ GKeyFile* _tmp7_ = NULL;
+ GKeyFile* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ GKeyFile* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ GKeyFile* _tmp12_ = NULL;
+ gboolean _tmp13_ = FALSE;
+ GKeyFile* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ GKeyFile* _tmp16_ = NULL;
+ gint _tmp17_ = 0;
+ GKeyFile* _tmp18_ = NULL;
+ gint _tmp19_ = 0;
+ ScanDirection _tmp20_ = 0;
+ GError * _inner_error_ = NULL;
+#line 1954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 1956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = force;
+#line 1956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp0_) {
+#line 9496 "ui.c"
+ guint _tmp1_ = 0U;
+ guint _tmp3_ = 0U;
+#line 1958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->save_state_timeout;
+#line 1958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp1_ != ((guint) 0)) {
+#line 9503 "ui.c"
+ guint _tmp2_ = 0U;
+#line 1959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = self->priv->save_state_timeout;
+#line 1959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_source_remove (_tmp2_);
+#line 9509 "ui.c"
+ }
+#line 1960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ____lambda9__gsource_func, g_object_ref (self), g_object_unref);
+#line 1960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->save_state_timeout = _tmp3_;
+#line 1966 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 9517 "ui.c"
+ }
+#line 1969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = user_interface_get_state_filename (self);
+#line 1969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = _tmp4_;
+#line 1969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = _tmp5_;
+#line 1969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_debug ("ui.vala:1969: Saving state to %s", _tmp6_);
+#line 1969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp6_);
+#line 1971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = g_key_file_new ();
+#line 1971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ f = _tmp7_;
+#line 1972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = f;
+#line 1972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = self->priv->window_width;
+#line 1972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_integer (_tmp8_, "window", "width", _tmp9_);
+#line 1973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = f;
+#line 1973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = self->priv->window_height;
+#line 1973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_integer (_tmp10_, "window", "height", _tmp11_);
+#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = f;
+#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = self->priv->window_is_maximized;
+#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_boolean (_tmp12_, "window", "is-maximized", _tmp13_);
+#line 1975 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = f;
+#line 1975 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = self->priv->default_page_width;
+#line 1975 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_integer (_tmp14_, "last-page", "width", _tmp15_);
+#line 1976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = f;
+#line 1976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = self->priv->default_page_height;
+#line 1976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_integer (_tmp16_, "last-page", "height", _tmp17_);
+#line 1977 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = f;
+#line 1977 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = self->priv->default_page_dpi;
+#line 1977 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_integer (_tmp18_, "last-page", "dpi", _tmp19_);
+#line 1978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = self->priv->default_page_scan_direction;
+#line 1978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (_tmp20_) {
+#line 1978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case SCAN_DIRECTION_TOP_TO_BOTTOM:
+#line 9575 "ui.c"
+ {
+ GKeyFile* _tmp21_ = NULL;
+#line 1981 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = f;
+#line 1981 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_value (_tmp21_, "last-page", "scan-direction", "top-to-bottom");
+#line 1982 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9584 "ui.c"
+ }
+#line 1978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case SCAN_DIRECTION_BOTTOM_TO_TOP:
+#line 9588 "ui.c"
+ {
+ GKeyFile* _tmp22_ = NULL;
+#line 1984 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = f;
+#line 1984 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_value (_tmp22_, "last-page", "scan-direction", "bottom-to-top");
+#line 1985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9597 "ui.c"
+ }
+#line 1978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case SCAN_DIRECTION_LEFT_TO_RIGHT:
+#line 9601 "ui.c"
+ {
+ GKeyFile* _tmp23_ = NULL;
+#line 1987 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = f;
+#line 1987 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_value (_tmp23_, "last-page", "scan-direction", "left-to-right");
+#line 1988 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9610 "ui.c"
+ }
+#line 1978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case SCAN_DIRECTION_RIGHT_TO_LEFT:
+#line 9614 "ui.c"
+ {
+ GKeyFile* _tmp24_ = NULL;
+#line 1990 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = f;
+#line 1990 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_key_file_set_value (_tmp24_, "last-page", "scan-direction", "right-to-left");
+#line 1991 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9623 "ui.c"
+ }
+ default:
+#line 1978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9628 "ui.c"
+ }
+ {
+ gchar* _tmp25_ = NULL;
+ gchar* _tmp26_ = NULL;
+ gchar* _tmp27_ = NULL;
+ GKeyFile* _tmp28_ = NULL;
+ gchar* _tmp29_ = NULL;
+ gchar* _tmp30_ = NULL;
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = user_interface_get_state_filename (self);
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp26_ = _tmp25_;
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = _tmp26_;
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = f;
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = g_key_file_to_data (_tmp28_, NULL, NULL);
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = _tmp29_;
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_file_set_contents (_tmp27_, _tmp30_, (gssize) (-1), &_inner_error_);
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp30_);
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (_tmp27_);
+#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 9657 "ui.c"
+ goto __catch25_g_error;
+ }
+ }
+ goto __finally25;
+ __catch25_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp31_ = NULL;
+ const gchar* _tmp32_ = NULL;
+#line 1993 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ e = _inner_error_;
+#line 1993 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 1999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = e;
+#line 1999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp32_ = _tmp31_->message;
+#line 1999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_warning ("ui.vala:1999: Failed to write state: %s", _tmp32_);
+#line 1993 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_error_free0 (e);
+#line 9679 "ui.c"
+ }
+ __finally25:
+#line 1993 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 1993 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_key_file_unref0 (f);
+#line 1993 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 1993 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 1993 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 9692 "ui.c"
+ }
+#line 1954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_key_file_unref0 (f);
+#line 9696 "ui.c"
+}
+
+
+static gboolean ___lambda17_ (UserInterface* self) {
+ gboolean result = FALSE;
+ ProgressBarDialog* _tmp0_ = NULL;
+#line 2014 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->progress_dialog;
+#line 2014 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
+#line 2015 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = FALSE;
+#line 2015 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9711 "ui.c"
+}
+
+
+static gboolean ____lambda17__gsource_func (gpointer self) {
+ gboolean result;
+ result = ___lambda17_ ((UserInterface*) self);
+#line 2013 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9720 "ui.c"
+}
+
+
+static void user_interface_book_saving_cb (UserInterface* self, gint page_number) {
+ gint total = 0;
+ Book* _tmp1_ = NULL;
+ guint _tmp2_ = 0U;
+ guint _tmp3_ = 0U;
+ gdouble fraction = 0.0;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gboolean complete = FALSE;
+ gdouble _tmp6_ = 0.0;
+ gboolean _tmp7_ = FALSE;
+ gchar* message = NULL;
+ const gchar* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gchar* _tmp11_ = NULL;
+ ProgressBarDialog* _tmp12_ = NULL;
+ gdouble _tmp13_ = 0.0;
+ ProgressBarDialog* _tmp14_ = NULL;
+#line 2003 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 2006 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ while (TRUE) {
+#line 9747 "ui.c"
+ gboolean _tmp0_ = FALSE;
+#line 2006 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = gtk_events_pending ();
+#line 2006 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp0_) {
+#line 2006 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 9755 "ui.c"
+ }
+#line 2007 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_main_iteration ();
+#line 9759 "ui.c"
+ }
+#line 2009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->_book;
+#line 2009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = book_get_n_pages (_tmp1_);
+#line 2009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = _tmp2_;
+#line 2009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ total = (gint) _tmp3_;
+#line 2010 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = page_number;
+#line 2010 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = total;
+#line 2010 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ fraction = (_tmp4_ + 1.0) / _tmp5_;
+#line 2011 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = fraction;
+#line 2011 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ complete = _tmp6_ == 1.0;
+#line 2012 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = complete;
+#line 2012 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp7_) {
+#line 2013 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 500, ____lambda17__gsource_func, g_object_ref (self), g_object_unref);
+#line 9785 "ui.c"
+ }
+#line 2017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _ ("Saving page %d out of %d");
+#line 2017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = page_number;
+#line 2017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = total;
+#line 2017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = g_strdup_printf (_tmp8_, _tmp9_ + 1, _tmp10_);
+#line 2017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ message = _tmp11_;
+#line 2019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = self->priv->progress_dialog;
+#line 2019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = fraction;
+#line 2019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ progress_bar_dialog_set_fraction (_tmp12_, _tmp13_);
+#line 2020 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = self->priv->progress_dialog;
+#line 2020 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ progress_bar_dialog_set_message (_tmp14_, message);
+#line 2003 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (message);
+#line 9809 "ui.c"
+}
+
+
+void user_interface_show_progress_dialog (UserInterface* self) {
+ ProgressBarDialog* _tmp0_ = NULL;
+#line 2023 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 2025 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->progress_dialog;
+#line 2025 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp0_, TRUE);
+#line 9821 "ui.c"
+}
+
+
+void user_interface_hide_progress_dialog (UserInterface* self) {
+ ProgressBarDialog* _tmp0_ = NULL;
+#line 2028 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 2030 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->progress_dialog;
+#line 2030 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
+#line 9833 "ui.c"
+}
+
+
+void user_interface_show_error (UserInterface* self, const gchar* error_title, const gchar* error_text, gboolean change_scanner_hint) {
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+#line 2033 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 2033 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (error_title != NULL);
+#line 2033 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (error_text != NULL);
+#line 2035 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->have_error = TRUE;
+#line 2036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = error_title;
+#line 2036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 2036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->error_title);
+#line 2036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->error_title = _tmp1_;
+#line 2037 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = error_text;
+#line 2037 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 2037 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->error_text);
+#line 2037 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->error_text = _tmp3_;
+#line 2038 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = change_scanner_hint;
+#line 2038 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->error_change_scanner_hint = _tmp4_;
+#line 2039 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_update_info_bar (self);
+#line 9873 "ui.c"
+}
+
+
+void user_interface_start (UserInterface* self) {
+#line 2042 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 2044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) self, TRUE);
+#line 9882 "ui.c"
+}
+
+
+Book* user_interface_get_book (UserInterface* self) {
+ Book* result;
+ Book* _tmp0_ = NULL;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->_book;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp0_;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9897 "ui.c"
+}
+
+
+static gpointer _book_ref0 (gpointer self) {
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return self ? book_ref (self) : NULL;
+#line 9904 "ui.c"
+}
+
+
+static void user_interface_set_book (UserInterface* self, Book* value) {
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = value;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = _book_ref0 (_tmp0_);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _book_unref0 (self->priv->_book);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->_book = _tmp1_;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "book");
+#line 9923 "ui.c"
+}
+
+
+Page* user_interface_get_selected_page (UserInterface* self) {
+ Page* result;
+ BookView* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->book_view;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = book_view_get_selected_page (_tmp0_);
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp2_;
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9944 "ui.c"
+}
+
+
+void user_interface_set_selected_page (UserInterface* self, Page* value) {
+ BookView* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->book_view;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = value;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ book_view_set_selected_page (_tmp0_, _tmp1_);
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "selected-page");
+#line 9961 "ui.c"
+}
+
+
+const gchar* user_interface_get_default_file_name (UserInterface* self) {
+ const gchar* result;
+ const gchar* _tmp0_ = NULL;
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->_default_file_name;
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp0_;
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 9976 "ui.c"
+}
+
+
+void user_interface_set_default_file_name (UserInterface* self, const gchar* value) {
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = value;
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->_default_file_name);
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->_default_file_name = _tmp1_;
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "default-file-name");
+#line 9995 "ui.c"
+}
+
+
+gboolean user_interface_get_scanning (UserInterface* self) {
+ gboolean result;
+ gboolean _tmp0_ = FALSE;
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->scanning_;
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp0_;
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 10010 "ui.c"
+}
+
+
+void user_interface_set_scanning (UserInterface* self, gboolean value) {
+ gboolean _tmp0_ = FALSE;
+ GtkMenuItem* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ GtkMenuItem* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ GtkToolButton* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+ GtkButton* _tmp7_ = NULL;
+ gboolean _tmp8_ = FALSE;
+ GtkButton* _tmp9_ = NULL;
+ gboolean _tmp10_ = FALSE;
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 195 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = value;
+#line 195 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->scanning_ = _tmp0_;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = self->priv->page_delete_menuitem;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = value;
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, !_tmp2_);
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->stop_scan_menuitem;
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = value;
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, _tmp4_);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->stop_toolbutton;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = value;
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, _tmp6_);
+#line 199 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = self->priv->scan_button;
+#line 199 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = value;
+#line 199 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp7_, !_tmp8_);
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = self->priv->stop_button;
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = value;
+#line 200 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp9_, _tmp10_);
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "scanning");
+#line 10064 "ui.c"
+}
+
+
+gint user_interface_get_brightness (UserInterface* self) {
+ gint result;
+ GtkAdjustment* _tmp0_ = NULL;
+ gdouble _tmp1_ = 0.0;
+ gdouble _tmp2_ = 0.0;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->brightness_adjustment;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_adjustment_get_value (_tmp0_);
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = (gint) _tmp2_;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 10085 "ui.c"
+}
+
+
+void user_interface_set_brightness (UserInterface* self, gint value) {
+ GtkAdjustment* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->brightness_adjustment;
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = value;
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_);
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "brightness");
+#line 10102 "ui.c"
+}
+
+
+gint user_interface_get_contrast (UserInterface* self) {
+ gint result;
+ GtkAdjustment* _tmp0_ = NULL;
+ gdouble _tmp1_ = 0.0;
+ gdouble _tmp2_ = 0.0;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->contrast_adjustment;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_adjustment_get_value (_tmp0_);
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = (gint) _tmp2_;
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 10123 "ui.c"
+}
+
+
+void user_interface_set_contrast (UserInterface* self, gint value) {
+ GtkAdjustment* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->contrast_adjustment;
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = value;
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_);
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "contrast");
+#line 10140 "ui.c"
+}
+
+
+gint user_interface_get_quality (UserInterface* self) {
+ gint result;
+ GtkAdjustment* _tmp0_ = NULL;
+ gdouble _tmp1_ = 0.0;
+ gdouble _tmp2_ = 0.0;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->quality_adjustment;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_adjustment_get_value (_tmp0_);
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = (gint) _tmp2_;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 10161 "ui.c"
+}
+
+
+void user_interface_set_quality (UserInterface* self, gint value) {
+ GtkAdjustment* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->quality_adjustment;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = value;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_);
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "quality");
+#line 10178 "ui.c"
+}
+
+
+gchar* user_interface_get_selected_device (UserInterface* self) {
+ gchar* result;
+ GtkTreeIter iter = {0};
+ GtkComboBox* _tmp0_ = NULL;
+ GtkTreeIter _tmp1_ = {0};
+ gboolean _tmp2_ = FALSE;
+#line 230 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->device_combo;
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_);
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp1_;
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_tmp2_) {
+#line 10198 "ui.c"
+ gchar* device = NULL;
+ GtkListStore* _tmp3_ = NULL;
+ GtkTreeIter _tmp4_ = {0};
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->device_model;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = iter;
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &device, -1, -1);
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = device;
+#line 238 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 10212 "ui.c"
+ }
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = NULL;
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 10218 "ui.c"
+}
+
+
+void user_interface_set_selected_device (UserInterface* self, const gchar* value) {
+ GtkTreeIter iter = {0};
+ const gchar* _tmp0_ = NULL;
+ GtkTreeIter _tmp1_ = {0};
+ gboolean _tmp2_ = FALSE;
+ GtkComboBox* _tmp3_ = NULL;
+ GtkTreeIter _tmp4_ = {0};
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = value;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = user_interface_find_scan_device (self, _tmp0_, &_tmp1_);
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ iter = _tmp1_;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (!_tmp2_) {
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return;
+#line 10241 "ui.c"
+ }
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->device_combo;
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = iter;
+#line 250 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_combo_box_set_active_iter (_tmp3_, &_tmp4_);
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->user_selected_device = TRUE;
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "selected-device");
+#line 10253 "ui.c"
+}
+
+
+static gboolean user_interface_get_shell_shows_menubar (UserInterface* self) {
+ gboolean result;
+ gboolean shell_shows_menubar = FALSE;
+ GtkSettings* _tmp0_ = NULL;
+#line 1665 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, FALSE);
+#line 1668 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = gtk_settings_get_default ();
+#line 1668 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_get ((GObject*) _tmp0_, "gtk-shell-shows-menubar", &shell_shows_menubar, NULL);
+#line 1669 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = shell_shows_menubar;
+#line 1669 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 10271 "ui.c"
+}
+
+
+static gchar* user_interface_get_state_filename (UserInterface* self) {
+ gchar* result;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+#line 1873 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1873 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = g_get_user_cache_dir ();
+#line 1873 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = g_build_filename (_tmp0_, "simple-scan", "state", NULL);
+#line 1873 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp1_;
+#line 1873 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 10289 "ui.c"
+}
+
+
+static void g_cclosure_user_marshal_VOID__STRING_SCAN_OPTIONS (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__STRING_SCAN_OPTIONS) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2);
+ register GMarshalFunc_VOID__STRING_SCAN_OPTIONS callback;
+ register GCClosure * cc;
+ register gpointer data1;
+ register gpointer data2;
+ cc = (GCClosure *) closure;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (n_param_values == 3);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ data1 = closure->data;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ data2 = param_values->data[0].v_pointer;
+#line 10308 "ui.c"
+ } else {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ data1 = param_values->data[0].v_pointer;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ data2 = closure->data;
+#line 10314 "ui.c"
+ }
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ callback = (GMarshalFunc_VOID__STRING_SCAN_OPTIONS) (marshal_data ? marshal_data : cc->callback);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ callback (data1, g_value_get_string (param_values + 1), value_get_scan_options (param_values + 2), data2);
+#line 10320 "ui.c"
+}
+
+
+static void g_cclosure_user_marshal_VOID__STRING_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
+ typedef void (*GMarshalFunc_VOID__STRING_INT) (gpointer data1, const char* arg_1, gint arg_2, gpointer data2);
+ register GMarshalFunc_VOID__STRING_INT callback;
+ register GCClosure * cc;
+ register gpointer data1;
+ register gpointer data2;
+ cc = (GCClosure *) closure;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (n_param_values == 3);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (G_CCLOSURE_SWAP_DATA (closure)) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ data1 = closure->data;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ data2 = param_values->data[0].v_pointer;
+#line 10339 "ui.c"
+ } else {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ data1 = param_values->data[0].v_pointer;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ data2 = closure->data;
+#line 10345 "ui.c"
+ }
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ callback = (GMarshalFunc_VOID__STRING_INT) (marshal_data ? marshal_data : cc->callback);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ callback (data1, g_value_get_string (param_values + 1), g_value_get_int (param_values + 2), data2);
+#line 10351 "ui.c"
+}
+
+
+static void user_interface_class_init (UserInterfaceClass * klass) {
+ gint UserInterface_private_offset;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_parent_class = g_type_class_peek_parent (klass);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_type_class_add_private (klass, sizeof (UserInterfacePrivate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (klass)->get_property = _vala_user_interface_get_property;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (klass)->set_property = _vala_user_interface_set_property;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (klass)->finalize = user_interface_finalize;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_BOOK, param_spec_book ("book", "book", "book", TYPE_BOOK, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_SELECTED_PAGE, param_spec_page ("selected-page", "selected-page", "selected-page", TYPE_PAGE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_DEFAULT_FILE_NAME, g_param_spec_string ("default-file-name", "default-file-name", "default-file-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_SCANNING, g_param_spec_boolean ("scanning", "scanning", "scanning", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_BRIGHTNESS, g_param_spec_int ("brightness", "brightness", "brightness", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_CONTRAST, g_param_spec_int ("contrast", "contrast", "contrast", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_QUALITY, g_param_spec_int ("quality", "quality", "quality", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_SELECTED_DEVICE, g_param_spec_string ("selected-device", "selected-device", "selected-device", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ UserInterface_private_offset = g_type_class_get_instance_private_offset (klass);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/SimpleScan/simple-scan.ui");
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_new ("start_scan", TYPE_USER_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_SCAN_OPTIONS, G_TYPE_NONE, 2, G_TYPE_STRING, TYPE_SCAN_OPTIONS);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_new ("stop_scan", TYPE_USER_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_new ("email", TYPE_USER_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_INT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_INT);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "menubar", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, menubar));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "toolbar", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, toolbar));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_menu", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_menu));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_vbox", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, main_vbox));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "custom_crop_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, custom_crop_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "a4_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, a4_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "a5_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, a5_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "a6_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, a6_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "letter_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, letter_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "legal_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, legal_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "four_by_six_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, four_by_six_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "no_crop_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, no_crop_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_move_left_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_move_left_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_move_right_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_move_right_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_delete_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_delete_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "crop_rotate_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, crop_rotate_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "save_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, save_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "save_as_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, save_as_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "copy_to_clipboard_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, copy_to_clipboard_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "save_button", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, save_button));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "save_toolbutton", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, save_toolbutton));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stop_scan_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, stop_scan_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stop_toolbutton", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, stop_toolbutton));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "crop_button", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, crop_button));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "crop_toolbutton", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, crop_toolbutton));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stop_button", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, stop_button));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scan_button", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, scan_button));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_button_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_button_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_button_hb_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_button_hb_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_button_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_button_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_button_hb_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_button_hb_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_menuitem));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "authorize_dialog", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, authorize_dialog));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "authorize_label", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, authorize_label));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "username_entry", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, username_entry));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "password_entry", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, password_entry));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "preferences_dialog", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, preferences_dialog));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "device_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, device_combo));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_dpi_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_dpi_combo));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_dpi_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_dpi_combo));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_side_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_side_combo));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "paper_size_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, paper_size_combo));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "brightness_scale", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, brightness_scale));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "contrast_scale", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, contrast_scale));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "quality_scale", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, quality_scale));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "device_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, device_model));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_dpi_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_dpi_model));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_dpi_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_dpi_model));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_side_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_side_model));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "paper_size_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, paper_size_model));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "brightness_adjustment", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, brightness_adjustment));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "contrast_adjustment", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, contrast_adjustment));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "quality_adjustment", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, quality_adjustment));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "device_combo_changed_cb", G_CALLBACK(_user_interface_device_combo_changed_cb_gtk_combo_box_changed));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "new_button_clicked_cb", G_CALLBACK(_user_interface_new_button_clicked_cb_gtk_button_clicked));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "text_menuitem_toggled_cb", G_CALLBACK(_user_interface_text_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "photo_menuitem_toggled_cb", G_CALLBACK(_user_interface_photo_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "scan_button_clicked_cb", G_CALLBACK(_user_interface_scan_button_clicked_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "stop_scan_button_clicked_cb", G_CALLBACK(_user_interface_stop_scan_button_clicked_cb_gtk_button_clicked));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "continuous_scan_button_clicked_cb", G_CALLBACK(_user_interface_continuous_scan_button_clicked_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "preferences_button_clicked_cb", G_CALLBACK(_user_interface_preferences_button_clicked_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "preferences_dialog_delete_event_cb", G_CALLBACK(_user_interface_preferences_dialog_delete_event_cb_gtk_widget_delete_event));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "preferences_dialog_response_cb", G_CALLBACK(_user_interface_preferences_dialog_response_cb_gtk_dialog_response));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "rotate_left_button_clicked_cb", G_CALLBACK(_user_interface_rotate_left_button_clicked_cb_gtk_button_clicked));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "rotate_right_button_clicked_cb", G_CALLBACK(_user_interface_rotate_right_button_clicked_cb_gtk_button_clicked));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "no_crop_menuitem_toggled_cb", G_CALLBACK(_user_interface_no_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "custom_crop_menuitem_toggled_cb", G_CALLBACK(_user_interface_custom_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "crop_button_toggled_cb", G_CALLBACK(_user_interface_crop_button_toggled_cb_gtk_toggle_button_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "crop_toolbutton_toggled_cb", G_CALLBACK(_user_interface_crop_toolbutton_toggled_cb_gtk_toggle_tool_button_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "four_by_six_menuitem_toggled_cb", G_CALLBACK(_user_interface_four_by_six_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "legal_menuitem_toggled_cb", G_CALLBACK(_user_interface_legal_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "letter_menuitem_toggled_cb", G_CALLBACK(_user_interface_letter_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "a6_menuitem_toggled_cb", G_CALLBACK(_user_interface_a6_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "a5_menuitem_toggled_cb", G_CALLBACK(_user_interface_a5_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "a4_menuitem_toggled_cb", G_CALLBACK(_user_interface_a4_menuitem_toggled_cb_gtk_check_menu_item_toggled));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "crop_rotate_menuitem_activate_cb", G_CALLBACK(_user_interface_crop_rotate_menuitem_activate_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "page_move_left_menuitem_activate_cb", G_CALLBACK(_user_interface_page_move_left_menuitem_activate_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "page_move_right_menuitem_activate_cb", G_CALLBACK(_user_interface_page_move_right_menuitem_activate_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "page_delete_menuitem_activate_cb", G_CALLBACK(_user_interface_page_delete_menuitem_activate_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "reorder_menuitem_activate_cb", G_CALLBACK(_user_interface_reorder_menuitem_activate_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "save_file_button_clicked_cb", G_CALLBACK(_user_interface_save_file_button_clicked_cb_gtk_button_clicked));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "copy_to_clipboard_button_clicked_cb", G_CALLBACK(_user_interface_copy_to_clipboard_button_clicked_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "save_as_file_button_clicked_cb", G_CALLBACK(_user_interface_save_as_file_button_clicked_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "email_button_clicked_cb", G_CALLBACK(_user_interface_email_button_clicked_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "print_button_clicked_cb", G_CALLBACK(_user_interface_print_button_clicked_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "help_contents_menuitem_activate_cb", G_CALLBACK(_user_interface_help_contents_menuitem_activate_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "about_menuitem_activate_cb", G_CALLBACK(_user_interface_about_menuitem_activate_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "quit_menuitem_activate_cb", G_CALLBACK(_user_interface_quit_menuitem_activate_cb_gtk_menu_item_activate));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "simple_scan_window_configure_event_cb", G_CALLBACK(_user_interface_simple_scan_window_configure_event_cb_gtk_widget_configure_event));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "simple_scan_window_window_state_event_cb", G_CALLBACK(_user_interface_simple_scan_window_window_state_event_cb_gtk_widget_window_state_event));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "window_delete_event_cb", G_CALLBACK(_user_interface_window_delete_event_cb_gtk_widget_delete_event));
+#line 10577 "ui.c"
+}
+
+
+static void user_interface_instance_init (UserInterface * self) {
+ gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv = USER_INTERFACE_GET_PRIVATE (self);
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->book_uri = NULL;
+#line 186 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = g_strdup ("photo");
+#line 186 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->document_hint = _tmp0_;
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = _ ("Scanned Document.pdf");
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = g_strdup (_tmp1_);
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->_default_file_name = _tmp2_;
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->scanning_ = FALSE;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_init_template (GTK_WIDGET (self));
+#line 10603 "ui.c"
+}
+
+
+static void user_interface_finalize (GObject* obj) {
+ UserInterface * self;
+ Book* _tmp0_ = NULL;
+ guint _tmp1_ = 0U;
+ Book* _tmp2_ = NULL;
+ guint _tmp3_ = 0U;
+ Book* _tmp4_ = NULL;
+ guint _tmp5_ = 0U;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_USER_INTERFACE, UserInterface);
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->_book;
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_parse_name ("page-added", TYPE_BOOK, &_tmp1_, NULL, FALSE);
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _user_interface_page_added_cb_book_page_added, self);
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = self->priv->_book;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_parse_name ("reordered", TYPE_BOOK, &_tmp3_, NULL, FALSE);
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _user_interface_reordered_cb_book_reordered, self);
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->_book;
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_parse_name ("page-removed", TYPE_BOOK, &_tmp5_, NULL, FALSE);
+#line 288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _user_interface_page_removed_cb_book_page_removed, self);
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->settings);
+#line 36 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->menubar);
+#line 38 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->toolbar);
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->page_menu);
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->main_vbox);
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar);
+#line 44 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar_image);
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar_label);
+#line 46 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar_close_button);
+#line 47 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->info_bar_change_scanner_button);
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->custom_crop_menuitem);
+#line 51 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->a4_menuitem);
+#line 53 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->a5_menuitem);
+#line 55 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->a6_menuitem);
+#line 57 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->letter_menuitem);
+#line 59 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->legal_menuitem);
+#line 61 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->four_by_six_menuitem);
+#line 63 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->no_crop_menuitem);
+#line 65 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->page_move_left_menuitem);
+#line 67 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->page_move_right_menuitem);
+#line 69 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->page_delete_menuitem);
+#line 71 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->crop_rotate_menuitem);
+#line 73 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->save_menuitem);
+#line 75 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->save_as_menuitem);
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->copy_to_clipboard_menuitem);
+#line 79 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->save_button);
+#line 81 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->save_toolbutton);
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->stop_scan_menuitem);
+#line 85 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->stop_toolbutton);
+#line 87 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->crop_button);
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->crop_toolbutton);
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->stop_button);
+#line 93 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->scan_button);
+#line 96 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->text_button_menuitem);
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->text_button_hb_menuitem);
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->text_menuitem);
+#line 102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->photo_button_menuitem);
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->photo_button_hb_menuitem);
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->photo_menuitem);
+#line 109 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->authorize_dialog);
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->authorize_label);
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->username_entry);
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->password_entry);
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->preferences_dialog);
+#line 120 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->device_combo);
+#line 122 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->text_dpi_combo);
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->photo_dpi_combo);
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->page_side_combo);
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->paper_size_combo);
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->brightness_scale);
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->contrast_scale);
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->quality_scale);
+#line 136 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->device_model);
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->text_dpi_model);
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->photo_dpi_model);
+#line 142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->page_side_model);
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->paper_size_model);
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->brightness_adjustment);
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->contrast_adjustment);
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->quality_adjustment);
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->save_dialog);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->progress_dialog);
+#line 158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->error_title);
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->error_text);
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _book_unref0 (self->priv->_book);
+#line 163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->book_uri);
+#line 177 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _autosave_manager_unref0 (self->priv->autosave_manager);
+#line 179 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->book_view);
+#line 186 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->document_hint);
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->_default_file_name);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (user_interface_parent_class)->finalize (obj);
+#line 10777 "ui.c"
+}
+
+
+GType user_interface_get_type (void) {
+ static volatile gsize user_interface_type_id__volatile = 0;
+ if (g_once_init_enter (&user_interface_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (UserInterfaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) user_interface_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UserInterface), 0, (GInstanceInitFunc) user_interface_instance_init, NULL };
+ GType user_interface_type_id;
+ user_interface_type_id = g_type_register_static (GTK_TYPE_APPLICATION_WINDOW, "UserInterface", &g_define_type_info, 0);
+ g_once_init_leave (&user_interface_type_id__volatile, user_interface_type_id);
+ }
+ return user_interface_type_id__volatile;
+}
+
+
+static void _vala_user_interface_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+ UserInterface * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_USER_INTERFACE, UserInterface);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (property_id) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_BOOK:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ value_set_book (value, user_interface_get_book (self));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_SELECTED_PAGE:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ value_set_page (value, user_interface_get_selected_page (self));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_DEFAULT_FILE_NAME:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_value_set_string (value, user_interface_get_default_file_name (self));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_SCANNING:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_value_set_boolean (value, user_interface_get_scanning (self));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_BRIGHTNESS:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_value_set_int (value, user_interface_get_brightness (self));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_CONTRAST:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_value_set_int (value, user_interface_get_contrast (self));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_QUALITY:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_value_set_int (value, user_interface_get_quality (self));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_SELECTED_DEVICE:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_value_take_string (value, user_interface_get_selected_device (self));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 10846 "ui.c"
+ default:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 10852 "ui.c"
+ }
+}
+
+
+static void _vala_user_interface_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+ UserInterface * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_USER_INTERFACE, UserInterface);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (property_id) {
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_BOOK:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_book (self, value_get_book (value));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_SELECTED_PAGE:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_selected_page (self, value_get_page (value));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_DEFAULT_FILE_NAME:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_default_file_name (self, g_value_get_string (value));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_SCANNING:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_scanning (self, g_value_get_boolean (value));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_BRIGHTNESS:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_brightness (self, g_value_get_int (value));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_CONTRAST:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_contrast (self, g_value_get_int (value));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_QUALITY:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_quality (self, g_value_get_int (value));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case USER_INTERFACE_SELECTED_DEVICE:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ user_interface_set_selected_device (self, g_value_get_string (value));
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 10910 "ui.c"
+ default:
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 10916 "ui.c"
+ }
+}
+
+
+ProgressBarDialog* progress_bar_dialog_construct (GType object_type, GtkApplicationWindow* parent, const gchar* title) {
+ ProgressBarDialog * self = NULL;
+ GtkProgressBar* _tmp0_ = NULL;
+ GtkBox* hbox = NULL;
+ GtkBox* _tmp1_ = NULL;
+ GtkBox* vbox = NULL;
+ GtkBox* _tmp2_ = NULL;
+ GtkProgressBar* _tmp3_ = NULL;
+ GtkProgressBar* _tmp4_ = NULL;
+ GtkProgressBar* _tmp5_ = NULL;
+ GtkProgressBar* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+ GtkApplicationWindow* _tmp8_ = NULL;
+ GtkProgressBar* _tmp9_ = NULL;
+#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (parent != NULL, NULL);
+#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (title != NULL, NULL);
+#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = (ProgressBarDialog*) g_object_new (object_type, NULL);
+#line 2066 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = (GtkProgressBar*) gtk_progress_bar_new ();
+#line 2066 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp0_);
+#line 2066 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->bar);
+#line 2066 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->bar = _tmp0_;
+#line 2067 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
+#line 2067 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp1_);
+#line 2067 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ hbox = _tmp1_;
+#line 2068 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
+#line 2068 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_ref_sink (_tmp2_);
+#line 2068 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ vbox = _tmp2_;
+#line 2069 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_hexpand ((GtkWidget*) hbox, TRUE);
+#line 2071 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = self->priv->bar;
+#line 2071 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_progress_bar_set_text (_tmp3_, "");
+#line 2072 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = self->priv->bar;
+#line 2072 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_progress_bar_set_show_text (_tmp4_, TRUE);
+#line 2073 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = self->priv->bar;
+#line 2073 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_size_request ((GtkWidget*) _tmp5_, 225, 25);
+#line 2074 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_size_request ((GtkWidget*) self, 250, 50);
+#line 2076 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = self->priv->bar;
+#line 2076 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (vbox, (GtkWidget*) _tmp6_, TRUE, FALSE, (guint) 0);
+#line 2077 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_box_pack_start (hbox, (GtkWidget*) vbox, TRUE, FALSE, (guint) 0);
+#line 2078 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_container_add ((GtkContainer*) self, (GtkWidget*) hbox);
+#line 2079 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = title;
+#line 2079 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_title ((GtkWindow*) self, _tmp7_);
+#line 2081 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = parent;
+#line 2081 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_transient_for ((GtkWindow*) self, (GtkWindow*) _tmp8_);
+#line 2082 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_position ((GtkWindow*) self, GTK_WIN_POS_CENTER_ON_PARENT);
+#line 2083 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_modal ((GtkWindow*) self, TRUE);
+#line 2084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_window_set_resizable ((GtkWindow*) self, FALSE);
+#line 2086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) hbox, TRUE);
+#line 2087 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) vbox, TRUE);
+#line 2088 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = self->priv->bar;
+#line 2088 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_widget_set_visible ((GtkWidget*) _tmp9_, TRUE);
+#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (vbox);
+#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (hbox);
+#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return self;
+#line 11013 "ui.c"
+}
+
+
+ProgressBarDialog* progress_bar_dialog_new (GtkApplicationWindow* parent, const gchar* title) {
+#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return progress_bar_dialog_construct (TYPE_PROGRESS_BAR_DIALOG, parent, title);
+#line 11020 "ui.c"
+}
+
+
+gdouble progress_bar_dialog_get_fraction (ProgressBarDialog* self) {
+ gdouble result;
+ GtkProgressBar* _tmp0_ = NULL;
+ gdouble _tmp1_ = 0.0;
+ gdouble _tmp2_ = 0.0;
+#line 2054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, 0.0);
+#line 2054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->bar;
+#line 2054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_progress_bar_get_fraction (_tmp0_);
+#line 2054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 2054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp2_;
+#line 2054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 11041 "ui.c"
+}
+
+
+void progress_bar_dialog_set_fraction (ProgressBarDialog* self, gdouble value) {
+ GtkProgressBar* _tmp0_ = NULL;
+ gdouble _tmp1_ = 0.0;
+#line 2055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 2055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->bar;
+#line 2055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = value;
+#line 2055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_progress_bar_set_fraction (_tmp0_, _tmp1_);
+#line 2055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "fraction");
+#line 11058 "ui.c"
+}
+
+
+const gchar* progress_bar_dialog_get_message (ProgressBarDialog* self) {
+ const gchar* result;
+ GtkProgressBar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+#line 2060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 2060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->bar;
+#line 2060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_progress_bar_get_text (_tmp0_);
+#line 2060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = _tmp1_;
+#line 2060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = _tmp2_;
+#line 2060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 11079 "ui.c"
+}
+
+
+void progress_bar_dialog_set_message (ProgressBarDialog* self, const gchar* value) {
+ GtkProgressBar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+#line 2061 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_if_fail (self != NULL);
+#line 2061 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = self->priv->bar;
+#line 2061 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = value;
+#line 2061 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ gtk_progress_bar_set_text (_tmp0_, _tmp1_);
+#line 2061 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_notify ((GObject *) self, "message");
+#line 11096 "ui.c"
+}
+
+
+static void progress_bar_dialog_class_init (ProgressBarDialogClass * klass) {
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ progress_bar_dialog_parent_class = g_type_class_peek_parent (klass);
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_type_class_add_private (klass, sizeof (ProgressBarDialogPrivate));
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (klass)->get_property = _vala_progress_bar_dialog_get_property;
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (klass)->set_property = _vala_progress_bar_dialog_set_property;
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (klass)->finalize = progress_bar_dialog_finalize;
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROGRESS_BAR_DIALOG_FRACTION, g_param_spec_double ("fraction", "fraction", "fraction", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROGRESS_BAR_DIALOG_MESSAGE, g_param_spec_string ("message", "message", "message", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 11115 "ui.c"
+}
+
+
+static void progress_bar_dialog_instance_init (ProgressBarDialog * self) {
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv = PROGRESS_BAR_DIALOG_GET_PRIVATE (self);
+#line 11122 "ui.c"
+}
+
+
+static void progress_bar_dialog_finalize (GObject* obj) {
+ ProgressBarDialog * self;
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialog);
+#line 2050 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_object_unref0 (self->priv->bar);
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (progress_bar_dialog_parent_class)->finalize (obj);
+#line 11134 "ui.c"
+}
+
+
+GType progress_bar_dialog_get_type (void) {
+ static volatile gsize progress_bar_dialog_type_id__volatile = 0;
+ if (g_once_init_enter (&progress_bar_dialog_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (ProgressBarDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) progress_bar_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProgressBarDialog), 0, (GInstanceInitFunc) progress_bar_dialog_instance_init, NULL };
+ GType progress_bar_dialog_type_id;
+ progress_bar_dialog_type_id = g_type_register_static (GTK_TYPE_WINDOW, "ProgressBarDialog", &g_define_type_info, 0);
+ g_once_init_leave (&progress_bar_dialog_type_id__volatile, progress_bar_dialog_type_id);
+ }
+ return progress_bar_dialog_type_id__volatile;
+}
+
+
+static void _vala_progress_bar_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+ ProgressBarDialog * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialog);
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (property_id) {
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case PROGRESS_BAR_DIALOG_FRACTION:
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_value_set_double (value, progress_bar_dialog_get_fraction (self));
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case PROGRESS_BAR_DIALOG_MESSAGE:
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_value_set_string (value, progress_bar_dialog_get_message (self));
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 11167 "ui.c"
+ default:
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 11173 "ui.c"
+ }
+}
+
+
+static void _vala_progress_bar_dialog_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+ ProgressBarDialog * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialog);
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ switch (property_id) {
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case PROGRESS_BAR_DIALOG_FRACTION:
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ progress_bar_dialog_set_fraction (self, g_value_get_double (value));
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ case PROGRESS_BAR_DIALOG_MESSAGE:
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ progress_bar_dialog_set_message (self, g_value_get_string (value));
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 11195 "ui.c"
+ default:
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+#line 2048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ break;
+#line 11201 "ui.c"
+ }
+}
+
+
+gchar* get_temporary_filename (const gchar* prefix, const gchar* extension) {
+ gchar* result = NULL;
+ gchar* filename = NULL;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* path = NULL;
+ GError * _inner_error_ = NULL;
+#line 2093 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (prefix != NULL, NULL);
+#line 2093 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (extension != NULL, NULL);
+#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = prefix;
+#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = extension;
+#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = g_strdup_printf ("%sXXXXXX.%s", _tmp0_, _tmp1_);
+#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ filename = _tmp2_;
+#line 11226 "ui.c"
+ {
+ gint fd = 0;
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+#line 2102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = filename;
+#line 2102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = g_file_open_tmp (_tmp3_, &_tmp4_, &_inner_error_);
+#line 2102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 2102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ path = _tmp4_;
+#line 2102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ fd = _tmp5_;
+#line 2102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 11245 "ui.c"
+ goto __catch26_g_error;
+ }
+#line 2103 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = fd;
+#line 2103 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ close (_tmp6_);
+#line 11252 "ui.c"
+ }
+ goto __finally26;
+ __catch26_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+#line 2100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ e = _inner_error_;
+#line 2100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _inner_error_ = NULL;
+#line 2107 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = e;
+#line 2107 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = _tmp7_->message;
+#line 2107 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_warning ("ui.vala:2107: Error saving email attachment: %s", _tmp8_);
+#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = NULL;
+#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_error_free0 (e);
+#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (filename);
+#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 11280 "ui.c"
+ }
+ __finally26:
+#line 2100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (_inner_error_ != NULL) {
+#line 2100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (path);
+#line 2100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (filename);
+#line 2100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 2100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_clear_error (&_inner_error_);
+#line 2100 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return NULL;
+#line 11295 "ui.c"
+ }
+#line 2111 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = path;
+#line 2111 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (filename);
+#line 2111 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 11303 "ui.c"
+}
+
+
+PageIcon* page_icon_construct (GType object_type, const gchar* text, gdouble r, gdouble g, gdouble b) {
+ PageIcon * self = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gdouble _tmp2_ = 0.0;
+ gdouble _tmp3_ = 0.0;
+ gdouble _tmp4_ = 0.0;
+#line 2122 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (text != NULL, NULL);
+#line 2122 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = (PageIcon*) g_object_new (object_type, NULL);
+#line 2124 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = text;
+#line 2124 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = g_strdup (_tmp0_);
+#line 2124 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->text);
+#line 2124 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->text = _tmp1_;
+#line 2125 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = r;
+#line 2125 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->r = _tmp2_;
+#line 2126 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = g;
+#line 2126 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->g = _tmp3_;
+#line 2127 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = b;
+#line 2127 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv->b = _tmp4_;
+#line 2122 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return self;
+#line 11340 "ui.c"
+}
+
+
+PageIcon* page_icon_new (const gchar* text, gdouble r, gdouble g, gdouble b) {
+#line 2122 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return page_icon_construct (TYPE_PAGE_ICON, text, r, g, b);
+#line 11347 "ui.c"
+}
+
+
+static void page_icon_real_get_preferred_width (GtkWidget* base, gint* minimum_width, gint* natural_width) {
+ PageIcon * self;
+ gint _vala_minimum_width = 0;
+ gint _vala_natural_width = 0;
+#line 2130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = (PageIcon*) base;
+#line 2132 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_natural_width = PAGE_ICON_MINIMUM_WIDTH;
+#line 2132 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_minimum_width = _vala_natural_width;
+#line 2130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (minimum_width) {
+#line 2130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *minimum_width = _vala_minimum_width;
+#line 11365 "ui.c"
+ }
+#line 2130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (natural_width) {
+#line 2130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *natural_width = _vala_natural_width;
+#line 11371 "ui.c"
+ }
+}
+
+
+static void page_icon_real_get_preferred_height (GtkWidget* base, gint* minimum_height, gint* natural_height) {
+ PageIcon * self;
+ gint _vala_minimum_height = 0;
+ gint _vala_natural_height = 0;
+ gdouble _tmp0_ = 0.0;
+#line 2135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = (PageIcon*) base;
+#line 2137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = round (PAGE_ICON_MINIMUM_WIDTH * G_SQRT2);
+#line 2137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_natural_height = (gint) _tmp0_;
+#line 2137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_minimum_height = _vala_natural_height;
+#line 2135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (minimum_height) {
+#line 2135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *minimum_height = _vala_minimum_height;
+#line 11393 "ui.c"
+ }
+#line 2135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (natural_height) {
+#line 2135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *natural_height = _vala_natural_height;
+#line 11399 "ui.c"
+ }
+}
+
+
+static void page_icon_real_get_preferred_height_for_width (GtkWidget* base, gint width, gint* minimum_height, gint* natural_height) {
+ PageIcon * self;
+ gint _vala_minimum_height = 0;
+ gint _vala_natural_height = 0;
+ gint _tmp0_ = 0;
+#line 2140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = (PageIcon*) base;
+#line 2142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = width;
+#line 2142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_natural_height = (gint) (_tmp0_ * G_SQRT2);
+#line 2142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_minimum_height = _vala_natural_height;
+#line 2140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (minimum_height) {
+#line 2140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *minimum_height = _vala_minimum_height;
+#line 11421 "ui.c"
+ }
+#line 2140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (natural_height) {
+#line 2140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *natural_height = _vala_natural_height;
+#line 11427 "ui.c"
+ }
+}
+
+
+static void page_icon_real_get_preferred_width_for_height (GtkWidget* base, gint height, gint* minimum_width, gint* natural_width) {
+ PageIcon * self;
+ gint _vala_minimum_width = 0;
+ gint _vala_natural_width = 0;
+ gint _tmp0_ = 0;
+#line 2145 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = (PageIcon*) base;
+#line 2147 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = height;
+#line 2147 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_natural_width = (gint) (_tmp0_ / G_SQRT2);
+#line 2147 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _vala_minimum_width = _vala_natural_width;
+#line 2145 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (minimum_width) {
+#line 2145 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *minimum_width = _vala_minimum_width;
+#line 11449 "ui.c"
+ }
+#line 2145 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if (natural_width) {
+#line 2145 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ *natural_width = _vala_natural_width;
+#line 11455 "ui.c"
+ }
+}
+
+
+static gboolean page_icon_real_draw (GtkWidget* base, cairo_t* c) {
+ PageIcon * self;
+ gboolean result = FALSE;
+ gint w = 0;
+ gint _tmp0_ = 0;
+ gint h = 0;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
+ cairo_t* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ cairo_t* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ cairo_t* _tmp16_ = NULL;
+ gdouble _tmp17_ = 0.0;
+ gdouble _tmp18_ = 0.0;
+ gdouble _tmp19_ = 0.0;
+ cairo_t* _tmp20_ = NULL;
+ cairo_t* _tmp21_ = NULL;
+ cairo_t* _tmp22_ = NULL;
+ cairo_t* _tmp23_ = NULL;
+ cairo_text_extents_t extents = {0};
+ cairo_t* _tmp24_ = NULL;
+ const gchar* _tmp25_ = NULL;
+ cairo_text_extents_t _tmp26_ = {0};
+ cairo_t* _tmp27_ = NULL;
+ gint _tmp28_ = 0;
+ cairo_text_extents_t _tmp29_ = {0};
+ gdouble _tmp30_ = 0.0;
+ gint _tmp31_ = 0;
+ cairo_text_extents_t _tmp32_ = {0};
+ gdouble _tmp33_ = 0.0;
+ cairo_t* _tmp34_ = NULL;
+ const gchar* _tmp35_ = NULL;
+#line 2150 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = (PageIcon*) base;
+#line 2150 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_return_val_if_fail (c != NULL, FALSE);
+#line 2152 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp0_ = gtk_widget_get_allocated_width ((GtkWidget*) self);
+#line 2152 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ w = _tmp0_;
+#line 2153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp1_ = gtk_widget_get_allocated_height ((GtkWidget*) self);
+#line 2153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ h = _tmp1_;
+#line 2154 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp2_ = w;
+#line 2154 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp3_ = h;
+#line 2154 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ if ((_tmp2_ * G_SQRT2) > ((gdouble) _tmp3_)) {
+#line 11516 "ui.c"
+ gint _tmp4_ = 0;
+ gdouble _tmp5_ = 0.0;
+#line 2155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp4_ = h;
+#line 2155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp5_ = round (_tmp4_ / G_SQRT2);
+#line 2155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ w = (gint) _tmp5_;
+#line 11525 "ui.c"
+ } else {
+ gint _tmp6_ = 0;
+ gdouble _tmp7_ = 0.0;
+#line 2157 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp6_ = w;
+#line 2157 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp7_ = round (_tmp6_ * G_SQRT2);
+#line 2157 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ h = (gint) _tmp7_;
+#line 11535 "ui.c"
+ }
+#line 2159 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp8_ = c;
+#line 2159 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp9_ = gtk_widget_get_allocated_width ((GtkWidget*) self);
+#line 2159 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp10_ = w;
+#line 2159 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp11_ = gtk_widget_get_allocated_height ((GtkWidget*) self);
+#line 2159 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp12_ = h;
+#line 2159 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_translate (_tmp8_, (gdouble) ((_tmp9_ - _tmp10_) / 2), (gdouble) ((_tmp11_ - _tmp12_) / 2));
+#line 2161 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp13_ = c;
+#line 2161 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp14_ = w;
+#line 2161 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp15_ = h;
+#line 2161 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_rectangle (_tmp13_, 0.5, 0.5, (gdouble) (_tmp14_ - 1), (gdouble) (_tmp15_ - 1));
+#line 2163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp16_ = c;
+#line 2163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp17_ = self->priv->r;
+#line 2163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp18_ = self->priv->g;
+#line 2163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp19_ = self->priv->b;
+#line 2163 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_set_source_rgb (_tmp16_, _tmp17_, _tmp18_, _tmp19_);
+#line 2164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp20_ = c;
+#line 2164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_fill_preserve (_tmp20_);
+#line 2166 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp21_ = c;
+#line 2166 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_set_line_width (_tmp21_, 1.0);
+#line 2167 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp22_ = c;
+#line 2167 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_set_source_rgb (_tmp22_, 0.0, 0.0, 0.0);
+#line 2168 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp23_ = c;
+#line 2168 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_stroke (_tmp23_);
+#line 2171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp24_ = c;
+#line 2171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp25_ = self->priv->text;
+#line 2171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_text_extents (_tmp24_, _tmp25_, &_tmp26_);
+#line 2171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ extents = _tmp26_;
+#line 2172 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp27_ = c;
+#line 2172 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp28_ = w;
+#line 2172 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp29_ = extents;
+#line 2172 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp30_ = _tmp29_.width;
+#line 2172 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp31_ = h;
+#line 2172 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp32_ = extents;
+#line 2172 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp33_ = _tmp32_.height;
+#line 2172 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_translate (_tmp27_, ((_tmp28_ - _tmp30_) * 0.5) - 0.5, ((_tmp31_ + _tmp33_) * 0.5) - 0.5);
+#line 2173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp34_ = c;
+#line 2173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _tmp35_ = self->priv->text;
+#line 2173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ cairo_show_text (_tmp34_, _tmp35_);
+#line 2175 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ result = TRUE;
+#line 2175 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ return result;
+#line 11617 "ui.c"
+}
+
+
+static void page_icon_class_init (PageIconClass * klass) {
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ page_icon_parent_class = g_type_class_peek_parent (klass);
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ g_type_class_add_private (klass, sizeof (PageIconPrivate));
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ GTK_WIDGET_CLASS (klass)->get_preferred_width = page_icon_real_get_preferred_width;
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ GTK_WIDGET_CLASS (klass)->get_preferred_height = page_icon_real_get_preferred_height;
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ GTK_WIDGET_CLASS (klass)->get_preferred_height_for_width = page_icon_real_get_preferred_height_for_width;
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ GTK_WIDGET_CLASS (klass)->get_preferred_width_for_height = page_icon_real_get_preferred_width_for_height;
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ GTK_WIDGET_CLASS (klass)->draw = page_icon_real_draw;
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (klass)->finalize = page_icon_finalize;
+#line 11638 "ui.c"
+}
+
+
+static void page_icon_instance_init (PageIcon * self) {
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self->priv = PAGE_ICON_GET_PRIVATE (self);
+#line 11645 "ui.c"
+}
+
+
+static void page_icon_finalize (GObject* obj) {
+ PageIcon * self;
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PAGE_ICON, PageIcon);
+#line 2116 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ _g_free0 (self->priv->text);
+#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala"
+ G_OBJECT_CLASS (page_icon_parent_class)->finalize (obj);
+#line 11657 "ui.c"
+}
+
+
+GType page_icon_get_type (void) {
+ static volatile gsize page_icon_type_id__volatile = 0;
+ if (g_once_init_enter (&page_icon_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (PageIconClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) page_icon_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PageIcon), 0, (GInstanceInitFunc) page_icon_instance_init, NULL };
+ GType page_icon_type_id;
+ page_icon_type_id = g_type_register_static (GTK_TYPE_DRAWING_AREA, "PageIcon", &g_define_type_info, 0);
+ g_once_init_leave (&page_icon_type_id__volatile, page_icon_type_id);
+ }
+ return page_icon_type_id__volatile;
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+
diff --git a/src/ui.vala b/src/ui.vala
new file mode 100644
index 0000000..2117a9a
--- /dev/null
+++ b/src/ui.vala
@@ -0,0 +1,2177 @@
+/*
+ * Copyright (C) 2009-2011 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>,
+ * Eduard Gotwig <g@ox.io>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+[GtkTemplate (ui = "/org/gnome/SimpleScan/simple-scan.ui")]
+public class UserInterface : Gtk.ApplicationWindow
+{
+ private const int DEFAULT_TEXT_DPI = 150;
+ private const int DEFAULT_PHOTO_DPI = 300;
+
+ private const GLib.ActionEntry[] action_entries =
+ {
+ { "new_document", new_document_activate_cb },
+ { "reorder", reorder_document_activate_cb },
+ { "save", save_document_activate_cb },
+ { "save_as", save_as_document_activate_cb },
+ { "email", email_document_activate_cb },
+ { "print", print_document_activate_cb },
+ { "preferences", preferences_activate_cb },
+ { "help", help_contents_activate_cb },
+ { "about", about_activate_cb },
+ { "quit", quit_activate_cb }
+ };
+
+ private Settings settings;
+
+ [GtkChild]
+ private Gtk.MenuBar menubar;
+ [GtkChild]
+ private Gtk.Toolbar toolbar;
+ [GtkChild]
+ private Gtk.Menu page_menu;
+ [GtkChild]
+ private Gtk.Box main_vbox;
+ private Gtk.InfoBar info_bar;
+ private Gtk.Image info_bar_image;
+ private Gtk.Label info_bar_label;
+ private Gtk.Button info_bar_close_button;
+ private Gtk.Button info_bar_change_scanner_button;
+ [GtkChild]
+ private Gtk.RadioMenuItem custom_crop_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem a4_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem a5_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem a6_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem letter_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem legal_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem four_by_six_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem no_crop_menuitem;
+ [GtkChild]
+ private Gtk.MenuItem page_move_left_menuitem;
+ [GtkChild]
+ private Gtk.MenuItem page_move_right_menuitem;
+ [GtkChild]
+ private Gtk.MenuItem page_delete_menuitem;
+ [GtkChild]
+ private Gtk.MenuItem crop_rotate_menuitem;
+ [GtkChild]
+ private Gtk.MenuItem save_menuitem;
+ [GtkChild]
+ private Gtk.MenuItem save_as_menuitem;
+ [GtkChild]
+ private Gtk.MenuItem copy_to_clipboard_menuitem;
+ [GtkChild]
+ private Gtk.Button save_button;
+ [GtkChild]
+ private Gtk.ToolButton save_toolbutton;
+ [GtkChild]
+ private Gtk.MenuItem stop_scan_menuitem;
+ [GtkChild]
+ private Gtk.ToolButton stop_toolbutton;
+ [GtkChild]
+ private Gtk.ToggleButton crop_button;
+ [GtkChild]
+ private Gtk.ToggleToolButton crop_toolbutton;
+ [GtkChild]
+ private Gtk.Button stop_button;
+ [GtkChild]
+ private Gtk.Button scan_button;
+
+ [GtkChild]
+ private Gtk.RadioMenuItem text_button_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem text_button_hb_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem text_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem photo_button_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem photo_button_hb_menuitem;
+ [GtkChild]
+ private Gtk.RadioMenuItem photo_menuitem;
+
+ [GtkChild]
+ private Gtk.Dialog authorize_dialog;
+ [GtkChild]
+ private Gtk.Label authorize_label;
+ [GtkChild]
+ private Gtk.Entry username_entry;
+ [GtkChild]
+ private Gtk.Entry password_entry;
+
+ [GtkChild]
+ private Gtk.Dialog preferences_dialog;
+ [GtkChild]
+ private Gtk.ComboBox device_combo;
+ [GtkChild]
+ private Gtk.ComboBox text_dpi_combo;
+ [GtkChild]
+ private Gtk.ComboBox photo_dpi_combo;
+ [GtkChild]
+ private Gtk.ComboBox page_side_combo;
+ [GtkChild]
+ private Gtk.ComboBox paper_size_combo;
+ [GtkChild]
+ private Gtk.Scale brightness_scale;
+ [GtkChild]
+ private Gtk.Scale contrast_scale;
+ [GtkChild]
+ private Gtk.Scale quality_scale;
+ [GtkChild]
+ private Gtk.ListStore device_model;
+ [GtkChild]
+ private Gtk.ListStore text_dpi_model;
+ [GtkChild]
+ private Gtk.ListStore photo_dpi_model;
+ [GtkChild]
+ private Gtk.ListStore page_side_model;
+ [GtkChild]
+ private Gtk.ListStore paper_size_model;
+ [GtkChild]
+ private Gtk.Adjustment brightness_adjustment;
+ [GtkChild]
+ private Gtk.Adjustment contrast_adjustment;
+ [GtkChild]
+ private Gtk.Adjustment quality_adjustment;
+ private bool setting_devices;
+ private bool user_selected_device;
+
+ private Gtk.FileChooserDialog? save_dialog;
+ private ProgressBarDialog progress_dialog;
+
+ private bool have_error;
+ private string error_title;
+ private string error_text;
+ private bool error_change_scanner_hint;
+
+ public Book book { get; private set; }
+ private string? book_uri = null;
+
+ public Page selected_page
+ {
+ get
+ {
+ return book_view.selected_page;
+ }
+ set
+ {
+ book_view.selected_page = value;
+ }
+ }
+
+ private AutosaveManager autosave_manager;
+
+ private BookView book_view;
+ private bool updating_page_menu;
+ private int default_page_width;
+ private int default_page_height;
+ private int default_page_dpi;
+ private ScanDirection default_page_scan_direction;
+
+ private string document_hint = "photo";
+
+ public string default_file_name { get; set; default = _("Scanned Document.pdf"); }
+ private bool scanning_ = false;
+ public bool scanning
+ {
+ get { return scanning_; }
+ set
+ {
+ scanning_ = value;
+ page_delete_menuitem.sensitive = !value;
+ stop_scan_menuitem.sensitive = value;
+ stop_toolbutton.sensitive = value;
+ scan_button.visible = !value;
+ stop_button.visible = value;
+ }
+ }
+
+ private int window_width;
+ private int window_height;
+ private bool window_is_maximized;
+
+ private uint save_state_timeout;
+
+ public int brightness
+ {
+ get { return (int) brightness_adjustment.value; }
+ set { brightness_adjustment.value = value; }
+ }
+
+ public int contrast
+ {
+ get { return (int) contrast_adjustment.value; }
+ set { contrast_adjustment.value = value; }
+ }
+
+ public int quality
+ {
+ get { return (int) quality_adjustment.value; }
+ set { quality_adjustment.value = value; }
+ }
+
+ public string? selected_device
+ {
+ owned get
+ {
+ Gtk.TreeIter iter;
+
+ if (device_combo.get_active_iter (out iter))
+ {
+ string device;
+ device_model.get (iter, 0, out device, -1);
+ return device;
+ }
+
+ return null;
+ }
+
+ set
+ {
+ Gtk.TreeIter iter;
+ if (!find_scan_device (value, out iter))
+ return;
+
+ device_combo.set_active_iter (iter);
+ user_selected_device = true;
+ }
+ }
+
+ public signal void start_scan (string? device, ScanOptions options);
+ public signal void stop_scan ();
+ public signal void email (string profile, int quality);
+
+ public UserInterface ()
+ {
+ settings = new Settings ("org.gnome.SimpleScan");
+
+ book = new Book ();
+ book.page_added.connect (page_added_cb);
+ book.reordered.connect (reordered_cb);
+ book.page_removed.connect (page_removed_cb);
+
+ load ();
+
+ autosave_manager = new AutosaveManager ();
+ autosave_manager.book = book;
+ autosave_manager.load ();
+
+ if (book.n_pages == 0)
+ {
+ add_default_page ();
+ book.needs_saving = false;
+ }
+ else
+ book_view.selected_page = book.get_page (0);
+ book.needs_saving_changed.connect (needs_saving_cb);
+ }
+
+ ~UserInterface ()
+ {
+ book.page_added.disconnect (page_added_cb);
+ book.reordered.disconnect (reordered_cb);
+ book.page_removed.disconnect (page_removed_cb);
+ }
+
+ private bool find_scan_device (string device, out Gtk.TreeIter iter)
+ {
+ bool have_iter = false;
+
+ if (device_model.get_iter_first (out iter))
+ {
+ do
+ {
+ string d;
+ device_model.get (iter, 0, out d, -1);
+ if (d == device)
+ have_iter = true;
+ } while (!have_iter && device_model.iter_next (ref iter));
+ }
+
+ return have_iter;
+ }
+
+ private void show_error_dialog (string error_title, string error_text)
+ {
+ var dialog = new Gtk.MessageDialog (this,
+ Gtk.DialogFlags.MODAL,
+ Gtk.MessageType.WARNING,
+ Gtk.ButtonsType.NONE,
+ "%s", error_title);
+ dialog.add_button (_("_Close"), 0);
+ dialog.format_secondary_text ("%s", error_text);
+ dialog.destroy ();
+ }
+
+ public void authorize (string resource, out string username, out string password)
+ {
+ /* Label in authorization dialog. '%s' is replaced with the name of the resource requesting authorization */
+ var description = _("Username and password required to access '%s'").printf (resource);
+
+ username_entry.text = "";
+ password_entry.text = "";
+ authorize_label.set_text (description);
+
+ authorize_dialog.visible = true;
+ authorize_dialog.run ();
+ authorize_dialog.visible = false;
+
+ username = username_entry.text;
+ password = password_entry.text;
+ }
+
+ [GtkCallback]
+ private void device_combo_changed_cb (Gtk.Widget widget)
+ {
+ if (setting_devices)
+ return;
+ user_selected_device = true;
+ if (selected_device != null)
+ settings.set_string ("selected-device", selected_device);
+ }
+
+ private void update_info_bar ()
+ {
+ Gtk.MessageType type;
+ string title, text, image_id;
+ bool show_close_button = false;
+ bool show_change_scanner_button = false;
+
+ if (have_error)
+ {
+ type = Gtk.MessageType.ERROR;
+ image_id = "dialog-error";
+ title = error_title;
+ text = error_text;
+ show_close_button = true;
+ show_change_scanner_button = error_change_scanner_hint;
+ }
+ else if (device_model.iter_n_children (null) == 0)
+ {
+ type = Gtk.MessageType.WARNING;
+ image_id = "dialog-warning";
+ /* Warning displayed when no scanners are detected */
+ title = _("No scanners detected");
+ /* Hint to user on why there are no scanners detected */
+ text = _("Please check your scanner is connected and powered on");
+ }
+ else
+ {
+ info_bar.visible = false;
+ return;
+ }
+
+ info_bar.message_type = type;
+ info_bar_image.set_from_icon_name (image_id, Gtk.IconSize.DIALOG);
+ var message = "<big><b>%s</b></big>\n\n%s".printf (title, text);
+ info_bar_label.set_markup (message);
+ info_bar_close_button.visible = show_close_button;
+ info_bar_change_scanner_button.visible = show_change_scanner_button;
+ info_bar.visible = true;
+ }
+
+ public void set_scan_devices (List<ScanDevice> devices)
+ {
+ bool have_selection = false;
+ int index;
+ Gtk.TreeIter iter;
+
+ setting_devices = true;
+
+ /* If the user hasn't chosen a scanner choose the best available one */
+ if (user_selected_device)
+ have_selection = device_combo.active >= 0;
+
+ /* Add new devices */
+ index = 0;
+ foreach (var device in devices)
+ {
+ int n_delete = -1;
+
+ /* Find if already exists */
+ if (device_model.iter_nth_child (out iter, null, index))
+ {
+ int i = 0;
+ do
+ {
+ string name;
+ bool matched;
+
+ device_model.get (iter, 0, out name, -1);
+ matched = name == device.name;
+
+ if (matched)
+ {
+ n_delete = i;
+ break;
+ }
+ i++;
+ } while (device_model.iter_next (ref iter));
+ }
+
+ /* If exists, remove elements up to this one */
+ if (n_delete >= 0)
+ {
+ int i;
+
+ /* Update label */
+ device_model.set (iter, 1, device.label, -1);
+
+ for (i = 0; i < n_delete; i++)
+ {
+ device_model.iter_nth_child (out iter, null, index);
+ device_model.remove (iter);
+ }
+ }
+ else
+ {
+ device_model.insert (out iter, index);
+ device_model.set (iter, 0, device.name, 1, device.label, -1);
+ }
+ index++;
+ }
+
+ /* Remove any remaining devices */
+ while (device_model.iter_nth_child (out iter, null, index))
+ device_model.remove (iter);
+
+ /* Select the first available device */
+ if (!have_selection && devices != null)
+ device_combo.set_active (0);
+
+ setting_devices = false;
+
+ update_info_bar ();
+ }
+
+ private void add_default_page ()
+ {
+ var page = new Page (default_page_width,
+ default_page_height,
+ default_page_dpi,
+ default_page_scan_direction);
+ book.append_page (page);
+ book_view.selected_page = page;
+ }
+
+ private void on_file_type_changed (Gtk.TreeSelection selection)
+ {
+ var extension = get_selected_extension (selection);
+ var path = save_dialog.get_filename ();
+ var filename = Path.get_basename (path);
+
+ /* Replace extension */
+ var extension_index = filename.last_index_of_char ('.');
+ if (extension_index >= 0)
+ filename = filename.slice (0, extension_index);
+ filename = filename + extension;
+ save_dialog.set_current_name (filename);
+ }
+
+ private string get_selected_extension (Gtk.TreeSelection selection)
+ {
+ Gtk.TreeModel model;
+ Gtk.TreeIter iter;
+ string extension = "";
+
+ if (selection.get_selected (out model, out iter))
+ model.get (iter, 1, out extension, -1);
+ return extension;
+ }
+
+ private string choose_file_location ()
+ {
+ /* Get directory to save to */
+ string? directory = null;
+ directory = settings.get_string ("save-directory");
+
+ if (directory == null || directory == "")
+ directory = Environment.get_user_special_dir (UserDirectory.DOCUMENTS);
+
+ save_dialog = new Gtk.FileChooserDialog (/* Save dialog: Dialog title */
+ _("Save As..."),
+ this,
+ Gtk.FileChooserAction.SAVE,
+ _("_Cancel"), Gtk.ResponseType.CANCEL,
+ _("_Save"), Gtk.ResponseType.ACCEPT,
+ null);
+ save_dialog.do_overwrite_confirmation = true;
+ save_dialog.local_only = false;
+ save_dialog.set_current_folder (directory);
+ save_dialog.set_current_name (default_file_name);
+
+ /* Filter to only show images by default */
+ var filter = new Gtk.FileFilter ();
+ filter.set_filter_name (/* Save dialog: Filter name to show only image files */
+ _("Image Files"));
+ filter.add_pixbuf_formats ();
+ filter.add_mime_type ("application/pdf");
+ save_dialog.add_filter (filter);
+ filter = new Gtk.FileFilter ();
+ filter.set_filter_name (/* Save dialog: Filter name to show all files */
+ _("All Files"));
+ filter.add_pattern ("*");
+ save_dialog.add_filter (filter);
+
+ var expander = new Gtk.Expander.with_mnemonic (/* */
+ _("Select File _Type"));
+ expander.spacing = 5;
+ save_dialog.set_extra_widget (expander);
+
+ string default_extension = "";
+ var index = default_file_name.last_index_of_char ('.');
+ if (index >= 0)
+ default_extension = default_file_name.substring (index);
+
+ var file_type_store = new Gtk.ListStore (2, typeof (string), typeof (string));
+ Gtk.TreeIter iter;
+ file_type_store.append (out iter);
+ file_type_store.set (iter,
+ /* Save dialog: Label for saving in PDF format */
+ 0, _("PDF (multi-page document)"),
+ 1, ".pdf",
+ -1);
+ file_type_store.append (out iter);
+ file_type_store.set (iter,
+ /* Save dialog: Label for saving in JPEG format */
+ 0, _("JPEG (compressed)"),
+ 1, ".jpg",
+ -1);
+ file_type_store.append (out iter);
+ file_type_store.set (iter,
+ /* Save dialog: Label for saving in PNG format */
+ 0, _("PNG (lossless)"),
+ 1, ".png",
+ -1);
+
+ var file_type_view = new Gtk.TreeView.with_model (file_type_store);
+ file_type_view.headers_visible = false;
+ file_type_view.rules_hint = true;
+ var column = new Gtk.TreeViewColumn.with_attributes ("",
+ new Gtk.CellRendererText (),
+ "text", 0, null);
+ file_type_view.append_column (column);
+ expander.add (file_type_view);
+
+ if (file_type_store.get_iter_first (out iter))
+ {
+ do
+ {
+ string e;
+ file_type_store.get (iter, 1, out e, -1);
+ if (default_extension == e)
+ file_type_view.get_selection ().select_iter (iter);
+ } while (file_type_store.iter_next (ref iter));
+ }
+ file_type_view.get_selection ().changed.connect (on_file_type_changed);
+
+ expander.show_all ();
+
+ var response = save_dialog.run ();
+
+ string? uri = null;
+ if (response == Gtk.ResponseType.ACCEPT)
+ {
+ var selection = file_type_view.get_selection ();
+ var extension = get_selected_extension (selection);
+
+ var path = save_dialog.get_filename ();
+ var filename = Path.get_basename (path);
+
+ var extension_index = filename.last_index_of_char ('.');
+ if (extension_index < 0)
+ path += extension;
+
+ uri = File.new_for_path (path).get_uri ();
+ }
+
+ settings.set_string ("save-directory", save_dialog.get_current_folder ());
+
+ file_type_view.get_selection ().changed.disconnect (on_file_type_changed);
+ save_dialog.destroy ();
+ save_dialog = null;
+
+ return uri;
+ }
+
+ private bool save_document (bool force_choose_location)
+ {
+ string? uri;
+ if (book_uri != null && !force_choose_location)
+ uri = book_uri;
+ else
+ uri = choose_file_location ();
+ if (uri == null)
+ return false;
+
+ var file = File.new_for_uri (uri);
+
+ debug ("Saving to '%s'", uri);
+
+ var uri_lower = uri.down ();
+ string format = "jpeg";
+ if (uri_lower.has_suffix (".pdf"))
+ format = "pdf";
+ else if (uri_lower.has_suffix (".ps"))
+ format = "ps";
+ else if (uri_lower.has_suffix (".png"))
+ format = "png";
+ else if (uri_lower.has_suffix (".tif") || uri_lower.has_suffix (".tiff"))
+ format = "tiff";
+
+ show_progress_dialog ();
+ try
+ {
+ book.save (format, quality, file);
+ }
+ catch (Error e)
+ {
+ hide_progress_dialog ();
+ warning ("Error saving file: %s", e.message);
+ show_error (/* Title of error dialog when save failed */
+ _("Failed to save file"),
+ e.message,
+ false);
+ return false;
+ }
+
+ book_uri = uri;
+ book.needs_saving = false;
+ return true;
+ }
+
+ private bool prompt_to_save (string title, string discard_label)
+ {
+ if (!book.needs_saving)
+ return true;
+
+ var dialog = new Gtk.MessageDialog (this,
+ Gtk.DialogFlags.MODAL,
+ Gtk.MessageType.WARNING,
+ Gtk.ButtonsType.NONE,
+ "%s", title);
+ dialog.format_secondary_text ("%s",
+ /* Text in dialog warning when a document is about to be lost*/
+ _("If you don't save, changes will be permanently lost."));
+ dialog.add_button (discard_label, Gtk.ResponseType.NO);
+ dialog.add_button (_("_Cancel"), Gtk.ResponseType.CANCEL);
+ dialog.add_button (_("_Save"), Gtk.ResponseType.YES);
+
+ var response = dialog.run ();
+ dialog.destroy ();
+
+ switch (response)
+ {
+ case Gtk.ResponseType.YES:
+ if (save_document (false))
+ return true;
+ else
+ return false;
+ case Gtk.ResponseType.CANCEL:
+ return false;
+ case Gtk.ResponseType.NO:
+ default:
+ return true;
+ }
+ }
+
+ private void clear_document ()
+ {
+ book.clear ();
+ add_default_page ();
+ book_uri = null;
+ book.needs_saving = false;
+ save_as_menuitem.sensitive = false;
+ copy_to_clipboard_menuitem.sensitive = false;
+ }
+
+ private void new_document ()
+ {
+ if (!prompt_to_save (/* Text in dialog warning when a document is about to be lost */
+ _("Save current document?"),
+ /* Button in dialog to create new document and discard unsaved document */
+ _("Discard Changes")))
+ return;
+
+ if (scanning)
+ stop_scan ();
+ clear_document ();
+ }
+
+ [GtkCallback]
+ private void new_button_clicked_cb (Gtk.Widget widget)
+ {
+ new_document();
+ }
+
+ public void new_document_activate_cb ()
+ {
+ new_document();
+ }
+
+ private void set_document_hint (string document_hint, bool save = false)
+ {
+ this.document_hint = document_hint;
+
+ if (document_hint == "text")
+ {
+ text_button_menuitem.active = true;
+ text_button_hb_menuitem.active = true;
+ text_menuitem.active = true;
+ }
+ else if (document_hint == "photo")
+ {
+ photo_button_menuitem.active = true;
+ photo_button_hb_menuitem.active = true;
+ photo_menuitem.active = true;
+ }
+
+ if (save)
+ settings.set_string ("document-type", document_hint);
+ }
+
+ [GtkCallback]
+ private void text_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_document_hint ("text", true);
+ }
+
+ [GtkCallback]
+ private void photo_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_document_hint ("photo", true);
+ }
+
+ private void set_page_side (ScanType page_side)
+ {
+ Gtk.TreeIter iter;
+
+ if (page_side_model.get_iter_first (out iter))
+ {
+ do
+ {
+ int s;
+ page_side_model.get (iter, 0, out s, -1);
+ if (s == page_side)
+ {
+ page_side_combo.set_active_iter (iter);
+ return;
+ }
+ } while (page_side_model.iter_next (ref iter));
+ }
+ }
+
+ private void set_paper_size (int width, int height)
+ {
+ Gtk.TreeIter iter;
+ bool have_iter;
+
+ for (have_iter = paper_size_model.get_iter_first (out iter);
+ have_iter;
+ have_iter = paper_size_model.iter_next (ref iter))
+ {
+ int w, h;
+ paper_size_model.get (iter, 0, out w, 1, out h, -1);
+ if (w == width && h == height)
+ break;
+ }
+
+ if (!have_iter)
+ have_iter = paper_size_model.get_iter_first (out iter);
+ if (have_iter)
+ paper_size_combo.set_active_iter (iter);
+ }
+
+ private int get_text_dpi ()
+ {
+ Gtk.TreeIter iter;
+ int dpi = DEFAULT_TEXT_DPI;
+
+ if (text_dpi_combo.get_active_iter (out iter))
+ text_dpi_model.get (iter, 0, out dpi, -1);
+
+ return dpi;
+ }
+
+ private int get_photo_dpi ()
+ {
+ Gtk.TreeIter iter;
+ int dpi = DEFAULT_PHOTO_DPI;
+
+ if (photo_dpi_combo.get_active_iter (out iter))
+ photo_dpi_model.get (iter, 0, out dpi, -1);
+
+ return dpi;
+ }
+
+ private ScanType get_page_side ()
+ {
+ Gtk.TreeIter iter;
+ int page_side = ScanType.ADF_BOTH;
+
+ if (page_side_combo.get_active_iter (out iter))
+ page_side_model.get (iter, 0, out page_side, -1);
+
+ return (ScanType) page_side;
+ }
+
+ private bool get_paper_size (out int width, out int height)
+ {
+ Gtk.TreeIter iter;
+
+ width = height = 0;
+ if (paper_size_combo.get_active_iter (out iter))
+ {
+ paper_size_model.get (iter, 0, ref width, 1, ref height, -1);
+ return true;
+ }
+
+ return false;
+ }
+
+ private ScanOptions make_scan_options ()
+ {
+ var options = new ScanOptions ();
+ if (document_hint == "text")
+ {
+ options.scan_mode = ScanMode.GRAY;
+ options.dpi = get_text_dpi ();
+ options.depth = 2;
+ }
+ else
+ {
+ options.scan_mode = ScanMode.COLOR;
+ options.dpi = get_photo_dpi ();
+ options.depth = 8;
+ }
+ get_paper_size (out options.paper_width, out options.paper_height);
+ options.brightness = brightness;
+ options.contrast = contrast;
+
+ return options;
+ }
+
+ [GtkCallback]
+ private void scan_button_clicked_cb (Gtk.Widget widget)
+ {
+ var options = make_scan_options ();
+ options.type = ScanType.SINGLE;
+ start_scan (selected_device, options);
+ }
+
+ [GtkCallback]
+ private void stop_scan_button_clicked_cb (Gtk.Widget widget)
+ {
+ stop_scan ();
+ }
+
+ [GtkCallback]
+ private void continuous_scan_button_clicked_cb (Gtk.Widget widget)
+ {
+ if (scanning)
+ stop_scan ();
+ else
+ {
+ var options = make_scan_options ();
+ options.type = get_page_side ();
+ start_scan (selected_device, options);
+ }
+ }
+
+ [GtkCallback]
+ private void preferences_button_clicked_cb (Gtk.Widget widget)
+ {
+ preferences_dialog.present ();
+ }
+
+ public void preferences_activate_cb ()
+ {
+ preferences_dialog.present ();
+ }
+
+ [GtkCallback]
+ private bool preferences_dialog_delete_event_cb (Gtk.Widget widget, Gdk.EventAny event)
+ {
+ return true;
+ }
+
+ [GtkCallback]
+ private void preferences_dialog_response_cb (Gtk.Widget widget, int response_id)
+ {
+ preferences_dialog.visible = false;
+ }
+
+ private void update_page_menu ()
+ {
+ var page = book_view.selected_page;
+ if (page == null)
+ {
+ page_move_left_menuitem.sensitive = false;
+ page_move_right_menuitem.sensitive = false;
+ }
+ else
+ {
+ var index = book.get_page_index (page);
+ page_move_left_menuitem.sensitive = index > 0;
+ page_move_right_menuitem.sensitive = index < book.n_pages - 1;
+ }
+ }
+
+ private void page_selected_cb (BookView view, Page? page)
+ {
+ if (page == null)
+ return;
+
+ updating_page_menu = true;
+
+ update_page_menu ();
+
+ var menuitem = no_crop_menuitem;
+ if (page.has_crop)
+ {
+ var crop_name = page.crop_name;
+ if (crop_name != null)
+ {
+ if (crop_name == "A4")
+ menuitem = a4_menuitem;
+ else if (crop_name == "A5")
+ menuitem = a5_menuitem;
+ else if (crop_name == "A6")
+ menuitem = a6_menuitem;
+ else if (crop_name == "letter")
+ menuitem = letter_menuitem;
+ else if (crop_name == "legal")
+ menuitem = legal_menuitem;
+ else if (crop_name == "4x6")
+ menuitem = four_by_six_menuitem;
+ }
+ else
+ menuitem = custom_crop_menuitem;
+ }
+
+ menuitem.active = true;
+ crop_button.active = page.has_crop;
+ crop_toolbutton.active = page.has_crop;
+
+ updating_page_menu = false;
+ }
+
+ private void show_page_cb (BookView view, Page page)
+ {
+ var path = get_temporary_filename ("scanned-page", "tiff");
+ if (path == null)
+ return;
+ var file = File.new_for_path (path);
+
+ try
+ {
+ page.save ("tiff", quality, file);
+ }
+ catch (Error e)
+ {
+ show_error_dialog (/* Error message display when unable to save image for preview */
+ _("Unable to save image for preview"),
+ e.message);
+ return;
+ }
+
+ try
+ {
+ Gtk.show_uri (screen, file.get_uri (), Gtk.get_current_event_time ());
+ }
+ catch (Error e)
+ {
+ show_error_dialog (/* Error message display when unable to preview image */
+ _("Unable to open image preview application"),
+ e.message);
+ }
+ }
+
+ private void show_page_menu_cb (BookView view)
+ {
+ page_menu.popup (null, null, null, 3, Gtk.get_current_event_time ());
+ }
+
+ [GtkCallback]
+ private void rotate_left_button_clicked_cb (Gtk.Widget widget)
+ {
+ if (updating_page_menu)
+ return;
+ var page = book_view.selected_page;
+ if (page != null)
+ page.rotate_left ();
+ }
+
+ [GtkCallback]
+ private void rotate_right_button_clicked_cb (Gtk.Widget widget)
+ {
+ if (updating_page_menu)
+ return;
+ var page = book_view.selected_page;
+ if (page != null)
+ page.rotate_right ();
+ }
+
+ private void set_crop (string? crop_name)
+ {
+ crop_rotate_menuitem.sensitive = crop_name != null;
+
+ if (updating_page_menu)
+ return;
+
+ var page = book_view.selected_page;
+ if (page == null)
+ {
+ warning ("Trying to set crop but no selected page");
+ return;
+ }
+
+ if (crop_name == null)
+ page.set_no_crop ();
+ else if (crop_name == "custom")
+ {
+ var width = page.width;
+ var height = page.height;
+ var crop_width = (int) (width * 0.8 + 0.5);
+ var crop_height = (int) (height * 0.8 + 0.5);
+ page.set_custom_crop (crop_width, crop_height);
+ page.move_crop ((width - crop_width) / 2, (height - crop_height) / 2);
+ }
+ else
+ page.set_named_crop (crop_name);
+ }
+
+ [GtkCallback]
+ private void no_crop_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_crop (null);
+ }
+
+ [GtkCallback]
+ private void custom_crop_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_crop ("custom");
+ }
+
+ [GtkCallback]
+ private void crop_button_toggled_cb (Gtk.ToggleButton widget)
+ {
+ if (updating_page_menu)
+ return;
+
+ if (widget.active)
+ custom_crop_menuitem.active = true;
+ else
+ no_crop_menuitem.active = true;
+ }
+
+ [GtkCallback]
+ private void crop_toolbutton_toggled_cb (Gtk.ToggleToolButton widget)
+ {
+ if (updating_page_menu)
+ return;
+
+ if (widget.active)
+ custom_crop_menuitem.active = true;
+ else
+ no_crop_menuitem.active = true;
+ }
+
+ [GtkCallback]
+ private void four_by_six_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_crop ("4x6");
+ }
+
+ [GtkCallback]
+ private void legal_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_crop ("legal");
+ }
+
+ [GtkCallback]
+ private void letter_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_crop ("letter");
+ }
+
+ [GtkCallback]
+ private void a6_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_crop ("A6");
+ }
+
+ [GtkCallback]
+ private void a5_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_crop ("A5");
+ }
+
+ [GtkCallback]
+ private void a4_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_crop ("A4");
+ }
+
+ [GtkCallback]
+ private void crop_rotate_menuitem_activate_cb (Gtk.Widget widget)
+ {
+ var page = book_view.selected_page;
+ if (page == null)
+ return;
+ page.rotate_crop ();
+ }
+
+ [GtkCallback]
+ private void page_move_left_menuitem_activate_cb (Gtk.Widget widget)
+ {
+ var page = book_view.selected_page;
+ var index = book.get_page_index (page);
+ if (index > 0)
+ book.move_page (page, index - 1);
+ }
+
+ [GtkCallback]
+ private void page_move_right_menuitem_activate_cb (Gtk.Widget widget)
+ {
+ var page = book_view.selected_page;
+ var index = book.get_page_index (page);
+ if (index < book.n_pages - 1)
+ book.move_page (page, book.get_page_index (page) + 1);
+ }
+
+ [GtkCallback]
+ private void page_delete_menuitem_activate_cb (Gtk.Widget widget)
+ {
+ book_view.book.delete_page (book_view.selected_page);
+ }
+
+ private void reorder_document ()
+ {
+ var dialog = new Gtk.Window ();
+ dialog.type_hint = Gdk.WindowTypeHint.DIALOG;
+ dialog.modal = true;
+ dialog.border_width = 12;
+ /* Title of dialog to reorder pages */
+ dialog.title = _("Reorder Pages");
+ dialog.set_transient_for (this);
+ dialog.key_press_event.connect ((e) =>
+ {
+ if (e.state == 0 && e.keyval == Gdk.Key.Escape)
+ {
+ dialog.destroy ();
+ return true;
+ }
+
+ return false;
+ });
+ dialog.visible = true;
+
+ var g = new Gtk.Grid ();
+ g.row_homogeneous = true;
+ g.row_spacing = 6;
+ g.column_homogeneous = true;
+ g.column_spacing = 6;
+ g.visible = true;
+ dialog.add (g);
+
+ /* Label on button for combining sides in reordering dialog */
+ var b = make_reorder_button (_("Combine sides"), "F1F2F3B1B2B3-F1B1F2B2F3B3");
+ b.clicked.connect (() =>
+ {
+ book.combine_sides ();
+ dialog.destroy ();
+ });
+ b.visible = true;
+ g.attach (b, 0, 0, 1, 1);
+
+ /* Label on button for combining sides in reverse order in reordering dialog */
+ b = make_reorder_button (_("Combine sides (reverse)"), "F1F2F3B3B2B1-F1B1F2B2F3B3");
+ b.clicked.connect (() =>
+ {
+ book.combine_sides_reverse ();
+ dialog.destroy ();
+ });
+ b.visible = true;
+ g.attach (b, 1, 0, 1, 1);
+
+ /* Label on button for reversing in reordering dialog */
+ b = make_reorder_button (_("Reverse"), "C1C2C3C4C5C6-C6C5C4C3C2C1");
+ b.clicked.connect (() =>
+ {
+ book.reverse ();
+ dialog.destroy ();
+ });
+ b.visible = true;
+ g.attach (b, 0, 2, 1, 1);
+
+ /* Label on button for cancelling page reordering dialog */
+ b = make_reorder_button (_("Keep unchanged"), "C1C2C3C4C5C6-C1C2C3C4C5C6");
+ b.clicked.connect (() =>
+ {
+ dialog.destroy ();
+ });
+ b.visible = true;
+ g.attach (b, 1, 2, 1, 1);
+
+ dialog.present ();
+ }
+
+ public void reorder_document_activate_cb ()
+ {
+ reorder_document ();
+ }
+
+ [GtkCallback]
+ private void reorder_menuitem_activate_cb (Gtk.Widget widget)
+ {
+ reorder_document ();
+ }
+
+ private Gtk.Button make_reorder_button (string text, string items)
+ {
+ var b = new Gtk.Button ();
+
+ var vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
+ vbox.visible = true;
+ b.add (vbox);
+
+ var label = new Gtk.Label (text);
+ label.visible = true;
+ vbox.pack_start (label, true, true, 0);
+
+ var rb = make_reorder_box (items);
+ rb.visible = true;
+ vbox.pack_start (rb, true, true, 0);
+
+ return b;
+ }
+
+ private Gtk.Box make_reorder_box (string items)
+ {
+ var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
+ box.visible = true;
+
+ Gtk.Box? page_box = null;
+ for (var i = 0; items[i] != '\0'; i++)
+ {
+ if (items[i] == '-')
+ {
+ var a = new Gtk.Arrow (Gtk.ArrowType.RIGHT, Gtk.ShadowType.NONE);
+ a.visible = true;
+ box.pack_start (a, false, false, 0);
+ page_box = null;
+ continue;
+ }
+
+ /* First character describes side */
+ var side = items[i];
+ i++;
+ if (items[i] == '\0')
+ break;
+
+ if (page_box == null)
+ {
+ page_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 3);
+ page_box.visible = true;
+ box.pack_start (page_box, false, false, 0);
+ }
+
+ /* Get colours for each page (from Tango palette) */
+ var r = 1.0;
+ var g = 1.0;
+ var b = 1.0;
+ switch (side)
+ {
+ case 'F':
+ /* Plum */
+ r = 0x75 / 255.0;
+ g = 0x50 / 255.0;
+ b = 0x7B / 255.0;
+ break;
+ case 'B':
+ /* Orange */
+ r = 0xF5 / 255.0;
+ g = 0x79 / 255.0;
+ b = 0.0;
+ break;
+ case 'C':
+ /* Butter to Scarlet Red */
+ var p = (items[i] - '1') / 5.0;
+ r = (0xED / 255.0) * (1 - p) + 0xCC * p;
+ g = (0xD4 / 255.0) * (1 - p);
+ b = 0;
+ break;
+ }
+
+ /* Mix with white to look more paper like */
+ r = r + (1.0 - r) * 0.7;
+ g = g + (1.0 - g) * 0.7;
+ b = b + (1.0 - b) * 0.7;
+
+ var icon = new PageIcon ("%c".printf (items[i]), r, g, b);
+ icon.visible = true;
+ page_box.pack_start (icon, false, false, 0);
+ }
+
+ return box;
+ }
+
+ [GtkCallback]
+ private void save_file_button_clicked_cb (Gtk.Widget widget)
+ {
+ save_document (false);
+ }
+
+ public void save_document_activate_cb ()
+ {
+ save_document (false);
+ }
+
+ [GtkCallback]
+ private void copy_to_clipboard_button_clicked_cb (Gtk.Widget widget)
+ {
+ var page = book_view.selected_page;
+ if (page != null)
+ page.copy_to_clipboard (this);
+ }
+
+ [GtkCallback]
+ private void save_as_file_button_clicked_cb (Gtk.Widget widget)
+ {
+ save_document (true);
+ }
+
+ public void save_as_document_activate_cb ()
+ {
+ save_document (true);
+ }
+
+ private void draw_page (Gtk.PrintOperation operation,
+ Gtk.PrintContext print_context,
+ int page_number)
+ {
+ var context = print_context.get_cairo_context ();
+ var page = book.get_page (page_number);
+
+ /* Rotate to same aspect */
+ bool is_landscape = false;
+ if (print_context.get_width () > print_context.get_height ())
+ is_landscape = true;
+ if (page.is_landscape != is_landscape)
+ {
+ context.translate (print_context.get_width (), 0);
+ context.rotate (Math.PI_2);
+ }
+
+ context.scale (print_context.get_dpi_x () / page.dpi,
+ print_context.get_dpi_y () / page.dpi);
+
+ var image = page.get_image (true);
+ Gdk.cairo_set_source_pixbuf (context, image, 0, 0);
+ context.paint ();
+ }
+
+ [GtkCallback]
+ private void email_button_clicked_cb (Gtk.Widget widget)
+ {
+ email (document_hint, quality);
+ }
+
+ public void email_document_activate_cb ()
+ {
+ email (document_hint, quality);
+ }
+
+ private void print_document ()
+ {
+ var print = new Gtk.PrintOperation ();
+ print.n_pages = (int) book.n_pages;
+ print.draw_page.connect (draw_page);
+
+ try
+ {
+ print.run (Gtk.PrintOperationAction.PRINT_DIALOG, this);
+ }
+ catch (Error e)
+ {
+ warning ("Error printing: %s", e.message);
+ }
+
+ print.draw_page.disconnect (draw_page);
+ }
+
+ [GtkCallback]
+ private void print_button_clicked_cb (Gtk.Widget widget)
+ {
+ print_document ();
+ }
+
+ public void print_document_activate_cb ()
+ {
+ print_document ();
+ }
+
+ private void launch_help ()
+ {
+ try
+ {
+ Gtk.show_uri (screen, "help:simple-scan", Gtk.get_current_event_time ());
+ }
+ catch (Error e)
+ {
+ show_error_dialog (/* Error message displayed when unable to launch help browser */
+ _("Unable to open help file"),
+ e.message);
+ }
+ }
+
+ [GtkCallback]
+ private void help_contents_menuitem_activate_cb (Gtk.Widget widget)
+ {
+ launch_help ();
+ }
+
+ public void help_contents_activate_cb ()
+ {
+ launch_help ();
+ }
+
+ private void show_about ()
+ {
+ string[] authors = { "Robert Ancell <robert.ancell@canonical.com>" };
+
+ /* The license this software is under (GPL3+) */
+ string license = _("This program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see <http://www.gnu.org/licenses/>.");
+
+ /* Title of about dialog */
+ string title = _("About Simple Scan");
+
+ /* Description of program */
+ string description = _("Simple document scanning tool");
+
+ Gtk.show_about_dialog (this,
+ "title", title,
+ "program-name", "Simple Scan",
+ "version", VERSION,
+ "comments", description,
+ "logo-icon-name", "scanner",
+ "authors", authors,
+ "translator-credits", _("translator-credits"),
+ "website", "https://launchpad.net/simple-scan",
+ "copyright", "Copyright © 2009-2011 Canonical Ltd.",
+ "license", license,
+ "wrap-license", true,
+ null);
+ }
+
+ [GtkCallback]
+ private void about_menuitem_activate_cb (Gtk.Widget widget)
+ {
+ show_about ();
+ }
+
+ public void about_activate_cb ()
+ {
+ show_about ();
+ }
+
+ private bool on_quit ()
+ {
+ if (!prompt_to_save (/* Text in dialog warning when a document is about to be lost */
+ _("Save document before quitting?"),
+ /* Button in dialog to quit and discard unsaved document */
+ _("Quit without Saving")))
+ return false;
+
+ destroy ();
+
+ if (save_state_timeout != 0)
+ save_state (true);
+
+ autosave_manager.cleanup ();
+
+ return true;
+ }
+
+ [GtkCallback]
+ private void quit_menuitem_activate_cb (Gtk.Widget widget)
+ {
+ on_quit ();
+ }
+
+ public void quit_activate_cb ()
+ {
+ on_quit ();
+ }
+
+ [GtkCallback]
+ private bool simple_scan_window_configure_event_cb (Gtk.Widget widget, Gdk.EventConfigure event)
+ {
+ if (!window_is_maximized)
+ {
+ window_width = event.width;
+ window_height = event.height;
+ save_state ();
+ }
+
+ return false;
+ }
+
+ private void info_bar_response_cb (Gtk.InfoBar widget, int response_id)
+ {
+ if (response_id == 1)
+ {
+ device_combo.grab_focus ();
+ preferences_dialog.present ();
+ }
+ else
+ {
+ have_error = false;
+ error_title = null;
+ error_text = null;
+ update_info_bar ();
+ }
+ }
+
+ [GtkCallback]
+ private bool simple_scan_window_window_state_event_cb (Gtk.Widget widget, Gdk.EventWindowState event)
+ {
+ if ((event.changed_mask & Gdk.WindowState.MAXIMIZED) != 0)
+ {
+ window_is_maximized = (event.new_window_state & Gdk.WindowState.MAXIMIZED) != 0;
+ save_state ();
+ }
+ return false;
+ }
+
+ [GtkCallback]
+ private bool window_delete_event_cb (Gtk.Widget widget, Gdk.EventAny event)
+ {
+ return !on_quit ();
+ }
+
+ private void page_size_changed_cb (Page page)
+ {
+ default_page_width = page.width;
+ default_page_height = page.height;
+ default_page_dpi = page.dpi;
+ save_state ();
+ }
+
+ private void page_scan_direction_changed_cb (Page page)
+ {
+ default_page_scan_direction = page.scan_direction;
+ save_state ();
+ }
+
+ private void page_added_cb (Book book, Page page)
+ {
+ page_size_changed_cb (page);
+ default_page_scan_direction = page.scan_direction;
+ page.size_changed.connect (page_size_changed_cb);
+ page.scan_direction_changed.connect (page_scan_direction_changed_cb);
+
+ update_page_menu ();
+ }
+
+ private void reordered_cb (Book book)
+ {
+ update_page_menu ();
+ }
+
+ private void page_removed_cb (Book book, Page page)
+ {
+ page.size_changed.disconnect (page_size_changed_cb);
+ page.scan_direction_changed.disconnect (page_scan_direction_changed_cb);
+
+ /* If this is the last page add a new blank one */
+ if (book.n_pages == 1)
+ add_default_page ();
+
+ update_page_menu ();
+ }
+
+ private void set_dpi_combo (Gtk.ComboBox combo, int default_dpi, int current_dpi)
+ {
+ var renderer = new Gtk.CellRendererText ();
+ combo.pack_start (renderer, true);
+ combo.add_attribute (renderer, "text", 1);
+
+ var model = combo.model as Gtk.ListStore;
+ int[] scan_resolutions = {75, 150, 300, 600, 1200, 2400};
+ foreach (var dpi in scan_resolutions)
+ {
+ string label;
+ if (dpi == default_dpi)
+ /* Preferences dialog: Label for default resolution in resolution list */
+ label = _("%d dpi (default)").printf (dpi);
+ else if (dpi == 75)
+ /* Preferences dialog: Label for minimum resolution in resolution list */
+ label = _("%d dpi (draft)").printf (dpi);
+ else if (dpi == 1200)
+ /* Preferences dialog: Label for maximum resolution in resolution list */
+ label = _("%d dpi (high resolution)").printf (dpi);
+ else
+ /* Preferences dialog: Label for resolution value in resolution list (dpi = dots per inch) */
+ label = _("%d dpi").printf (dpi);
+
+ Gtk.TreeIter iter;
+ model.append (out iter);
+ model.set (iter, 0, dpi, 1, label, -1);
+
+ if (dpi == current_dpi)
+ combo.set_active_iter (iter);
+ }
+ }
+
+ private void needs_saving_cb (Book book)
+ {
+ save_menuitem.sensitive = book.needs_saving;
+ save_button.sensitive = book.needs_saving;
+ save_toolbutton.sensitive = book.needs_saving;
+ if (book.needs_saving)
+ save_as_menuitem.sensitive = true;
+ copy_to_clipboard_menuitem.sensitive = true;
+ }
+
+ private bool shell_shows_menubar
+ {
+ get
+ {
+ bool shell_shows_menubar;
+ Gtk.Settings.get_default ().get ("gtk-shell-shows-menubar", out shell_shows_menubar);
+ return shell_shows_menubar;
+ }
+ }
+
+ private void load ()
+ {
+ Gtk.IconTheme.get_default ().append_search_path (ICON_DIR);
+
+ Gtk.Window.set_default_icon_name ("scanner");
+
+ var app = Application.get_default () as Gtk.Application;
+
+ if (!shell_shows_menubar)
+ {
+ app.add_action_entries (action_entries, this);
+
+ var appmenu = new Menu ();
+ var section = new Menu ();
+ appmenu.append_section (null, section);
+ section.append (_("New Document"), "app.new_document");
+
+ section = new Menu ();
+ appmenu.append_section (null, section);
+ var menu = new Menu ();
+ section.append_submenu (_("Document"), menu);
+ menu.append (_("Reorder Pages"), "app.reorder");
+ menu.append (_("Save"), "app.save");
+ menu.append (_("Save As..."), "app.save_as");
+ menu.append (_("Email..."), "app.email");
+ menu.append (_("Print..."), "app.print");
+
+ section = new Menu ();
+ appmenu.append_section (null, section);
+ section.append (_("Preferences"), "app.preferences");
+
+ section = new Menu ();
+ appmenu.append_section (null, section);
+ section.append (_("Help"), "app.help");
+ section.append (_("About"), "app.about");
+ section.append (_("Quit"), "app.quit");
+
+ app.app_menu = appmenu;
+
+ app.add_accelerator ("<Ctrl>N", "app.new_document", null);
+ app.add_accelerator ("<Ctrl>S", "app.save", null);
+ app.add_accelerator ("<Shift><Ctrl>S", "app.save_as", null);
+ app.add_accelerator ("<Ctrl>E", "app.email", null);
+ app.add_accelerator ("<Ctrl>P", "app.print", null);
+ app.add_accelerator ("F1", "app.help", null);
+ app.add_accelerator ("<Ctrl>Q", "app.quit", null);
+ }
+ else
+ {
+ set_titlebar (null);
+ menubar.visible = true;
+ toolbar.visible = true;
+ }
+ app.add_window (this);
+
+ /* Add InfoBar (not supported in Glade) */
+ info_bar = new Gtk.InfoBar ();
+ info_bar.response.connect (info_bar_response_cb);
+ main_vbox.pack_start (info_bar, false, true, 0);
+ var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
+ var content_area = info_bar.get_content_area () as Gtk.Container;
+ content_area.add (hbox);
+ hbox.visible = true;
+
+ info_bar_image = new Gtk.Image.from_icon_name ("dialog-warning", Gtk.IconSize.DIALOG);
+ hbox.pack_start (info_bar_image, false, true, 0);
+ info_bar_image.visible = true;
+
+ info_bar_label = new Gtk.Label (null);
+ info_bar_label.set_alignment (0.0f, 0.5f);
+ hbox.pack_start (info_bar_label, true, true, 0);
+ info_bar_label.visible = true;
+
+ info_bar_close_button = info_bar.add_button (_("_Close"), Gtk.ResponseType.CLOSE) as Gtk.Button;
+ info_bar_change_scanner_button = info_bar.add_button (/* Button in error infobar to open preferences dialog and change scanner */
+ _("Change _Scanner"), 1) as Gtk.Button;
+
+ Gtk.TreeIter iter;
+ paper_size_model.append (out iter);
+ paper_size_model.set (iter, 0, 0, 1, 0, 2,
+ /* Combo box value for automatic paper size */
+ _("Automatic"), -1);
+ paper_size_model.append (out iter);
+ paper_size_model.set (iter, 0, 1050, 1, 1480, 2, "A6", -1);
+ paper_size_model.append (out iter);
+ paper_size_model.set (iter, 0, 1480, 1, 2100, 2, "A5", -1);
+ paper_size_model.append (out iter);
+ paper_size_model.set (iter, 0, 2100, 1, 2970, 2, "A4", -1);
+ paper_size_model.append (out iter);
+ paper_size_model.set (iter, 0, 2159, 1, 2794, 2, "Letter", -1);
+ paper_size_model.append (out iter);
+ paper_size_model.set (iter, 0, 2159, 1, 3556, 2, "Legal", -1);
+ paper_size_model.append (out iter);
+ paper_size_model.set (iter, 0, 1016, 1, 1524, 2, "4×6", -1);
+
+ var dpi = settings.get_int ("text-dpi");
+ if (dpi <= 0)
+ dpi = DEFAULT_TEXT_DPI;
+ set_dpi_combo (text_dpi_combo, DEFAULT_TEXT_DPI, dpi);
+ text_dpi_combo.changed.connect (() => { settings.set_int ("text-dpi", get_text_dpi ()); });
+ dpi = settings.get_int ("photo-dpi");
+ if (dpi <= 0)
+ dpi = DEFAULT_PHOTO_DPI;
+ set_dpi_combo (photo_dpi_combo, DEFAULT_PHOTO_DPI, dpi);
+ photo_dpi_combo.changed.connect (() => { settings.set_int ("photo-dpi", get_photo_dpi ()); });
+
+ var renderer = new Gtk.CellRendererText ();
+ device_combo.pack_start (renderer, true);
+ device_combo.add_attribute (renderer, "text", 1);
+
+ renderer = new Gtk.CellRendererText ();
+ page_side_combo.pack_start (renderer, true);
+ page_side_combo.add_attribute (renderer, "text", 1);
+ set_page_side ((ScanType) settings.get_enum ("page-side"));
+ page_side_combo.changed.connect (() => { settings.set_enum ("page-side", get_page_side ()); });
+
+ renderer = new Gtk.CellRendererText ();
+ paper_size_combo.pack_start (renderer, true);
+ paper_size_combo.add_attribute (renderer, "text", 2);
+ var paper_width = settings.get_int ("paper-width");
+ var paper_height = settings.get_int ("paper-height");
+ set_paper_size (paper_width, paper_height);
+ paper_size_combo.changed.connect (() =>
+ {
+ int w, h;
+ get_paper_size (out w, out h);
+ settings.set_int ("paper-width", w);
+ settings.set_int ("paper-height", h);
+ });
+
+ var lower = brightness_adjustment.lower;
+ var darker_label = "<small>%s</small>".printf (_("Darker"));
+ var upper = brightness_adjustment.upper;
+ var lighter_label = "<small>%s</small>".printf (_("Lighter"));
+ brightness_scale.add_mark (lower, Gtk.PositionType.BOTTOM, darker_label);
+ brightness_scale.add_mark (0, Gtk.PositionType.BOTTOM, null);
+ brightness_scale.add_mark (upper, Gtk.PositionType.BOTTOM, lighter_label);
+ brightness = settings.get_int ("brightness");
+ brightness_adjustment.value_changed.connect (() => { settings.set_int ("brightness", brightness); });
+
+ lower = contrast_adjustment.lower;
+ var less_label = "<small>%s</small>".printf (_("Less"));
+ upper = contrast_adjustment.upper;
+ var more_label = "<small>%s</small>".printf (_("More"));
+ contrast_scale.add_mark (lower, Gtk.PositionType.BOTTOM, less_label);
+ contrast_scale.add_mark (0, Gtk.PositionType.BOTTOM, null);
+ contrast_scale.add_mark (upper, Gtk.PositionType.BOTTOM, more_label);
+ contrast = settings.get_int ("contrast");
+ contrast_adjustment.value_changed.connect (() => { settings.set_int ("contrast", contrast); });
+
+ lower = quality_adjustment.lower;
+ var minimum_label = "<small>%s</small>".printf (_("Minimum"));
+ upper = quality_adjustment.upper;
+ var maximum_label = "<small>%s</small>".printf (_("Maximum"));
+ quality_scale.add_mark (lower, Gtk.PositionType.BOTTOM, minimum_label);
+ quality_scale.add_mark (75, Gtk.PositionType.BOTTOM, null);
+ quality_scale.add_mark (upper, Gtk.PositionType.BOTTOM, maximum_label);
+ quality = settings.get_int ("jpeg-quality");
+ quality_adjustment.value_changed.connect (() => { settings.set_int ("jpeg-quality", quality); });
+
+ var device = settings.get_string ("selected-device");
+ if (device != null)
+ {
+ if (find_scan_device (device, out iter))
+ device_combo.set_active_iter (iter);
+ }
+
+ var document_type = settings.get_string ("document-type");
+ if (document_type != null)
+ set_document_hint (document_type);
+
+ book_view = new BookView (book);
+ book_view.border_width = 18;
+ main_vbox.pack_end (book_view, true, true, 0);
+ book_view.page_selected.connect (page_selected_cb);
+ book_view.show_page.connect (show_page_cb);
+ book_view.show_menu.connect (show_page_menu_cb);
+ book_view.visible = true;
+
+ authorize_dialog.transient_for = this;
+ preferences_dialog.transient_for = this;
+
+ /* Load previous state */
+ load_state ();
+
+ /* Restore window size */
+ debug ("Restoring window to %dx%d pixels", window_width, window_height);
+ set_default_size (window_width, window_height);
+ if (window_is_maximized)
+ {
+ debug ("Restoring window to maximized");
+ maximize ();
+ }
+
+ progress_dialog = new ProgressBarDialog (this, _("Saving document..."));
+ book.saving.connect (book_saving_cb);
+ }
+
+ private string state_filename
+ {
+ owned get { return Path.build_filename (Environment.get_user_cache_dir (), "simple-scan", "state"); }
+ }
+
+ private void load_state ()
+ {
+ debug ("Loading state from %s", state_filename);
+
+ var f = new KeyFile ();
+ try
+ {
+ f.load_from_file (state_filename, KeyFileFlags.NONE);
+ }
+ catch (Error e)
+ {
+ if (!(e is FileError.NOENT))
+ warning ("Failed to load state: %s", e.message);
+ }
+ window_width = state_get_integer (f, "window", "width", 600);
+ if (window_width <= 0)
+ window_width = 600;
+ window_height = state_get_integer (f, "window", "height", 400);
+ if (window_height <= 0)
+ window_height = 400;
+ window_is_maximized = state_get_boolean (f, "window", "is-maximized");
+ default_page_width = state_get_integer (f, "last-page", "width", 595);
+ default_page_height = state_get_integer (f, "last-page", "height", 842);
+ default_page_dpi = state_get_integer (f, "last-page", "dpi", 72);
+ switch (state_get_string (f, "last-page", "scan-direction", "top-to-bottom"))
+ {
+ default:
+ case "top-to-bottom":
+ default_page_scan_direction = ScanDirection.TOP_TO_BOTTOM;
+ break;
+ case "bottom-to-top":
+ default_page_scan_direction = ScanDirection.BOTTOM_TO_TOP;
+ break;
+ case "left-to-right":
+ default_page_scan_direction = ScanDirection.LEFT_TO_RIGHT;
+ break;
+ case "right-to-left":
+ default_page_scan_direction = ScanDirection.RIGHT_TO_LEFT;
+ break;
+ }
+ }
+
+ private int state_get_integer (KeyFile f, string group_name, string key, int default = 0)
+ {
+ try
+ {
+ return f.get_integer (group_name, key);
+ }
+ catch
+ {
+ return default;
+ }
+ }
+
+ private bool state_get_boolean (KeyFile f, string group_name, string key, bool default = false)
+ {
+ try
+ {
+ return f.get_boolean (group_name, key);
+ }
+ catch
+ {
+ return default;
+ }
+ }
+
+ private string state_get_string (KeyFile f, string group_name, string key, string default = "")
+ {
+ try
+ {
+ return f.get_string (group_name, key);
+ }
+ catch
+ {
+ return default;
+ }
+ }
+
+ private void save_state (bool force = false)
+ {
+ if (!force)
+ {
+ if (save_state_timeout != 0)
+ Source.remove (save_state_timeout);
+ save_state_timeout = Timeout.add (100, () =>
+ {
+ save_state (true);
+ save_state_timeout = 0;
+ return false;
+ });
+ return;
+ }
+
+ debug ("Saving state to %s", state_filename);
+
+ var f = new KeyFile ();
+ f.set_integer ("window", "width", window_width);
+ f.set_integer ("window", "height", window_height);
+ f.set_boolean ("window", "is-maximized", window_is_maximized);
+ f.set_integer ("last-page", "width", default_page_width);
+ f.set_integer ("last-page", "height", default_page_height);
+ f.set_integer ("last-page", "dpi", default_page_dpi);
+ switch (default_page_scan_direction)
+ {
+ case ScanDirection.TOP_TO_BOTTOM:
+ f.set_value ("last-page", "scan-direction", "top-to-bottom");
+ break;
+ case ScanDirection.BOTTOM_TO_TOP:
+ f.set_value ("last-page", "scan-direction", "bottom-to-top");
+ break;
+ case ScanDirection.LEFT_TO_RIGHT:
+ f.set_value ("last-page", "scan-direction", "left-to-right");
+ break;
+ case ScanDirection.RIGHT_TO_LEFT:
+ f.set_value ("last-page", "scan-direction", "right-to-left");
+ break;
+ }
+ try
+ {
+ FileUtils.set_contents (state_filename, f.to_data ());
+ }
+ catch (Error e)
+ {
+ warning ("Failed to write state: %s", e.message);
+ }
+ }
+
+ private void book_saving_cb (int page_number)
+ {
+ /* Prevent GUI from freezing */
+ while (Gtk.events_pending ())
+ Gtk.main_iteration ();
+
+ var total = (int) book.n_pages;
+ var fraction = (page_number + 1.0) / total;
+ var complete = fraction == 1.0;
+ if (complete)
+ Timeout.add (500, () => {
+ progress_dialog.visible = false;
+ return false;
+ });
+ var message = _("Saving page %d out of %d").printf (page_number + 1, total);
+
+ progress_dialog.fraction = fraction;
+ progress_dialog.message = message;
+ }
+
+ public void show_progress_dialog ()
+ {
+ progress_dialog.visible = true;
+ }
+
+ public void hide_progress_dialog ()
+ {
+ progress_dialog.visible = false;
+ }
+
+ public void show_error (string error_title, string error_text, bool change_scanner_hint)
+ {
+ have_error = true;
+ this.error_title = error_title;
+ this.error_text = error_text;
+ error_change_scanner_hint = change_scanner_hint;
+ update_info_bar ();
+ }
+
+ public void start ()
+ {
+ visible = true;
+ }
+}
+
+private class ProgressBarDialog : Gtk.Window
+{
+ private Gtk.ProgressBar bar;
+
+ public double fraction
+ {
+ get { return bar.fraction; }
+ set { bar.fraction = value; }
+ }
+
+ public string message
+ {
+ get { return bar.text; }
+ set { bar.text = value; }
+ }
+
+ public ProgressBarDialog (Gtk.ApplicationWindow parent, string title)
+ {
+ bar = new Gtk.ProgressBar ();
+ var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 5);
+ var vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 5);
+ hbox.hexpand = true;
+
+ bar.text = "";
+ bar.show_text = true;
+ bar.set_size_request (225, 25);
+ set_size_request (250, 50);
+
+ vbox.pack_start (bar, true, false, 0);
+ hbox.pack_start (vbox, true, false, 0);
+ add (hbox);
+ this.title = title;
+
+ transient_for = parent;
+ set_position (Gtk.WindowPosition.CENTER_ON_PARENT);
+ modal = true;
+ resizable = false;
+
+ hbox.visible = true;
+ vbox.visible = true;
+ bar.visible = true;
+ }
+}
+
+// FIXME: Duplicated from simple-scan.vala
+private string? get_temporary_filename (string prefix, string extension)
+{
+ /* NOTE: I'm not sure if this is a 100% safe strategy to use g_file_open_tmp(), close and
+ * use the filename but it appears to work in practise */
+
+ var filename = "%sXXXXXX.%s".printf (prefix, extension);
+ string path;
+ try
+ {
+ var fd = FileUtils.open_tmp (filename, out path);
+ Posix.close (fd);
+ }
+ catch (Error e)
+ {
+ warning ("Error saving email attachment: %s", e.message);
+ return null;
+ }
+
+ return path;
+}
+
+private class PageIcon : Gtk.DrawingArea
+{
+ private string text;
+ private double r;
+ private double g;
+ private double b;
+ private const int MINIMUM_WIDTH = 20;
+
+ public PageIcon (string text, double r = 1.0, double g = 1.0, double b = 1.0)
+ {
+ this.text = text;
+ this.r = r;
+ this.g = g;
+ this.b = b;
+ }
+
+ public override void get_preferred_width (out int minimum_width, out int natural_width)
+ {
+ minimum_width = natural_width = MINIMUM_WIDTH;
+ }
+
+ public override void get_preferred_height (out int minimum_height, out int natural_height)
+ {
+ minimum_height = natural_height = (int) Math.round (MINIMUM_WIDTH * Math.SQRT2);
+ }
+
+ public override void get_preferred_height_for_width (int width, out int minimum_height, out int natural_height)
+ {
+ minimum_height = natural_height = (int) (width * Math.SQRT2);
+ }
+
+ public override void get_preferred_width_for_height (int height, out int minimum_width, out int natural_width)
+ {
+ minimum_width = natural_width = (int) (height / Math.SQRT2);
+ }
+
+ public override bool draw (Cairo.Context c)
+ {
+ var w = get_allocated_width ();
+ var h = get_allocated_height ();
+ if (w * Math.SQRT2 > h)
+ w = (int) Math.round (h / Math.SQRT2);
+ else
+ h = (int) Math.round (w * Math.SQRT2);
+
+ c.translate ((get_allocated_width () - w) / 2, (get_allocated_height () - h) / 2);
+
+ c.rectangle (0.5, 0.5, w - 1, h - 1);
+
+ c.set_source_rgb (r, g, b);
+ c.fill_preserve ();
+
+ c.set_line_width (1.0);
+ c.set_source_rgb (0.0, 0.0, 0.0);
+ c.stroke ();
+
+ Cairo.TextExtents extents;
+ c.text_extents (text, out extents);
+ c.translate ((w - extents.width) * 0.5 - 0.5, (h + extents.height) * 0.5 - 0.5);
+ c.show_text (text);
+
+ return true;
+ }
+}