From dfae5860833782af557deb35e286d7e186fe3cf5 Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Sun, 26 Oct 2008 16:11:41 +0000 Subject: Imported Upstream version 4.3.99+cvs20050702 --- include/Makefile.am | 8 +- include/Makefile.in | 676 ++++++++---- include/gimp-print/Makefile.am | 39 - include/gimp-print/Makefile.in | 357 ------- include/gimp-print/gimp-print-intl-internal.h | 54 - include/gimp-print/gimp-print-intl.h | 60 -- include/gimp-print/gimp-print.h | 598 ----------- include/gimp-print/gimp-print.h.in | 598 ----------- include/gutenprint/Makefile.am | 68 ++ include/gutenprint/Makefile.in | 630 ++++++++++++ include/gutenprint/array.h | 169 +++ include/gutenprint/bit-ops.h | 72 ++ include/gutenprint/channel.h | 89 ++ include/gutenprint/color.h | 138 +++ include/gutenprint/curve-cache.h | 82 ++ include/gutenprint/curve.h | 686 +++++++++++++ include/gutenprint/dither.h | 204 ++++ include/gutenprint/gutenprint-intl-internal.h | 88 ++ include/gutenprint/gutenprint-intl.h | 91 ++ include/gutenprint/gutenprint-module.h | 67 ++ include/gutenprint/gutenprint-version.h.in | 90 ++ include/gutenprint/gutenprint.h | 67 ++ include/gutenprint/image.h | 144 +++ include/gutenprint/list.h | 337 ++++++ include/gutenprint/module.h | 111 ++ include/gutenprint/mxml.h | 178 ++++ include/gutenprint/paper.h | 133 +++ include/gutenprint/path.h | 57 ++ include/gutenprint/printers.h | 236 +++++ include/gutenprint/sequence.h | 389 +++++++ include/gutenprint/string-list.h | 100 ++ include/gutenprint/util.h | 177 ++++ include/gutenprint/vars.h | 1357 +++++++++++++++++++++++++ include/gutenprint/weave.h | 180 ++++ include/gutenprint/xml.h | 76 ++ include/gutenprintui/Makefile.am | 41 + include/gutenprintui/Makefile.in | 576 +++++++++++ include/gutenprintui/gutenprintui.h | 178 ++++ include/gutenprintui2/Makefile.am | 65 ++ include/gutenprintui2/Makefile.in | 595 +++++++++++ include/gutenprintui2/curve.h | 127 +++ include/gutenprintui2/gammacurve.h | 85 ++ include/gutenprintui2/gutenprintui.h | 182 ++++ include/gutenprintui2/typebuiltins.h | 23 + 44 files changed, 8354 insertions(+), 1924 deletions(-) delete mode 100644 include/gimp-print/Makefile.am delete mode 100644 include/gimp-print/Makefile.in delete mode 100644 include/gimp-print/gimp-print-intl-internal.h delete mode 100644 include/gimp-print/gimp-print-intl.h delete mode 100644 include/gimp-print/gimp-print.h delete mode 100644 include/gimp-print/gimp-print.h.in create mode 100644 include/gutenprint/Makefile.am create mode 100644 include/gutenprint/Makefile.in create mode 100644 include/gutenprint/array.h create mode 100644 include/gutenprint/bit-ops.h create mode 100644 include/gutenprint/channel.h create mode 100644 include/gutenprint/color.h create mode 100644 include/gutenprint/curve-cache.h create mode 100644 include/gutenprint/curve.h create mode 100644 include/gutenprint/dither.h create mode 100644 include/gutenprint/gutenprint-intl-internal.h create mode 100644 include/gutenprint/gutenprint-intl.h create mode 100644 include/gutenprint/gutenprint-module.h create mode 100644 include/gutenprint/gutenprint-version.h.in create mode 100644 include/gutenprint/gutenprint.h create mode 100644 include/gutenprint/image.h create mode 100644 include/gutenprint/list.h create mode 100644 include/gutenprint/module.h create mode 100644 include/gutenprint/mxml.h create mode 100644 include/gutenprint/paper.h create mode 100644 include/gutenprint/path.h create mode 100644 include/gutenprint/printers.h create mode 100644 include/gutenprint/sequence.h create mode 100644 include/gutenprint/string-list.h create mode 100644 include/gutenprint/util.h create mode 100644 include/gutenprint/vars.h create mode 100644 include/gutenprint/weave.h create mode 100644 include/gutenprint/xml.h create mode 100644 include/gutenprintui/Makefile.am create mode 100644 include/gutenprintui/Makefile.in create mode 100644 include/gutenprintui/gutenprintui.h create mode 100644 include/gutenprintui2/Makefile.am create mode 100644 include/gutenprintui2/Makefile.in create mode 100644 include/gutenprintui2/curve.h create mode 100644 include/gutenprintui2/gammacurve.h create mode 100644 include/gutenprintui2/gutenprintui.h create mode 100644 include/gutenprintui2/typebuiltins.h (limited to 'include') diff --git a/include/Makefile.am b/include/Makefile.am index aa12284..526a5a5 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,5 +1,5 @@ -## $Id: Makefile.am,v 1.2 2001/09/18 18:03:56 rleigh Exp $ -## Copyright (C) 2000 Roger Leigh +## $Id: Makefile.am,v 1.6 2004/09/17 18:37:44 rleigh Exp $ +## Copyright (C) 2000,2004 Roger Leigh ## ## 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 @@ -23,7 +23,9 @@ AUTOMAKE_OPTIONS = 1.4 gnu MAINT_CHARSET = latin1 -SUBDIRS = gimp-print +SUBDIRS = gutenprint gutenprintui gutenprintui2 + +include $(top_srcdir)/scripts/global.mk ## Clean diff --git a/include/Makefile.in b/include/Makefile.in index bbc1e23..0ff367c 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,6 +1,8 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated by automake 1.9.5 from Makefile.am. +# @configure_input@ -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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. @@ -10,210 +12,355 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +@SET_MAKE@ -SHELL = @SHELL@ - +# Variables srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ - top_builddir = .. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - +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 = : -host_alias = @host_alias@ +build_triplet = @build@ host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/scripts/global.mk +subdir = include +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \ + $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \ + $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ -AS = @AS@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BISON_PROG = @BISON_PROG@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ +BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@ +BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@ +BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@ +BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@ +BUILD_ESCPUTIL_FALSE = @BUILD_ESCPUTIL_FALSE@ +BUILD_ESCPUTIL_TRUE = @BUILD_ESCPUTIL_TRUE@ +BUILD_FOOMATIC_3_FALSE = @BUILD_FOOMATIC_3_FALSE@ +BUILD_FOOMATIC_3_TRUE = @BUILD_FOOMATIC_3_TRUE@ +BUILD_FOOMATIC_FALSE = @BUILD_FOOMATIC_FALSE@ +BUILD_FOOMATIC_TRUE = @BUILD_FOOMATIC_TRUE@ +BUILD_GENPPD_STATIC_FALSE = @BUILD_GENPPD_STATIC_FALSE@ +BUILD_GENPPD_STATIC_TRUE = @BUILD_GENPPD_STATIC_TRUE@ +BUILD_GHOSTSCRIPT_FALSE = @BUILD_GHOSTSCRIPT_FALSE@ +BUILD_GHOSTSCRIPT_TRUE = @BUILD_GHOSTSCRIPT_TRUE@ +BUILD_GIMP2_FALSE = @BUILD_GIMP2_FALSE@ +BUILD_GIMP2_TRUE = @BUILD_GIMP2_TRUE@ +BUILD_GIMP_FALSE = @BUILD_GIMP_FALSE@ +BUILD_GIMP_TRUE = @BUILD_GIMP_TRUE@ +BUILD_LIBGUTENPRINTUI2_FALSE = @BUILD_LIBGUTENPRINTUI2_FALSE@ +BUILD_LIBGUTENPRINTUI2_TRUE = @BUILD_LIBGUTENPRINTUI2_TRUE@ +BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@ +BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@ +BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@ +BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@ +BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@ +BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@ +BUILD_TEST_FALSE = @BUILD_TEST_FALSE@ +BUILD_TEST_TRUE = @BUILD_TEST_TRUE@ +BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@ +BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@ CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ CONVERT = @CONVERT@ -CUPS_BACKEND_BIN = @CUPS_BACKEND_BIN@ -CUPS_BIN = @CUPS_BIN@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ CUPS_CFLAGS = @CUPS_CFLAGS@ -CUPS_CONF = @CUPS_CONF@ CUPS_CONFIG = @CUPS_CONFIG@ -CUPS_FILTER_BIN = @CUPS_FILTER_BIN@ -CUPS_INSTALL = @CUPS_INSTALL@ CUPS_LIBS = @CUPS_LIBS@ -CUPS_MAN = @CUPS_MAN@ -CUPS_NOINST_BIN = @CUPS_NOINST_BIN@ -CUPS_PKG = @CUPS_PKG@ +CUPS_PPDS_AT_TOP_LEVEL_FALSE = @CUPS_PPDS_AT_TOP_LEVEL_FALSE@ +CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@ CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@ -DATADIRNAME = @DATADIRNAME@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ DB2HTML = @DB2HTML@ DB2PDF = @DB2PDF@ DB2PS = @DB2PS@ -DLLTOOL = @DLLTOOL@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIALOG = @DIALOG@ +DOXYGEN = @DOXYGEN@ DVIPDF = @DVIPDF@ DVIPS = @DVIPS@ ECHO = @ECHO@ -ESCPUTIL_BIN = @ESCPUTIL_BIN@ -ESCPUTIL_MAN = @ESCPUTIL_MAN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FOOMATIC_3_NOINST_BIN = @FOOMATIC_3_NOINST_BIN@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FIND = @FIND@ FOOMATIC_CONFIGURE = @FOOMATIC_CONFIGURE@ -FOOMATIC_INSTALL = @FOOMATIC_INSTALL@ FOOMATIC_KITLOAD = @FOOMATIC_KITLOAD@ -FOOMATIC_NOINST_BIN = @FOOMATIC_NOINST_BIN@ -FOOMATIC_OLDIDS_NOINST_BIN = @FOOMATIC_OLDIDS_NOINST_BIN@ FOOMATIC_PPDFILE = @FOOMATIC_PPDFILE@ -GENCAT = @GENCAT@ -GIMPPRINT_BINARY_AGE = @GIMPPRINT_BINARY_AGE@ -GIMPPRINT_CFLAGS = @GIMPPRINT_CFLAGS@ -GIMPPRINT_CURRENT_INTERFACE = @GIMPPRINT_CURRENT_INTERFACE@ -GIMPPRINT_DEPLIBS = @GIMPPRINT_DEPLIBS@ -GIMPPRINT_INTERFACE_AGE = @GIMPPRINT_INTERFACE_AGE@ -GIMPPRINT_LIBS = @GIMPPRINT_LIBS@ -GIMPPRINT_MAJOR_VERSION = @GIMPPRINT_MAJOR_VERSION@ -GIMPPRINT_MICRO_VERSION = @GIMPPRINT_MICRO_VERSION@ -GIMPPRINT_MINOR_VERSION = @GIMPPRINT_MINOR_VERSION@ -GIMPPRINT_VERSION = @GIMPPRINT_VERSION@ +GENPPD_LIBS = @GENPPD_LIBS@ +GIMP2_CFLAGS = @GIMP2_CFLAGS@ +GIMP2_LIBS = @GIMP2_LIBS@ GIMPTOOL = @GIMPTOOL@ +GIMPTOOL2_CHECK = @GIMPTOOL2_CHECK@ GIMPTOOL_CHECK = @GIMPTOOL_CHECK@ -GIMP_BIN = @GIMP_BIN@ GIMP_CFLAGS = @GIMP_CFLAGS@ GIMP_CFLAGS_NOUI = @GIMP_CFLAGS_NOUI@ GIMP_DATA_DIR = @GIMP_DATA_DIR@ GIMP_LIBS = @GIMP_LIBS@ GIMP_LIBS_NOUI = @GIMP_LIBS_NOUI@ GIMP_PLUGIN_DIR = @GIMP_PLUGIN_DIR@ -GLIBC21 = @GLIBC21@ -GMOFILES = @GMOFILES@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_CONFIG = @GLIB_CONFIG@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GNUCFLAGS = @GNUCFLAGS@ -IJS_BIN = @IJS_BIN@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_CONFIG = @GTK_CONFIG@ +GTK_LIBS = @GTK_LIBS@ +GUTENPRINTUI2_BINARY_AGE = @GUTENPRINTUI2_BINARY_AGE@ +GUTENPRINTUI2_CFLAGS = @GUTENPRINTUI2_CFLAGS@ +GUTENPRINTUI2_CURRENT_INTERFACE = @GUTENPRINTUI2_CURRENT_INTERFACE@ +GUTENPRINTUI2_INTERFACE_AGE = @GUTENPRINTUI2_INTERFACE_AGE@ +GUTENPRINTUI2_LIBDEPS = @GUTENPRINTUI2_LIBDEPS@ +GUTENPRINTUI2_LIBS = $(top_builddir)/src/gutenprintui2/libgutenprintui2.la +GUTENPRINTUI2_VERSION = @GUTENPRINTUI2_VERSION@ +GUTENPRINTUI_BINARY_AGE = @GUTENPRINTUI_BINARY_AGE@ +GUTENPRINTUI_CFLAGS = @GUTENPRINTUI_CFLAGS@ +GUTENPRINTUI_CURRENT_INTERFACE = @GUTENPRINTUI_CURRENT_INTERFACE@ +GUTENPRINTUI_INTERFACE_AGE = @GUTENPRINTUI_INTERFACE_AGE@ +GUTENPRINTUI_LIBDEPS = @GUTENPRINTUI_LIBDEPS@ +GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la +GUTENPRINTUI_VERSION = @GUTENPRINTUI_VERSION@ +GUTENPRINT_BINARY_AGE = @GUTENPRINT_BINARY_AGE@ +GUTENPRINT_CFLAGS = @GUTENPRINT_CFLAGS@ +GUTENPRINT_CURRENT_INTERFACE = @GUTENPRINT_CURRENT_INTERFACE@ +GUTENPRINT_INTERFACE_AGE = @GUTENPRINT_INTERFACE_AGE@ +GUTENPRINT_LIBDEPS = @GUTENPRINT_LIBDEPS@ + +# Libraries +GUTENPRINT_LIBS = $(top_builddir)/src/main/libgutenprint.la +GUTENPRINT_MAJOR_VERSION = @GUTENPRINT_MAJOR_VERSION@ +GUTENPRINT_MICRO_VERSION = @GUTENPRINT_MICRO_VERSION@ +GUTENPRINT_MINOR_VERSION = @GUTENPRINT_MINOR_VERSION@ +GUTENPRINT_VERSION = @GUTENPRINT_VERSION@ IJS_CFLAGS = @IJS_CFLAGS@ IJS_CONFIG = @IJS_CONFIG@ -IJS_INSTALL = @IJS_INSTALL@ IJS_LIBS = @IJS_LIBS@ -INCLUDES = @INCLUDES@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SAMPLES_FALSE = @INSTALL_SAMPLES_FALSE@ +INSTALL_SAMPLES_TRUE = @INSTALL_SAMPLES_TRUE@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTALL_USER_GUIDE_FALSE = @INSTALL_USER_GUIDE_FALSE@ +INSTALL_USER_GUIDE_TRUE = @INSTALL_USER_GUIDE_TRUE@ INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ +LDFLAGS = @LDFLAGS@ LEX = @LEX@ -LIBGIMPPRINT_LIBS = @LIBGIMPPRINT_LIBS@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBICONV = @LIBICONV@ -LIBM = @LIBM@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ LIBREADLINE_DEPS = @LIBREADLINE_DEPS@ +LIBS = $(INTLLIBS) @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTALLOCA = @LTALLOCA@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ -LT_AGE = @LT_AGE@ -LT_CURRENT = @LT_CURRENT@ -LT_RELEASE = @LT_RELEASE@ -LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAINTAINER_CFLAGS = @MAINTAINER_CFLAGS@ -MAIN_BIN = @MAIN_BIN@ -MAIN_DAT = @MAIN_DAT@ -MAIN_MAN = @MAIN_MAN@ -MAIN_SCR = @MAIN_SCR@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ -OBJDUMP = @OBJDUMP@ +MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ PLUG_IN_PATH = @PLUG_IN_PATH@ -POFILES = @POFILES@ POSUB = @POSUB@ -PRINT_VASPRINTF = @PRINT_VASPRINTF@ RANLIB = @RANLIB@ RELEASE_DATE = @RELEASE_DATE@ RM = @RM@ -SAMPLE_IMAGES = @SAMPLE_IMAGES@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ STRIP = @STRIP@ -TESTPATTERN_BIN = @TESTPATTERN_BIN@ -TEST_BIN = @TEST_BIN@ TEXI2HTML = @TEXI2HTML@ -USER_GUIDE = @USER_GUIDE@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_LEVEL3_PS_FALSE = @USE_LEVEL3_PS_FALSE@ +USE_LEVEL3_PS_TRUE = @USE_LEVEL3_PS_TRUE@ USE_NLS = @USE_NLS@ +USE_NLS_FALSE = @USE_NLS_FALSE@ +USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ YACC = @YACC@ -YACC_PROG = @YACC_PROG@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +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 = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ cups_bindir = @cups_bindir@ cups_conf_datadir = @cups_conf_datadir@ cups_conf_serverbin = @cups_conf_serverbin@ cups_conf_serverroot = @cups_conf_serverroot@ cups_exec_prefix = @cups_exec_prefix@ cups_prefix = @cups_prefix@ +cups_sbindir = @cups_sbindir@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +gimp2_plug_indir = @gimp2_plug_indir@ gimp_plug_indir = @gimp_plug_indir@ -gimpprint_cflags = @gimpprint_cflags@ -gimpprint_libs = @gimpprint_libs@ - +gutenprint_cflags = @gutenprint_cflags@ +gutenprint_libs = @gutenprint_libs@ +gutenprintui2_cflags = @gutenprintui2_cflags@ +gutenprintui2_libs = @gutenprintui2_libs@ +gutenprintui_cflags = @gutenprintui_cflags@ +gutenprintui_libs = @gutenprintui_libs@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ AUTOMAKE_OPTIONS = 1.4 gnu - MAINT_CHARSET = latin1 - -SUBDIRS = gimp-print - +SUBDIRS = gutenprint gutenprintui gutenprintui2 +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS) MAINTAINERCLEANFILES = Makefile.in -mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs -CONFIG_HEADER = ../config.h -CONFIG_CLEAN_FILES = -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) +all: all-recursive -TAR = tar -GZIP_ENV = --best -all: all-redirect .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps include/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/scripts/global.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/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 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -221,13 +368,14 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. - -@SET_MAKE@ - -all-recursive install-data-recursive install-exec-recursive \ -installdirs-recursive install-recursive uninstall-recursive \ -check-recursive installcheck-recursive info-recursive dvi-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -239,7 +387,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive: local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ @@ -247,13 +395,24 @@ check-recursive installcheck-recursive info-recursive dvi-recursive: mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @set fnord $(MAKEFLAGS); amf=$$2; \ + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ - rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ - rev="$$subdir $$rev"; \ - test "$$subdir" = "." && dot_seen=yes; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ done; \ - test "$$dot_seen" = "no" && rev=". $$rev"; \ + rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ @@ -263,145 +422,232 @@ maintainer-clean-recursive: local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) + mkid -fID $$unique +tags: TAGS -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ - fi; \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ done; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique -clean-tags: +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = include + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ + $(mkdir_p) $(distdir)/../scripts + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ fi; \ done - for subdir in $(SUBDIRS); do \ + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ - chmod 777 $(distdir)/$$subdir; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ || exit 1; \ fi; \ done -info-am: -info: info-recursive -dvi-am: -dvi: dvi-recursive check-am: all-am check: check-recursive -installcheck-am: -installcheck: installcheck-recursive -install-exec-am: +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive install-exec: install-exec-recursive - -install-data-am: install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-recursive -uninstall-am: -uninstall: uninstall-recursive -all-am: Makefile -all-redirect: all-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: installdirs-recursive -installdirs-am: - +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -mostlyclean-am: mostlyclean-tags mostlyclean-generic +clean: clean-recursive -mostlyclean: mostlyclean-recursive +clean-am: clean-generic clean-libtool mostlyclean-am -clean-am: clean-tags clean-generic mostlyclean-am +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags -clean: clean-recursive +dvi: dvi-recursive -distclean-am: distclean-tags distclean-generic clean-am - -rm -f libtool +dvi-am: -distclean: distclean-recursive +html: html-recursive -maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ - distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive -.PHONY: install-data-recursive uninstall-data-recursive \ -install-exec-recursive uninstall-exec-recursive installdirs-recursive \ -uninstalldirs-recursive all-recursive check-recursive \ -installcheck-recursive info-recursive dvi-recursive \ -mostlyclean-recursive distclean-recursive clean-recursive \ -maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs-am \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-libtool clean-recursive ctags \ + ctags-recursive distclean distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-libtool \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-info-am @SET_MAKE@ +export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +export STP_DATA_PATH = $(top_srcdir)/src/main + +# Rules + +$(top_builddir)/src/main/libgutenprint.la: + cd $(top_builddir)/src/main; \ + $(MAKE) + +$(top_builddir)/src/gutenprintui/libgutenprintui.la: + cd $(top_builddir)/src/gutenprintui; \ + $(MAKE) + +$(top_builddir)/src/gutenprintui2/libgutenprintui2.la: + cd $(top_builddir)/src/gutenprintui2; \ + $(MAKE) # 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/include/gimp-print/Makefile.am b/include/gimp-print/Makefile.am deleted file mode 100644 index 1a79e13..0000000 --- a/include/gimp-print/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -## $Id: Makefile.am,v 1.2.6.1 2003/07/12 20:47:44 rleigh Exp $ -## Copyright (C) 2000 Roger Leigh -## -## 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 2, or (at your option) -## any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -## Process this file with automake to produce Makefile.in. - -AUTOMAKE_OPTIONS = 1.4 gnu - -@SET_MAKE@ - -MAINT_CHARSET = latin1 - - -## Data - -noinst_HEADERS = gimp-print-intl.h gimp-print-intl-internal.h - -pkginclude_HEADERS = gimp-print.h - -EXTRA_HEADERS = gimp-print.h.in - - -## Clean - -DISTCLEANFILES = gimp-print.h -MAINTAINERCLEANFILES = Makefile.in diff --git a/include/gimp-print/Makefile.in b/include/gimp-print/Makefile.in deleted file mode 100644 index 861d1dd..0000000 --- a/include/gimp-print/Makefile.in +++ /dev/null @@ -1,357 +0,0 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999 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. - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = ../.. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_alias = @host_alias@ -host_triplet = @host@ -ALL_LINGUAS = @ALL_LINGUAS@ -AS = @AS@ -AWK = @AWK@ -BISON_PROG = @BISON_PROG@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CONVERT = @CONVERT@ -CUPS_BACKEND_BIN = @CUPS_BACKEND_BIN@ -CUPS_BIN = @CUPS_BIN@ -CUPS_CFLAGS = @CUPS_CFLAGS@ -CUPS_CONF = @CUPS_CONF@ -CUPS_CONFIG = @CUPS_CONFIG@ -CUPS_FILTER_BIN = @CUPS_FILTER_BIN@ -CUPS_INSTALL = @CUPS_INSTALL@ -CUPS_LIBS = @CUPS_LIBS@ -CUPS_MAN = @CUPS_MAN@ -CUPS_NOINST_BIN = @CUPS_NOINST_BIN@ -CUPS_PKG = @CUPS_PKG@ -CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@ -DATADIRNAME = @DATADIRNAME@ -DB2HTML = @DB2HTML@ -DB2PDF = @DB2PDF@ -DB2PS = @DB2PS@ -DLLTOOL = @DLLTOOL@ -DVIPDF = @DVIPDF@ -DVIPS = @DVIPS@ -ECHO = @ECHO@ -ESCPUTIL_BIN = @ESCPUTIL_BIN@ -ESCPUTIL_MAN = @ESCPUTIL_MAN@ -EXEEXT = @EXEEXT@ -FOOMATIC_3_NOINST_BIN = @FOOMATIC_3_NOINST_BIN@ -FOOMATIC_CONFIGURE = @FOOMATIC_CONFIGURE@ -FOOMATIC_INSTALL = @FOOMATIC_INSTALL@ -FOOMATIC_KITLOAD = @FOOMATIC_KITLOAD@ -FOOMATIC_NOINST_BIN = @FOOMATIC_NOINST_BIN@ -FOOMATIC_OLDIDS_NOINST_BIN = @FOOMATIC_OLDIDS_NOINST_BIN@ -FOOMATIC_PPDFILE = @FOOMATIC_PPDFILE@ -GENCAT = @GENCAT@ -GIMPPRINT_BINARY_AGE = @GIMPPRINT_BINARY_AGE@ -GIMPPRINT_CFLAGS = @GIMPPRINT_CFLAGS@ -GIMPPRINT_CURRENT_INTERFACE = @GIMPPRINT_CURRENT_INTERFACE@ -GIMPPRINT_DEPLIBS = @GIMPPRINT_DEPLIBS@ -GIMPPRINT_INTERFACE_AGE = @GIMPPRINT_INTERFACE_AGE@ -GIMPPRINT_LIBS = @GIMPPRINT_LIBS@ -GIMPPRINT_MAJOR_VERSION = @GIMPPRINT_MAJOR_VERSION@ -GIMPPRINT_MICRO_VERSION = @GIMPPRINT_MICRO_VERSION@ -GIMPPRINT_MINOR_VERSION = @GIMPPRINT_MINOR_VERSION@ -GIMPPRINT_VERSION = @GIMPPRINT_VERSION@ -GIMPTOOL = @GIMPTOOL@ -GIMPTOOL_CHECK = @GIMPTOOL_CHECK@ -GIMP_BIN = @GIMP_BIN@ -GIMP_CFLAGS = @GIMP_CFLAGS@ -GIMP_CFLAGS_NOUI = @GIMP_CFLAGS_NOUI@ -GIMP_DATA_DIR = @GIMP_DATA_DIR@ -GIMP_LIBS = @GIMP_LIBS@ -GIMP_LIBS_NOUI = @GIMP_LIBS_NOUI@ -GIMP_PLUGIN_DIR = @GIMP_PLUGIN_DIR@ -GLIBC21 = @GLIBC21@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GNUCFLAGS = @GNUCFLAGS@ -IJS_BIN = @IJS_BIN@ -IJS_CFLAGS = @IJS_CFLAGS@ -IJS_CONFIG = @IJS_CONFIG@ -IJS_INSTALL = @IJS_INSTALL@ -IJS_LIBS = @IJS_LIBS@ -INCLUDES = @INCLUDES@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ -LEX = @LEX@ -LIBGIMPPRINT_LIBS = @LIBGIMPPRINT_LIBS@ -LIBICONV = @LIBICONV@ -LIBM = @LIBM@ -LIBREADLINE_DEPS = @LIBREADLINE_DEPS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LN_S = @LN_S@ -LTALLOCA = @LTALLOCA@ -LTLIBOBJS = @LTLIBOBJS@ -LT_AGE = @LT_AGE@ -LT_CURRENT = @LT_CURRENT@ -LT_RELEASE = @LT_RELEASE@ -LT_REVISION = @LT_REVISION@ -MAINT = @MAINT@ -MAINTAINER_CFLAGS = @MAINTAINER_CFLAGS@ -MAIN_BIN = @MAIN_BIN@ -MAIN_DAT = @MAIN_DAT@ -MAIN_MAN = @MAIN_MAN@ -MAIN_SCR = @MAIN_SCR@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PERL = @PERL@ -PLUG_IN_PATH = @PLUG_IN_PATH@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PRINT_VASPRINTF = @PRINT_VASPRINTF@ -RANLIB = @RANLIB@ -RELEASE_DATE = @RELEASE_DATE@ -RM = @RM@ -SAMPLE_IMAGES = @SAMPLE_IMAGES@ -STRIP = @STRIP@ -TESTPATTERN_BIN = @TESTPATTERN_BIN@ -TEST_BIN = @TEST_BIN@ -TEXI2HTML = @TEXI2HTML@ -USER_GUIDE = @USER_GUIDE@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -YACC = @YACC@ -YACC_PROG = @YACC_PROG@ -cups_bindir = @cups_bindir@ -cups_conf_datadir = @cups_conf_datadir@ -cups_conf_serverbin = @cups_conf_serverbin@ -cups_conf_serverroot = @cups_conf_serverroot@ -cups_exec_prefix = @cups_exec_prefix@ -cups_prefix = @cups_prefix@ -gimp_plug_indir = @gimp_plug_indir@ -gimpprint_cflags = @gimpprint_cflags@ -gimpprint_libs = @gimpprint_libs@ - -AUTOMAKE_OPTIONS = 1.4 gnu - -MAINT_CHARSET = latin1 - -noinst_HEADERS = gimp-print-intl.h gimp-print-intl-internal.h - -pkginclude_HEADERS = gimp-print.h - -EXTRA_HEADERS = gimp-print.h.in - -DISTCLEANFILES = gimp-print.h -MAINTAINERCLEANFILES = Makefile.in -mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs -CONFIG_HEADER = ../../config.h -CONFIG_CLEAN_FILES = gimp-print.h -HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) - -DIST_COMMON = Makefile.am Makefile.in gimp-print.h.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = tar -GZIP_ENV = --best -all: all-redirect -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps include/gimp-print/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -gimp-print.h: $(top_builddir)/config.status gimp-print.h.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(pkgincludedir) - @list='$(pkginclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ - echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgincludedir)/$$p"; \ - $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgincludedir)/$$p; \ - done - -uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - list='$(pkginclude_HEADERS)'; for p in $$list; do \ - rm -f $(DESTDIR)$(pkgincludedir)/$$p; \ - done - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = include/gimp-print - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: install-pkgincludeHEADERS -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: uninstall-pkgincludeHEADERS -uninstall: uninstall-am -all-am: Makefile $(HEADERS) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - $(mkinstalldirs) $(DESTDIR)$(pkgincludedir) - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -mostlyclean-am: mostlyclean-tags mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-tags clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-tags distclean-generic clean-am - -rm -f libtool - -distclean: distclean-am - -maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ - distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-am - -.PHONY: uninstall-pkgincludeHEADERS install-pkgincludeHEADERS tags \ -mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ -distdir info-am info dvi-am dvi check check-am installcheck-am \ -installcheck install-exec-am install-exec install-data-am install-data \ -install-am install uninstall-am uninstall all-redirect all-am all \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -@SET_MAKE@ - -# 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/include/gimp-print/gimp-print-intl-internal.h b/include/gimp-print/gimp-print-intl-internal.h deleted file mode 100644 index 5c1722e..0000000 --- a/include/gimp-print/gimp-print-intl-internal.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * "$Id: gimp-print-intl-internal.h,v 1.1 2001/09/08 17:05:27 rleigh Exp $" - * - * I18N header file for the gimp-print. - * - * Copyright 1997-2000 Michael Sweet (mike@easysw.com), - * Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org) - * - * 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 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_PRINT_INTL_INTERNAL_H__ -#define __GIMP_PRINT_INTL_INTERNAL_H__ - -#ifdef INCLUDE_LOCALE_H -INCLUDE_LOCALE_H -#else -#include -#endif - -#if defined ENABLE_NLS && !defined DISABLE_NLS -# include -# define _(String) dgettext (PACKAGE, String) -# undef gettext -# define gettext(String) dgettext (PACKAGE, String) -# ifdef gettext_noop -# define N_(String) gettext_noop (String) -# else -# define N_(String) (String) -# endif -#else /* ifndef ENABLE_NLS */ -/* Stubs that do something close enough. */ -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) -# define _(String) (String) -# define N_(String) (String) -#endif - -#endif /* __GIMP_PRINT_INTL_INTERNAL_H__ */ diff --git a/include/gimp-print/gimp-print-intl.h b/include/gimp-print/gimp-print-intl.h deleted file mode 100644 index 4bd1d28..0000000 --- a/include/gimp-print/gimp-print-intl.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * "$Id: gimp-print-intl.h,v 1.2 2001/09/08 17:05:27 rleigh Exp $" - * - * I18N header file for the gimp-print. - * - * Copyright 1997-2000 Michael Sweet (mike@easysw.com), - * Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org) - * - * 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 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef __GIMP_PRINT_INTL_H__ -#define __GIMP_PRINT_INTL_H__ - -#ifdef INCLUDE_LOCALE_H -INCLUDE_LOCALE_H -#else -#include -#endif - -#ifdef ENABLE_NLS - -#include -#ifndef _ -#define _(String) gettext (String) -#endif -#ifndef gettext_noop -#define gettext_noop(String) (String) -#endif -#ifdef gettext_noop -# define N_(String) gettext_noop (String) -#else -# define N_(String) (String) -#endif - -#else /* ifndef ENABLE_NLS */ -/* Stubs that do something close enough. */ -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) -# define _(String) (String) -# define N_(String) (String) - -#endif - -#endif /* __GIMP_PRINT_INTL_H__ */ diff --git a/include/gimp-print/gimp-print.h b/include/gimp-print/gimp-print.h deleted file mode 100644 index 589a166..0000000 --- a/include/gimp-print/gimp-print.h +++ /dev/null @@ -1,598 +0,0 @@ -/* - * $Id: gimp-print.h.in,v 1.8.2.1 2002/12/08 21:12:33 rlk Exp $ - * - * Print plug-in header file for the GIMP. - * - * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and - * Robert Krawitz (rlk@alum.mit.edu) - * - * 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 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Revision History: - * - * See ChangeLog - */ - -/* - * This file must include only standard C header files. The core code must - * compile on generic platforms that don't support glib, gimp, gtk, etc. - */ - -#ifndef __GIMP_PRINT_H__ -#define __GIMP_PRINT_H__ - -/* - * Include necessary header files... - */ - -#include /* For size_t */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Library versioning details - */ - -/* - * compile-time version - */ -#define GIMPPRINT_MAJOR_VERSION (4) -#define GIMPPRINT_MINOR_VERSION (2) -#define GIMPPRINT_MICRO_VERSION (7) -#define GIMPPRINT_CURRENT_INTERFACE (2) -#define GIMPPRINT_BINARY_AGE (1) -#define GIMPPRINT_INTERFACE_AGE (3) -#define GIMPPRINT_CHECK_VERSION(major,minor,micro) \ - (GIMPPRINT_MAJOR_VERSION > (major) || \ - (GIMPPRINT_MAJOR_VERSION == (major) && GIMPPRINT_MINOR_VERSION > (minor)) || \ - (GIMPPRINT_MAJOR_VERSION == (major) && GIMPPRINT_MINOR_VERSION == (minor) && \ - GIMPPRINT_MICRO_VERSION >= (micro))) - -extern const unsigned int gimpprint_major_version; -extern const unsigned int gimpprint_minor_version; -extern const unsigned int gimpprint_micro_version; -extern const unsigned int gimpprint_current_interface; -extern const unsigned int gimpprint_binary_age; -extern const unsigned int gimpprint_interface_age; -extern const char* stp_check_version (unsigned int required_major, - unsigned int required_minor, - unsigned int required_micro); - - -/* - * Constants... - */ - -#define OUTPUT_GRAY 0 /* Grayscale output */ -#define OUTPUT_COLOR 1 /* Color output */ -#define OUTPUT_MONOCHROME 2 /* Raw monochrome output */ -#define OUTPUT_RAW_CMYK 3 /* Raw CMYK output */ - -#define ORIENT_AUTO -1 /* Best orientation */ -#define ORIENT_PORTRAIT 0 /* Portrait orientation */ -#define ORIENT_LANDSCAPE 1 /* Landscape orientation */ -#define ORIENT_UPSIDEDOWN 2 /* Reverse portrait orientation */ -#define ORIENT_SEASCAPE 3 /* Reverse landscape orientation */ - -#define IMAGE_LINE_ART 0 -#define IMAGE_SOLID_TONE 1 -#define IMAGE_CONTINUOUS 2 -#define NIMAGE_TYPES 3 - -#define COLOR_MODEL_RGB 0 -#define COLOR_MODEL_CMY 1 -#define NCOLOR_MODELS 2 - -/* - * Printer driver control structure. See "print.c" for the actual list... - */ - -typedef enum stp_papersize_unit -{ - PAPERSIZE_ENGLISH, - PAPERSIZE_METRIC -} stp_papersize_unit_t; - -typedef enum -{ - STP_JOB_MODE_PAGE, - STP_JOB_MODE_JOB -} stp_job_mode_t; - -typedef enum stp_image_status -{ - STP_IMAGE_OK, - STP_IMAGE_ABORT -} stp_image_status_t; - -/* - * Abstract data type for interfacing with the image creation program - * (in this case, the Gimp). - * - * The image layer need not implement transpose(), hflip(), vflip(), - * crop(), rotate_ccw(), rotate_cw(), and rotate_180() if it does not - * require that functionality or implements it internally. This - * functionality will likely be dropped in future releases. - * - * The image layer must implement all of the other members. The - * progress_init(), note_progress(), and progress_conclude() members - * are used to enable the image layer to deliver notification of - * progress to the user. It is likely that these functions will be - * dropped in the future, and if desired must be implemented in - * get_row(). - * - * get_appname() should return the name of the application. This is - * embedded in the output by some drivers. - * - * width() and height() return the dimensions of the image in pixels. - * - * bpp(), or bytes per pixel, is used in combination with the output type - * and presence of a color map, if supplied, to determine the format - * of the input: - * - * Output_type is OUTPUT_MONOCHROME, OUTPUT_COLOR, or OUTPUT_GRAY: - * - * bpp No color map Color map present - * 1 grayscale indexed color (256 colors) - * 2 grayscale w/alpha indexed color w/alpha - * 3 RGB N/A - * 4 N/A RGB w/alpha (RGBA) - * - * Output_type is OUTPUT_CMYK: - * - * bpp No color map Color map present - * 4 8 bits/plane CMYK N/A - * 8 16 bits/plane CMYK N/A - * - * init() is used to perform any initialization required by the image - * layer for the image. It will be called once per image. reset() is - * called to reset the image to the beginning. It may (in principle) - * be called multiple times if a page is being printed more than once. - * The reset() call may be removed in the future. - * - * get_row() transfers the data from the image to the gimp-print - * library. It is called from the driver layer. It should copy WIDTH - * (as returned by the width() member) pixels of data into the data - * buffer. It normally returns STP_IMAGE_OK; if something goes wrong, - * or the application wishes to stop producing any further output - * (e. g. because the user cancelled the print job), it should return - * STP_IMAGE_ABORT. This will cause the driver to flush any remaining - * data to the output. It will always request rows in monotonically - * ascending order, but it may skip rows (if, for example, the - * resolution of the input is higher than the resolution of the - * output). - */ - -typedef struct stp_image -{ - void (*init)(struct stp_image *image); - void (*reset)(struct stp_image *image); - void (*transpose)(struct stp_image *image); - void (*hflip)(struct stp_image *image); - void (*vflip)(struct stp_image *image); - void (*crop)(struct stp_image *image, - int left, int top, int right, int bottom); - void (*rotate_ccw)(struct stp_image *image); - void (*rotate_cw)(struct stp_image *image); - void (*rotate_180)(struct stp_image *image); - int (*bpp)(struct stp_image *image); - int (*width)(struct stp_image *image); - int (*height)(struct stp_image *image); - stp_image_status_t (*get_row)(struct stp_image *image, unsigned char *data, - int row); - const char *(*get_appname)(struct stp_image *image); - void (*progress_init)(struct stp_image *image); - void (*note_progress)(struct stp_image *image, double current, double total); - void (*progress_conclude)(struct stp_image *image); - void *rep; -} stp_image_t; - -/* - * Definition of a printer. A printer definition contains some data - * about the printer and a set of member functions that operate on it. - * - * The data members are: - * - * long_name is a human-readable name. It is intended to be used by - * a user interface to print the name of the printer. - * - * driver is the short name of the printer. This is an alternate name - * that is used internally. A user interface may use this for input - * purposes, or a client program may use this to generate a filename. - * The driver name should consist of lowercase alphanumerics and hyphens - * only. - * - * model is a model number used only by the underlying driver. It is - * treated as an opaque, but static, identifier. It should not be a - * pointer value, but the exact interpretation of the model number - * is up to the driver implementation (it may be an index into an - * array, for example). - * - * printvars is the default settings for this printer. - * - * The member functions are: - * - * char **(*parameters)(const stp_printer_t printer, - * char *ppd_file, - * char *name, - * int *count) - * - * returns a list of option values of the specified parameter NAME - * for the specified PRINTER. If a PPD filename is specified, the driver - * may use that to help generate the valid parameter list. The number - * of options returned is placed in COUNT. Both the array and the - * options themselves are allocated on the heap; it is the caller's - * responsibility to free them upon completion of use. The driver - * must therefore return a copy of data. - * - * In all cases, the returned option names should be appropriate for a - * user interface to display. - * - * The list of parameters is subject to change. The currently supported - * parameters are: - * - * PageSize returns a list of legal page size names for the printer - * in question. - * - * Resolution returns a list of valid resolution settings. The - * resolutions are to be interpreted as opaque names; the caller - * must not attempt to interpret them except with the - * describe_resolution function described below. There may be - * multiple resolution names that resolve to the same printing - * resolution; they may correspond to different quality settings, - * for example. - * - * InkType returns a list of legal ink types. The printer driver may - * define these as it sees fit. If a printer offers a choice of - * ink cartridges, the choices would be enumerated here. - * - * MediaType returns a list of legal media types. The printer driver - * may define these as it sees fit. This is normally different kinds - * of paper that the printer can handle. - * - * InputSlot returns a list of legal input sources for the printer. - * This is typically things like different input trays, manual feed, - * roll feed, and the like. - * - * void (*media_size)(const stp_printer_t printer, - * const stp_vars_t v, - * int *width, - * int *height) - * - * returns the physical WIDTH and HEIGHT of the page using the settings - * in V. The driver will almost always look at the media_size variable - * in V; it may look at other data in V to determine the physical page - * size. WIDTH and HEIGHT are expressed in units of 1/72". - * - * void (*imageable_area)(const stp_printer_t printer, - * const stp_vars_t v, - * int *left, - * int *right, - * int *bottom, - * int *top) - * - * returns the width of the LEFT, RIGHT, BOTTOM, and TOP border of the - * page for the given printer and variable settings. The caller can - * use this, in combination with the media_size member, to determine - * the printable region of the page, and if needed, exactly where to - * place the image to achieve a given physical placement (e. g. - * centering) on the page. All returned values are in units of - * 1/72". - * - * void (*limit)(const stp_printer_t printer, - * const stp_vars_t v, - * int *width, - * int *height) - * - * returns the maximum page size the printer can handle, in units of - * 1/72". - * - * void (*print)(const stp_printer_t printer, - * stp_image_t *image, - * const stp_vars_t v) - * - * prints a page. The variable settings provided in V are used to control - * the printing; PRN is a file pointer that the raw printer output - * is to be written to, and IMAGE is an object that sources the input - * data to the driver (the contents of which are opaque to the low level - * driver and are interpreted by the high level program). - * - * const char *(*default_resolution)(const stp_printer_t printer) - * - * returns the name of the default resolution for the printer. The - * caller must not attempt to free the returned value. - * - * void (*describe_resolution)(const stp_printer_t printer, - * const char *resolution, - * int *x, - * int *y) - * - * returns the horizontal (X) and vertical (Y) resolution of the chosen - * RESOLUTION name. The high level program may choose to use this to - * rasterize at an appropriate resolution. - * - */ - -typedef void *stp_printer_t; -typedef void *stp_vars_t; -typedef void *stp_papersize_t; -typedef struct -{ - const char *name, /* Option name */ - *text; /* Human-readable (translated) text */ -} stp_param_t; - -typedef void (*stp_outfunc_t) (void *data, const char *buffer, size_t bytes); - -typedef struct -{ - stp_param_t *(*parameters)(const stp_printer_t printer, - const char *ppd_file, - const char *name, int *count); - void (*media_size)(const stp_printer_t printer, const stp_vars_t v, - int *width, int *height); - void (*imageable_area)(const stp_printer_t printer, - const stp_vars_t v, - int *left, int *right, int *bottom, int *top); - void (*limit)(const stp_printer_t printer, const stp_vars_t v, - int *max_width, int *max_height, - int *min_width, int *min_height); - void (*print)(const stp_printer_t printer, - stp_image_t *image, const stp_vars_t v); - const char *(*default_parameters)(const stp_printer_t printer, - const char *ppd_file, - const char *name); - void (*describe_resolution)(const stp_printer_t printer, - const char *resolution, int *x, int *y); - int (*verify)(const stp_printer_t p, const stp_vars_t v); - int (*start_job)(const stp_printer_t printer, - stp_image_t *image, const stp_vars_t v); - int (*end_job)(const stp_printer_t printer, - stp_image_t *image, const stp_vars_t v); -} stp_printfuncs_t; - -/* - * stp_init() must be called prior to any other use of the library. - */ -extern int stp_init (void); - -extern const char * stp_printer_get_long_name (const stp_printer_t p); -extern const char * stp_printer_get_driver (const stp_printer_t p); -extern int stp_printer_get_model (const stp_printer_t p); -extern const stp_printfuncs_t *stp_printer_get_printfuncs(const stp_printer_t); -extern const stp_vars_t stp_printer_get_printvars (const stp_printer_t p); -extern void stp_set_printer_defaults(stp_vars_t, const stp_printer_t, - const char *ppd_file); - -extern stp_vars_t stp_allocate_vars (void); -extern void stp_copy_vars (stp_vars_t vd, const stp_vars_t vs); -extern stp_vars_t stp_allocate_copy (const stp_vars_t vs); - -extern void stp_free_vars (stp_vars_t vv); - -extern void stp_set_output_to (stp_vars_t vv, const char *val); -extern void stp_set_driver (stp_vars_t vv, const char *val); -extern void stp_set_ppd_file (stp_vars_t vv, const char *val); -extern void stp_set_resolution (stp_vars_t vv, const char *val); -extern void stp_set_media_size (stp_vars_t vv, const char *val); -extern void stp_set_media_type (stp_vars_t vv, const char *val); -extern void stp_set_media_source (stp_vars_t vv, const char *val); -extern void stp_set_ink_type (stp_vars_t vv, const char *val); -extern void stp_set_dither_algorithm (stp_vars_t vv, const char *val); - -/* - * The _n variants are used for strings that are not null-delimited. - */ -extern void stp_set_output_to_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_driver_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_ppd_file_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_resolution_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_media_size_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_media_type_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_media_source_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_ink_type_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_dither_algorithm_n (stp_vars_t vv, const char *val, - int bytes); - -extern void stp_set_output_type (stp_vars_t vv, int val); -extern void stp_set_orientation (stp_vars_t vv, int val); -extern void stp_set_left (stp_vars_t vv, int val); -extern void stp_set_top (stp_vars_t vv, int val); -extern void stp_set_image_type (stp_vars_t vv, int val); -extern void stp_set_unit (stp_vars_t vv, int val); -extern void stp_set_page_width (stp_vars_t vv, int val); -extern void stp_set_page_height (stp_vars_t vv, int val); - -/* - * Input color model refers to how the data is being sent to the - * driver library; the default is RGB. Output color model refers to - * the characteristics of the device; the default is CMYK. The output - * color model is set by the printer driver and cannot be overridden. - * It is provided to permit applications to generate previews using - * the color machinery in Gimp-Print. If this is done, normally - * the output color model will be RGB. - */ -extern void stp_set_input_color_model (stp_vars_t vv, int val); -extern void stp_set_output_color_model (stp_vars_t vv, int val); - -extern void stp_set_brightness (stp_vars_t vv, float val); -extern void stp_set_scaling (stp_vars_t vv, float val); -extern void stp_set_gamma (stp_vars_t vv, float val); -extern void stp_set_contrast (stp_vars_t vv, float val); -extern void stp_set_cyan (stp_vars_t vv, float val); -extern void stp_set_magenta (stp_vars_t vv, float val); -extern void stp_set_yellow (stp_vars_t vv, float val); -extern void stp_set_saturation (stp_vars_t vv, float val); -extern void stp_set_density (stp_vars_t vv, float val); - -/* - * Application gamma is used to initially correct the input data - * for the application's characteristics. This cannot be done by the - * application (except in 16-bit CMYK mode) without losing data. - */ -extern void stp_set_app_gamma (stp_vars_t vv, float val); - -/* - * Please see the source in print-color.c for an explanation of this. - */ -extern void stp_set_lut (stp_vars_t vv, void * val); - -/* - * For use with indexed color: the LUT should be an array of 256 - * RGB values. - */ -extern void stp_set_cmap (stp_vars_t vv, unsigned char * val); - -/* - * These functions are used to print output and diagnostic information - * respectively. These must be supplied by the caller. - */ -extern void stp_set_outfunc (const stp_vars_t vv, stp_outfunc_t val); -extern void stp_set_errfunc (const stp_vars_t vv, stp_outfunc_t val); -extern void stp_set_outdata (stp_vars_t vv, void * val); -extern void stp_set_errdata (stp_vars_t vv, void * val); - -extern const char * stp_get_output_to (const stp_vars_t vv); -extern const char * stp_get_driver (const stp_vars_t vv); -extern const char * stp_get_ppd_file (const stp_vars_t vv); -extern const char * stp_get_resolution (const stp_vars_t vv); -extern const char * stp_get_media_size (const stp_vars_t vv); -extern const char * stp_get_media_type (const stp_vars_t vv); -extern const char * stp_get_media_source (const stp_vars_t vv); -extern const char * stp_get_ink_type (const stp_vars_t vv); -extern const char * stp_get_dither_algorithm (const stp_vars_t vv); -extern int stp_get_output_type (const stp_vars_t vv); -extern int stp_get_orientation (const stp_vars_t vv); -extern int stp_get_left (const stp_vars_t vv); -extern int stp_get_top (const stp_vars_t vv); -extern int stp_get_image_type (const stp_vars_t vv); -extern int stp_get_unit (const stp_vars_t vv); -extern int stp_get_page_width (const stp_vars_t vv); -extern int stp_get_page_height (const stp_vars_t vv); -extern int stp_get_input_color_model (const stp_vars_t vv); -extern int stp_get_output_color_model (const stp_vars_t vv); -extern float stp_get_brightness (const stp_vars_t vv); -extern float stp_get_scaling (const stp_vars_t vv); -extern float stp_get_gamma (const stp_vars_t vv); -extern float stp_get_contrast (const stp_vars_t vv); -extern float stp_get_cyan (const stp_vars_t vv); -extern float stp_get_magenta (const stp_vars_t vv); -extern float stp_get_yellow (const stp_vars_t vv); -extern float stp_get_saturation (const stp_vars_t vv); -extern float stp_get_density (const stp_vars_t vv); -extern float stp_get_app_gamma (const stp_vars_t vv); -extern void * stp_get_lut (const stp_vars_t vv); -extern stp_outfunc_t stp_get_outfunc (const stp_vars_t vv); -extern stp_outfunc_t stp_get_errfunc (const stp_vars_t vv); -extern void * stp_get_outdata (const stp_vars_t vv); -extern void * stp_get_errdata (const stp_vars_t vv); -extern unsigned char * stp_get_cmap (const stp_vars_t vv); - - -/* - * hue_map is an array of 49 doubles representing the mapping of hue - * from (0..6) to (0..6) in increments of .125. The hue_map is in CMY space, - * so hue=0 is cyan. Interpolation between values is linear. - * - * lum_map and sat_map are correction factors for luminosity and saturation - * respectively. Both of these are inverse exponential. The degree of - * luminosity correction is scaled by the saturation of the particular - * pixel. This is likely to change drastically in the future. - */ -typedef void (*stp_convert_t) (const stp_vars_t vars, const unsigned char *in, - unsigned short *out, int *zero_mask, - int width, int bpp, const unsigned char *cmap, - const double *hue_map, const double *lum_map, - const double *sat_map); - -extern void stp_merge_printvars (stp_vars_t user, const stp_vars_t print); - -extern size_t stp_dither_algorithm_count (void); -extern const char * stp_dither_algorithm_name (int id); -extern const char * stp_dither_algorithm_text (int id); -extern const char * stp_default_dither_algorithm (void); - -extern int stp_known_papersizes (void); -extern const stp_papersize_t stp_get_papersize_by_name (const char *name); -extern const stp_papersize_t stp_get_papersize_by_size (int l, int w); -extern const stp_papersize_t stp_get_papersize_by_index (int index); -extern const char * stp_papersize_get_name (const stp_papersize_t pt); -extern const char * stp_papersize_get_text (const stp_papersize_t pt); -extern unsigned stp_papersize_get_width (const stp_papersize_t pt); -extern unsigned stp_papersize_get_height (const stp_papersize_t pt); -extern unsigned stp_papersize_get_top (const stp_papersize_t pt); -extern unsigned stp_papersize_get_left (const stp_papersize_t pt); -extern unsigned stp_papersize_get_bottom (const stp_papersize_t pt); -extern unsigned stp_papersize_get_right (const stp_papersize_t pt); -extern stp_papersize_unit_t stp_papersize_get_unit (const stp_papersize_t pt); - -extern void stp_set_job_mode(stp_vars_t, stp_job_mode_t); -extern stp_job_mode_t stp_get_job_mode(const stp_vars_t); -extern void stp_set_page_number(stp_vars_t, int); -extern int stp_get_page_number(const stp_vars_t); - -extern int stp_known_printers (void); -extern const stp_printer_t stp_get_printer_by_index (int idx); -extern const stp_printer_t stp_get_printer_by_long_name (const char *long_name); -extern const stp_printer_t stp_get_printer_by_driver (const char *driver); -extern int stp_get_printer_index_by_driver (const char *driver); - -/* - * This is likely to change in the future. - */ -extern stp_convert_t stp_choose_colorfunc (int output_type, int image_bpp, - const unsigned char *cmap, - int *out_bpp, - const stp_vars_t v); -extern void stp_allocate_lut (stp_vars_t v, size_t steps); -extern void stp_free_lut (stp_vars_t v); -extern void stp_compute_lut (stp_vars_t v, size_t steps); - -/* - * This is likely to change in the future. In particular, responsibility - * for orientation will likely be transferred to the application from - * the library. - */ -extern void stp_compute_page_parameters (int page_right, int page_left, - int page_top, int page_bottom, - double scaling, int image_width, - int image_height, stp_image_t *image, - int *orientation, - int *page_width, int *page_height, - int *out_width, int *out_height, - int *left, int *top); - -extern const stp_vars_t stp_default_settings (void); -extern const stp_vars_t stp_maximum_settings (void); -extern const stp_vars_t stp_minimum_settings (void); - -#ifdef __cplusplus - } -#endif - -#endif /* __GIMP_PRINT_H__ */ -/* - * End of $Id: gimp-print.h.in,v 1.8.2.1 2002/12/08 21:12:33 rlk Exp $ - */ diff --git a/include/gimp-print/gimp-print.h.in b/include/gimp-print/gimp-print.h.in deleted file mode 100644 index 8e3d059..0000000 --- a/include/gimp-print/gimp-print.h.in +++ /dev/null @@ -1,598 +0,0 @@ -/* - * $Id: gimp-print.h.in,v 1.8.2.1 2002/12/08 21:12:33 rlk Exp $ - * - * Print plug-in header file for the GIMP. - * - * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and - * Robert Krawitz (rlk@alum.mit.edu) - * - * 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 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * Revision History: - * - * See ChangeLog - */ - -/* - * This file must include only standard C header files. The core code must - * compile on generic platforms that don't support glib, gimp, gtk, etc. - */ - -#ifndef __GIMP_PRINT_H__ -#define __GIMP_PRINT_H__ - -/* - * Include necessary header files... - */ - -#include /* For size_t */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Library versioning details - */ - -/* - * compile-time version - */ -#define GIMPPRINT_MAJOR_VERSION (@GIMPPRINT_MAJOR_VERSION@) -#define GIMPPRINT_MINOR_VERSION (@GIMPPRINT_MINOR_VERSION@) -#define GIMPPRINT_MICRO_VERSION (@GIMPPRINT_MICRO_VERSION@) -#define GIMPPRINT_CURRENT_INTERFACE (@GIMPPRINT_CURRENT_INTERFACE@) -#define GIMPPRINT_BINARY_AGE (@GIMPPRINT_BINARY_AGE@) -#define GIMPPRINT_INTERFACE_AGE (@GIMPPRINT_INTERFACE_AGE@) -#define GIMPPRINT_CHECK_VERSION(major,minor,micro) \ - (GIMPPRINT_MAJOR_VERSION > (major) || \ - (GIMPPRINT_MAJOR_VERSION == (major) && GIMPPRINT_MINOR_VERSION > (minor)) || \ - (GIMPPRINT_MAJOR_VERSION == (major) && GIMPPRINT_MINOR_VERSION == (minor) && \ - GIMPPRINT_MICRO_VERSION >= (micro))) - -extern const unsigned int gimpprint_major_version; -extern const unsigned int gimpprint_minor_version; -extern const unsigned int gimpprint_micro_version; -extern const unsigned int gimpprint_current_interface; -extern const unsigned int gimpprint_binary_age; -extern const unsigned int gimpprint_interface_age; -extern const char* stp_check_version (unsigned int required_major, - unsigned int required_minor, - unsigned int required_micro); - - -/* - * Constants... - */ - -#define OUTPUT_GRAY 0 /* Grayscale output */ -#define OUTPUT_COLOR 1 /* Color output */ -#define OUTPUT_MONOCHROME 2 /* Raw monochrome output */ -#define OUTPUT_RAW_CMYK 3 /* Raw CMYK output */ - -#define ORIENT_AUTO -1 /* Best orientation */ -#define ORIENT_PORTRAIT 0 /* Portrait orientation */ -#define ORIENT_LANDSCAPE 1 /* Landscape orientation */ -#define ORIENT_UPSIDEDOWN 2 /* Reverse portrait orientation */ -#define ORIENT_SEASCAPE 3 /* Reverse landscape orientation */ - -#define IMAGE_LINE_ART 0 -#define IMAGE_SOLID_TONE 1 -#define IMAGE_CONTINUOUS 2 -#define NIMAGE_TYPES 3 - -#define COLOR_MODEL_RGB 0 -#define COLOR_MODEL_CMY 1 -#define NCOLOR_MODELS 2 - -/* - * Printer driver control structure. See "print.c" for the actual list... - */ - -typedef enum stp_papersize_unit -{ - PAPERSIZE_ENGLISH, - PAPERSIZE_METRIC -} stp_papersize_unit_t; - -typedef enum -{ - STP_JOB_MODE_PAGE, - STP_JOB_MODE_JOB -} stp_job_mode_t; - -typedef enum stp_image_status -{ - STP_IMAGE_OK, - STP_IMAGE_ABORT -} stp_image_status_t; - -/* - * Abstract data type for interfacing with the image creation program - * (in this case, the Gimp). - * - * The image layer need not implement transpose(), hflip(), vflip(), - * crop(), rotate_ccw(), rotate_cw(), and rotate_180() if it does not - * require that functionality or implements it internally. This - * functionality will likely be dropped in future releases. - * - * The image layer must implement all of the other members. The - * progress_init(), note_progress(), and progress_conclude() members - * are used to enable the image layer to deliver notification of - * progress to the user. It is likely that these functions will be - * dropped in the future, and if desired must be implemented in - * get_row(). - * - * get_appname() should return the name of the application. This is - * embedded in the output by some drivers. - * - * width() and height() return the dimensions of the image in pixels. - * - * bpp(), or bytes per pixel, is used in combination with the output type - * and presence of a color map, if supplied, to determine the format - * of the input: - * - * Output_type is OUTPUT_MONOCHROME, OUTPUT_COLOR, or OUTPUT_GRAY: - * - * bpp No color map Color map present - * 1 grayscale indexed color (256 colors) - * 2 grayscale w/alpha indexed color w/alpha - * 3 RGB N/A - * 4 N/A RGB w/alpha (RGBA) - * - * Output_type is OUTPUT_CMYK: - * - * bpp No color map Color map present - * 4 8 bits/plane CMYK N/A - * 8 16 bits/plane CMYK N/A - * - * init() is used to perform any initialization required by the image - * layer for the image. It will be called once per image. reset() is - * called to reset the image to the beginning. It may (in principle) - * be called multiple times if a page is being printed more than once. - * The reset() call may be removed in the future. - * - * get_row() transfers the data from the image to the gimp-print - * library. It is called from the driver layer. It should copy WIDTH - * (as returned by the width() member) pixels of data into the data - * buffer. It normally returns STP_IMAGE_OK; if something goes wrong, - * or the application wishes to stop producing any further output - * (e. g. because the user cancelled the print job), it should return - * STP_IMAGE_ABORT. This will cause the driver to flush any remaining - * data to the output. It will always request rows in monotonically - * ascending order, but it may skip rows (if, for example, the - * resolution of the input is higher than the resolution of the - * output). - */ - -typedef struct stp_image -{ - void (*init)(struct stp_image *image); - void (*reset)(struct stp_image *image); - void (*transpose)(struct stp_image *image); - void (*hflip)(struct stp_image *image); - void (*vflip)(struct stp_image *image); - void (*crop)(struct stp_image *image, - int left, int top, int right, int bottom); - void (*rotate_ccw)(struct stp_image *image); - void (*rotate_cw)(struct stp_image *image); - void (*rotate_180)(struct stp_image *image); - int (*bpp)(struct stp_image *image); - int (*width)(struct stp_image *image); - int (*height)(struct stp_image *image); - stp_image_status_t (*get_row)(struct stp_image *image, unsigned char *data, - int row); - const char *(*get_appname)(struct stp_image *image); - void (*progress_init)(struct stp_image *image); - void (*note_progress)(struct stp_image *image, double current, double total); - void (*progress_conclude)(struct stp_image *image); - void *rep; -} stp_image_t; - -/* - * Definition of a printer. A printer definition contains some data - * about the printer and a set of member functions that operate on it. - * - * The data members are: - * - * long_name is a human-readable name. It is intended to be used by - * a user interface to print the name of the printer. - * - * driver is the short name of the printer. This is an alternate name - * that is used internally. A user interface may use this for input - * purposes, or a client program may use this to generate a filename. - * The driver name should consist of lowercase alphanumerics and hyphens - * only. - * - * model is a model number used only by the underlying driver. It is - * treated as an opaque, but static, identifier. It should not be a - * pointer value, but the exact interpretation of the model number - * is up to the driver implementation (it may be an index into an - * array, for example). - * - * printvars is the default settings for this printer. - * - * The member functions are: - * - * char **(*parameters)(const stp_printer_t printer, - * char *ppd_file, - * char *name, - * int *count) - * - * returns a list of option values of the specified parameter NAME - * for the specified PRINTER. If a PPD filename is specified, the driver - * may use that to help generate the valid parameter list. The number - * of options returned is placed in COUNT. Both the array and the - * options themselves are allocated on the heap; it is the caller's - * responsibility to free them upon completion of use. The driver - * must therefore return a copy of data. - * - * In all cases, the returned option names should be appropriate for a - * user interface to display. - * - * The list of parameters is subject to change. The currently supported - * parameters are: - * - * PageSize returns a list of legal page size names for the printer - * in question. - * - * Resolution returns a list of valid resolution settings. The - * resolutions are to be interpreted as opaque names; the caller - * must not attempt to interpret them except with the - * describe_resolution function described below. There may be - * multiple resolution names that resolve to the same printing - * resolution; they may correspond to different quality settings, - * for example. - * - * InkType returns a list of legal ink types. The printer driver may - * define these as it sees fit. If a printer offers a choice of - * ink cartridges, the choices would be enumerated here. - * - * MediaType returns a list of legal media types. The printer driver - * may define these as it sees fit. This is normally different kinds - * of paper that the printer can handle. - * - * InputSlot returns a list of legal input sources for the printer. - * This is typically things like different input trays, manual feed, - * roll feed, and the like. - * - * void (*media_size)(const stp_printer_t printer, - * const stp_vars_t v, - * int *width, - * int *height) - * - * returns the physical WIDTH and HEIGHT of the page using the settings - * in V. The driver will almost always look at the media_size variable - * in V; it may look at other data in V to determine the physical page - * size. WIDTH and HEIGHT are expressed in units of 1/72". - * - * void (*imageable_area)(const stp_printer_t printer, - * const stp_vars_t v, - * int *left, - * int *right, - * int *bottom, - * int *top) - * - * returns the width of the LEFT, RIGHT, BOTTOM, and TOP border of the - * page for the given printer and variable settings. The caller can - * use this, in combination with the media_size member, to determine - * the printable region of the page, and if needed, exactly where to - * place the image to achieve a given physical placement (e. g. - * centering) on the page. All returned values are in units of - * 1/72". - * - * void (*limit)(const stp_printer_t printer, - * const stp_vars_t v, - * int *width, - * int *height) - * - * returns the maximum page size the printer can handle, in units of - * 1/72". - * - * void (*print)(const stp_printer_t printer, - * stp_image_t *image, - * const stp_vars_t v) - * - * prints a page. The variable settings provided in V are used to control - * the printing; PRN is a file pointer that the raw printer output - * is to be written to, and IMAGE is an object that sources the input - * data to the driver (the contents of which are opaque to the low level - * driver and are interpreted by the high level program). - * - * const char *(*default_resolution)(const stp_printer_t printer) - * - * returns the name of the default resolution for the printer. The - * caller must not attempt to free the returned value. - * - * void (*describe_resolution)(const stp_printer_t printer, - * const char *resolution, - * int *x, - * int *y) - * - * returns the horizontal (X) and vertical (Y) resolution of the chosen - * RESOLUTION name. The high level program may choose to use this to - * rasterize at an appropriate resolution. - * - */ - -typedef void *stp_printer_t; -typedef void *stp_vars_t; -typedef void *stp_papersize_t; -typedef struct -{ - const char *name, /* Option name */ - *text; /* Human-readable (translated) text */ -} stp_param_t; - -typedef void (*stp_outfunc_t) (void *data, const char *buffer, size_t bytes); - -typedef struct -{ - stp_param_t *(*parameters)(const stp_printer_t printer, - const char *ppd_file, - const char *name, int *count); - void (*media_size)(const stp_printer_t printer, const stp_vars_t v, - int *width, int *height); - void (*imageable_area)(const stp_printer_t printer, - const stp_vars_t v, - int *left, int *right, int *bottom, int *top); - void (*limit)(const stp_printer_t printer, const stp_vars_t v, - int *max_width, int *max_height, - int *min_width, int *min_height); - void (*print)(const stp_printer_t printer, - stp_image_t *image, const stp_vars_t v); - const char *(*default_parameters)(const stp_printer_t printer, - const char *ppd_file, - const char *name); - void (*describe_resolution)(const stp_printer_t printer, - const char *resolution, int *x, int *y); - int (*verify)(const stp_printer_t p, const stp_vars_t v); - int (*start_job)(const stp_printer_t printer, - stp_image_t *image, const stp_vars_t v); - int (*end_job)(const stp_printer_t printer, - stp_image_t *image, const stp_vars_t v); -} stp_printfuncs_t; - -/* - * stp_init() must be called prior to any other use of the library. - */ -extern int stp_init (void); - -extern const char * stp_printer_get_long_name (const stp_printer_t p); -extern const char * stp_printer_get_driver (const stp_printer_t p); -extern int stp_printer_get_model (const stp_printer_t p); -extern const stp_printfuncs_t *stp_printer_get_printfuncs(const stp_printer_t); -extern const stp_vars_t stp_printer_get_printvars (const stp_printer_t p); -extern void stp_set_printer_defaults(stp_vars_t, const stp_printer_t, - const char *ppd_file); - -extern stp_vars_t stp_allocate_vars (void); -extern void stp_copy_vars (stp_vars_t vd, const stp_vars_t vs); -extern stp_vars_t stp_allocate_copy (const stp_vars_t vs); - -extern void stp_free_vars (stp_vars_t vv); - -extern void stp_set_output_to (stp_vars_t vv, const char *val); -extern void stp_set_driver (stp_vars_t vv, const char *val); -extern void stp_set_ppd_file (stp_vars_t vv, const char *val); -extern void stp_set_resolution (stp_vars_t vv, const char *val); -extern void stp_set_media_size (stp_vars_t vv, const char *val); -extern void stp_set_media_type (stp_vars_t vv, const char *val); -extern void stp_set_media_source (stp_vars_t vv, const char *val); -extern void stp_set_ink_type (stp_vars_t vv, const char *val); -extern void stp_set_dither_algorithm (stp_vars_t vv, const char *val); - -/* - * The _n variants are used for strings that are not null-delimited. - */ -extern void stp_set_output_to_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_driver_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_ppd_file_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_resolution_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_media_size_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_media_type_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_media_source_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_ink_type_n (stp_vars_t vv, const char *val, - int bytes); -extern void stp_set_dither_algorithm_n (stp_vars_t vv, const char *val, - int bytes); - -extern void stp_set_output_type (stp_vars_t vv, int val); -extern void stp_set_orientation (stp_vars_t vv, int val); -extern void stp_set_left (stp_vars_t vv, int val); -extern void stp_set_top (stp_vars_t vv, int val); -extern void stp_set_image_type (stp_vars_t vv, int val); -extern void stp_set_unit (stp_vars_t vv, int val); -extern void stp_set_page_width (stp_vars_t vv, int val); -extern void stp_set_page_height (stp_vars_t vv, int val); - -/* - * Input color model refers to how the data is being sent to the - * driver library; the default is RGB. Output color model refers to - * the characteristics of the device; the default is CMYK. The output - * color model is set by the printer driver and cannot be overridden. - * It is provided to permit applications to generate previews using - * the color machinery in Gimp-Print. If this is done, normally - * the output color model will be RGB. - */ -extern void stp_set_input_color_model (stp_vars_t vv, int val); -extern void stp_set_output_color_model (stp_vars_t vv, int val); - -extern void stp_set_brightness (stp_vars_t vv, float val); -extern void stp_set_scaling (stp_vars_t vv, float val); -extern void stp_set_gamma (stp_vars_t vv, float val); -extern void stp_set_contrast (stp_vars_t vv, float val); -extern void stp_set_cyan (stp_vars_t vv, float val); -extern void stp_set_magenta (stp_vars_t vv, float val); -extern void stp_set_yellow (stp_vars_t vv, float val); -extern void stp_set_saturation (stp_vars_t vv, float val); -extern void stp_set_density (stp_vars_t vv, float val); - -/* - * Application gamma is used to initially correct the input data - * for the application's characteristics. This cannot be done by the - * application (except in 16-bit CMYK mode) without losing data. - */ -extern void stp_set_app_gamma (stp_vars_t vv, float val); - -/* - * Please see the source in print-color.c for an explanation of this. - */ -extern void stp_set_lut (stp_vars_t vv, void * val); - -/* - * For use with indexed color: the LUT should be an array of 256 - * RGB values. - */ -extern void stp_set_cmap (stp_vars_t vv, unsigned char * val); - -/* - * These functions are used to print output and diagnostic information - * respectively. These must be supplied by the caller. - */ -extern void stp_set_outfunc (const stp_vars_t vv, stp_outfunc_t val); -extern void stp_set_errfunc (const stp_vars_t vv, stp_outfunc_t val); -extern void stp_set_outdata (stp_vars_t vv, void * val); -extern void stp_set_errdata (stp_vars_t vv, void * val); - -extern const char * stp_get_output_to (const stp_vars_t vv); -extern const char * stp_get_driver (const stp_vars_t vv); -extern const char * stp_get_ppd_file (const stp_vars_t vv); -extern const char * stp_get_resolution (const stp_vars_t vv); -extern const char * stp_get_media_size (const stp_vars_t vv); -extern const char * stp_get_media_type (const stp_vars_t vv); -extern const char * stp_get_media_source (const stp_vars_t vv); -extern const char * stp_get_ink_type (const stp_vars_t vv); -extern const char * stp_get_dither_algorithm (const stp_vars_t vv); -extern int stp_get_output_type (const stp_vars_t vv); -extern int stp_get_orientation (const stp_vars_t vv); -extern int stp_get_left (const stp_vars_t vv); -extern int stp_get_top (const stp_vars_t vv); -extern int stp_get_image_type (const stp_vars_t vv); -extern int stp_get_unit (const stp_vars_t vv); -extern int stp_get_page_width (const stp_vars_t vv); -extern int stp_get_page_height (const stp_vars_t vv); -extern int stp_get_input_color_model (const stp_vars_t vv); -extern int stp_get_output_color_model (const stp_vars_t vv); -extern float stp_get_brightness (const stp_vars_t vv); -extern float stp_get_scaling (const stp_vars_t vv); -extern float stp_get_gamma (const stp_vars_t vv); -extern float stp_get_contrast (const stp_vars_t vv); -extern float stp_get_cyan (const stp_vars_t vv); -extern float stp_get_magenta (const stp_vars_t vv); -extern float stp_get_yellow (const stp_vars_t vv); -extern float stp_get_saturation (const stp_vars_t vv); -extern float stp_get_density (const stp_vars_t vv); -extern float stp_get_app_gamma (const stp_vars_t vv); -extern void * stp_get_lut (const stp_vars_t vv); -extern stp_outfunc_t stp_get_outfunc (const stp_vars_t vv); -extern stp_outfunc_t stp_get_errfunc (const stp_vars_t vv); -extern void * stp_get_outdata (const stp_vars_t vv); -extern void * stp_get_errdata (const stp_vars_t vv); -extern unsigned char * stp_get_cmap (const stp_vars_t vv); - - -/* - * hue_map is an array of 49 doubles representing the mapping of hue - * from (0..6) to (0..6) in increments of .125. The hue_map is in CMY space, - * so hue=0 is cyan. Interpolation between values is linear. - * - * lum_map and sat_map are correction factors for luminosity and saturation - * respectively. Both of these are inverse exponential. The degree of - * luminosity correction is scaled by the saturation of the particular - * pixel. This is likely to change drastically in the future. - */ -typedef void (*stp_convert_t) (const stp_vars_t vars, const unsigned char *in, - unsigned short *out, int *zero_mask, - int width, int bpp, const unsigned char *cmap, - const double *hue_map, const double *lum_map, - const double *sat_map); - -extern void stp_merge_printvars (stp_vars_t user, const stp_vars_t print); - -extern size_t stp_dither_algorithm_count (void); -extern const char * stp_dither_algorithm_name (int id); -extern const char * stp_dither_algorithm_text (int id); -extern const char * stp_default_dither_algorithm (void); - -extern int stp_known_papersizes (void); -extern const stp_papersize_t stp_get_papersize_by_name (const char *name); -extern const stp_papersize_t stp_get_papersize_by_size (int l, int w); -extern const stp_papersize_t stp_get_papersize_by_index (int index); -extern const char * stp_papersize_get_name (const stp_papersize_t pt); -extern const char * stp_papersize_get_text (const stp_papersize_t pt); -extern unsigned stp_papersize_get_width (const stp_papersize_t pt); -extern unsigned stp_papersize_get_height (const stp_papersize_t pt); -extern unsigned stp_papersize_get_top (const stp_papersize_t pt); -extern unsigned stp_papersize_get_left (const stp_papersize_t pt); -extern unsigned stp_papersize_get_bottom (const stp_papersize_t pt); -extern unsigned stp_papersize_get_right (const stp_papersize_t pt); -extern stp_papersize_unit_t stp_papersize_get_unit (const stp_papersize_t pt); - -extern void stp_set_job_mode(stp_vars_t, stp_job_mode_t); -extern stp_job_mode_t stp_get_job_mode(const stp_vars_t); -extern void stp_set_page_number(stp_vars_t, int); -extern int stp_get_page_number(const stp_vars_t); - -extern int stp_known_printers (void); -extern const stp_printer_t stp_get_printer_by_index (int idx); -extern const stp_printer_t stp_get_printer_by_long_name (const char *long_name); -extern const stp_printer_t stp_get_printer_by_driver (const char *driver); -extern int stp_get_printer_index_by_driver (const char *driver); - -/* - * This is likely to change in the future. - */ -extern stp_convert_t stp_choose_colorfunc (int output_type, int image_bpp, - const unsigned char *cmap, - int *out_bpp, - const stp_vars_t v); -extern void stp_allocate_lut (stp_vars_t v, size_t steps); -extern void stp_free_lut (stp_vars_t v); -extern void stp_compute_lut (stp_vars_t v, size_t steps); - -/* - * This is likely to change in the future. In particular, responsibility - * for orientation will likely be transferred to the application from - * the library. - */ -extern void stp_compute_page_parameters (int page_right, int page_left, - int page_top, int page_bottom, - double scaling, int image_width, - int image_height, stp_image_t *image, - int *orientation, - int *page_width, int *page_height, - int *out_width, int *out_height, - int *left, int *top); - -extern const stp_vars_t stp_default_settings (void); -extern const stp_vars_t stp_maximum_settings (void); -extern const stp_vars_t stp_minimum_settings (void); - -#ifdef __cplusplus - } -#endif - -#endif /* __GIMP_PRINT_H__ */ -/* - * End of $Id: gimp-print.h.in,v 1.8.2.1 2002/12/08 21:12:33 rlk Exp $ - */ diff --git a/include/gutenprint/Makefile.am b/include/gutenprint/Makefile.am new file mode 100644 index 0000000..e86b99f --- /dev/null +++ b/include/gutenprint/Makefile.am @@ -0,0 +1,68 @@ +## $Id: Makefile.am,v 1.1 2004/09/17 18:38:01 rleigh Exp $ +## Copyright (C) 2000 Roger Leigh +## +## 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 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +## Process this file with automake to produce Makefile.in. + +AUTOMAKE_OPTIONS = 1.4 gnu + +@SET_MAKE@ + +MAINT_CHARSET = latin1 + +include $(top_srcdir)/scripts/global.mk + + +## Data + +noinst_HEADERS = gutenprint-intl.h gutenprint-intl-internal.h + +pkginclude_HEADERS = \ + gutenprint.h \ + gutenprint-module.h \ + array.h \ + bit-ops.h \ + channel.h \ + color.h \ + curve-cache.h \ + curve.h \ + dither.h \ + sequence.h \ + image.h \ + list.h \ + module.h \ + mxml.h \ + paper.h \ + path.h \ + printers.h \ + sequence.h \ + string-list.h \ + util.h \ + vars.h \ + weave.h \ + xml.h + +nodist_pkginclude_HEADERS = gutenprint-version.h + + +## Clean + +DISTCLEANFILES = gutenprint-version.h +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = gutenprint-version.h.in + +TAGS_FILES = gutenprint-version.h.in diff --git a/include/gutenprint/Makefile.in b/include/gutenprint/Makefile.in new file mode 100644 index 0000000..3495602 --- /dev/null +++ b/include/gutenprint/Makefile.in @@ -0,0 +1,630 @@ +# Makefile.in generated by automake 1.9.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + +# Variables + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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 = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/gutenprint-version.h.in \ + $(top_srcdir)/scripts/global.mk +subdir = include/gutenprint +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \ + $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \ + $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = gutenprint-version.h +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgincludedir)" \ + "$(DESTDIR)$(pkgincludedir)" +nodist_pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(nodist_pkginclude_HEADERS) $(noinst_HEADERS) \ + $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@ +BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@ +BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@ +BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@ +BUILD_ESCPUTIL_FALSE = @BUILD_ESCPUTIL_FALSE@ +BUILD_ESCPUTIL_TRUE = @BUILD_ESCPUTIL_TRUE@ +BUILD_FOOMATIC_3_FALSE = @BUILD_FOOMATIC_3_FALSE@ +BUILD_FOOMATIC_3_TRUE = @BUILD_FOOMATIC_3_TRUE@ +BUILD_FOOMATIC_FALSE = @BUILD_FOOMATIC_FALSE@ +BUILD_FOOMATIC_TRUE = @BUILD_FOOMATIC_TRUE@ +BUILD_GENPPD_STATIC_FALSE = @BUILD_GENPPD_STATIC_FALSE@ +BUILD_GENPPD_STATIC_TRUE = @BUILD_GENPPD_STATIC_TRUE@ +BUILD_GHOSTSCRIPT_FALSE = @BUILD_GHOSTSCRIPT_FALSE@ +BUILD_GHOSTSCRIPT_TRUE = @BUILD_GHOSTSCRIPT_TRUE@ +BUILD_GIMP2_FALSE = @BUILD_GIMP2_FALSE@ +BUILD_GIMP2_TRUE = @BUILD_GIMP2_TRUE@ +BUILD_GIMP_FALSE = @BUILD_GIMP_FALSE@ +BUILD_GIMP_TRUE = @BUILD_GIMP_TRUE@ +BUILD_LIBGUTENPRINTUI2_FALSE = @BUILD_LIBGUTENPRINTUI2_FALSE@ +BUILD_LIBGUTENPRINTUI2_TRUE = @BUILD_LIBGUTENPRINTUI2_TRUE@ +BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@ +BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@ +BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@ +BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@ +BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@ +BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@ +BUILD_TEST_FALSE = @BUILD_TEST_FALSE@ +BUILD_TEST_TRUE = @BUILD_TEST_TRUE@ +BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@ +BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONVERT = @CONVERT@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CUPS_CFLAGS = @CUPS_CFLAGS@ +CUPS_CONFIG = @CUPS_CONFIG@ +CUPS_LIBS = @CUPS_LIBS@ +CUPS_PPDS_AT_TOP_LEVEL_FALSE = @CUPS_PPDS_AT_TOP_LEVEL_FALSE@ +CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@ +CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB2HTML = @DB2HTML@ +DB2PDF = @DB2PDF@ +DB2PS = @DB2PS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIALOG = @DIALOG@ +DOXYGEN = @DOXYGEN@ +DVIPDF = @DVIPDF@ +DVIPS = @DVIPS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FIND = @FIND@ +FOOMATIC_CONFIGURE = @FOOMATIC_CONFIGURE@ +FOOMATIC_KITLOAD = @FOOMATIC_KITLOAD@ +FOOMATIC_PPDFILE = @FOOMATIC_PPDFILE@ +GENPPD_LIBS = @GENPPD_LIBS@ +GIMP2_CFLAGS = @GIMP2_CFLAGS@ +GIMP2_LIBS = @GIMP2_LIBS@ +GIMPTOOL = @GIMPTOOL@ +GIMPTOOL2_CHECK = @GIMPTOOL2_CHECK@ +GIMPTOOL_CHECK = @GIMPTOOL_CHECK@ +GIMP_CFLAGS = @GIMP_CFLAGS@ +GIMP_CFLAGS_NOUI = @GIMP_CFLAGS_NOUI@ +GIMP_DATA_DIR = @GIMP_DATA_DIR@ +GIMP_LIBS = @GIMP_LIBS@ +GIMP_LIBS_NOUI = @GIMP_LIBS_NOUI@ +GIMP_PLUGIN_DIR = @GIMP_PLUGIN_DIR@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_CONFIG = @GLIB_CONFIG@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GNUCFLAGS = @GNUCFLAGS@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_CONFIG = @GTK_CONFIG@ +GTK_LIBS = @GTK_LIBS@ +GUTENPRINTUI2_BINARY_AGE = @GUTENPRINTUI2_BINARY_AGE@ +GUTENPRINTUI2_CFLAGS = @GUTENPRINTUI2_CFLAGS@ +GUTENPRINTUI2_CURRENT_INTERFACE = @GUTENPRINTUI2_CURRENT_INTERFACE@ +GUTENPRINTUI2_INTERFACE_AGE = @GUTENPRINTUI2_INTERFACE_AGE@ +GUTENPRINTUI2_LIBDEPS = @GUTENPRINTUI2_LIBDEPS@ +GUTENPRINTUI2_LIBS = $(top_builddir)/src/gutenprintui2/libgutenprintui2.la +GUTENPRINTUI2_VERSION = @GUTENPRINTUI2_VERSION@ +GUTENPRINTUI_BINARY_AGE = @GUTENPRINTUI_BINARY_AGE@ +GUTENPRINTUI_CFLAGS = @GUTENPRINTUI_CFLAGS@ +GUTENPRINTUI_CURRENT_INTERFACE = @GUTENPRINTUI_CURRENT_INTERFACE@ +GUTENPRINTUI_INTERFACE_AGE = @GUTENPRINTUI_INTERFACE_AGE@ +GUTENPRINTUI_LIBDEPS = @GUTENPRINTUI_LIBDEPS@ +GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la +GUTENPRINTUI_VERSION = @GUTENPRINTUI_VERSION@ +GUTENPRINT_BINARY_AGE = @GUTENPRINT_BINARY_AGE@ +GUTENPRINT_CFLAGS = @GUTENPRINT_CFLAGS@ +GUTENPRINT_CURRENT_INTERFACE = @GUTENPRINT_CURRENT_INTERFACE@ +GUTENPRINT_INTERFACE_AGE = @GUTENPRINT_INTERFACE_AGE@ +GUTENPRINT_LIBDEPS = @GUTENPRINT_LIBDEPS@ + +# Libraries +GUTENPRINT_LIBS = $(top_builddir)/src/main/libgutenprint.la +GUTENPRINT_MAJOR_VERSION = @GUTENPRINT_MAJOR_VERSION@ +GUTENPRINT_MICRO_VERSION = @GUTENPRINT_MICRO_VERSION@ +GUTENPRINT_MINOR_VERSION = @GUTENPRINT_MINOR_VERSION@ +GUTENPRINT_VERSION = @GUTENPRINT_VERSION@ +IJS_CFLAGS = @IJS_CFLAGS@ +IJS_CONFIG = @IJS_CONFIG@ +IJS_LIBS = @IJS_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SAMPLES_FALSE = @INSTALL_SAMPLES_FALSE@ +INSTALL_SAMPLES_TRUE = @INSTALL_SAMPLES_TRUE@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTALL_USER_GUIDE_FALSE = @INSTALL_USER_GUIDE_FALSE@ +INSTALL_USER_GUIDE_TRUE = @INSTALL_USER_GUIDE_TRUE@ +INTLLIBS = @INTLLIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBREADLINE_DEPS = @LIBREADLINE_DEPS@ +LIBS = $(INTLLIBS) @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LN_S = @LN_S@ +LTALLOCA = @LTALLOCA@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_CFLAGS = @MAINTAINER_CFLAGS@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +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_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PLUG_IN_PATH = @PLUG_IN_PATH@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +RELEASE_DATE = @RELEASE_DATE@ +RM = @RM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TEXI2HTML = @TEXI2HTML@ +USE_LEVEL3_PS_FALSE = @USE_LEVEL3_PS_FALSE@ +USE_LEVEL3_PS_TRUE = @USE_LEVEL3_PS_TRUE@ +USE_NLS = @USE_NLS@ +USE_NLS_FALSE = @USE_NLS_FALSE@ +USE_NLS_TRUE = @USE_NLS_TRUE@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +YACC = @YACC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +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 = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +cups_bindir = @cups_bindir@ +cups_conf_datadir = @cups_conf_datadir@ +cups_conf_serverbin = @cups_conf_serverbin@ +cups_conf_serverroot = @cups_conf_serverroot@ +cups_exec_prefix = @cups_exec_prefix@ +cups_prefix = @cups_prefix@ +cups_sbindir = @cups_sbindir@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +gimp2_plug_indir = @gimp2_plug_indir@ +gimp_plug_indir = @gimp_plug_indir@ +gutenprint_cflags = @gutenprint_cflags@ +gutenprint_libs = @gutenprint_libs@ +gutenprintui2_cflags = @gutenprintui2_cflags@ +gutenprintui2_libs = @gutenprintui2_libs@ +gutenprintui_cflags = @gutenprintui_cflags@ +gutenprintui_libs = @gutenprintui_libs@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +AUTOMAKE_OPTIONS = 1.4 gnu +MAINT_CHARSET = latin1 +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS) +noinst_HEADERS = gutenprint-intl.h gutenprint-intl-internal.h +pkginclude_HEADERS = \ + gutenprint.h \ + gutenprint-module.h \ + array.h \ + bit-ops.h \ + channel.h \ + color.h \ + curve-cache.h \ + curve.h \ + dither.h \ + sequence.h \ + image.h \ + list.h \ + module.h \ + mxml.h \ + paper.h \ + path.h \ + printers.h \ + sequence.h \ + string-list.h \ + util.h \ + vars.h \ + weave.h \ + xml.h + +nodist_pkginclude_HEADERS = gutenprint-version.h +DISTCLEANFILES = gutenprint-version.h +MAINTAINERCLEANFILES = Makefile.in +EXTRA_DIST = gutenprint-version.h.in +TAGS_FILES = gutenprint-version.h.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/scripts/global.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/gutenprint/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/gutenprint/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 +gutenprint-version.h: $(top_builddir)/config.status $(srcdir)/gutenprint-version.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)" + @list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(nodist_pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(nodist_pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-nodist_pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/../../scripts + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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 $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-nodist_pkgincludeHEADERS \ + install-pkgincludeHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-nodist_pkgincludeHEADERS \ + uninstall-pkgincludeHEADERS + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-nodist_pkgincludeHEADERS \ + install-pkgincludeHEADERS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-info-am \ + uninstall-nodist_pkgincludeHEADERS uninstall-pkgincludeHEADERS + + +@SET_MAKE@ + +export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +export STP_DATA_PATH = $(top_srcdir)/src/main + +# Rules + +$(top_builddir)/src/main/libgutenprint.la: + cd $(top_builddir)/src/main; \ + $(MAKE) + +$(top_builddir)/src/gutenprintui/libgutenprintui.la: + cd $(top_builddir)/src/gutenprintui; \ + $(MAKE) + +$(top_builddir)/src/gutenprintui2/libgutenprintui2.la: + cd $(top_builddir)/src/gutenprintui2; \ + $(MAKE) +# 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/include/gutenprint/array.h b/include/gutenprint/array.h new file mode 100644 index 0000000..62c173b --- /dev/null +++ b/include/gutenprint/array.h @@ -0,0 +1,169 @@ +/* + * "$Id: array.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * Copyright 2003 Roger Leigh (rleigh@debian.org) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/array.h + * @brief Array functions. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gimpprint, etc. + */ + +#ifndef GUTENPRINT_ARRAY_H +#define GUTENPRINT_ARRAY_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + + + /** + * The array is a simple "two-dimensional array of numbers" data + * structure. array "inherits" from the sequence data structure + * (implemented via containment). + * + * @defgroup array array + * @{ + */ + +struct stp_array; + /** The array opaque data type. */ +typedef struct stp_array stp_array_t; + + /** + * Create a new array. + * The total size of the array will be (x_size * y_size). + * @param x_size the number of "columns". + * @param y_size the number of "rows". + * @returns the newly created array. + */ +extern stp_array_t *stp_array_create(int x_size, int y_size); + + /** + * Destroy an array. + * It is an error to destroy the array more than once. + * @param array the array to destroy. + */ +extern void stp_array_destroy(stp_array_t *array); + + /** + * Copy an array. + * Both dest and source must be valid arrays previously created with + * stp_array_create(). + * @param dest the destination array. + * @param source the source array. + */ +extern void stp_array_copy(stp_array_t *dest, const stp_array_t *source); + + /** + * Copy and allocate an array. + * dest will be created, and then the contents of source will be + * copied into it. dest must not have been previously allocated + * with stp_array_create(). + * @param array the source array. + * @returns the new copy of the array. + */ +extern stp_array_t *stp_array_create_copy(const stp_array_t *array); + + /** + * Resize an array. + * Resizing an array will destroy all data stored in the array. + * @param array the array to resize. + * @param x_size the new number of "columns". + * @param y_size the new number of "rows". + */ +extern void stp_array_set_size(stp_array_t *array, int x_size, int y_size); + + /** + * Get the size of an array. + * The current x and y sizes are stored in the integers pointed to + * by x_size and y_size. + * @param array the array to get the size of. + * @param x_size a pointer to an integer to store the x size in. + * @param y_size a pointer to an integer to store the y size in. + */ +extern void stp_array_get_size(const stp_array_t *array, int *x_size, int *y_size); + + /** + * Set the data in an array. + * @param array the array to set. + * @param data a pointer to the first member of an array containing + * the data to set. This array must be at least as long as (x_size + * * y_size). + */ +extern void stp_array_set_data(stp_array_t *array, const double *data); + + /** + * Get the data in an array. + * @param array the array to get the data from. + * @param size the number of elements in the array (x_size * y_size) + * are stored in the size_t pointed to. + * @param data a pointer to the first element of an array of doubles + * is stored in a pointer to double*. + * @code + * stp_array_t *array; + * size_t size; + * double *data; + * stp_array_get_data(array, &size, &data); + * @endcode + */ +extern void stp_array_get_data(const stp_array_t *array, size_t *size, + const double **data); + + /** + * Set the data at a single point in the array. + * @param array the array to use. + * @param x the x location. + * @param y the y location. + * @param data the datum to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_array_set_point(stp_array_t *array, int x, int y, + double data); + + /** + * Get the data at a single point in the array. + * @param array the array to use. + * @param x the x location. + * @param y the y location. + * @param data the datum is stored in the double pointed to. + * @returns 1 on success, 0 on failure. + */ +extern int stp_array_get_point(const stp_array_t *array, int x, int y, + double *data); + + /** + * Get the underlying stp_sequence_t. + * @param array the array to use. + * @returns the (constant) stp_sequence_t. + */ +extern const stp_sequence_t *stp_array_get_sequence(const stp_array_t *array); + + /** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_ARRAY_H */ diff --git a/include/gutenprint/bit-ops.h b/include/gutenprint/bit-ops.h new file mode 100644 index 0000000..877c191 --- /dev/null +++ b/include/gutenprint/bit-ops.h @@ -0,0 +1,72 @@ +/* + * "$Id: bit-ops.h,v 1.2 2005/06/29 01:42:34 rlk Exp $" + * + * Softweave calculator for gimp-print. + * + * Copyright 2000 Charles Briscoe-Smith + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/bit-ops.h + * @brief Bit operations. + */ + +#ifndef GUTENPRINT_BIT_OPS_H +#define GUTENPRINT_BIT_OPS_H + +#ifdef __cplusplus +extern "C" { +#endif + +extern void stp_fold(const unsigned char *line, int single_height, + unsigned char *outbuf); + +extern void stp_split_2(int height, int bits, const unsigned char *in, + unsigned char *outhi, unsigned char *outlo); + +extern void stp_split_4(int height, int bits, const unsigned char *in, + unsigned char *out0, unsigned char *out1, + unsigned char *out2, unsigned char *out3); + +extern void stp_unpack_2(int height, int bits, const unsigned char *in, + unsigned char *outlo, unsigned char *outhi); + +extern void stp_unpack_4(int height, int bits, const unsigned char *in, + unsigned char *out0, unsigned char *out1, + unsigned char *out2, unsigned char *out3); + +extern void stp_unpack_8(int height, int bits, const unsigned char *in, + unsigned char *out0, unsigned char *out1, + unsigned char *out2, unsigned char *out3, + unsigned char *out4, unsigned char *out5, + unsigned char *out6, unsigned char *out7); + +extern void stp_unpack_16(int height, int bits, const unsigned char *in, + unsigned char *out0, unsigned char *out1, + unsigned char *out2, unsigned char *out3, + unsigned char *out4, unsigned char *out5, + unsigned char *out6, unsigned char *out7, + unsigned char *out8, unsigned char *out9, + unsigned char *out10, unsigned char *out11, + unsigned char *out12, unsigned char *out13, + unsigned char *out14, unsigned char *out15); + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_BIT_OPS_H */ diff --git a/include/gutenprint/channel.h b/include/gutenprint/channel.h new file mode 100644 index 0000000..0a74d45 --- /dev/null +++ b/include/gutenprint/channel.h @@ -0,0 +1,89 @@ +/* + * "$Id: channel.h,v 1.5 2005/06/14 02:49:10 rlk Exp $" + * + * libgimpprint header. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Revision History: + * + * See ChangeLog + */ + +/** + * @file gutenprint/channel.h + * @brief Channel functions. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifndef GUTENPRINT_CHANNEL_H +#define GUTENPRINT_CHANNEL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +extern void stp_channel_reset(stp_vars_t *v); +extern void stp_channel_reset_channel(stp_vars_t *v, int channel); + +extern void stp_channel_add(stp_vars_t *v, unsigned channel, + unsigned subchannel, double value); +extern double stp_channel_get_value(stp_vars_t *v, unsigned channel, + unsigned subchannel); + +extern void stp_channel_set_density_adjustment(stp_vars_t *v, + int color, int subchannel, + double adjustment); +extern double stp_channel_get_density_adjustment(stp_vars_t *v, + int color, int subchannel); +extern void stp_channel_set_ink_limit(stp_vars_t *v, double limit); +extern double stp_channel_get_ink_limit(stp_vars_t *v); +extern void stp_channel_set_cutoff_adjustment(stp_vars_t *v, + int color, int subchannel, + double adjustment); +extern double stp_channel_get_cutoff_adjustment(stp_vars_t *v, + int color, int subchannel); +extern void stp_channel_set_black_channel(stp_vars_t *v, int channel); +extern int stp_channel_get_black_channel(stp_vars_t *v); +extern void stp_channel_set_gloss_channel(stp_vars_t *v, int channel); +extern int stp_channel_get_gloss_channel(stp_vars_t *v); +extern void stp_channel_set_gloss_limit(stp_vars_t *v, double limit); +extern double stp_channel_get_gloss_limit(stp_vars_t *v); +extern void stp_channel_set_curve(stp_vars_t *v, int channel, + const stp_curve_t *curve); +extern const stp_curve_t *stp_channel_get_curve(stp_vars_t *v, int channel); + +extern void stp_channel_initialize(stp_vars_t *v, stp_image_t *image, + int input_channel_count); + +extern void stp_channel_convert(const stp_vars_t *v, unsigned *zero_mask); + +extern unsigned short * stp_channel_get_input(const stp_vars_t *v); + +extern unsigned short * stp_channel_get_output(const stp_vars_t *v); + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_CHANNEL_H */ diff --git a/include/gutenprint/color.h b/include/gutenprint/color.h new file mode 100644 index 0000000..7210897 --- /dev/null +++ b/include/gutenprint/color.h @@ -0,0 +1,138 @@ +/* + * "$Id: color.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * libgimpprint color functions. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/color.h + * @brief Color functions. + */ + +#ifndef GUTENPRINT_COLOR_H +#define GUTENPRINT_COLOR_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The color data type is responsible for providing colour + * conversion features. Color modules provide the actual + * functionality, so different colour management modules may provide + * the application with different services (for example, colour + * profiles). + + * @defgroup color color + * @{ + */ + +typedef struct +{ + int (*init)(stp_vars_t *v, stp_image_t *image, size_t steps); + int (*get_row)(stp_vars_t *v, stp_image_t *image, + int row, unsigned *zero_mask); + stp_parameter_list_t (*list_parameters)(const stp_vars_t *v); + void (*describe_parameter)(const stp_vars_t *v, const char *name, + stp_parameter_t *description); +} stp_colorfuncs_t; + + +typedef struct stp_color +{ + const char *short_name; /* Color module name */ + const char *long_name; /* Long name for UI */ + const stp_colorfuncs_t *colorfuncs; +} stp_color_t; + +/* + * Initialize the color machinery. Return value is the number + * of columns of output + */ +extern int stp_color_init(stp_vars_t *v, stp_image_t *image, size_t steps); + +/* + * Acquire input and perform color conversion. Return value + * is status; zero is success. + */ +extern int stp_color_get_row(stp_vars_t *v, stp_image_t *image, + int row, unsigned *zero_mask); + +extern stp_parameter_list_t stp_color_list_parameters(const stp_vars_t *v); + +extern void stp_color_describe_parameter(const stp_vars_t *v, const char *name, + stp_parameter_t *description); + +extern int +stp_color_register(const stp_color_t *color); + +extern int +stp_color_unregister(const stp_color_t *color); + +/** + * Get the number of available color modules. + * @returns the number of color modules. + */ +extern int +stp_color_count(void); + +/** + * Get a color module by its name. + * @param name the short unique name. + * number of papers - 1). + * @returns a pointer to the color module, or NULL on failure. + */ +extern const stp_color_t * +stp_get_color_by_name(const char *name); + +/** + * Get a color module by its index number. + * @param idx the index number. This must not be greater than (total + * number of papers - 1). + * @returns a pointer to the color module, or NULL on failure. + */ +extern const stp_color_t * +stp_get_color_by_index(int idx); + +extern const stp_color_t * +stp_get_color_by_colorfuncs(stp_colorfuncs_t *colorfuncs); + +/** + * Get the short (untranslated) name of a color module. + * @param c the color module to use. + * @returns the short name. + */ +extern const char * +stp_color_get_name(const stp_color_t *c); + +/** + * Get the long (translated) name of a color module. + * @param c the color module to use. + * @returns the long name. + */ +extern const char * +stp_color_get_long_name(const stp_color_t *c); + + + +#endif /* GUTENPRINT_COLOR_H */ +/* + * End of "$Id: color.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". + */ diff --git a/include/gutenprint/curve-cache.h b/include/gutenprint/curve-cache.h new file mode 100644 index 0000000..d63cb7a --- /dev/null +++ b/include/gutenprint/curve-cache.h @@ -0,0 +1,82 @@ +/* + * "$Id: curve-cache.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * Gimp-Print color management module - traditional Gimp-Print algorithm. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/curve-cache.h + * @brief Curve caching functions. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifndef GUTENPRINT_CURVE_CACHE_H +#define GUTENPRINT_CURVE_CACHE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef struct +{ + stp_curve_t *curve; + const double *d_cache; + const unsigned short *s_cache; + size_t count; +} stp_cached_curve_t; + +extern void stp_curve_free_curve_cache(stp_cached_curve_t *cache); + +extern void stp_curve_cache_curve_data(stp_cached_curve_t *cache); + +extern stp_curve_t *stp_curve_cache_get_curve(stp_cached_curve_t *cache); + +extern void stp_curve_cache_curve_invalidate(stp_cached_curve_t *cache); + +extern void stp_curve_cache_set_curve(stp_cached_curve_t *cache, + stp_curve_t *curve); + +extern void stp_curve_cache_set_curve_copy(stp_cached_curve_t *cache, + const stp_curve_t *curve); + +extern const size_t stp_curve_cache_get_count(stp_cached_curve_t *cache); + +extern const unsigned short *stp_curve_cache_get_ushort_data(stp_cached_curve_t *cache); + +extern const double *stp_curve_cache_get_double_data(stp_cached_curve_t *cache); + +extern void stp_curve_cache_copy(stp_cached_curve_t *dest, + const stp_cached_curve_t *src); + +#define CURVE_CACHE_FAST_USHORT(cache) ((cache)->s_cache) +#define CURVE_CACHE_FAST_DOUBLE(cache) ((cache)->d_cache) +#define CURVE_CACHE_FAST_COUNT(cache) ((cache)->count) + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_CURVE_CACHE_H */ diff --git a/include/gutenprint/curve.h b/include/gutenprint/curve.h new file mode 100644 index 0000000..fbdeab3 --- /dev/null +++ b/include/gutenprint/curve.h @@ -0,0 +1,686 @@ +/* + * "$Id: curve.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * libgimpprint curve functions. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/curve.h + * @brief Curve functions. + */ + +#ifndef GUTENPRINT_CURVE_H +#define GUTENPRINT_CURVE_H + +#include +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + + /* + * Curve code borrowed from GTK+, http://www.gtk.org/ + */ + + /** + * The curve type models a linear, spline or gamma curve. curve + * "inherits" from the sequence data structure (implemented via + * containment), since the curve data is represented internally as a + * sequence of numbers, for linear and spline curves. Linear + * Piecewise Curves (LPCs) should be implemented in the future which + * represent a curve in a more compact format. + * + * Various operations are supported, including interpolation and + * composition. + * + * @defgroup curve curve + * @{ + */ + +struct stp_curve; + /** The curve opaque data type. */ +typedef struct stp_curve stp_curve_t; + + /** Curve types. */ +typedef enum +{ + /** Linear interpolation. */ + STP_CURVE_TYPE_LINEAR, + /** Spline interpolation. */ + STP_CURVE_TYPE_SPLINE +} stp_curve_type_t; + + /** Wrapping mode. */ +typedef enum +{ + /** The curve does not wrap */ + STP_CURVE_WRAP_NONE, + /** The curve wraps to its starting point. */ + STP_CURVE_WRAP_AROUND +} stp_curve_wrap_mode_t; + + /** Composition types. */ +typedef enum +{ + /** Add composition. */ + STP_CURVE_COMPOSE_ADD, + /** Multiply composition. */ + STP_CURVE_COMPOSE_MULTIPLY, + /** Exponentiate composition. */ + STP_CURVE_COMPOSE_EXPONENTIATE +} stp_curve_compose_t; + + /** Behaviour when curve exceeds bounds. */ +typedef enum +{ + /** Rescale the bounds. */ + STP_CURVE_BOUNDS_RESCALE, + /** Clip the curve to the existing bounds. */ + STP_CURVE_BOUNDS_CLIP, + /** Error if bounds are violated. */ + STP_CURVE_BOUNDS_ERROR +} stp_curve_bounds_t; + + /** Point (x,y) for piecewise curve. */ +typedef struct +{ + /** Horizontal position. */ + double x; + /** Vertical position. */ + double y; +} stp_curve_point_t; + +/** + * Create a new curve. Curves have y=lower..upper. The default + * bounds are 0..1. The default interpolation type is linear. There + * are no points allocated, and the gamma is defaulted to 1. The curve + * is a dense (equally-spaced) curve. + * + * A wrapped curve has the same value at x=0 and x=1. The wrap mode + * of a curve cannot be changed except by routines that destroy the + * old curve entirely (e. g. stp_curve_copy, stp_curve_read). + * @param wrap the wrap mode of the curve. + * @returns the newly created curve. + */ +extern stp_curve_t *stp_curve_create(stp_curve_wrap_mode_t wrap); + + /** + * Copy and allocate an curve. + * dest will be created, and then the contents of source will be + * copied into it. dest must not have been previously allocated + * with stp_curve_create(). + * @param curve the source curve. + * @returns the new copy of the curve. + */ +extern stp_curve_t *stp_curve_create_copy(const stp_curve_t *curve); + + /** + * Copy an curve. + * Both dest and source must be valid curves previously created with + * stp_curve_create(). + * @param dest the destination curve. + * @param source the source curve. + */ +extern void stp_curve_copy(stp_curve_t *dest, const stp_curve_t *source); + + /** + * Destroy an curve. + * It is an error to destroy the curve more than once. + * @param curve the curve to destroy. + */ +extern void stp_curve_destroy(stp_curve_t *curve); + +/** + * Set the lower and upper bounds on a curve. + * To change the bounds adjusting data as required, use + * stp_curve_rescale instead. + * @param curve the curve to use. + * @param low the lower bound. + * @param high the upper bound. + * @returns FALSE if any existing points on the curve are outside the + * bounds. + */ +extern int stp_curve_set_bounds(stp_curve_t *curve, double low, double high); + +/** + * Get the lower and upper bounds on a curve. + * @param curve the curve to use. + * @param low a pointer to a double to store the lower bound in. + * @param high a pointer to a double to store the upper bound in. + */ +extern void stp_curve_get_bounds(const stp_curve_t *curve, + double *low, double *high); + +/** + * Get the wrapping mode. + * @param curve the curve to use. + * @returns the wrapping mode. + */ +extern stp_curve_wrap_mode_t stp_curve_get_wrap(const stp_curve_t *curve); + +/** + * Determine whether the curve is piecewise + * @param curve the curve to use. + * @returns whether the curve is piecewise + */ +extern int stp_curve_is_piecewise(const stp_curve_t *curve); + +/* + * Get the range (lowest and highest value of points) in the curve. + * This does not account for any interpolation that may place + * intermediate points outside of the curve. + * @param curve the curve to use. + * @param low a pointer to double to store the lower limit in. + * @param high a pointer to double to store the upper limit in. + */ +extern void stp_curve_get_range(const stp_curve_t *curve, + double *low, double *high); + +/** + * Get the number of allocated points in the curve. + * @param curve the curve to use. + * @returns the number of points. + */ +extern size_t stp_curve_count_points(const stp_curve_t *curve); + +/** + * Set the curve interpolation type. + * @param curve the curve to use. + * @param itype the interpolation type. + * @returns 1 on success, or 0 if itype is invalid. + */ +extern int stp_curve_set_interpolation_type(stp_curve_t *curve, + stp_curve_type_t itype); + +/** + * Get the curve interpolation type. + * @param curve the curve to use. + * @returns the interpolation type. + */ +extern stp_curve_type_t stp_curve_get_interpolation_type(const stp_curve_t *curve); + +/** + * Set all data points of the curve. If any of the data points fall + * outside the bounds, the operation is not performed and FALSE is + * returned. This creates a curve with equally-spaced points. + * @param curve the curve to use. + * @param count the number of points (must be at least two and not + * more than 1048576). + * @param data a pointer to an array of doubles (must be at least + * count in size). + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_data(stp_curve_t *curve, size_t count, + const double *data); + +/** + * Set all data points of the curve. If any of the data points fall + * outside the bounds, the operation is not performed and FALSE is + * returned. This creates a piecewise curve. + * @param curve the curve to use. + * @param count the number of points (must be at least two and not + * more than 1048576). + * @param data a pointer to an array of points (must be at least + * count in size). The first point must have X=0, and each point must + * have an X value at least .000001 greater than the previous point. If + * the curve is not a wraparound curve, the last point must have X=1. + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_data_points(stp_curve_t *curve, size_t count, + const stp_curve_point_t *data); + +/** + * Set the data points in a curve from float values. If any of the + * data points fall outside the bounds, the operation is not performed + * and FALSE is returned. This creates a curve with equally-spaced points. + * @param curve the curve to use. + * @param count the number of the number of points (must be at least + * two and not more than 1048576). + * @param data a pointer to an array of floats (must be at least + * count in size). + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_float_data(stp_curve_t *curve, + size_t count, const float *data); + +/** + * Set the data points in a curve from long values. If any of the + * data points fall outside the bounds, the operation is not performed + * and FALSE is returned. This creates a curve with equally-spaced points. + * @param curve the curve to use. + * @param count the number of the number of points (must be at least + * two and not more than 1048576). + * @param data a pointer to an array of longs (must be at least + * count in size). + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_long_data(stp_curve_t *curve, + size_t count, const long *data); + +/** + * Set the data points in a curve from unsigned long values. If any + * of the data points fall outside the bounds, the operation is not + * performed and FALSE is returned. This creates a curve with + * equally-spaced points. + * @param curve the curve to use. + * @param count the number of the number of points (must be at least + * two and not more than 1048576). + * @param data a pointer to an array of unsigned longs (must be at + * least count in size). + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_ulong_data(stp_curve_t *curve, + size_t count, const unsigned long *data); + +/** + * Set the data points in a curve from integer values. If any of the + * data points fall outside the bounds, the operation is not performed + * and FALSE is returned. This creates a curve with equally-spaced points. + * @param curve the curve to use. + * @param count the number of the number of points (must be at least + * two and not more than 1048576). + * @param data a pointer to an array of integers (must be at least + * count in size). + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_int_data(stp_curve_t *curve, + size_t count, const int *data); + +/** + * Set the data points in a curve from unsigned integer values. If + * any of the data points fall outside the bounds, the operation is + * not performed and FALSE is returned. This creates a curve with + * equally-spaced points. + * @param curve the curve to use. + * @param count the number of the number of points (must be at least + * two and not more than 1048576). + * @param data a pointer to an array of unsigned integers (must be at + * least count in size). + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_uint_data(stp_curve_t *curve, + size_t count, const unsigned int *data); + +/** + * Set the data points in a curve from short values. If any of the + * data points fall outside the bounds, the operation is not performed + * and FALSE is returned. This creates a curve with equally-spaced points. + * @param curve the curve to use. + * @param count the number of the number of points (must be at least + * two and not more than 1048576). + * @param data a pointer to an array of shorts (must be at least + * count in size). + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_short_data(stp_curve_t *curve, + size_t count, const short *data); + +/** + * Set the data points in a curve from unsigned short values. If any + * of the data points fall outside the bounds, the operation is not + * performed and FALSE is returned. This creates a curve with + * equally-spaced points. + * @param curve the curve to use. + * @param count the number of the number of points (must be at least + * two and not more than 1048576). + * @param data a pointer to an array of unsigned shorts (must be at + * least count in size). + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_ushort_data(stp_curve_t *curve, + size_t count, const unsigned short *data); + +/** + * Get a curve containing a subrange of data. If the start or count + * is invalid, the returned curve will compare equal to NULL (i. e. it + * will be a null pointer). start and count must not exceed the + * number of points in the curve, and count must be at least 2. + * The curve must be a dense (equally-spaced) curve + * @param curve the curve to use. + * @param start the start of the subrange. + * @param count the number of point starting at start. + * @returns a curve containing the subrange. The returned curve is + * non-wrapping. + */ +extern stp_curve_t *stp_curve_get_subrange(const stp_curve_t *curve, + size_t start, size_t count); + +/* + * Set part of a curve to the range in another curve. The data in the + * range must fit within both the bounds and the number of points in + * the first curve. The curve must be a dense (equally-spaced) curve. + * @param curve the curve to use (destination). + * @param range the source curve. + * @param start the starting point in the destination range. + * @param returns 1 on success, 0 on failure. + */ +extern int stp_curve_set_subrange(stp_curve_t *curve, const stp_curve_t *range, + size_t start); + +/** + * Get a pointer to the curve's raw data. + * @param curve the curve to use. + * @param count a pointer to a size_t to store the curve size in. + * @returns a pointer to the curve data. This data is not guaranteed + * to be valid beyond the next non-const curve call. If the curve is + * a pure gamma curve (no associated points), NULL is returned and the + * count is 0. This call also returns NULL if the curve is a piecewise + * curve. + */ +extern const double *stp_curve_get_data(const stp_curve_t *curve, size_t *count); + +/** + * Get a pointer to the curve's raw data as points. + * @param curve the curve to use. + * @param count a pointer to a size_t to store the curve size in. + * @returns a pointer to the curve data. This data is not guaranteed + * to be valid beyond the next non-const curve call. If the curve is + * a pure gamma curve (no associated points), NULL is returned and the + * count is 0. This call also returns NULL if the curve is a dense + * (equally-spaced) curve. + */ +extern const stp_curve_point_t *stp_curve_get_data_points(const stp_curve_t *curve, size_t *count); + + +/** + * Get pointer to the curve's raw data as floats. + * @param curve the curve to use. + * @param count a pointer to a size_t to store the curve size in. + * @returns a pointer to the curve data. This data is not guaranteed + * to be valid beyond the next non-const curve call. If the curve is + * a pure gamma curve (no associated points), NULL is returned and the + * count is 0. This also returns NULL if the curve is a piecewise curve. + */ +extern const float *stp_curve_get_float_data(const stp_curve_t *curve, + size_t *count); + +/** + * Get pointer to the curve's raw data as longs. + * @param curve the curve to use. + * @param count a pointer to a size_t to store the curve size in. + * @returns a pointer to the curve data. This data is not guaranteed + * to be valid beyond the next non-const curve call. If the curve is + * a pure gamma curve (no associated points), NULL is returned and the + * count is 0. This also returns NULL if the curve is a piecewise curve. + */ +extern const long *stp_curve_get_long_data(const stp_curve_t *curve, + size_t *count); + +/** + * Get pointer to the curve's raw data as unsigned longs. + * @param curve the curve to use. + * @param count a pointer to a size_t to store the curve size in. + * @returns a pointer to the curve data. This data is not guaranteed + * to be valid beyond the next non-const curve call. If the curve is + * a pure gamma curve (no associated points), NULL is returned and the + * count is 0. This also returns NULL if the curve is a piecewise curve. + */ +extern const unsigned long *stp_curve_get_ulong_data(const stp_curve_t *curve, + size_t *count); + +/** + * Get pointer to the curve's raw data as integers. + * @param curve the curve to use. + * @param count a pointer to a size_t to store the curve size in. + * @returns a pointer to the curve data. This data is not guaranteed + * to be valid beyond the next non-const curve call. If the curve is + * a pure gamma curve (no associated points), NULL is returned and the + * count is 0. This also returns NULL if the curve is a piecewise curve. + */ +extern const int *stp_curve_get_int_data(const stp_curve_t *curve, + size_t *count); + +/** + * Get pointer to the curve's raw data as unsigned integers. + * @param curve the curve to use. + * @param count a pointer to a size_t to store the curve size in. + * @returns a pointer to the curve data. This data is not guaranteed + * to be valid beyond the next non-const curve call. If the curve is + * a pure gamma curve (no associated points), NULL is returned and the + * count is 0. This also returns NULL if the curve is a piecewise curve. + */ +extern const unsigned int *stp_curve_get_uint_data(const stp_curve_t *curve, + size_t *count); + +/** + * Get pointer to the curve's raw data as shorts. + * @param curve the curve to use. + * @param count a pointer to a size_t to store the curve size in. + * @returns a pointer to the curve data. This data is not guaranteed + * to be valid beyond the next non-const curve call. If the curve is + * a pure gamma curve (no associated points), NULL is returned and the + * count is 0. This also returns NULL if the curve is a piecewise curve. + */ +extern const short *stp_curve_get_short_data(const stp_curve_t *curve, + size_t *count); + +/** + * Get pointer to the curve's raw data as unsigned shorts. + * @param curve the curve to use. + * @param count a pointer to a size_t to store the curve size in. + * @returns a pointer to the curve data. This data is not guaranteed + * to be valid beyond the next non-const curve call. If the curve is + * a pure gamma curve (no associated points), NULL is returned and the + * count is 0. This also returns NULL if the curve is a piecewise curve. + */ +extern const unsigned short *stp_curve_get_ushort_data(const stp_curve_t *curve, + size_t *count); + +/** + * Get the underlying stp_sequence_t data structure which stp_curve_t + * is derived from. + * This can be used for fast access to the raw data. + * @param curve the curve to use. + * @returns the stp_sequence_t. If the curve is a piecewise curve, the + * sequence returned is NULL; + */ +extern const stp_sequence_t *stp_curve_get_sequence(const stp_curve_t *curve); + +/** + * Set the gamma of a curve. This replaces all existing points along + * the curve. The bounds are set to 0..1. If the gamma value is + * positive, the function is increasing; if negative, the function is + * decreasing. Count must be either 0 or at least 2. If the count is + * zero, the gamma of the curve is set for interpolation purposes, but + * points cannot be assigned to. It is illegal to set gamma on a + * wrap-mode curve. The resulting curve is treated as a dense + * (equally-spaced) curve. + * @param curve the curve to use. + * @param f_gamma the gamma value to set. + * @returns FALSE if the gamma value is illegal (0, infinity, or NaN), + * or if the curve wraps around. + */ +extern int stp_curve_set_gamma(stp_curve_t *curve, double f_gamma); + +/** + * Get the gamma value of the curve. + * @returns the gamma value. A value of 0 indicates that the curve + * does not have a valid gamma value. + */ +extern double stp_curve_get_gamma(const stp_curve_t *curve); + +/** + * Set a point along the curve. + * This call destroys any gamma value assigned to the curve. + * @param curve the curve to use. + * @param where the point to set. + * @param data the value to set where to. + * @returns FALSE if data is outside the valid bounds or if where is + * outside the number of valid points. This also returns NULL if + * the curve is a piecewise curve. + */ +extern int stp_curve_set_point(stp_curve_t *curve, size_t where, double data); + +/** + * Get a point along the curve. + * @param curve the curve to use. + * @param where the point to get. + * @param data a pointer to a double to store the value of where in. + * @returns FALSE if where is outside of the number of valid + * points. This also returns NULL if the curve is a piecewise curve. + */ +extern int stp_curve_get_point(const stp_curve_t *curve, size_t where, + double *data); + +/** + * Interpolate a point along the curve. + * @param curve the curve to use. + * @param where the point to interpolate. + * @param result a pointer to double to store the value of where in. + * If interpolation would produce a value outside of the allowed range + * (as could happen with spline interpolation), the value is clipped + * to the range. + * @returns FALSE if 'where' is less than 0 or greater than the number + * of points, an error is returned. Also returns FALSE if the curve + * is a piecewise curve. + */ +extern int stp_curve_interpolate_value(const stp_curve_t *curve, + double where, double *result); + +/** + * Resample a curve (change the number of points). This does not + * destroy the gamma value of a curve. Points are interpolated as + * required; any interpolation that would place points outside of the + * bounds of the curve will be clipped to the bounds. The resulting + * curve is always dense (equally-spaced). This is the correct way + * to convert a piecewise curve to an equally-spaced curve. + * @param curve the curve to use (must not exceed 1048576). + * @param points the number of points. + * @returns FALSE if the number of points is invalid (less than two, + * except that zero points is permitted for a gamma curve). + */ +extern int stp_curve_resample(stp_curve_t *curve, size_t points); + +/** + * Rescale a curve (multiply all points by a scaling constant). This + * also rescales the bounds. Note that this currently destroys the + * gamma property of the curve. + * @param curve the curve to use. + * @param scale the scaling factor. + * @param mode the composition mode. + * @param bounds_mode the bounds exceeding mode. + * @returns FALSE if this would exceed floating point limits + */ +extern int stp_curve_rescale(stp_curve_t *curve, double scale, + stp_curve_compose_t mode, + stp_curve_bounds_t bounds_mode); + +/** + * Write a curve to a file. + * The printable representation is guaranteed to contain only 7-bit + * printable ASCII characters, and is null-terminated. The curve will + * not contain any space, newline, single quote, or comma characters. + * Furthermore, a printed curve will be read back correctly in all locales. + * These calls are not guaranteed to provide more than 6 decimal places + * of precision or +/-0.5e-6 accuracy, whichever is less. + * @warning NOTE that these calls are not thread-safe! These + * routines may manipulate the locale to achieve a safe + * representation. + * @param file the file to write. + * @param curve the curve to use. + * @returns 1 on success, 0 on failure. + */ +extern int stp_curve_write(FILE *file, const stp_curve_t *curve); + +/** + * Write a curve to a string. + * The printable representation is guaranteed to contain only 7-bit + * printable ASCII characters, and is null-terminated. The curve will + * not contain any space, newline, or comma characters. Furthermore, + * a printed curve will be read back correctly in all locales. + * These calls are not guaranteed to provide more than 6 decimal places + * of precision or +/-0.5e-6 accuracy, whichever is less. + * @warning NOTE that these calls are not thread-safe! These + * routines may manipulate the locale to achieve a safe + * representation. + * @param curve the curve to use. + * @returns a pointer to a string. This is allocated on the heap, and + * it is the caller's responsibility to free it. + */ +extern char *stp_curve_write_string(const stp_curve_t *curve); + +/** + * Create a curve from a stream. + * @warning NOTE that these calls are not thread-safe! These + * routines may manipulate the locale to achieve a safe + * representation. + * @param fp the stream to read. + * @returns the newly created curve, or NULL if an error occured. + */ +extern stp_curve_t *stp_curve_create_from_stream(FILE* fp); + +/** + * Create a curve from a stream. + * @warning NOTE that these calls are not thread-safe! These + * routines may manipulate the locale to achieve a safe + * representation. + * @param file the file to read. + * @returns the newly created curve, or NULL if an error occured. + */ +extern stp_curve_t *stp_curve_create_from_file(const char* file); + +/** + * Create a curve from a string. + * @warning NOTE that these calls are not thread-safe! These + * routines may manipulate the locale to achieve a safe + * representation. + * @param string the string to read. + * @returns the newly created curve, or NULL if an error occured. + */ +extern stp_curve_t *stp_curve_create_from_string(const char* string); + +/** + * Compose two curves, creating a third curve. Only add and multiply + * composition is currently supported. + * If both curves are gamma curves with the same sign, and the + * operation is multiplication or division, the returned curve is a + * gamma curve with the appropriate number of points. + * Both a and b must have the same wraparound type. + * @param retval a pointer to store the location of the newly-created + * output curve in. + * @param a the first source curve. + * @param b the second source curve. + * @param mode the composition mode. + * @param points the number of points in the output curve (must not + * exceed 1048576). It must be at least two, unless the curve is a + * gamma curve and the operation chosen is multiplication or division. + * If -1, the resulting number of points will be the least common + * multiplier of the number of points in the input and output curves + * (but will not exceed 1048576). + * @returns FALSE if element-wise composition fails. + */ +extern int stp_curve_compose(stp_curve_t **retval, + stp_curve_t *a, stp_curve_t *b, + stp_curve_compose_t mode, int points); + + /** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_CURVE_H */ +/* + * End of "$Id: curve.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". + */ diff --git a/include/gutenprint/dither.h b/include/gutenprint/dither.h new file mode 100644 index 0000000..55f1b1e --- /dev/null +++ b/include/gutenprint/dither.h @@ -0,0 +1,204 @@ +/* + * "$Id: dither.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * libgimpprint dither header. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Revision History: + * + * See ChangeLog + */ + +/** + * @file gutenprint/dither.h + * @brief Dither functions. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifndef GUTENPRINT_DITHER_H +#define GUTENPRINT_DITHER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef HAVE_CONFIG_H +#include +#endif + +/* + * STP_ECOLOR_K must be 0 + */ +#define STP_ECOLOR_K 0 +#define STP_ECOLOR_C 1 +#define STP_ECOLOR_M 2 +#define STP_ECOLOR_Y 3 +#define STP_NCOLORS (4) + +typedef struct stp_dither_matrix_short +{ + int x; + int y; + int bytes; + int prescaled; + const unsigned short *data; +} stp_dither_matrix_short_t; + +typedef struct stp_dither_matrix_normal +{ + int x; + int y; + int bytes; + int prescaled; + const unsigned *data; +} stp_dither_matrix_normal_t; + +typedef struct stp_dither_matrix_generic +{ + int x; + int y; + int bytes; + int prescaled; + const void *data; +} stp_dither_matrix_generic_t; + +typedef struct dither_matrix_impl +{ + int base; + int exp; + int x_size; + int y_size; + int total_size; + int last_x; + int last_x_mod; + int last_y; + int last_y_mod; + int index; + int i_own; + int x_offset; + int y_offset; + unsigned fast_mask; + unsigned *matrix; +} stp_dither_matrix_impl_t; + +extern void stp_dither_matrix_iterated_init(stp_dither_matrix_impl_t *mat, size_t size, + size_t exponent, const unsigned *array); +extern void stp_dither_matrix_shear(stp_dither_matrix_impl_t *mat, + int x_shear, int y_shear); +extern void stp_dither_matrix_init(stp_dither_matrix_impl_t *mat, int x_size, + int y_size, const unsigned int *array, + int transpose, int prescaled); +extern void stp_dither_matrix_init_short(stp_dither_matrix_impl_t *mat, int x_size, + int y_size, + const unsigned short *array, + int transpose, int prescaled); +extern int stp_dither_matrix_validate_array(const stp_array_t *array); +extern void stp_dither_matrix_init_from_dither_array(stp_dither_matrix_impl_t *mat, + const stp_array_t *array, + int transpose); +extern void stp_dither_matrix_destroy(stp_dither_matrix_impl_t *mat); +extern void stp_dither_matrix_clone(const stp_dither_matrix_impl_t *src, + stp_dither_matrix_impl_t *dest, + int x_offset, int y_offset); +extern void stp_dither_matrix_copy(const stp_dither_matrix_impl_t *src, + stp_dither_matrix_impl_t *dest); +extern void stp_dither_matrix_scale_exponentially(stp_dither_matrix_impl_t *mat, + double exponent); +extern void stp_dither_matrix_set_row(stp_dither_matrix_impl_t *mat, int y); +extern stp_array_t *stp_find_standard_dither_array(int x_aspect, int y_aspect); + + +typedef struct stp_dotsize +{ + unsigned bit_pattern; + double value; +} stp_dotsize_t; + +typedef struct stp_shade +{ + double value; + int numsizes; + const stp_dotsize_t *dot_sizes; +} stp_shade_t; + +extern stp_parameter_list_t stp_dither_list_parameters(const stp_vars_t *v); + +extern void +stp_dither_describe_parameter(const stp_vars_t *v, const char *name, + stp_parameter_t *description); + +extern void stp_dither_init(stp_vars_t *v, stp_image_t *image, + int out_width, int xdpi, int ydpi); +extern void stp_dither_set_iterated_matrix(stp_vars_t *v, size_t edge, + size_t iterations, + const unsigned *data, + int prescaled, + int x_shear, int y_shear); +extern void stp_dither_set_matrix(stp_vars_t *v, const stp_dither_matrix_generic_t *mat, + int transpose, int x_shear, int y_shear); +extern void stp_dither_set_matrix_from_dither_array(stp_vars_t *v, + const stp_array_t *array, + int transpose); +extern void stp_dither_set_transition(stp_vars_t *v, double); +extern void stp_dither_set_randomizer(stp_vars_t *v, int color, double); +extern void stp_dither_set_ink_spread(stp_vars_t *v, int spread); +extern void stp_dither_set_adaptive_limit(stp_vars_t *v, double limit); +extern int stp_dither_get_first_position(stp_vars_t *v, int color, int subchan); +extern int stp_dither_get_last_position(stp_vars_t *v, int color, int subchan); +extern void stp_dither_set_inks_simple(stp_vars_t *v, int color, int nlevels, + const double *levels, double density, + double darkness); +extern void stp_dither_set_inks_full(stp_vars_t *v, int color, int nshades, + const stp_shade_t *shades, + double density, double darkness); +extern void stp_dither_set_inks(stp_vars_t *v, int color, + double density, double darkness, + int nshades, const double *svalues, + int ndotsizes, const double *dvalues); + + +extern void stp_dither_add_channel(stp_vars_t *v, unsigned char *data, + unsigned channel, unsigned subchannel); + +extern unsigned char *stp_dither_get_channel(stp_vars_t *v, + unsigned channel, + unsigned subchannel); + +extern void stp_dither(stp_vars_t *v, int row, int duplicate_line, + int zero_mask, const unsigned char *mask); + +/* #ifdef STP_TESTDITHER */ +extern void stp_dither_internal(stp_vars_t *v, int row, + const unsigned short *input, + int duplicate_line, int zero_mask, + const unsigned char *mask); +/* #endif */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_DITHER_H */ +/* + * End of "$Id: dither.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". + */ diff --git a/include/gutenprint/gutenprint-intl-internal.h b/include/gutenprint/gutenprint-intl-internal.h new file mode 100644 index 0000000..5057530 --- /dev/null +++ b/include/gutenprint/gutenprint-intl-internal.h @@ -0,0 +1,88 @@ +/* + * "$Id: gutenprint-intl-internal.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * I18N header file for the gimp-print. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com), + * Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/gutenprint-intl-internal.h + * @brief Internationalisation functions. + */ + +#ifndef GUTENPRINT_INTL_INTERNAL_H +#define GUTENPRINT_INTL_INTERNAL_H + +#ifdef __cplusplus +extern "C" { +#endif + + /** + * Internationalisation functions are used to localise Gimp-Print by + * translating strings into the user's native language. + * + * The macros defined in this header are convenience wrappers around + * the gettext functions provided by libintl library (or directly by + * libc on GNU systems). They differ from the normal intl functions + * in that the textdomain is fixed, for use by functions internal to + * Gimp-Print. This header should not be included by source files + * outside the gimp-print source tree. + * + * @defgroup intl_internal intl-internal + * @{ + */ + +#ifdef INCLUDE_LOCALE_H +INCLUDE_LOCALE_H +#else +#include +#endif + +#if defined ENABLE_NLS && !defined DISABLE_NLS +# include +/** Translate String. */ +# define _(String) dgettext (PACKAGE, String) +# undef gettext +/** Translate String. */ +# define gettext(String) dgettext (PACKAGE, String) +# ifdef gettext_noop +/** Mark String for translation, but don't translate it right now. */ +# define N_(String) gettext_noop (String) +# else +/** Mark String for translation, but don't translate it right now. */ +# define N_(String) (String) +# endif +#else /* ifndef ENABLE_NLS */ +/* Stubs that do something close enough. */ +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + + /** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_INTL_INTERNAL_H */ diff --git a/include/gutenprint/gutenprint-intl.h b/include/gutenprint/gutenprint-intl.h new file mode 100644 index 0000000..e859b3d --- /dev/null +++ b/include/gutenprint/gutenprint-intl.h @@ -0,0 +1,91 @@ +/* + * "$Id: gutenprint-intl.h,v 1.2 2004/11/28 15:59:29 rleigh Exp $" + * + * I18N header file for Gimp-Print. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com), + * Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/gutenprint-intl.h + * @brief Internationalisation functions. + */ + +#ifndef GUTENPRINT_INTL_H +#define GUTENPRINT_INTL_H + +#ifdef __cplusplus +extern "C" { +#endif + + /** + * Internationalisation functions are used to localise Gimp-Print by + * translating strings into the user's native language. + * + * The macros defined in this header are convenience wrappers around + * the gettext functions provided by libintl library (or directly by + * libc on GNU systems). + * + * @defgroup intl intl + * @{ + */ + +#ifdef INCLUDE_LOCALE_H +INCLUDE_LOCALE_H +#else +#include +#endif + +#ifdef ENABLE_NLS + +#include +#ifndef _ +/** Translate String. */ +#define _(String) gettext (String) +#endif +#ifndef gettext_noop +/** Mark String for translation, but don't translate it right now. */ +#define gettext_noop(String) (String) +#endif +#ifdef gettext_noop +/** Mark String for translation, but don't translate it right now. */ +# define N_(String) gettext_noop (String) +#else +/** Mark String for translation, but don't translate it right now. */ +# define N_(String) (String) +#endif + +#else /* ifndef ENABLE_NLS */ +/* Stubs that do something close enough. */ +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) + +#endif + + /** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_INTL_H */ diff --git a/include/gutenprint/gutenprint-module.h b/include/gutenprint/gutenprint-module.h new file mode 100644 index 0000000..9e59ecd --- /dev/null +++ b/include/gutenprint/gutenprint-module.h @@ -0,0 +1,67 @@ +/* -*- Mode: C -*- + * $Id: gutenprint-module.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $ + * + * Gimp-Print module header file + * + * Copyright 1997-2002 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Revision History: + * + * See ChangeLog + */ + +/** + * @file gutenprint/gutenprint-module.h + * @brief Gutenprint module header. + * This header includes all of the public headers used by modules. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifndef GUTENPRINT_GUTENPRINT_MODULE_H +#define GUTENPRINT_GUTENPRINT_MODULE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define STP_MODULE 1 + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_MODULE_H */ +/* + * End of $Id: gutenprint-module.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $ + */ diff --git a/include/gutenprint/gutenprint-version.h.in b/include/gutenprint/gutenprint-version.h.in new file mode 100644 index 0000000..e35cce4 --- /dev/null +++ b/include/gutenprint/gutenprint-version.h.in @@ -0,0 +1,90 @@ +/* -*- Mode: C -*- + * $Id: gutenprint-version.h.in,v 1.1 2004/09/17 18:38:01 rleigh Exp $ + * + * Version of Gimp-print + * + * Copyright 2002 Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Revision History: + * + * See ChangeLog + */ + +/** + * @file gutenprint-version.h + * @brief Version functions. + */ + +#ifndef GUTENPRINT_VERSION_H +#define GUTENPRINT_VERSION_H + +/** + * Version information. Version information may be used to check the + * library version at compile-time, using macros, or at run-time, + * using constants. + * + * @defgroup version version + * @{ + */ + + +/* + * Autogen-time versioning. + */ +#define STP_MAJOR_VERSION (@GUTENPRINT_MAJOR_VERSION@) +#define STP_MINOR_VERSION (@GUTENPRINT_MINOR_VERSION@) +#define STP_MICRO_VERSION (@GUTENPRINT_MICRO_VERSION@) +#define STP_CURRENT_INTERFACE (@GUTENPRINT_CURRENT_INTERFACE@) +#define STP_BINARY_AGE (@GUTENPRINT_BINARY_AGE@) +#define STP_INTERFACE_AGE (@GUTENPRINT_INTERFACE_AGE@) + +#define STP_CHECK_VERSION(major,minor,micro) \ + (STP_MAJOR_VERSION > (major) || \ + (STP_MAJOR_VERSION == (major) && \ + STP_MINOR_VERSION > (minor)) || \ + (STP_MAJOR_VERSION == (major) && \ + STP_MINOR_VERSION == (minor) && \ + STP_MICRO_VERSION >= (micro))) + +/** The library major version number. */ +extern const unsigned int stp_major_version; +/** The library minor version number. */ +extern const unsigned int stp_minor_version; +/** The library micro version number. */ +extern const unsigned int stp_micro_version; +/** The library ABI revision number (number of incompatible revisions). */ +extern const unsigned int stp_current_interface; +/** The library ABI binary age number (number of forward-compatible revisions). */ +extern const unsigned int stp_binary_age; +/** The library ABI interface age number (number of revisions of this ABI). */ +extern const unsigned int stp_interface_age; + +/** + * Check whether the library provides the requested version. + * @param required_major the minimum major revision. + * @param required_minor the minimum minor revision. + * @param required_micro the minimum micro revision. + * @returns NULL if the version matches, or else a description of the + * error if the library is too old or too new. + */ +extern const char *stp_check_version(unsigned int required_major, + unsigned int required_minor, + unsigned int required_micro); + + /** @} */ + +#endif /* GUTENPRINT_VERSION_H */ diff --git a/include/gutenprint/gutenprint.h b/include/gutenprint/gutenprint.h new file mode 100644 index 0000000..449f172 --- /dev/null +++ b/include/gutenprint/gutenprint.h @@ -0,0 +1,67 @@ +/* -*- Mode: C -*- + * $Id: gutenprint.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $ + * + * Gimp-Print header file + * + * Copyright 1997-2002 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Revision History: + * + * See ChangeLog + */ + +/** + * @file gutenprint/gutenprint.h + * @brief Gutenprint master header. + * This header includes all of the public headers. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifndef GUTENPRINT_H +#define GUTENPRINT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include /* For size_t */ +#include /* For FILE */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_H */ +/* + * End of $Id: gutenprint.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $ + */ diff --git a/include/gutenprint/image.h b/include/gutenprint/image.h new file mode 100644 index 0000000..ab9902d --- /dev/null +++ b/include/gutenprint/image.h @@ -0,0 +1,144 @@ +/* + * "$Id: image.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * libgimpprint image functions. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/image.h + * @brief Image functions. + */ + +#ifndef GUTENPRINT_IMAGE_H +#define GUTENPRINT_IMAGE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The image type is an abstract data type for interfacing with the + * image creation program. + * + * @defgroup image image + * @{ + */ + +/* + * Constants... + */ + +/*! The maximum number of channels. */ +#define STP_CHANNEL_LIMIT (32) + + +/** Image status. */ +typedef enum +{ + STP_IMAGE_STATUS_OK, /*!< Everything is OK. */ + STP_IMAGE_STATUS_ABORT /*!< An error occured, or the job was aborted. */ +} stp_image_status_t; + +/** + * The image type is an abstract data type for interfacing with the + * image creation program. It provides callbacks to functions defined + * within the client application which are called while printing the + * image. + */ +typedef struct stp_image +{ + /** + * This callback is used to perform any initialization required by + * the image layer for the image. It will be called once per image. + * @param image the image in use. + */ + void (*init)(struct stp_image *image); + /** + * This callback is called to reset the image to the beginning. It + * may (in principle) be called multiple times if a page is being + * printed more than once. + * @warning The reset() call may be removed in the future. + * @param image the image in use. + */ + void (*reset)(struct stp_image *image); + /** + * This callback returns the width of the image in pixels. + * @param image the image in use. + */ + int (*width)(struct stp_image *image); + /** + * This callback returns the height of the image in pixels. + * @param image the image in use. + */ + int (*height)(struct stp_image *image); + /** + * This callback transfers the data from the image to the gimp-print + * library. It is called from the driver layer. It should copy + * WIDTH (as returned by the width() member) pixels of data into the + * data buffer. It normally returns STP_IMAGE_STATUS_OK; if + * something goes wrong, or the application wishes to stop producing + * any further output (e. g. because the user cancelled the print + * job), it should return STP_IMAGE_STATUS_ABORT. This will cause + * the driver to flush any remaining data to the output. It will + * always request rows in monotonically ascending order, but it may + * skip rows (if, for example, the resolution of the input is higher + * than the resolution of the output). + * @param image the image in use. + * @param data a pointer to width() bytes of pixel data. + * @param byte_limit (image width * number of channels). + * @param row (unused). + */ + stp_image_status_t (*get_row)(struct stp_image *image, unsigned char *data, + size_t byte_limit, int row); + + /** + * This callback returns the name of the application. This is + * embedded in the output by some drivers. + */ + const char *(*get_appname)(struct stp_image *image); + /** + * This callback is called at the end of each page. + */ + void (*conclude)(struct stp_image *image); + /** + * A pointer to an application-specific state information that might + * need to be associated with the image object. + */ + void *rep; +} stp_image_t; + +extern void stp_image_init(stp_image_t *image); +extern void stp_image_reset(stp_image_t *image); +extern int stp_image_width(stp_image_t *image); +extern int stp_image_height(stp_image_t *image); +extern stp_image_status_t stp_image_get_row(stp_image_t *image, + unsigned char *data, + size_t limit, int row); +extern const char *stp_image_get_appname(stp_image_t *image); +extern void stp_image_conclude(stp_image_t *image); + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_IMAGE_H */ +/* + * End of "$Id: image.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". + */ diff --git a/include/gutenprint/list.h b/include/gutenprint/list.h new file mode 100644 index 0000000..64f3beb --- /dev/null +++ b/include/gutenprint/list.h @@ -0,0 +1,337 @@ +/* + * "$Id: list.h,v 1.2 2004/11/28 15:59:29 rleigh Exp $" + * + * libgimpprint generic list type + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com), + * Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org) + * Copyright 2002 Roger Leigh (rleigh@debian.org) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/list.h + * @brief Generic list functions. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifndef GUTENPRINT_LIST_H +#define GUTENPRINT_LIST_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The list data type implements a fast generic doubly-linked list. + * It supports all of the operations you might want in a list (insert, + * remove, iterate over the list, copy whole lists), plus some + * (optional) less common features: finding items by index, name or + * long name, and sorting. These should also be fairly fast, due to + * caching in the list head. + * + * @defgroup list list + * @{ + */ + + struct stp_list_item; + /** + * The list item opaque data type. + * This object is a node in the list. + */ + typedef struct stp_list_item stp_list_item_t; + + struct stp_list; + /** + * The list opaque data type. + * This object represents the list as a whole. + */ + typedef struct stp_list stp_list_t; + + /** + * A callback function to free the data a node contains. + * The parameter is a pointer to the node data. + */ + typedef void (*stp_node_freefunc)(void *); + + /** + * A callback function to copy the data a node contains. + * The parameter is a pointer to the node data. + * The return value is a pointer to the new copy of the data. + */ + typedef void *(*stp_node_copyfunc)(const void *); + + /** + * A callback function to get the name of a node. + * The parameter is a pointer to the node data. + * The return value is a pointer to the name of the + * node, or NULL if there is no name. + */ + typedef const char *(*stp_node_namefunc)(const void *); + + /** + * A callback function to compare two nodes. + * The two parameters are pointers to node data. + * The return value is <0 if the first sorts before the + * second, 0 if they sort identically, and >0 if the + * first sorts after the second. + */ + typedef int (*stp_node_sortfunc)(const void *, const void *); + + /** + * Free node data allocated with stp_malloc. + * This function is indended for use as an stp_node_freefunc, which + * uses stp_free to free the node data. + * @param item the node data to free + */ + extern void stp_list_node_free_data(void *item); + + /** + * Create a new list object. + * @returns the newly created list object. + */ + extern stp_list_t *stp_list_create(void); + + /** + * Copy and allocate a list object. + * list must be a valid list object previously created with + * stp_list_create(). + * @param list the list to copy. + * @returns a pointer to the new copy of the list. + */ + extern stp_list_t *stp_list_copy(const stp_list_t *list); + + /** + * Destroy a list object. + * It is an error to destroy the list more than once. + * @param list the list to destroy. + * @returns 0 on success, 1 on failure. + */ + extern int stp_list_destroy(stp_list_t *list); + + /** + * Find the first item in a list. + * @param list the list to use. + * @returns a pointer to the first list item, or NULL if the list is + * empty. + */ + extern stp_list_item_t *stp_list_get_start(const stp_list_t *list); + + /** + * Find the last item in a list. + * @param list the list to use. + * @returns a pointer to the last list item, or NULL if the list is + * empty. + */ + extern stp_list_item_t *stp_list_get_end(const stp_list_t *list); + + /** + * Find an item in a list by its index. + * @param list the list to use. + * @param idx the index to find. + * @returns a pointer to the list item, or NULL if the index is + * invalid or the list is empty. + */ + extern stp_list_item_t *stp_list_get_item_by_index(const stp_list_t *list, + int idx); + + /** + * Find an item in a list by its name. + * @param list the list to use. + * @param name the name to find. + * @returns a pointer to the list item, or NULL if the name is + * invalid or the list is empty. + */ + extern stp_list_item_t *stp_list_get_item_by_name(const stp_list_t *list, + const char *name); + + /** + * Find an item in a list by its long name. + * @param list the list to use. + * @param long_name the long name to find. + * @returns a pointer to the list item, or NULL if the long name is + * invalid or the list is empty. + */ + extern stp_list_item_t *stp_list_get_item_by_long_name(const stp_list_t *list, + const char *long_name); + + /** + * Get the length of a list. + * @param list the list to use. + * @returns the list length (number of list items). + */ + extern int stp_list_get_length(const stp_list_t *list); + + /** + * Set a list node free function. + * This callback function will be called whenever a list item is + * destroyed. Its intended use is for automatic object destruction + * and any other cleanup required. + * @param list the list to use. + * @param freefunc the function to set. + */ + extern void stp_list_set_freefunc(stp_list_t *list, + stp_node_freefunc freefunc); + + /** + * Get a list node free function. + * @param list the list to use. + * @returns the function previously set with stp_list_set_freefunc, + * or NULL if no function has been set. + */ + extern stp_node_freefunc stp_list_get_freefunc(const stp_list_t *list); + + /** + * Set a list node copy function. + * This callback function will be called whenever a list item is + * copied. Its intended use is for automatic object copying + * (since C lacks a copy constructor). + * @param list the list to use. + * @param copyfunc the function to set. + */ + extern void stp_list_set_copyfunc(stp_list_t *list, + stp_node_copyfunc copyfunc); + + /** + * Get a list node copy function. + * @param list the list to use. + * @returns the function previously set with stp_list_set_copyfunc, + * or NULL if no function has been set. + */ + extern stp_node_copyfunc stp_list_get_copyfunc(const stp_list_t *list); + + /** + * Set a list node name function. + * This callback function will be called whenever the name of a list + * item needs to be determined. This is used to find list items by + * name. + * @param list the list to use. + * @param namefunc the function to set. + */ + extern void stp_list_set_namefunc(stp_list_t *list, + stp_node_namefunc namefunc); + + /** + * Get a list node name function. + * @param list the list to use. + * @returns the function previously set with stp_list_set_namefunc, + * or NULL if no function has been set. + */ + extern stp_node_namefunc stp_list_get_namefunc(const stp_list_t *list); + + /** + * Set a list node long name function. + * This callback function will be called whenever the long name of a list + * item needs to be determined. This is used to find list items by + * long name. + * @param list the list to use. + * @param long_namefunc the function to set. + */ + extern void stp_list_set_long_namefunc(stp_list_t *list, + stp_node_namefunc long_namefunc); + + /** + * Get a list node long name function. + * @param list the list to use. + * @returns the function previously set with + * stp_list_set_long_namefunc, or NULL if no function has been set. + */ + extern stp_node_namefunc stp_list_get_long_namefunc(const stp_list_t *list); + + /** + * Set a list node sort function. + * This callback function will be called to determine the sort + * order for list items in sorted lists. + * @param list the list to use. + * @param sortfunc the function to set. + */ + extern void stp_list_set_sortfunc(stp_list_t *list, + stp_node_sortfunc sortfunc); + + /** + * Get a list node sort function. + * @param list the list to use. + * @returns the function previously set with + * stp_list_set_sortfunc, or NULL if no function has been set. + */ + extern stp_node_sortfunc stp_list_get_sortfunc(const stp_list_t *list); + + /** + * Create a new list item. + * @param list the list to use. + * @param next the next item in the list, or NULL to insert at the end of + * the list. + * @param data the data the list item will contain. + * @returns 0 on success, 1 on failure (if data is NULL, for example). + */ + extern int stp_list_item_create(stp_list_t *list, + stp_list_item_t *next, + const void *data); + + /** + * Destroy a list item. + * @param list the list to use. + * @param item the item to destroy. + * @returns 0 on success, 1 on failure. + */ + extern int stp_list_item_destroy(stp_list_t *list, + stp_list_item_t *item); + + /** + * Get the previous item in the list. + * @param item the item to start from. + * @returns a pointer to the list item prior to item, or NULL if + * item is the start of the list. + */ + extern stp_list_item_t *stp_list_item_prev(const stp_list_item_t *item); + + /** + * Get the next item in the list. + * @param item the item to start from. + * @returns a pointer to the list item following from item, or NULL + * if item is the end of the list. + */ + extern stp_list_item_t *stp_list_item_next(const stp_list_item_t *item); + + /** + * Get the data associated with a list item. + * @param item the list item to use. + * @returns the data associated with item. + */ + extern void *stp_list_item_get_data(const stp_list_item_t *item); + + /** + * Set the data associated with a list item. + * @warning Note that if a sortfunc is in use, changing the data + * will NOT re-sort the list! + * @param item the list item to use. + * @param data the data to set. + * @returns 0 on success, 1 on failure (if data is NULL). + */ + extern int stp_list_item_set_data(stp_list_item_t *item, + void *data); + + /** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_LIST_H */ diff --git a/include/gutenprint/module.h b/include/gutenprint/module.h new file mode 100644 index 0000000..3e54099 --- /dev/null +++ b/include/gutenprint/module.h @@ -0,0 +1,111 @@ +/* + * "$Id: module.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * libgimpprint module loader - load modules with libltdl/libdl. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com), + * Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org) + * Copyright 2002 Roger Leigh (rleigh@debian.org) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/module.h + * @brief Module functions. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifndef GUTENPRINT_MODULE_H +#define GUTENPRINT_MODULE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifdef USE_LTDL +#include +#elif defined(USE_DLOPEN) +#include +#endif + + +#ifdef USE_LTDL +#define DLOPEN(Filename) lt_dlopen(Filename) +#define DLSYM(Handle, Symbol) lt_dlsym(Handle, Symbol) +#define DLCLOSE(Handle) lt_dlclose(Handle) +#define DLERROR() lt_dlerror() +#elif defined(USE_DLOPEN) +#define DLOPEN(Filename) dlopen(Filename, RTLD_LAZY) +#define DLSYM(Handle, Symbol) stp_dlsym(Handle, Symbol, modulename) +#define DLCLOSE(Handle) dlclose(Handle) +#define DLERROR() dlerror() +#endif + +typedef struct stp_module_version +{ + int major; + int minor; +} stp_module_version_t; + + +typedef enum +{ + STP_MODULE_CLASS_INVALID, + STP_MODULE_CLASS_MISC, + STP_MODULE_CLASS_FAMILY, + STP_MODULE_CLASS_COLOR, + STP_MODULE_CLASS_DITHER +} stp_module_class_t; + + +typedef struct stp_module +{ + const char *name; /* module name */ + const char *version; /* module version number */ + const char *comment; /* description of module function */ + stp_module_class_t class; /* type of module */ +#ifdef USE_LTDL + lt_dlhandle handle; /* ltdl module pointer (set by libgimpprint) */ +#else + void *handle; /* dlopen or static module pointer */ +#endif + int (*init)(void); /* initialisation function */ + int (*fini)(void); /* finalise (cleanup and removal) function */ + void *syms; /* pointer to e.g. a struct containing + internal module symbols (class-specific + functions and data) */ +} stp_module_t; + + +extern int stp_module_load(void); +extern int stp_module_exit(void); +extern int stp_module_open(const char *modulename); +extern int stp_module_init(void); +extern int stp_module_close(stp_list_item_t *module); +extern stp_list_t *stp_module_get_class(stp_module_class_t class); + + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_MODULE_H */ diff --git a/include/gutenprint/mxml.h b/include/gutenprint/mxml.h new file mode 100644 index 0000000..d82a021 --- /dev/null +++ b/include/gutenprint/mxml.h @@ -0,0 +1,178 @@ +/* + * "$Id: mxml.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * Header file for mini-XML, a small XML-like file parsing library. + * + * Copyright 2003 by Michael Sweet. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/** + * @file gutenprint/mxml.h + * @brief Mini-XML XML parsing functions. + */ + +/* + * Prevent multiple inclusion... + */ + +#ifndef GUTENPRINT_MXML_H +# define GUTENPRINT_MXML_H + +/* + * Include necessary headers... + */ + +# include +# include +# include +# include +# include + + +/* + * Constants... + */ + +# define STP_MXML_WRAP 70 /* Wrap XML output at this column position */ +# define STP_MXML_TAB 8 /* Tabs every N columns */ + +# define STP_MXML_NO_CALLBACK 0 /* Don't use a type callback */ +# define STP_MXML_NO_PARENT 0 /* No parent for the node */ + +# define STP_MXML_DESCEND 1 /* Descend when finding/walking */ +# define STP_MXML_NO_DESCEND 0 /* Don't descend when finding/walking */ +# define STP_MXML_DESCEND_FIRST -1 /* Descend for first find */ + +# define STP_MXML_WS_BEFORE_OPEN 0 /* Callback for before open tag */ +# define STP_MXML_WS_AFTER_OPEN 1 /* Callback for after open tag */ +# define STP_MXML_WS_BEFORE_CLOSE 2 /* Callback for before close tag */ +# define STP_MXML_WS_AFTER_CLOSE 3 /* Callback for after close tag */ + +# define STP_MXML_ADD_BEFORE 0 /* Add node before specified node */ +# define STP_MXML_ADD_AFTER 1 /* Add node after specified node */ +# define STP_MXML_ADD_TO_PARENT NULL /* Add node relative to parent */ + + +/* + * Data types... + */ + +typedef enum stp_mxml_type_e /**** The XML node type. ****/ +{ + STP_MXML_ELEMENT, /* XML element with attributes */ + STP_MXML_INTEGER, /* Integer value */ + STP_MXML_OPAQUE, /* Opaque string */ + STP_MXML_REAL, /* Real value */ + STP_MXML_TEXT /* Text fragment */ +} stp_mxml_type_t; + +typedef struct stp_mxml_attr_s /**** An XML element attribute value. ****/ +{ + char *name; /* Attribute name */ + char *value; /* Attribute value */ +} stp_mxml_attr_t; + +typedef struct stp_mxml_value_s /**** An XML element value. ****/ +{ + char *name; /* Name of element */ + int num_attrs; /* Number of attributes */ + stp_mxml_attr_t *attrs; /* Attributes */ +} stp_mxml_element_t; + +typedef struct stp_mxml_text_s /**** An XML text value. ****/ +{ + int whitespace; /* Leading whitespace? */ + char *string; /* Fragment string */ +} stp_mxml_text_t; + +typedef union stp_mxml_value_u /**** An XML node value. ****/ +{ + stp_mxml_element_t element; /* Element */ + int integer; /* Integer number */ + char *opaque; /* Opaque string */ + double real; /* Real number */ + stp_mxml_text_t text; /* Text fragment */ +} stp_mxml_value_t; + +typedef struct stp_mxml_node_s stp_mxml_node_t; /**** An XML node. ****/ + +struct stp_mxml_node_s /**** An XML node. ****/ +{ + stp_mxml_type_t type; /* Node type */ + stp_mxml_node_t *next; /* Next node under same parent */ + stp_mxml_node_t *prev; /* Previous node under same parent */ + stp_mxml_node_t *parent; /* Parent node */ + stp_mxml_node_t *child; /* First child node */ + stp_mxml_node_t *last_child; /* Last child node */ + stp_mxml_value_t value; /* Node value */ +}; + + +/* + * C++ support... + */ + +# ifdef __cplusplus +extern "C" { +# endif /* __cplusplus */ + +/* + * Prototypes... + */ + +extern void stp_mxmlAdd(stp_mxml_node_t *parent, int where, + stp_mxml_node_t *child, stp_mxml_node_t *node); +extern void stp_mxmlDelete(stp_mxml_node_t *node); +extern const char *stp_mxmlElementGetAttr(stp_mxml_node_t *node, const char *name); +extern void stp_mxmlElementSetAttr(stp_mxml_node_t *node, const char *name, + const char *value); +extern stp_mxml_node_t *stp_mxmlFindElement(stp_mxml_node_t *node, stp_mxml_node_t *top, + const char *name, const char *attr, + const char *value, int descend); +extern stp_mxml_node_t *stp_mxmlLoadFile(stp_mxml_node_t *top, FILE *fp, + stp_mxml_type_t (*cb)(stp_mxml_node_t *)); +extern stp_mxml_node_t *stp_mxmlLoadString(stp_mxml_node_t *top, const char *s, + stp_mxml_type_t (*cb)(stp_mxml_node_t *)); +extern stp_mxml_node_t *stp_mxmlNewElement(stp_mxml_node_t *parent, const char *name); +extern stp_mxml_node_t *stp_mxmlNewInteger(stp_mxml_node_t *parent, int integer); +extern stp_mxml_node_t *stp_mxmlNewOpaque(stp_mxml_node_t *parent, const char *opaque); +extern stp_mxml_node_t *stp_mxmlNewReal(stp_mxml_node_t *parent, double real); +extern stp_mxml_node_t *stp_mxmlNewText(stp_mxml_node_t *parent, int whitespace, + const char *string); +extern void stp_mxmlRemove(stp_mxml_node_t *node); +extern char *stp_mxmlSaveAllocString(stp_mxml_node_t *node, + int (*cb)(stp_mxml_node_t *, int)); +extern int stp_mxmlSaveFile(stp_mxml_node_t *node, FILE *fp, + int (*cb)(stp_mxml_node_t *, int)); +extern int stp_mxmlSaveString(stp_mxml_node_t *node, char *buffer, + int bufsize, + int (*cb)(stp_mxml_node_t *, int)); +extern stp_mxml_node_t *stp_mxmlWalkNext(stp_mxml_node_t *node, stp_mxml_node_t *top, + int descend); +extern stp_mxml_node_t *stp_mxmlWalkPrev(stp_mxml_node_t *node, stp_mxml_node_t *top, + int descend); + + +/* + * C++ support... + */ + +# ifdef __cplusplus +} +# endif /* __cplusplus */ +#endif /* !GUTENPRINT_MXML_H */ + + +/* + * End of "$Id: mxml.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". + */ diff --git a/include/gutenprint/paper.h b/include/gutenprint/paper.h new file mode 100644 index 0000000..876e1f8 --- /dev/null +++ b/include/gutenprint/paper.h @@ -0,0 +1,133 @@ +/* + * "$Id: paper.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * libgimpprint paper functions. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/paper.h + * @brief Paper size functions. + */ + +#ifndef GUTENPRINT_PAPER_H +#define GUTENPRINT_PAPER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/** + * The papersize describes the dimensions of a paper. + * + * @defgroup papersize papersize + * @{ + */ + + + +/** + * Units of measurement. + */ +typedef enum +{ + /** English/Imperial units. */ + PAPERSIZE_ENGLISH_STANDARD, + /** Metric units. */ + PAPERSIZE_METRIC_STANDARD, + /** English/Imperial units (optional paper, not displayed by default). */ + PAPERSIZE_ENGLISH_EXTENDED, + /** Metric units (optional paper, not displayed by default). */ + PAPERSIZE_METRIC_EXTENDED +} stp_papersize_unit_t; + +/** The papersize data type. */ +typedef struct +{ + /** Short unique name (not translated). */ + char *name; + /** Long descriptive name (translated). */ + char *text; + /** Comment. */ + char *comment; + /** Paper width. */ + unsigned width; + /** Paper height. */ + unsigned height; + /** Top margin. */ + unsigned top; + /** Left margin. */ + unsigned left; + /** Bottom margin. */ + unsigned bottom; + /** Right margin. */ + unsigned right; + /** Units of measurement. */ + stp_papersize_unit_t paper_unit; +} stp_papersize_t; + +/** + * Get the number of available papersizes. + * @returns the number of papersizes. + */ +extern int stp_known_papersizes(void); + +/** + * Get a papersize by name. + * @param name the short unique name of the paper. + * @returns a pointer to the papersize, or NULL on failure. The + * pointer should not be freed. + */ +extern const stp_papersize_t *stp_get_papersize_by_name(const char *name); + +/** + * Get a papersize by size. + * The nearest available size to the size requested will be found. + * @param length the length of the paper. + * @param width the width of the paper + * @returns a pointer to the papersize, or NULL on failure. The + * pointer should not be freed. + */ +extern const stp_papersize_t *stp_get_papersize_by_size(int length, + int width); + +/** + * Get a papersize by its index number. + * @param idx the index number. This must not be greater than (total + * number of papers - 1). + * @returns a pointer to the papersize, or NULL on failure. The + * pointer should not be freed. + */ +extern const stp_papersize_t *stp_get_papersize_by_index(int idx); + +extern void stp_default_media_size(const stp_vars_t *v, + int *width, int *height); + +/** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_PAPER_H */ +/* + * End of "$Id: paper.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". + */ diff --git a/include/gutenprint/path.h b/include/gutenprint/path.h new file mode 100644 index 0000000..e08c9ed --- /dev/null +++ b/include/gutenprint/path.h @@ -0,0 +1,57 @@ +/* + * "$Id: path.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * libgimpprint path functions header + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com), + * Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org) + * Copyright 2002 Roger Leigh (rleigh@debian.org) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/path.h + * @brief Simple directory path functions. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifndef GUTENPRINT_PATH_H +#define GUTENPRINT_PATH_H + +#ifdef __cplusplus +extern "C" { +#endif + + +extern stp_list_t *stp_path_search(stp_list_t *dirlist, + const char *suffix); + +extern void stp_path_split(stp_list_t *list, + const char *path); + + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_PATH_H */ +/* + * End of "$Id: path.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". + */ diff --git a/include/gutenprint/printers.h b/include/gutenprint/printers.h new file mode 100644 index 0000000..103da04 --- /dev/null +++ b/include/gutenprint/printers.h @@ -0,0 +1,236 @@ +/* + * "$Id: printers.h,v 1.2 2004/11/28 15:59:29 rleigh Exp $" + * + * libgimpprint printer functions. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/printers.h + * @brief Printer functions. + */ + +#ifndef GUTENPRINT_PRINTERS_H +#define GUTENPRINT_PRINTERS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +/** + * The printer type represents a printer model. A particular + * printer model must selected in order to be able to print. Each + * printer model provides default print options through a default + * vars object. + * + * @defgroup printer printer + * @{ + */ + +struct stp_printer; +/** The printer opaque data type (representation of printer model). */ +typedef struct stp_printer stp_printer_t; + +/** + * Get the number of available printer models. + * @returns the number of printer models. + */ +extern int stp_printer_model_count(void); + +/** + * Get a printer model by its index number. + * @param idx the index number. This must not be greater than (total + * number of printers - 1). + * @returns a pointer to the printer model, or NULL on failure. The + * pointer should not be freed. + */ +extern const stp_printer_t *stp_get_printer_by_index(int idx); + +/** + * Get a printer model by its long (translated) name. + * @param long_name the printer model's long (translated) name. + * @returns a pointer to the printer model, or NULL on failure. The + * pointer should not be freed. + */ +extern const stp_printer_t *stp_get_printer_by_long_name(const char *long_name); + +/** + * Get a printer model by its short name. + * @param driver the printer model's short (driver) name. + * @returns a pointer to the printer model, or NULL on failure. The + * pointer should not be freed. + */ +extern const stp_printer_t *stp_get_printer_by_driver(const char *driver); + +/** + * Get the printer model from a vars object. + * @param v the vars to use. + * @returns a pointer to the printer model, or NULL on failure. The + * pointer should not be freed. + */ +extern const stp_printer_t *stp_get_printer(const stp_vars_t *v); + +/** + * Get the printer index number from the printer model short (driver) name. + * @deprecated There should never be any need to use this function. + * @param driver the printer model's short (driver) name. + * @returns the index number, or -1 on failure. + */ +extern int stp_get_printer_index_by_driver(const char *driver); + +/** + * Get a printer model's long (translated) name. + * @param p the printer model to use. + * @returns the long name (should never be freed). + */ +extern const char *stp_printer_get_long_name(const stp_printer_t * p); + +/** + * Get a printer model's short (driver) name. + * @param p the printer model to use. + * @returns the short name (should never be freed). + */ +extern const char *stp_printer_get_driver(const stp_printer_t *p); + +/** + * Get a printer model's family name. + * The family name is the name of the modular "family" driver this + * model uses. + * @param p the printer model to use. + * @returns the family name (should never be freed). + */ +extern const char *stp_printer_get_family(const stp_printer_t *p); + +/** + * Get a printer model's manufacturer's name. + * @param p the printer model to use. + * @returns the manufacturer's name (should never be freed). + */ +extern const char *stp_printer_get_manufacturer(const stp_printer_t *p); + +/** + * Get a printer model's model number. + * The model number is used internally by the "family" driver module, + * and has no meaning out of that context. It bears no relation to + * the model name/number actually found on the printer itself. + * @param p the printer model to use. + * @returns the model number. + */ +extern int stp_printer_get_model(const stp_printer_t *p); + +/** + * Get the default vars for a particular printer model. + * The default vars should be copied to a new vars object and + * customised prior to printing. + * @param p the printer model to use. + * @returns the printer model's default vars. + */ +extern const stp_vars_t *stp_printer_get_defaults(const stp_printer_t *p); + +/** + * Set a vars object to use a particular driver, and set the parameter + * to its defaults. + * @param v the vars to use. + * @param p the printer model to use. + */ +extern void stp_set_printer_defaults(stp_vars_t *v, const stp_printer_t *p); + + +/** + * Print the image. + * @warning stp_job_start() must be called prior to the first call to + * this function. + * @param v the vars to use. + * @param image the image to print. + * @returns 0 on failure, 1 on success, 2 on abort requested by the + * driver. + */ +extern int stp_print(const stp_vars_t *v, stp_image_t *image); + +/** + * Start a print job. + * @warning This function must be called prior to the first call to + * stp_print(). + * @param v the vars to use. + * @param image the image to print. + * @returns 1 on success, 0 on failure. + */ +extern int stp_start_job(const stp_vars_t *v, stp_image_t *image); + +/** + * End a print job. + * @param v the vars to use. + * @param image the image to print. + * @returns 1 on success, 0 on failure. + */ +extern int stp_end_job(const stp_vars_t *v, stp_image_t *image); + +typedef struct +{ + stp_parameter_list_t (*list_parameters)(const stp_vars_t *v); + void (*parameters)(const stp_vars_t *v, const char *name, + stp_parameter_t *); + void (*media_size)(const stp_vars_t *v, int *width, int *height); + void (*imageable_area)(const stp_vars_t *v, + int *left, int *right, int *bottom, int *top); + void (*limit)(const stp_vars_t *v, int *max_width, int *max_height, + int *min_width, int *min_height); + int (*print)(const stp_vars_t *v, stp_image_t *image); + void (*describe_resolution)(const stp_vars_t *v, int *x, int *y); + const char *(*describe_output)(const stp_vars_t *v); + int (*verify)(stp_vars_t *v); + int (*start_job)(const stp_vars_t *v, stp_image_t *image); + int (*end_job)(const stp_vars_t *v, stp_image_t *image); +} stp_printfuncs_t; + +typedef struct stp_family +{ + const stp_printfuncs_t *printfuncs; /* printfuncs for the printer */ + stp_list_t *printer_list; /* list of printers */ +} stp_family_t; + +extern int stp_get_model_id(const stp_vars_t *v); + +extern int stp_verify_printer_params(stp_vars_t *v); + +extern int stp_family_register(stp_list_t *family); +extern int stp_family_unregister(stp_list_t *family); +extern void stp_initialize_printer_defaults(void); + +extern stp_parameter_list_t stp_printer_list_parameters(const stp_vars_t *v); + +extern void +stp_printer_describe_parameter(const stp_vars_t *v, const char *name, + stp_parameter_t *description); + +const char *stp_describe_output(const stp_vars_t *v); + +/** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_PRINTERS_H */ +/* + * End of "$Id: printers.h,v 1.2 2004/11/28 15:59:29 rleigh Exp $". + */ diff --git a/include/gutenprint/sequence.h b/include/gutenprint/sequence.h new file mode 100644 index 0000000..02789df --- /dev/null +++ b/include/gutenprint/sequence.h @@ -0,0 +1,389 @@ +/* + * "$Id: sequence.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * libgimpprint sequence functions. + * + * Copyright 2003 Roger Leigh (rleigh@debian.org) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/sequence.h + * @brief Sequence functions. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gimpprint, etc. + */ + +#ifndef GUTENPRINT_SEQUENCE_H +#define GUTENPRINT_SEQUENCE_H + +#ifdef __cplusplus +extern "C" { +#endif + + + /** + * The sequence is a simple "vector of numbers" data structure. + * + * @defgroup sequence sequence + * @{ + */ + +struct stp_sequence; + /** The sequence opaque data type. */ +typedef struct stp_sequence stp_sequence_t; + + /** + * Create a new sequence. + * @returns the newly created sequence. + */ +extern stp_sequence_t *stp_sequence_create(void); + + /** + * Destroy a sequence. + * It is an error to destroy the sequence more than once. + * @param sequence the sequence to destroy. + */ +extern void stp_sequence_destroy(stp_sequence_t *sequence); + + /** + * Copy an sequence. + * Both dest and source must be valid sequences previously created + * with stp_sequence_create(). + * @param dest the destination sequence. + * @param source the source sequence. + */ +extern void stp_sequence_copy(stp_sequence_t *dest, + const stp_sequence_t *source); + + /** + * Copy and allocate an sequence. + * A new sequence will be created, and then the contents of source will + * be copied into it. The destination must not have been previously + * allocated with stp_sequence_create(). + * @param sequence the source sequence. + * @returns the new copy of the sequence. + */ +extern stp_sequence_t *stp_sequence_create_copy(const stp_sequence_t *sequence); + + /** + * Set the lower and upper bounds. + * The lower and upper bounds set the minimum and maximum values + * that a point in the sequence may hold. + * @param sequence the sequence to work on. + * @param low the lower bound. + * @param high the upper bound. + * @returns 1 on success, or 0 if the lower bound is greater than + * the upper bound. + */ +extern int stp_sequence_set_bounds(stp_sequence_t *sequence, + double low, double high); + + /** + * Get the lower and upper bounds. + * The values are stored in the variables pointed to by low and + * high. + * @param sequence the sequence to work on. + * @param low a pointer to a double to store the low bound in. + * @param high a pointer to a double to store the high bound in. + */ +extern void stp_sequence_get_bounds(const stp_sequence_t *sequence, + double *low, double *high); + + + /** + * Get range of values stored in the sequence. + * The values are stored in the variables pointed to by low and + * high. + * @param sequence the sequence to work on. + * @param low a pointer to a double to store the low bound in. + * @param high a pointer to a double to store the high bound in. + */ +extern void stp_sequence_get_range(const stp_sequence_t *sequence, + double *low, double *high); + + /** + * Set the sequence size. + * The size is the number of elements the sequence contains. Note + * that resizing will destroy all data contained in the sequence. + * @param sequence the sequence to work on. + * @param size the size to set the sequence to. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_size(stp_sequence_t *sequence, size_t size); + + /** + * Get the sequence size. + * @returns the sequence size. + */ +extern size_t stp_sequence_get_size(const stp_sequence_t *sequence); + + /** + * Set the data in a sequence. + * @param sequence the sequence to set. + * @param count the number of elements in the data. + * @param data a pointer to the first member of a sequence + * containing the data to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_data(stp_sequence_t *sequence, + size_t count, + const double *data); + + /** + * Set the data in a subrange of a sequence. + * @param sequence the sequence to set. + * @param where the starting element in the sequence (indexed from + * 0). + * @param size the number of elements in the data. + * @param data a pointer to the first member of a sequence + * containing the data to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_subrange(stp_sequence_t *sequence, + size_t where, size_t size, + const double *data); + + /** + * Get the data in a sequence. + * @param sequence the sequence to get the data from. + * @param size the number of elements in the sequence are stored in + * the size_t pointed to. + * @param data a pointer to the first element of an sequence of doubles + * is stored in a pointer to double*. + * @code + * stp_sequence_t *sequence; + * size_t size; + * double *data; + * stp_sequence_get_data(sequence, &size, &data); + * @endcode + */ +extern void stp_sequence_get_data(const stp_sequence_t *sequence, + size_t *size, const double **data); + + /** + * Set the data at a single point in a sequence. + * @param sequence the sequence to use. + * @param where the location (indexed from zero). + * @param data the datum to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_point(stp_sequence_t *sequence, + size_t where, double data); + + /** + * Get the data at a single point in a sequence. + * @param sequence the sequence to use. + * @param where the location (indexed from zero). + * @param data the datum is stored in the double pointed to. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_get_point(const stp_sequence_t *sequence, + size_t where, double *data); + + + /** + * Set the data in a sequence from float values. + * @param sequence the sequence to set. + * @param count the number of elements in the data. + * @param data a pointer to the first member of a sequence + * containing the data to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_float_data(stp_sequence_t *sequence, + size_t count, const float *data); + + /** + * Set the data in a sequence from long values. + * @param sequence the sequence to set. + * @param count the number of elements in the data. + * @param data a pointer to the first member of a sequence + * containing the data to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_long_data(stp_sequence_t *sequence, + size_t count, const long *data); + + /** + * Set the data in a sequence from unsigned long values. + * @param sequence the sequence to set. + * @param count the number of elements in the data. + * @param data a pointer to the first member of a sequence + * containing the data to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_ulong_data(stp_sequence_t *sequence, + size_t count, const unsigned long *data); + + /** + * Set the data in a sequence from int values. + * @param sequence the sequence to set. + * @param count the number of elements in the data. + * @param data a pointer to the first member of a sequence + * containing the data to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_int_data(stp_sequence_t *sequence, + size_t count, const int *data); + + /** + * Set the data in a sequence from unsigned int values. + * @param sequence the sequence to set. + * @param count the number of elements in the data. + * @param data a pointer to the first member of a sequence + * containing the data to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_uint_data(stp_sequence_t *sequence, + size_t count, const unsigned int *data); + + /** + * Set the data in a sequence from short values. + * @param sequence the sequence to set. + * @param count the number of elements in the data. + * @param data a pointer to the first member of a sequence + * containing the data to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_short_data(stp_sequence_t *sequence, + size_t count, const short *data); + + /** + * Set the data in a sequence from unsigned short values. + * @param sequence the sequence to set. + * @param count the number of elements in the data. + * @param data a pointer to the first member of a sequence + * containing the data to set. + * @returns 1 on success, 0 on failure. + */ +extern int stp_sequence_set_ushort_data(stp_sequence_t *sequence, + size_t count, const unsigned short *data); + + /** + * Get the data in a sequence as float data. + * The pointer returned is owned by the curve, and is not guaranteed + * to be valid beyond the next non-const curve call; + * If the bounds of the curve exceed the limits of the data type, + * NULL is returned. + * @param sequence the sequence to get the data from. + * @param count the number of elements in the sequence are stored in + * the size_t pointed to. + * @returns a pointer to the first element of an sequence of floats + * is stored in a pointer to float*. + */ +extern const float *stp_sequence_get_float_data(const stp_sequence_t *sequence, + size_t *count); + + /** + * Get the data in a sequence as long data. + * The pointer returned is owned by the curve, and is not guaranteed + * to be valid beyond the next non-const curve call; + * If the bounds of the curve exceed the limits of the data type, + * NULL is returned. + * @param sequence the sequence to get the data from. + * @param count the number of elements in the sequence are stored in + * the size_t pointed to. + * @returns a pointer to the first element of an sequence of longs + * is stored in a pointer to long*. + */ +extern const long *stp_sequence_get_long_data(const stp_sequence_t *sequence, + size_t *count); + + /** + * Get the data in a sequence as unsigned long data. + * The pointer returned is owned by the curve, and is not guaranteed + * to be valid beyond the next non-const curve call; + * If the bounds of the curve exceed the limits of the data type, + * NULL is returned. + * @param sequence the sequence to get the data from. + * @param count the number of elements in the sequence are stored in + * the size_t pointed to. + * @returns a pointer to the first element of an sequence of + * unsigned longs is stored in a pointer to unsigned long*. + */ +extern const unsigned long *stp_sequence_get_ulong_data(const stp_sequence_t *sequence, + size_t *count); + + /** + * Get the data in a sequence as int data. + * The pointer returned is owned by the curve, and is not guaranteed + * to be valid beyond the next non-const curve call; + * If the bounds of the curve exceed the limits of the data type, + * NULL is returned. + * @param sequence the sequence to get the data from. + * @param count the number of elements in the sequence are stored in + * the size_t pointed to. + * @returns a pointer to the first element of an sequence of ints + * is stored in a pointer to int*. + */ +extern const int *stp_sequence_get_int_data(const stp_sequence_t *sequence, + size_t *count); + + /** + * Get the data in a sequence as unsigned int data. + * The pointer returned is owned by the curve, and is not guaranteed + * to be valid beyond the next non-const curve call; + * If the bounds of the curve exceed the limits of the data type, + * NULL is returned. + * @param sequence the sequence to get the data from. + * @param count the number of elements in the sequence are stored in + * the size_t pointed to. + * @returns a pointer to the first element of an sequence of + * unsigned ints is stored in a pointer to unsigned int*. + */ +extern const unsigned int *stp_sequence_get_uint_data(const stp_sequence_t *sequence, + size_t *count); + + /** + * Get the data in a sequence as short data. + * The pointer returned is owned by the curve, and is not guaranteed + * to be valid beyond the next non-const curve call; + * If the bounds of the curve exceed the limits of the data type, + * NULL is returned. + * @param sequence the sequence to get the data from. + * @param count the number of elements in the sequence are stored in + * the size_t pointed to. + * @returns a pointer to the first element of an sequence of shorts + * is stored in a pointer to short*. + */ +extern const short *stp_sequence_get_short_data(const stp_sequence_t *sequence, + size_t *count); + + /** + * Get the data in a sequence as unsigned short data. + * The pointer returned is owned by the curve, and is not guaranteed + * to be valid beyond the next non-const curve call; + * If the bounds of the curve exceed the limits of the data type, + * NULL is returned. + * @param sequence the sequence to get the data from. + * @param count the number of elements in the sequence are stored in + * the size_t pointed to. + * @returns a pointer to the first element of an sequence of + * unsigned shorts is stored in a pointer to unsigned short*. + */ +extern const unsigned short *stp_sequence_get_ushort_data(const stp_sequence_t *sequence, + size_t *count); + + /** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_SEQUENCE_H */ diff --git a/include/gutenprint/string-list.h b/include/gutenprint/string-list.h new file mode 100644 index 0000000..a04f9e0 --- /dev/null +++ b/include/gutenprint/string-list.h @@ -0,0 +1,100 @@ +/* + * "$Id: string-list.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * libgimpprint string list functions. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/string-list.h + * @brief String list functions. + */ + +#ifndef GUTENPRINT_STRING_LIST_H +#define GUTENPRINT_STRING_LIST_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct stp_string_list; +/** The string_list opaque data type. */ +typedef struct stp_string_list stp_string_list_t; + +/** + * String parameter. + * Representation of a choice list of strings. The choices themselves + * consist of a key and a human-readable name. The list object is + * opaque. + */ +typedef struct +{ + const char *name, /*!< Option name (key, untranslated). */ + *text; /*!< Human-readable (translated) text. */ +} stp_param_string_t; + +/**************************************************************** +* * +* LISTS OF STRINGS * +* * +****************************************************************/ + +/* The string_list opaque data type is defined in vars.h */ + +extern stp_string_list_t * +stp_string_list_create(void); + +extern void +stp_string_list_destroy(stp_string_list_t *list); + +extern stp_param_string_t * +stp_string_list_param(const stp_string_list_t *list, size_t element); + +extern stp_param_string_t * +stp_string_list_find(const stp_string_list_t *list, const char *name); + +extern size_t +stp_string_list_count(const stp_string_list_t *list); + +extern stp_string_list_t * +stp_string_list_create_copy(const stp_string_list_t *list); + +extern void +stp_string_list_add_string(stp_string_list_t *list, + const char *name, const char *text); + +extern void +stp_string_list_remove_string(stp_string_list_t *list, const char *name); + +extern stp_string_list_t * +stp_string_list_create_from_params(const stp_param_string_t *list, + size_t count); + +extern int +stp_string_list_is_present(const stp_string_list_t *list, + const char *value); + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_STRING_LIST_H */ +/* + * End of "$Id: string-list.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". + */ diff --git a/include/gutenprint/util.h b/include/gutenprint/util.h new file mode 100644 index 0000000..a0fb793 --- /dev/null +++ b/include/gutenprint/util.h @@ -0,0 +1,177 @@ +/* + * "$Id: util.h,v 1.2 2005/04/10 23:15:16 rlk Exp $" + * + * libgimpprint utility and miscellaneous functions. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/util.h + * @brief Utility functions. + */ + +#ifndef GUTENPRINT_UTIL_H +#define GUTENPRINT_UTIL_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Utility functions. + * + * @defgroup util util + * @{ + */ + +/** + * Initialise libgimpprint. + * This function must be called prior to any other use of the library. + * It is responsible for loading modules and XML data and initialising + * internal data structures. + * @returns 0 on success, 1 on failure. + */ +extern int stp_init(void); + +/** + * Set the output encoding. This function sets the encoding that all + * strings translated by gettext are output in. It is a wrapper + * around the gettext bind_textdomain_codeset() function. + * @param codeset the standard name of the encoding, which must be + * usable with iconv_open(). For example, "US-ASCII" or "UTF-8". If + * NULL, the currently-selected codeset will be returned (or NULL if + * no codeset has been selected yet). + * @returns a string containing the selected codeset, or NULL on + * failure (errno is set accordingly). + */ +extern const char *stp_set_output_codeset(const char *codeset); + +extern stp_curve_t *stp_read_and_compose_curves(const char *s1, const char *s2, + stp_curve_compose_t comp, + size_t piecewise_point_count); +extern void stp_abort(void); + +/* + * Remove inactive and unclaimed options from the list + */ +extern void stp_prune_inactive_options(stp_vars_t *v); + + +extern void stp_zprintf(const stp_vars_t *v, const char *format, ...) + __attribute__((format(__printf__, 2, 3))); + +extern void stp_zfwrite(const char *buf, size_t bytes, size_t nitems, + const stp_vars_t *v); + +extern void stp_putc(int ch, const stp_vars_t *v); +extern void stp_put16_le(unsigned short sh, const stp_vars_t *v); +extern void stp_put16_be(unsigned short sh, const stp_vars_t *v); +extern void stp_put32_le(unsigned int sh, const stp_vars_t *v); +extern void stp_put32_be(unsigned int sh, const stp_vars_t *v); +extern void stp_puts(const char *s, const stp_vars_t *v); +extern void stp_send_command(const stp_vars_t *v, const char *command, + const char *format, ...); + +extern void stp_erputc(int ch); + +extern void stp_eprintf(const stp_vars_t *v, const char *format, ...) + __attribute__((format(__printf__, 2, 3))); +extern void stp_erprintf(const char *format, ...) + __attribute__((format(__printf__, 1, 2))); +extern void stp_asprintf(char **strp, const char *format, ...) + __attribute__((format(__printf__, 2, 3))); +extern void stp_catprintf(char **strp, const char *format, ...) + __attribute__((format(__printf__, 2, 3))); + +#define STP_DBG_LUT 0x1 +#define STP_DBG_COLORFUNC 0x2 +#define STP_DBG_INK 0x4 +#define STP_DBG_PS 0x8 +#define STP_DBG_PCL 0x10 +#define STP_DBG_ESCP2 0x20 +#define STP_DBG_CANON 0x40 +#define STP_DBG_LEXMARK 0x80 +#define STP_DBG_WEAVE_PARAMS 0x100 +#define STP_DBG_ROWS 0x200 +#define STP_DBG_MARK_FILE 0x400 +#define STP_DBG_LIST 0x800 +#define STP_DBG_MODULE 0x1000 +#define STP_DBG_PATH 0x2000 +#define STP_DBG_PAPER 0x4000 +#define STP_DBG_PRINTERS 0x8000 +#define STP_DBG_XML 0x10000 +#define STP_DBG_VARS 0x20000 +#define STP_DBG_OLYMPUS 0x40000 +#define STP_DBG_CURVE 0x80000 +#define STP_DBG_CURVE_ERRORS 0x100000 + +extern unsigned long stp_get_debug_level(void); +extern void stp_dprintf(unsigned long level, const stp_vars_t *v, + const char *format, ...) + __attribute__((format(__printf__, 3, 4))); +extern void stp_deprintf(unsigned long level, const char *format, ...) + __attribute__((format(__printf__, 2, 3))); +extern void stp_init_debug_messages(stp_vars_t *v); +extern void stp_flush_debug_messages(stp_vars_t *v); + + +extern void *stp_malloc (size_t); +extern void *stp_zalloc (size_t); +extern void *stp_realloc (void *ptr, size_t); +extern void stp_free(void *ptr); + +#define STP_SAFE_FREE(x) \ +do \ +{ \ + if ((x)) \ + stp_free((char *)(x)); \ + ((x)) = NULL; \ +} while (0) + +extern size_t stp_strlen(const char *s); +extern char *stp_strndup(const char *s, int n); +extern char *stp_strdup(const char *s); + +/** + * Get the library version string (x.y.z) + * @returns a pointer to the version name of the package, which must not + * be modified or freed. + */ +extern const char *stp_get_version(void); + +/** + * Get the library release version string (x.y) + * @returns a pointer to the release name of the package, which must not + * be modified or freed. + */ +extern const char *stp_get_release_version(void); + +/** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_UTIL_H */ +/* + * End of "$Id: util.h,v 1.2 2005/04/10 23:15:16 rlk Exp $". + */ diff --git a/include/gutenprint/vars.h b/include/gutenprint/vars.h new file mode 100644 index 0000000..57f9ae7 --- /dev/null +++ b/include/gutenprint/vars.h @@ -0,0 +1,1357 @@ +/* + * "$id: vars.h,v 1.3.4.4 2004/03/09 03:00:25 rlk Exp $" + * + * libgimpprint stp_vars_t core functions. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/vars.h + * @brief Print job functions. + */ + +#ifndef GUTENPRINT_VARS_H +#define GUTENPRINT_VARS_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The vars data type contains all the information about a print job, + * this includes information such as the printer model, paper size, + * print resolution etc. Most of these job options are expressed as + * parameters which vary according to the model and other options + * selected. + * + * The representation of printer settings has changed dramatically from 4.2. + * All (well most, anyway) settings outside of basics such as the printer + * model and sizing settings are now typed parameters. + * + * @defgroup vars vars + * @{ + */ + +struct stp_vars; +/** The vars opaque data type. */ +typedef struct stp_vars stp_vars_t; + +/** + * Parameter types. + * The following types are permitted for a printer setting. Not all + * are currently implemented. + */ +typedef enum +{ + STP_PARAMETER_TYPE_STRING_LIST, /*!< Single string choice from a list. */ + STP_PARAMETER_TYPE_INT, /*!< Integer. */ + STP_PARAMETER_TYPE_BOOLEAN, /*!< Boolean. */ + STP_PARAMETER_TYPE_DOUBLE, /*!< Floating point number. */ + STP_PARAMETER_TYPE_CURVE, /*!< Curve. */ + STP_PARAMETER_TYPE_FILE, /*!< Filename (NYI, need to consider security). */ + STP_PARAMETER_TYPE_RAW, /*!< Raw, opaque data. */ + STP_PARAMETER_TYPE_ARRAY, /*!< Array. */ + STP_PARAMETER_TYPE_DIMENSION, /*!< Linear dimension. */ + STP_PARAMETER_TYPE_INVALID /*!< Invalid type (should never be used). */ +} stp_parameter_type_t; + +/** + * Parameter class. + * What kind of setting this is, for the purpose of user interface + * representation. + */ +typedef enum +{ + STP_PARAMETER_CLASS_FEATURE, /*!< Printer feature. */ + STP_PARAMETER_CLASS_OUTPUT, /*!< Output control. */ + STP_PARAMETER_CLASS_CORE, /*!< Core Gimp-Print parameter. */ + STP_PARAMETER_CLASS_INVALID /*!< Invalid class (should never be used). */ +} stp_parameter_class_t; + +/** + * Parameter level. + * What "level" a setting is at, for UI design. + */ +typedef enum +{ + STP_PARAMETER_LEVEL_BASIC, /*!< Basic parameter, shown by all UIs. */ + STP_PARAMETER_LEVEL_ADVANCED, /*!< Advanced parameter, shown by advanced UIs. */ + STP_PARAMETER_LEVEL_ADVANCED1, /*!< Advanced1 parameter, shown by advanced UIs. */ + STP_PARAMETER_LEVEL_ADVANCED2, /*!< Advanced2 parameter, shown by advanced UIs. */ + STP_PARAMETER_LEVEL_ADVANCED3, /*!< Advanced3 parameter, shown by advanced UIs. */ + STP_PARAMETER_LEVEL_ADVANCED4, /*!< Advanced4 parameter, shown by advanced UIs. */ + STP_PARAMETER_LEVEL_INTERNAL, /*!< Parameters used only within Gimp-Print. */ + STP_PARAMETER_LEVEL_EXTERNAL, /*!< Parameters used only outside Gimp-Print. */ + STP_PARAMETER_LEVEL_INVALID /*!< Invalid level (should never be used). */ +} stp_parameter_level_t; + +/** + * Parameter activity. + * Whether a parameter is currently active (i. e. whether its value + * should be used by the driver or not). All parameters default to being + * active unless explicitly "turned off". + */ +typedef enum +{ + STP_PARAMETER_INACTIVE, /*!< Parameter is inactive (unused). */ + STP_PARAMETER_DEFAULTED, /*!< Parameter is set to its default value. */ + STP_PARAMETER_ACTIVE /*!< Parameter is active (used). */ +} stp_parameter_activity_t; + +/* + * Other parameter types + */ + +/** Raw parameter. */ +typedef struct +{ + size_t bytes; /*!< Size of data. */ + const void *data; /*!< Raw data. */ +} stp_raw_t; + +/** double_bound (range) parameter. */ +typedef struct +{ + double lower; /*!< Lower bound. */ + double upper; /*!< Upper bound. */ +} stp_double_bound_t; + +/** int_bound (range) parameter. */ +typedef struct +{ + int lower; /*!< Lower bound. */ + int upper; /*!< Upper bound. */ +} stp_int_bound_t; + +/** Parameter description. */ +typedef struct +{ + const char *name; /*!< Internal name (key). */ + const char *text; /*!< User-visible name. */ + const char *category; /*!< User-visible category name. */ + const char *help; /*!< Help string. */ + stp_parameter_type_t p_type; /*!< Parameter type. */ + stp_parameter_class_t p_class; /*!< Parameter class. */ + stp_parameter_level_t p_level; /*!< Parameter level. */ + unsigned char is_mandatory; /*!< The parameter is required, even when set inactive. */ + unsigned char is_active; /*!< Is the parameter active? */ + unsigned char channel; /*!< The channel to which this parameter applies */ + unsigned char verify_this_parameter; /*!< Should the verify system check this parameter? */ + unsigned char read_only; + union + { + stp_curve_t *curve; /*!< curve parameter value. */ + stp_double_bound_t dbl; /*!< double_bound parameter value. */ + stp_int_bound_t integer; /*!< int_bound parameter value. */ + stp_int_bound_t dimension; /*!< int_bound parameter value. */ + stp_string_list_t *str; /*!< string_list parameter value. */ + stp_array_t *array; /*!< array parameter value. */ + } bounds; /*!< Limits on the values the parameter may take. */ + union + { + stp_curve_t *curve; /*!< Default curve parameter value. */ + double dbl; /*!< Default double parameter value. */ + int dimension; /*!< Default dimension parameter value. */ + int integer; /*!< Default int parameter value. */ + int boolean; /*!< Default boolean parameter value. */ + const char *str; /*!< Default string parameter value. */ + stp_array_t *array; /*!< Default array parameter value. */ + } deflt; /*!< Default value of the parameter. */ +} stp_parameter_t; + +/** The parameter_list opaque data type. */ +typedef void *stp_parameter_list_t; +/** The constant parameter_list opaque data type. */ +typedef const void *stp_const_parameter_list_t; + +/** + * Output function supplied by the calling application. + * There are two output functions supplied by the caller, one to send + * output data and one to report errors. + * @param data a pointer to an opaque object owned by the calling + * application. + * @param buffer the data to output. + * @param bytes the size of buffer (in bytes). + */ +typedef void (*stp_outfunc_t) (void *data, const char *buffer, size_t bytes); + + +/**************************************************************** +* * +* BASIC PRINTER SETTINGS * +* * +****************************************************************/ + +/** + * Create a new vars object. + * @returns the newly created vars object. + */ +extern stp_vars_t *stp_vars_create(void); + +/** + * Copy a vars object. + * Both dest and source must be valid vars objects previously + * created with stp_vars_create(). + * @param dest the destination vars. + * @param source the source vars. + */ +extern void stp_vars_copy(stp_vars_t *dest, const stp_vars_t *source); + +/** + * Copy and allocate a vars object. + * source must be a valid vars object previously created with + * stp_vars_create(). + * @param source the source vars. + * @returns the new copy of the vars. + */ +extern stp_vars_t *stp_vars_create_copy(const stp_vars_t *source); + +/** + * Destroy a vars object. + * It is an error to destroy the vars more than once. + * @param v the vars to destroy. + */ +extern void stp_vars_destroy(stp_vars_t *v); + +/** + * Set the name of the printer driver. + * @param v the vars to use. + * @param val the name to set. + */ +extern void stp_set_driver(stp_vars_t *v, const char *val); + +/** + * Set the name of the printer driver. + * @param v the vars to use. + * @param val the name to set. + * @param bytes the length of val (in bytes). + */ +extern void stp_set_driver_n(stp_vars_t *v, const char *val, int bytes); + +/** + * Get the name of the printer driver. + * @returns the name of the printer driver (must not be freed). + */ +extern const char *stp_get_driver(const stp_vars_t *v); + +/** + * Set the name of the color conversion routine, if not the default. + * @param v the vars to use. + * @param val the name to set. + */ +extern void stp_set_color_conversion(stp_vars_t *v, const char *val); + +/** + * Set the name of the color conversion routine, if not the default. + * @param v the vars to use. + * @param val the name to set. + * @param bytes the length of val (in bytes). + */ +extern void stp_set_color_conversion_n(stp_vars_t *v, const char *val, int bytes); + +/** + * Get the name of the color conversion routine. + * @returns the name of the color conversion routine (must not be freed). + */ +extern const char *stp_get_color_conversion(const stp_vars_t *v); + +/* + * Set/get the position and size of the image + */ + +/** + * Set the left edge of the image. + * @param v the vars to use. + * @param val the value to set. + */ +extern void stp_set_left(stp_vars_t *v, int val); + +/** + * Get the left edge of the image. + * @returns the left edge. + */ +extern int stp_get_left(const stp_vars_t *v); + +/** + * Set the top edge of the image. + * @param v the vars to use. + * @param val the value to set. + */ +extern void stp_set_top(stp_vars_t *v, int val); + +/** + * Get the top edge of the image. + * @returns the left edge. + */ +extern int stp_get_top(const stp_vars_t *v); + +/** + * Set the width of the image. + * @param v the vars to use. + * @param val the value to set. + */ +extern void stp_set_width(stp_vars_t *v, int val); + +/** + * Get the width edge of the image. + * @returns the left edge. + */ +extern int stp_get_width(const stp_vars_t *v); + +/** + * Set the height of the image. + * @param v the vars to use. + * @param val the value to set. + */ +extern void stp_set_height(stp_vars_t *v, int val); + +/** + * Get the height of the image. + * @returns the left edge. + */ +extern int stp_get_height(const stp_vars_t *v); + +/* + * For custom page widths, these functions may be used. + */ + +/** + * Set the page width. + * @param v the vars to use. + * @param val the value to set. + */ +extern void stp_set_page_width(stp_vars_t *v, int val); + +/** + * Get the page width. + * @returns the page width. + */ +extern int stp_get_page_width(const stp_vars_t *v); + +/** + * Set the page height. + * @param v the vars to use. + * @param val the value to set. + */ +extern void stp_set_page_height(stp_vars_t *v, int val); + +/** + * Get the page height. + * @returns the page height. + */ +extern int stp_get_page_height(const stp_vars_t *v); + +/** + * Set the function used to print output information. + * These must be supplied by the caller. outdata is passed as an + * arguments to outfunc; typically it will be a file descriptor. + * @param v the vars to use. + * @param val the value to set. + */ +extern void stp_set_outfunc(stp_vars_t *v, stp_outfunc_t val); + +/** + * Get the function used to print output information. + * @param v the vars to use. + * @returns the outfunc. + */ +extern stp_outfunc_t stp_get_outfunc(const stp_vars_t *v); + +/** + * Set the function used to print error and diagnostic information. + * These must be supplied by the caller. errdata is passed as an + * arguments to errfunc; typically it will be a file descriptor. + * @param v the vars to use. + * @param val the value to set. + */ +extern void stp_set_errfunc(stp_vars_t *v, stp_outfunc_t val); + +/** + * Get the function used to print output information. + * @param v the vars to use. + * @returns the outfunc. + */ +extern stp_outfunc_t stp_get_errfunc(const stp_vars_t *v); + +/** + * Set the output data. + * @param v the vars to use. + * @param val the output data. This will typically be a file + * descriptor, but it is entirely up to the caller exactly what type + * this might be. + */ +extern void stp_set_outdata(stp_vars_t *v, void *val); + +/** + * Get the output data. + * @param v the vars to use. + * @returns the output data. + */ +extern void *stp_get_outdata(const stp_vars_t *v); + +/** + * Set the error data. + * @param v the vars to use. + * @param val the error data. This will typically be a file + * descriptor, but it is entirely up to the caller exactly what type + * this might be. + */ +extern void stp_set_errdata(stp_vars_t *v, void *val); + +/** + * Get the error data. + * @param v the vars to use. + * @returns the output data. + */ +extern void *stp_get_errdata(const stp_vars_t *v); + +/** + * Merge defaults for a printer with user-chosen settings. + * @deprecated This is likely to go away. + * @param user the destination vars. + * @param print the vars to merge into user. + */ +extern void stp_merge_printvars(stp_vars_t *user, const stp_vars_t *print); + + +/**************************************************************** +* * +* PARAMETER MANAGEMENT * +* * +****************************************************************/ + +/** + * List the available parameters for the currently chosen settings. + * This does not fill in the bounds and defaults; it merely provides + * a list of settings. To fill in detailed information for a setting, + * use stp_describe_parameter. + * @param v the vars to use. + * @returns a list of available parameters (must be freed with + * stp_parameter_list_destroy()). + */ +extern stp_parameter_list_t stp_get_parameter_list(const stp_vars_t *v); + +/** + * List the number of available parameters for the currently chosen + * settings. + * @param list the parameter_list to use. + * @returns the number of parameters. + */ +extern size_t stp_parameter_list_count(stp_const_parameter_list_t list); + +/** + * Find a parameter by its name. + * @param list the parameter_list to use. + * @param name the name of the parameter. + * @returns a pointer to the parameter (must not be freed), or NULL if + * no parameter was found. + */ +extern const stp_parameter_t * +stp_parameter_find(stp_const_parameter_list_t list, const char *name); + +/** + * Find a parameter by its index number. + * @param list the parameter_list to use. + * @param item the index number of the parameter (must not be greater + * than stp_parameter_list_count - 1). + * @returns a pointer to the parameter (must not be freed), or NULL if + * no parameter was found. + */ +extern const stp_parameter_t * +stp_parameter_list_param(stp_const_parameter_list_t list, size_t item); + +/** + * Destroy a parameter_list. + * It is an error to destroy the parameter_list more than once. + * @param list the parameter_list to destroy. + */ +extern void stp_parameter_list_destroy(stp_parameter_list_t list); + +/** + * Create a parameter_list. + * @returns the newly created parameter_list. + */ +extern stp_parameter_list_t stp_parameter_list_create(void); + +/** + * Add a parameter to a parameter_list. + * @param list the parameter_list to use. + * @param item the parameter to add. + */ +extern void stp_parameter_list_add_param(stp_parameter_list_t list, + const stp_parameter_t *item); + +/** + * Copy and allocate a parameter_list. + * A new parameter_list will be created, and then the contents of + * source will be + * copied into it. + * @param list the source parameter_list. + * @returns the new copy of the parameter_list. + */ +extern stp_parameter_list_t +stp_parameter_list_copy(stp_const_parameter_list_t list); + +/** + * Append one parameter_list to another. + * @param list the destination list (to append to). + * @param append the list of paramters to append. Each item that does + * not already exist in list will be appended. + */ +extern void +stp_parameter_list_append(stp_parameter_list_t list, + stp_const_parameter_list_t append); + +/** + * Describe a parameter in detail. + * All of the parameter fields will be populated. + * @param v the vars to use. + * @param name the name of the parameter. + * @param description a pointer to an stp_parameter_t to store the + * parameter description in. + */ +extern void +stp_describe_parameter(const stp_vars_t *v, const char *name, + stp_parameter_t *description); + +/** + * Destroy a parameter description. + * This must be called even if the stp_parameter_t was not allocated + * with malloc, since some members are dynamically allocated. + * @param description the parameter description to destroy. + */ +extern void stp_parameter_description_destroy(stp_parameter_t *description); + +/** + * Find a parameter by its name from a vars object. + * @param v the vars to use. + * @param name the name of the parameter. + * @returns a pointer to the parameter (must not be freed), or NULL if + * no parameter was found. + */ +extern const stp_parameter_t * +stp_parameter_find_in_settings(const stp_vars_t *v, const char *name); + +/** + * Set a string parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_string_parameter(stp_vars_t *v, const char *parameter, + const char *value); + +/** + * Set a string parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set (must not contain NUL). + * @param bytes the length of value (in bytes). + */ +extern void stp_set_string_parameter_n(stp_vars_t *v, const char *parameter, + const char *value, size_t bytes); + +/** + * Set a file parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_file_parameter(stp_vars_t *v, const char *parameter, + const char *value); + +/** + * Set a file parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set (must not contain NUL). + * @param bytes the length of value (in bytes). + */ +extern void stp_set_file_parameter_n(stp_vars_t *v, const char *parameter, + const char *value, size_t bytes); + +/** + * Set a float parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_float_parameter(stp_vars_t *v, const char *parameter, + double value); + +/** + * Set an integer parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_int_parameter(stp_vars_t *v, const char *parameter, + int value); + +/** + * Set a dimension parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_dimension_parameter(stp_vars_t *v, const char *parameter, + int value); + +/** + * Set a boolean parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_boolean_parameter(stp_vars_t *v, const char *parameter, + int value); + +/** + * Set a curve parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_curve_parameter(stp_vars_t *v, const char *parameter, + const stp_curve_t *value); + +/** + * Set an array parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_array_parameter(stp_vars_t *v, const char *parameter, + const stp_array_t *value); + +/** + * Set a raw parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + * @param bytes the length of value (in bytes). + */ +extern void stp_set_raw_parameter(stp_vars_t *v, const char *parameter, + const void *value, size_t bytes); + +/** + * Multiply the value of a float parameter by a scaling factor. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param scale the factor to multiply the value by. + */ +extern void stp_scale_float_parameter(stp_vars_t *v, const char *parameter, + double scale); + +/** + * Set a default string parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_default_string_parameter(stp_vars_t *v, + const char *parameter, + const char *value); + +/** + * Set a default string parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set (must not contain NUL). + * @param bytes the length of value (in bytes). + */ +extern void stp_set_default_string_parameter_n(stp_vars_t *v, + const char *parameter, + const char *value, size_t bytes); + +/** + * Set a default file parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_default_file_parameter(stp_vars_t *v, + const char *parameter, + const char *value); + +/** + * Set a default file parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set (must not contain NUL). + * @param bytes the length of value (in bytes). + */ +extern void stp_set_default_file_parameter_n(stp_vars_t *v, + const char *parameter, + const char *value, size_t bytes); + +/** + * Set a default float parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_default_float_parameter(stp_vars_t *v, + const char *parameter, + double value); + +/** + * Set a default integer parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_default_int_parameter(stp_vars_t *v, + const char *parameter, + int value); + +/** + * Set a default dimension parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_default_dimension_parameter(stp_vars_t *v, + const char *parameter, + int value); + +/** + * Set a default boolean parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_default_boolean_parameter(stp_vars_t *v, + const char *parameter, + int value); + +/** + * Set a default curve parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_default_curve_parameter(stp_vars_t *v, + const char *parameter, + const stp_curve_t *value); + +/** + * Set a default array parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + */ +extern void stp_set_default_array_parameter(stp_vars_t *v, + const char *parameter, + const stp_array_t *value); + +/** + * Set a default raw parameter. + * The value is set if the parameter is not already set. This avoids + * having to check if the parameter is set prior to setting it, if you + * do not want to override the existing value. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param value the value to set. + * @param bytes the length of value (in bytes). + */ +extern void stp_set_default_raw_parameter(stp_vars_t *v, + const char *parameter, + const void *value, size_t bytes); + +/** + * Get a string parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the string, or NULL if no parameter was found. + */ +extern const char *stp_get_string_parameter(const stp_vars_t *v, + const char *parameter); + +/** + * Get a file parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the filename, or NULL if no parameter was found. + */ +extern const char *stp_get_file_parameter(const stp_vars_t *v, + const char *parameter); + +/** + * Get a float parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the float value. + */ +extern double stp_get_float_parameter(const stp_vars_t *v, + const char *parameter); + +/** + * Get an integer parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the integer value. + */ +extern int stp_get_int_parameter(const stp_vars_t *v, + const char *parameter); + +/** + * Get a dimension parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the dimension (integer) value. + */ +extern int stp_get_dimension_parameter(const stp_vars_t *v, + const char *parameter); + +/** + * Get a boolean parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the boolean value. + */ +extern int stp_get_boolean_parameter(const stp_vars_t *v, + const char *parameter); + +/** + * Get a curve parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the curve, or NULL if no parameter was found. + */ +extern const stp_curve_t *stp_get_curve_parameter(const stp_vars_t *v, + const char *parameter); + +/** + * Get an array parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the array, or NULL if no parameter was found. + */ +extern const stp_array_t *stp_get_array_parameter(const stp_vars_t *v, + const char *parameter); + +/** + * Get a raw parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the raw data, or NULL if no parameter was found. + */ +extern const stp_raw_t *stp_get_raw_parameter(const stp_vars_t *v, + const char *parameter); + +/** + * Clear a string parameter. + * The parameter is set to NULL. + * @param v the vars to use. + * @param parameter the name of the parameter. + */ +extern void stp_clear_string_parameter(stp_vars_t *v, const char *parameter); + +/** + * Clear a file parameter. + * The parameter is set to NULL. + * @param v the vars to use. + * @param parameter the name of the parameter. + */ +extern void stp_clear_file_parameter(stp_vars_t *v, const char *parameter); + +/** + * Clear (remove) a float parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + */ +extern void stp_clear_float_parameter(stp_vars_t *v, const char *parameter); + +/** + * Clear (remove) an integer parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + */ +extern void stp_clear_int_parameter(stp_vars_t *v, const char *parameter); + +/** + * Clear (remove) a dimension parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + */ +extern void stp_clear_dimension_parameter(stp_vars_t *v, const char *parameter); + +/** + * Clear (remove) a boolean parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + */ +extern void stp_clear_boolean_parameter(stp_vars_t *v, const char *parameter); + +/** + * Clear a curve parameter. + * The parameter is set to NULL. + * @param v the vars to use. + * @param parameter the name of the parameter. + */ +extern void stp_clear_curve_parameter(stp_vars_t *v, const char *parameter); + +/** + * Clear an array parameter. + * The parameter is set to NULL. + * @param v the vars to use. + * @param parameter the name of the parameter. + */ +extern void stp_clear_array_parameter(stp_vars_t *v, const char *parameter); + +/** + * Clear a raw parameter. + * The parameter is set to NULL. + * @param v the vars to use. + * @param parameter the name of the parameter. + */ +extern void stp_clear_raw_parameter(stp_vars_t *v, const char *parameter); + +/** + * Set the activity of a string parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the activity status to set (should be set to + * STP_PARAMETER_ACTIVE or STP_PARAMETER_INACTIVE). + */ +extern void stp_set_string_parameter_active(const stp_vars_t *v, + const char *parameter, + stp_parameter_activity_t active); + +/** + * Set the activity of a file parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the activity status to set (should be set to + * STP_PARAMETER_ACTIVE or STP_PARAMETER_INACTIVE). + */ +extern void stp_set_file_parameter_active(const stp_vars_t *v, + const char *parameter, + stp_parameter_activity_t active); + +/** + * Set the activity of a float parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the activity status to set (should be set to + * STP_PARAMETER_ACTIVE or STP_PARAMETER_INACTIVE). + */ +extern void stp_set_float_parameter_active(const stp_vars_t *v, + const char *parameter, + stp_parameter_activity_t active); + +/** + * Set the activity of an integer parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the activity status to set (should be set to + * STP_PARAMETER_ACTIVE or STP_PARAMETER_INACTIVE). + */ +extern void stp_set_int_parameter_active(const stp_vars_t *v, + const char *parameter, + stp_parameter_activity_t active); + +/** + * Set the activity of a dimension parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the activity status to set (should be set to + * STP_PARAMETER_ACTIVE or STP_PARAMETER_INACTIVE). + */ +extern void stp_set_dimension_parameter_active(const stp_vars_t *v, + const char *parameter, + stp_parameter_activity_t active); + +/** + * Set the activity of a boolean parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the activity status to set (should be set to + * STP_PARAMETER_ACTIVE or STP_PARAMETER_INACTIVE). + */ +extern void stp_set_boolean_parameter_active(const stp_vars_t *v, + const char *parameter, + stp_parameter_activity_t active); + +/** + * Set the activity of a curveparameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the activity status to set (should be set to + * STP_PARAMETER_ACTIVE or STP_PARAMETER_INACTIVE). + */ +extern void stp_set_curve_parameter_active(const stp_vars_t *v, + const char *parameter, + stp_parameter_activity_t active); + +/** + * Set the activity of an array parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the activity status to set (should be set to + * STP_PARAMETER_ACTIVE or STP_PARAMETER_INACTIVE). + */ +extern void stp_set_array_parameter_active(const stp_vars_t *v, + const char *parameter, + stp_parameter_activity_t active); + +/** + * Set the activity of a raw parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the activity status to set (should be set to + * STP_PARAMETER_ACTIVE or STP_PARAMETER_INACTIVE). + */ +extern void stp_set_raw_parameter_active(const stp_vars_t *v, + const char *parameter, + stp_parameter_activity_t active); + +/** + * Check if a string parameter is set. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the minimum activity status. + */ +extern int stp_check_string_parameter(const stp_vars_t *v, const char *parameter, + stp_parameter_activity_t active); + +/** + * Check if a file parameter is set. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the minimum activity status. + */ +extern int stp_check_file_parameter(const stp_vars_t *v, const char *parameter, + stp_parameter_activity_t active); + +/** + * Check if a float parameter is set. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the minimum activity status. + */ +extern int stp_check_float_parameter(const stp_vars_t *v, const char *parameter, + stp_parameter_activity_t active); + +/** + * Check if an integer parameter is set. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the minimum activity status. + */ +extern int stp_check_int_parameter(const stp_vars_t *v, const char *parameter, + stp_parameter_activity_t active); + +/** + * Check if a dimension parameter is set. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the minimum activity status. + */ +extern int stp_check_dimension_parameter(const stp_vars_t *v, const char *parameter, + stp_parameter_activity_t active); + +/** + * Check if a boolean parameter is set. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the minimum activity status. + */ +extern int stp_check_boolean_parameter(const stp_vars_t *v, const char *parameter, + stp_parameter_activity_t active); + +/** + * Check if a curve parameter is set. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the minimum activity status. + */ +extern int stp_check_curve_parameter(const stp_vars_t *v, const char *parameter, + stp_parameter_activity_t active); + +/** + * Check if an array parameter is set. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the minimum activity status. + */ +extern int stp_check_array_parameter(const stp_vars_t *v, const char *parameter, + stp_parameter_activity_t active); + +/** + * Check if a raw parameter is set. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @param active the minimum activity status. + */ +extern int stp_check_raw_parameter(const stp_vars_t *v, const char *parameter, + stp_parameter_activity_t active); + +/** + * Get the activity status of a string parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the activity status. + */ +extern stp_parameter_activity_t +stp_get_string_parameter_active(const stp_vars_t *v, const char *parameter); + +/** + * Get the activity status of a file parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the activity status. + */ +extern stp_parameter_activity_t +stp_get_file_parameter_active(const stp_vars_t *v, const char *parameter); + +/** + * Get the activity status of a float parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the activity status. + */ +extern stp_parameter_activity_t +stp_get_float_parameter_active(const stp_vars_t *v, const char *parameter); + +/** + * Get the activity status of an integer parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the activity status. + */ +extern stp_parameter_activity_t +stp_get_int_parameter_active(const stp_vars_t *v, const char *parameter); + +/** + * Get the activity status of a dimension parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the activity status. + */ +extern stp_parameter_activity_t +stp_get_dimension_parameter_active(const stp_vars_t *v, const char *parameter); + +/** + * Get the activity status of a boolean parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the activity status. + */ +extern stp_parameter_activity_t +stp_get_boolean_parameter_active(const stp_vars_t *v, const char *parameter); + +/** + * Get the activity status of a curve parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the activity status. + */ +extern stp_parameter_activity_t +stp_get_curve_parameter_active(const stp_vars_t *v, const char *parameter); + +/** + * Get the activity status of an array parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the activity status. + */ +extern stp_parameter_activity_t +stp_get_array_parameter_active(const stp_vars_t *v, const char *parameter); + +/** + * Get the activity status of a raw parameter. + * @param v the vars to use. + * @param parameter the name of the parameter. + * @returns the activity status. + */ +extern stp_parameter_activity_t +stp_get_raw_parameter_active(const stp_vars_t *v, const char *parameter); + + + +/**************************************************************** +* * +* INFORMATIONAL QUERIES * +* * +****************************************************************/ + +/** + * Get the media (paper) size. + * Retrieve the media size of the media type set in V, expressed in units + * of 1/72". If the media size is invalid, width and height will be set + * to -1. Values of 0 for width or height indicate that the dimension + * is variable, so that custom page sizes or roll paper can be used. + * In this case, the size limit should be used to determine maximum and + * minimum values permitted. + * @param v the vars to use. + * @param width a pointer to an int to store the media width in. + * @param height a pointer to an int to store the media height in. + */ +extern void stp_get_media_size(const stp_vars_t *v, int *width, int *height); + +/** + * Get the imagable area of the page. + * Retrieve the boundaries of the printable area of the page. In combination + * with the media size, this can be used to determine the actual printable + * region, which callers can use to place the image precisely. The + * dimensions are relative to the top left of the physical page. + * + * If a customizable page size is used (see stp_printer_get_media_size), + * the actual desired width and/or height must be filled in using + * stp_set_page_width and/or stp_set_page_height. If these are not filled + * in, the margins will be returned. + * + * Returned values may be negative if a printer is capable of full bleed + * by printing beyond the physical boundaries of the page. + * + * If the media size stored in V is invalid, the return values + * will be indeterminate. It is up to the user to specify legal values. + * @param v the vars to use. + * @param left a pointer to a int to store the left edge in. + * @param right a pointer to a int to store the right edge in. + * @param bottom a pointer to a int to store the bottom edge in. + * @param top a pointer to a int to store the top edge in. + */ +extern void stp_get_imageable_area(const stp_vars_t *v, int *left, int *right, + int *bottom, int *top); + +/** + * Get the media size limits. + * Retrieve the minimum and maximum size limits for custom media sizes + * with the current printer settings. + * @param v the vars to use. + * @param max_width a pointer to a int to store the maximum width in. + * @param max_height a pointer to a int to store the maximum height in. + * @param min_width a pointer to a int to store the minimum width in. + * @param min_height a pointer to a int to store the minimum height in. + */ +extern void +stp_get_size_limit(const stp_vars_t *v, int *max_width, int *max_height, + int *min_width, int *min_height); + + +/** + * Retrieve the printing resolution of the selected resolution. If the + * resolution is invalid, -1 will be returned in both x and y. + * @param v the vars to use. + * @param x a pointer to a int to store the horizontal resolution in. + * @param y a pointer to a int to store the vertical resolution in. + */ +extern void stp_describe_resolution(const stp_vars_t *v, int *x, int *y); + +/** + * Verify parameters. + * Verify that the parameters selected are consistent with those allowed + * by the driver. This must be called prior to printing; failure to do + * so will result in printing failing. + * @param v the vars to use. + * @returns 0 on failure, 1 on success; other status values are reserved. + */ +extern int stp_verify(stp_vars_t *v); + +/** + * Get default global settings. The main use of this is to provide a + * usable stp_vars_t for purposes of parameter inquiry in the absence + * of a specific printer. This is currently used in a variety of + * places to get information on the standard color parameters without + * querying a particular printer. + * @returns the default settings. + */ +extern const stp_vars_t *stp_default_settings(void); + +typedef void *(*stp_copy_data_func_t)(void *); +typedef void (*stp_free_data_func_t)(void *); + +typedef enum +{ + PARAMETER_BAD, + PARAMETER_OK, + PARAMETER_INACTIVE +} stp_parameter_verify_t; + +extern void stp_allocate_component_data(stp_vars_t *v, + const char *name, + stp_copy_data_func_t copyfunc, + stp_free_data_func_t freefunc, + void *data); +extern void stp_destroy_component_data(stp_vars_t *v, const char *name); + +struct stp_compdata; +typedef struct stp_compdata compdata_t; + +extern void *stp_get_component_data(const stp_vars_t *v, const char *name); + +extern stp_parameter_verify_t stp_verify_parameter(const stp_vars_t *v, + const char *parameter, + int quiet); +extern int stp_get_verified(const stp_vars_t *v); +extern void stp_set_verified(stp_vars_t *v, int value); + +extern void stp_copy_options(stp_vars_t *vd, const stp_vars_t *vs); + +extern void +stp_fill_parameter_settings(stp_parameter_t *desc, + const stp_parameter_t *param); + + /** @} */ + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_VARS_H */ +/* + * End of "$Id: vars.h,v 1.2 2005/04/09 13:59:17 rlk Exp $". + */ diff --git a/include/gutenprint/weave.h b/include/gutenprint/weave.h new file mode 100644 index 0000000..41d4e2c --- /dev/null +++ b/include/gutenprint/weave.h @@ -0,0 +1,180 @@ +/* + * "$Id: weave.h,v 1.2 2005/06/29 01:42:34 rlk Exp $" + * + * libgimpprint header. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and + * Robert Krawitz (rlk@alum.mit.edu) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Revision History: + * + * See ChangeLog + */ + +/** + * @file gutenprint/weave.h + * @brief Softweave functions. + */ + +/* + * This file must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifndef GUTENPRINT_WEAVE_H +#define GUTENPRINT_WEAVE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef HAVE_CONFIG_H +#include +#endif + +#define STP_MAX_WEAVE (16) + + +typedef struct /* Weave parameters for a specific row */ +{ + int row; /* Absolute row # */ + int pass; /* Computed pass # */ + int jet; /* Which physical nozzle we're using */ + int missingstartrows; /* Phantom rows (nonexistent rows that */ + /* would be printed by nozzles lower than */ + /* the first nozzle we're using this pass; */ + /* with the current algorithm, always zero */ + int logicalpassstart; /* Offset in rows (from start of image) */ + /* that the printer must be for this row */ + /* to print correctly with the specified jet */ + int physpassstart; /* Offset in rows to the first row printed */ + /* in this pass. Currently always equal to */ + /* logicalpassstart */ + int physpassend; /* Offset in rows (from start of image) to */ + /* the last row that will be printed this */ + /* pass (assuming that we're printing a full */ + /* pass). */ +} stp_weave_t; + +typedef struct /* Weave parameters for a specific pass */ +{ + int pass; /* Absolute pass number */ + int missingstartrows; /* All other values the same as weave_t */ + int logicalpassstart; + int physpassstart; + int physpassend; + int subpass; +} stp_pass_t; + +typedef struct { /* Offsets from the start of each line */ + int ncolors; + unsigned long *v; /* (really pass) */ +} stp_lineoff_t; + +typedef struct { /* Is this line (really pass) active? */ + int ncolors; + char *v; +} stp_lineactive_t; + +typedef struct { /* number of rows for a pass */ + int ncolors; + int *v; +} stp_linecount_t; + +typedef struct { /* Base pointers for each pass */ + int ncolors; + unsigned char **v; +} stp_linebufs_t; + +typedef struct { /* Width of data actually printed */ + int ncolors; + int *start_pos; + int *end_pos; +} stp_linebounds_t; + +typedef enum { + STP_WEAVE_ZIGZAG, + STP_WEAVE_ASCENDING, + STP_WEAVE_DESCENDING, + STP_WEAVE_ASCENDING_2X, + STP_WEAVE_STAGGERED, + STP_WEAVE_ASCENDING_3X +} stp_weave_strategy_t; + +typedef int stp_packfunc(stp_vars_t *v, + const unsigned char *line, int height, + unsigned char *comp_buf, + unsigned char **comp_ptr, + int *first, int *last); +typedef void stp_fillfunc(stp_vars_t *v, int row, int subpass, + int width, int missingstartrows, int color); +typedef void stp_flushfunc(stp_vars_t *v, int passno, int vertical_subpass); +typedef int stp_compute_linewidth_func(stp_vars_t *v, int n); + +extern void stp_initialize_weave(stp_vars_t *v, int jets, int separation, + int oversample, int horizontal, + int vertical, int ncolors, int bitwidth, + int linewidth, int line_count, + int first_line, int page_height, + const int *head_offset, + stp_weave_strategy_t, + stp_flushfunc, + stp_fillfunc, + stp_packfunc, + stp_compute_linewidth_func); + +extern stp_packfunc stp_pack_tiff; +extern stp_packfunc stp_pack_uncompressed; + +extern stp_fillfunc stp_fill_tiff; +extern stp_fillfunc stp_fill_uncompressed; + +extern stp_compute_linewidth_func stp_compute_tiff_linewidth; +extern stp_compute_linewidth_func stp_compute_uncompressed_linewidth; + +extern void stp_flush_all(stp_vars_t *v); + +extern void +stp_write_weave(stp_vars_t *v, unsigned char *const cols[]); + +extern stp_lineoff_t * +stp_get_lineoffsets_by_pass(const stp_vars_t *v, int pass); + +extern stp_lineactive_t * +stp_get_lineactive_by_pass(const stp_vars_t *v, int pass); + +extern stp_linecount_t * +stp_get_linecount_by_pass(const stp_vars_t *v, int pass); + +extern const stp_linebufs_t * +stp_get_linebases_by_pass(const stp_vars_t *v, int pass); + +extern stp_pass_t * +stp_get_pass_by_pass(const stp_vars_t *v, int pass); + +extern void +stp_weave_parameters_by_row(const stp_vars_t *v, int row, + int vertical_subpass, stp_weave_t *w); + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINT_WEAVE_H */ +/* + * End of "$Id: weave.h,v 1.2 2005/06/29 01:42:34 rlk Exp $". + */ diff --git a/include/gutenprint/xml.h b/include/gutenprint/xml.h new file mode 100644 index 0000000..7be3235 --- /dev/null +++ b/include/gutenprint/xml.h @@ -0,0 +1,76 @@ +/* + * "$Id: xml.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $" + * + * Gutenprint module loader header + * + * Copyright 1997-2002 Michael Sweet (mike@easysw.com), + * Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org) + * Copyright 2002-2003 Roger Leigh (rleigh@debian.org) + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * @file gutenprint/xml.h + * @brief XML tree functions. + */ + +#ifndef GUTENPRINT_XML_H +#define GUTENPRINT_XML_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef int (*stp_xml_parse_func)(stp_mxml_node_t *node, const char *file); + +extern void +stp_register_xml_parser(const char *name, stp_xml_parse_func parse_func); + +extern void +stp_unregister_xml_parser(const char *name); + +extern void stp_register_xml_preload(const char *filename); +extern void stp_unregister_xml_preload(const char *filename); + +extern int stp_xml_init_defaults(void); +extern int stp_xml_parse_file(const char *file); + +extern long stp_xmlstrtol(const char *value); +extern unsigned long stp_xmlstrtoul(const char *value); +extern double stp_xmlstrtod(const char *textval); + +extern void stp_xml_init(void); +extern void stp_xml_exit(void); +extern stp_mxml_node_t *stp_xml_get_node(stp_mxml_node_t *xmlroot, ...); +extern stp_mxml_node_t *stp_xmldoc_create_generic(void); +extern void stp_xml_preinit(void); + +extern stp_sequence_t *stp_sequence_create_from_xmltree(stp_mxml_node_t *da); +extern stp_mxml_node_t *stp_xmltree_create_from_sequence(const stp_sequence_t *seq); + +extern stp_curve_t *stp_curve_create_from_xmltree(stp_mxml_node_t *da); +extern stp_mxml_node_t *stp_xmltree_create_from_curve(const stp_curve_t *curve); + +extern stp_array_t *stp_array_create_from_xmltree(stp_mxml_node_t *array); +extern stp_mxml_node_t *stp_xmltree_create_from_array(const stp_array_t *array); +extern void stp_xml_parse_file_named(const char *name); + +#endif /* GUTENPRINT_XML_H */ +/* + * End of "$Id: xml.h,v 1.1 2004/09/17 18:38:01 rleigh Exp $". + */ diff --git a/include/gutenprintui/Makefile.am b/include/gutenprintui/Makefile.am new file mode 100644 index 0000000..caf14b9 --- /dev/null +++ b/include/gutenprintui/Makefile.am @@ -0,0 +1,41 @@ +## $Id: Makefile.am,v 1.2 2004/10/31 22:29:24 rleigh Exp $ +## Copyright (C) 2000 Roger Leigh +## +## 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 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +## Process this file with automake to produce Makefile.in. + +AUTOMAKE_OPTIONS = 1.4 gnu + +@SET_MAKE@ + +MAINT_CHARSET = latin1 + +include $(top_srcdir)/scripts/global.mk + + +pkgincludedir = $(includedir)/gutenprintui + + +## Data + +if BUILD_LIBGUTENPRINTUI +pkginclude_HEADERS = \ + gutenprintui.h +endif + +## Clean + +MAINTAINERCLEANFILES = Makefile.in diff --git a/include/gutenprintui/Makefile.in b/include/gutenprintui/Makefile.in new file mode 100644 index 0000000..f5b1ac6 --- /dev/null +++ b/include/gutenprintui/Makefile.in @@ -0,0 +1,576 @@ +# Makefile.in generated by automake 1.9.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + +# Variables + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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 = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/scripts/global.mk +subdir = include/gutenprintui +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \ + $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \ + $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__pkginclude_HEADERS_DIST = gutenprintui.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgincludedir = $(includedir)/gutenprintui +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@ +BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@ +BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@ +BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@ +BUILD_ESCPUTIL_FALSE = @BUILD_ESCPUTIL_FALSE@ +BUILD_ESCPUTIL_TRUE = @BUILD_ESCPUTIL_TRUE@ +BUILD_FOOMATIC_3_FALSE = @BUILD_FOOMATIC_3_FALSE@ +BUILD_FOOMATIC_3_TRUE = @BUILD_FOOMATIC_3_TRUE@ +BUILD_FOOMATIC_FALSE = @BUILD_FOOMATIC_FALSE@ +BUILD_FOOMATIC_TRUE = @BUILD_FOOMATIC_TRUE@ +BUILD_GENPPD_STATIC_FALSE = @BUILD_GENPPD_STATIC_FALSE@ +BUILD_GENPPD_STATIC_TRUE = @BUILD_GENPPD_STATIC_TRUE@ +BUILD_GHOSTSCRIPT_FALSE = @BUILD_GHOSTSCRIPT_FALSE@ +BUILD_GHOSTSCRIPT_TRUE = @BUILD_GHOSTSCRIPT_TRUE@ +BUILD_GIMP2_FALSE = @BUILD_GIMP2_FALSE@ +BUILD_GIMP2_TRUE = @BUILD_GIMP2_TRUE@ +BUILD_GIMP_FALSE = @BUILD_GIMP_FALSE@ +BUILD_GIMP_TRUE = @BUILD_GIMP_TRUE@ +BUILD_LIBGUTENPRINTUI2_FALSE = @BUILD_LIBGUTENPRINTUI2_FALSE@ +BUILD_LIBGUTENPRINTUI2_TRUE = @BUILD_LIBGUTENPRINTUI2_TRUE@ +BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@ +BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@ +BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@ +BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@ +BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@ +BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@ +BUILD_TEST_FALSE = @BUILD_TEST_FALSE@ +BUILD_TEST_TRUE = @BUILD_TEST_TRUE@ +BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@ +BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONVERT = @CONVERT@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CUPS_CFLAGS = @CUPS_CFLAGS@ +CUPS_CONFIG = @CUPS_CONFIG@ +CUPS_LIBS = @CUPS_LIBS@ +CUPS_PPDS_AT_TOP_LEVEL_FALSE = @CUPS_PPDS_AT_TOP_LEVEL_FALSE@ +CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@ +CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB2HTML = @DB2HTML@ +DB2PDF = @DB2PDF@ +DB2PS = @DB2PS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIALOG = @DIALOG@ +DOXYGEN = @DOXYGEN@ +DVIPDF = @DVIPDF@ +DVIPS = @DVIPS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FIND = @FIND@ +FOOMATIC_CONFIGURE = @FOOMATIC_CONFIGURE@ +FOOMATIC_KITLOAD = @FOOMATIC_KITLOAD@ +FOOMATIC_PPDFILE = @FOOMATIC_PPDFILE@ +GENPPD_LIBS = @GENPPD_LIBS@ +GIMP2_CFLAGS = @GIMP2_CFLAGS@ +GIMP2_LIBS = @GIMP2_LIBS@ +GIMPTOOL = @GIMPTOOL@ +GIMPTOOL2_CHECK = @GIMPTOOL2_CHECK@ +GIMPTOOL_CHECK = @GIMPTOOL_CHECK@ +GIMP_CFLAGS = @GIMP_CFLAGS@ +GIMP_CFLAGS_NOUI = @GIMP_CFLAGS_NOUI@ +GIMP_DATA_DIR = @GIMP_DATA_DIR@ +GIMP_LIBS = @GIMP_LIBS@ +GIMP_LIBS_NOUI = @GIMP_LIBS_NOUI@ +GIMP_PLUGIN_DIR = @GIMP_PLUGIN_DIR@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_CONFIG = @GLIB_CONFIG@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GNUCFLAGS = @GNUCFLAGS@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_CONFIG = @GTK_CONFIG@ +GTK_LIBS = @GTK_LIBS@ +GUTENPRINTUI2_BINARY_AGE = @GUTENPRINTUI2_BINARY_AGE@ +GUTENPRINTUI2_CFLAGS = @GUTENPRINTUI2_CFLAGS@ +GUTENPRINTUI2_CURRENT_INTERFACE = @GUTENPRINTUI2_CURRENT_INTERFACE@ +GUTENPRINTUI2_INTERFACE_AGE = @GUTENPRINTUI2_INTERFACE_AGE@ +GUTENPRINTUI2_LIBDEPS = @GUTENPRINTUI2_LIBDEPS@ +GUTENPRINTUI2_LIBS = $(top_builddir)/src/gutenprintui2/libgutenprintui2.la +GUTENPRINTUI2_VERSION = @GUTENPRINTUI2_VERSION@ +GUTENPRINTUI_BINARY_AGE = @GUTENPRINTUI_BINARY_AGE@ +GUTENPRINTUI_CFLAGS = @GUTENPRINTUI_CFLAGS@ +GUTENPRINTUI_CURRENT_INTERFACE = @GUTENPRINTUI_CURRENT_INTERFACE@ +GUTENPRINTUI_INTERFACE_AGE = @GUTENPRINTUI_INTERFACE_AGE@ +GUTENPRINTUI_LIBDEPS = @GUTENPRINTUI_LIBDEPS@ +GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la +GUTENPRINTUI_VERSION = @GUTENPRINTUI_VERSION@ +GUTENPRINT_BINARY_AGE = @GUTENPRINT_BINARY_AGE@ +GUTENPRINT_CFLAGS = @GUTENPRINT_CFLAGS@ +GUTENPRINT_CURRENT_INTERFACE = @GUTENPRINT_CURRENT_INTERFACE@ +GUTENPRINT_INTERFACE_AGE = @GUTENPRINT_INTERFACE_AGE@ +GUTENPRINT_LIBDEPS = @GUTENPRINT_LIBDEPS@ + +# Libraries +GUTENPRINT_LIBS = $(top_builddir)/src/main/libgutenprint.la +GUTENPRINT_MAJOR_VERSION = @GUTENPRINT_MAJOR_VERSION@ +GUTENPRINT_MICRO_VERSION = @GUTENPRINT_MICRO_VERSION@ +GUTENPRINT_MINOR_VERSION = @GUTENPRINT_MINOR_VERSION@ +GUTENPRINT_VERSION = @GUTENPRINT_VERSION@ +IJS_CFLAGS = @IJS_CFLAGS@ +IJS_CONFIG = @IJS_CONFIG@ +IJS_LIBS = @IJS_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SAMPLES_FALSE = @INSTALL_SAMPLES_FALSE@ +INSTALL_SAMPLES_TRUE = @INSTALL_SAMPLES_TRUE@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTALL_USER_GUIDE_FALSE = @INSTALL_USER_GUIDE_FALSE@ +INSTALL_USER_GUIDE_TRUE = @INSTALL_USER_GUIDE_TRUE@ +INTLLIBS = @INTLLIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBREADLINE_DEPS = @LIBREADLINE_DEPS@ +LIBS = $(INTLLIBS) @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LN_S = @LN_S@ +LTALLOCA = @LTALLOCA@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_CFLAGS = @MAINTAINER_CFLAGS@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +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_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PLUG_IN_PATH = @PLUG_IN_PATH@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +RELEASE_DATE = @RELEASE_DATE@ +RM = @RM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TEXI2HTML = @TEXI2HTML@ +USE_LEVEL3_PS_FALSE = @USE_LEVEL3_PS_FALSE@ +USE_LEVEL3_PS_TRUE = @USE_LEVEL3_PS_TRUE@ +USE_NLS = @USE_NLS@ +USE_NLS_FALSE = @USE_NLS_FALSE@ +USE_NLS_TRUE = @USE_NLS_TRUE@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +YACC = @YACC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +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 = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +cups_bindir = @cups_bindir@ +cups_conf_datadir = @cups_conf_datadir@ +cups_conf_serverbin = @cups_conf_serverbin@ +cups_conf_serverroot = @cups_conf_serverroot@ +cups_exec_prefix = @cups_exec_prefix@ +cups_prefix = @cups_prefix@ +cups_sbindir = @cups_sbindir@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +gimp2_plug_indir = @gimp2_plug_indir@ +gimp_plug_indir = @gimp_plug_indir@ +gutenprint_cflags = @gutenprint_cflags@ +gutenprint_libs = @gutenprint_libs@ +gutenprintui2_cflags = @gutenprintui2_cflags@ +gutenprintui2_libs = @gutenprintui2_libs@ +gutenprintui_cflags = @gutenprintui_cflags@ +gutenprintui_libs = @gutenprintui_libs@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +AUTOMAKE_OPTIONS = 1.4 gnu +MAINT_CHARSET = latin1 +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS) +@BUILD_LIBGUTENPRINTUI_TRUE@pkginclude_HEADERS = \ +@BUILD_LIBGUTENPRINTUI_TRUE@ gutenprintui.h + +MAINTAINERCLEANFILES = Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/scripts/global.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/gutenprintui/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/gutenprintui/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 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/../../scripts + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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 $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-pkgincludeHEADERS + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-pkgincludeHEADERS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-pkgincludeHEADERS + + +@SET_MAKE@ + +export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +export STP_DATA_PATH = $(top_srcdir)/src/main + +# Rules + +$(top_builddir)/src/main/libgutenprint.la: + cd $(top_builddir)/src/main; \ + $(MAKE) + +$(top_builddir)/src/gutenprintui/libgutenprintui.la: + cd $(top_builddir)/src/gutenprintui; \ + $(MAKE) + +$(top_builddir)/src/gutenprintui2/libgutenprintui2.la: + cd $(top_builddir)/src/gutenprintui2; \ + $(MAKE) +# 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/include/gutenprintui/gutenprintui.h b/include/gutenprintui/gutenprintui.h new file mode 100644 index 0000000..2b40d70 --- /dev/null +++ b/include/gutenprintui/gutenprintui.h @@ -0,0 +1,178 @@ +/* + * "$Id: gutenprintui.h,v 1.2 2005/01/28 03:02:18 rlk Exp $" + * + * Print plug-in for the GIMP. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com), + * Robert Krawitz (rlk@alum.mit.edu). and Steve Miller (smiller@rni.net + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * + * Revision History: + * + * See ChangeLog + */ + +#ifndef GUTENPRINTUI +#define GUTENPRINTUI + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifdef __GNUC__ +#define inline __inline__ +#endif + +#include + +#include + +/* + * All Gimp-specific code is in this file. + */ + +typedef enum +{ + ORIENT_AUTO = -1, + ORIENT_PORTRAIT = 0, + ORIENT_LANDSCAPE = 1, + ORIENT_UPSIDEDOWN = 2, + ORIENT_SEASCAPE = 3 +} orient_t; + +/* + * If this is changed, command_options[] in panel.c must be appropriately + * updated. + */ +typedef enum +{ + COMMAND_TYPE_DEFAULT, + COMMAND_TYPE_CUSTOM, + COMMAND_TYPE_FILE +} command_t; + +typedef struct /**** Printer List ****/ +{ + char *name; /* Name of printer */ + command_t command_type; + char *queue_name; + char *extra_printer_options; + char *custom_command; + char *current_standard_command; + char *output_filename; + float scaling; /* Scaling, percent of printable area */ + orient_t orientation; + int unit; /* Units for preview area 0=Inch 1=Metric */ + int auto_size_roll_feed_paper; + int invalid_mask; + stp_vars_t *v; +} stpui_plist_t; + +typedef struct stpui_image +{ + stp_image_t im; + void (*transpose)(struct stpui_image *image); + void (*hflip)(struct stpui_image *image); + void (*vflip)(struct stpui_image *image); + void (*rotate_ccw)(struct stpui_image *image); + void (*rotate_cw)(struct stpui_image *image); + void (*rotate_180)(struct stpui_image *image); + void (*crop)(struct stpui_image *image, int left, int top, + int right, int bottom); +} stpui_image_t; + +/* + * Function prototypes + */ +extern void stpui_plist_set_name(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_name_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_name(const stpui_plist_t *p); + +extern void stpui_plist_set_queue_name(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_queue_name_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_queue_name(const stpui_plist_t *p); + +extern void stpui_plist_set_output_filename(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_output_filename_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_output_filename(const stpui_plist_t *p); + +extern void stpui_plist_set_extra_printer_options(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_extra_printer_options_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_extra_printer_options(const stpui_plist_t *p); + +extern void stpui_plist_set_custom_command(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_custom_command_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_custom_command(const stpui_plist_t *p); + +extern void stpui_plist_set_copy_count(stpui_plist_t *p, gint count); +extern int stpui_plist_get_copy_count(const stpui_plist_t *p); + +extern void stpui_plist_set_current_standard_command(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_current_standard_command_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_current_standard_command(const stpui_plist_t *p); + +extern void stpui_plist_set_command_type(stpui_plist_t *p, command_t val); +extern command_t stpui_plist_get_command_type(const stpui_plist_t *p); + +extern void stpui_set_global_parameter(const char *param, const char *value); +extern const char *stpui_get_global_parameter(const char *param); + +extern void stpui_plist_copy(stpui_plist_t *vd, const stpui_plist_t *vs); +extern int stpui_plist_add(const stpui_plist_t *key, int add_only); +extern void stpui_printer_initialize(stpui_plist_t *printer); +extern const stpui_plist_t *stpui_get_current_printer(void); + +extern char *stpui_build_standard_print_command(const stpui_plist_t *plist, + const stp_printer_t *printer); + +extern void stpui_set_printrc_file(const char *name); +extern const char * stpui_get_printrc_file(void); +extern void stpui_printrc_load (void); +extern void stpui_get_system_printers (void); +extern void stpui_printrc_save (void); +extern void stpui_set_image_filename(const char *); +extern const char *stpui_get_image_filename(void); +extern void stpui_set_errfunc(stp_outfunc_t wfunc); +extern stp_outfunc_t stpui_get_errfunc(void); +extern void stpui_set_errdata(void *errdata); +extern void *stpui_get_errdata(void); + +extern gint stpui_do_print_dialog (void); + +extern gint stpui_compute_orientation(void); +extern void stpui_set_image_dimensions(gint width, gint height); +extern void stpui_set_image_resolution(gdouble xres, gdouble yres); +extern void stpui_set_image_type(const char *image_type); +extern void stpui_set_image_raw_channels(gint channels); +extern void stpui_set_image_channel_depth(gint bit_depth); + +typedef guchar *(*get_thumbnail_func_t)(void *data, gint *width, gint *height, + gint *bpp, gint page); +extern void stpui_set_thumbnail_func(get_thumbnail_func_t); +extern get_thumbnail_func_t stpui_get_thumbnail_func(void); +extern void stpui_set_thumbnail_data(void *); +extern void *stpui_get_thumbnail_data(void); + +extern int stpui_print(const stpui_plist_t *printer, stpui_image_t *im); + + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINTUI */ diff --git a/include/gutenprintui2/Makefile.am b/include/gutenprintui2/Makefile.am new file mode 100644 index 0000000..b848039 --- /dev/null +++ b/include/gutenprintui2/Makefile.am @@ -0,0 +1,65 @@ +## $Id: Makefile.am,v 1.2 2004/10/31 22:29:24 rleigh Exp $ +## Copyright (C) 2000 Roger Leigh +## +## 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 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +## Process this file with automake to produce Makefile.in. + +AUTOMAKE_OPTIONS = 1.4 gnu + +@SET_MAKE@ + +MAINT_CHARSET = latin1 + +include $(top_srcdir)/scripts/global.mk + + +pkgincludedir = $(includedir)/gutenprintui2 + + +## Data + +stpui_public_h_sources = \ + gutenprintui.h \ + curve.h \ + gammacurve.h + +stpui_built_public_sources = \ + typebuiltins.h + +if BUILD_LIBGUTENPRINTUI2 +pkginclude_HEADERS = \ + $(stpui_public_h_sources) \ + $(stpui_built_public_sources) +endif + +## Rules + +if MAINTAINER_MODE +typebuiltins_extra_deps = Makefile +endif + +$(srcdir)/typebuiltins.h: $(stpui_public_h_sources) $(typebuiltins_extra_deps) + ( cd $(srcdir) && $(GLIB_MKENUMS) \ + --fhead "#ifndef GUTENPRINTUI_TYPE_BUILTINS_H\n#define GUTENPRINTUI_TYPE_BUILTINS_H\n\n#include \n\nG_BEGIN_DECLS\n" \ + --fprod "/* enumerations from \"@filename@\" */\n" \ + --vhead "GType @enum_name@_get_type (void);\n#define STPUI_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ + --ftail "G_END_DECLS\n\n#endif /* GUTENPRINTUI_TYPE_BUILTINS_H */" \ + $(stpui_public_h_sources) ) > $@ + + +## Clean + +MAINTAINERCLEANFILES = Makefile.in typebuiltins.h diff --git a/include/gutenprintui2/Makefile.in b/include/gutenprintui2/Makefile.in new file mode 100644 index 0000000..77fe0be --- /dev/null +++ b/include/gutenprintui2/Makefile.in @@ -0,0 +1,595 @@ +# Makefile.in generated by automake 1.9.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + +# Variables + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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 = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(am__pkginclude_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/scripts/global.mk +subdir = include/gutenprintui2 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \ + $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \ + $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__pkginclude_HEADERS_DIST = gutenprintui.h curve.h gammacurve.h \ + typebuiltins.h +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgincludedir = $(includedir)/gutenprintui2 +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@ +BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@ +BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@ +BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@ +BUILD_ESCPUTIL_FALSE = @BUILD_ESCPUTIL_FALSE@ +BUILD_ESCPUTIL_TRUE = @BUILD_ESCPUTIL_TRUE@ +BUILD_FOOMATIC_3_FALSE = @BUILD_FOOMATIC_3_FALSE@ +BUILD_FOOMATIC_3_TRUE = @BUILD_FOOMATIC_3_TRUE@ +BUILD_FOOMATIC_FALSE = @BUILD_FOOMATIC_FALSE@ +BUILD_FOOMATIC_TRUE = @BUILD_FOOMATIC_TRUE@ +BUILD_GENPPD_STATIC_FALSE = @BUILD_GENPPD_STATIC_FALSE@ +BUILD_GENPPD_STATIC_TRUE = @BUILD_GENPPD_STATIC_TRUE@ +BUILD_GHOSTSCRIPT_FALSE = @BUILD_GHOSTSCRIPT_FALSE@ +BUILD_GHOSTSCRIPT_TRUE = @BUILD_GHOSTSCRIPT_TRUE@ +BUILD_GIMP2_FALSE = @BUILD_GIMP2_FALSE@ +BUILD_GIMP2_TRUE = @BUILD_GIMP2_TRUE@ +BUILD_GIMP_FALSE = @BUILD_GIMP_FALSE@ +BUILD_GIMP_TRUE = @BUILD_GIMP_TRUE@ +BUILD_LIBGUTENPRINTUI2_FALSE = @BUILD_LIBGUTENPRINTUI2_FALSE@ +BUILD_LIBGUTENPRINTUI2_TRUE = @BUILD_LIBGUTENPRINTUI2_TRUE@ +BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@ +BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@ +BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@ +BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@ +BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@ +BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@ +BUILD_TEST_FALSE = @BUILD_TEST_FALSE@ +BUILD_TEST_TRUE = @BUILD_TEST_TRUE@ +BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@ +BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONVERT = @CONVERT@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CUPS_CFLAGS = @CUPS_CFLAGS@ +CUPS_CONFIG = @CUPS_CONFIG@ +CUPS_LIBS = @CUPS_LIBS@ +CUPS_PPDS_AT_TOP_LEVEL_FALSE = @CUPS_PPDS_AT_TOP_LEVEL_FALSE@ +CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@ +CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DB2HTML = @DB2HTML@ +DB2PDF = @DB2PDF@ +DB2PS = @DB2PS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIALOG = @DIALOG@ +DOXYGEN = @DOXYGEN@ +DVIPDF = @DVIPDF@ +DVIPS = @DVIPS@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FIND = @FIND@ +FOOMATIC_CONFIGURE = @FOOMATIC_CONFIGURE@ +FOOMATIC_KITLOAD = @FOOMATIC_KITLOAD@ +FOOMATIC_PPDFILE = @FOOMATIC_PPDFILE@ +GENPPD_LIBS = @GENPPD_LIBS@ +GIMP2_CFLAGS = @GIMP2_CFLAGS@ +GIMP2_LIBS = @GIMP2_LIBS@ +GIMPTOOL = @GIMPTOOL@ +GIMPTOOL2_CHECK = @GIMPTOOL2_CHECK@ +GIMPTOOL_CHECK = @GIMPTOOL_CHECK@ +GIMP_CFLAGS = @GIMP_CFLAGS@ +GIMP_CFLAGS_NOUI = @GIMP_CFLAGS_NOUI@ +GIMP_DATA_DIR = @GIMP_DATA_DIR@ +GIMP_LIBS = @GIMP_LIBS@ +GIMP_LIBS_NOUI = @GIMP_LIBS_NOUI@ +GIMP_PLUGIN_DIR = @GIMP_PLUGIN_DIR@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_CONFIG = @GLIB_CONFIG@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GNUCFLAGS = @GNUCFLAGS@ +GTK2_CFLAGS = @GTK2_CFLAGS@ +GTK2_LIBS = @GTK2_LIBS@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_CONFIG = @GTK_CONFIG@ +GTK_LIBS = @GTK_LIBS@ +GUTENPRINTUI2_BINARY_AGE = @GUTENPRINTUI2_BINARY_AGE@ +GUTENPRINTUI2_CFLAGS = @GUTENPRINTUI2_CFLAGS@ +GUTENPRINTUI2_CURRENT_INTERFACE = @GUTENPRINTUI2_CURRENT_INTERFACE@ +GUTENPRINTUI2_INTERFACE_AGE = @GUTENPRINTUI2_INTERFACE_AGE@ +GUTENPRINTUI2_LIBDEPS = @GUTENPRINTUI2_LIBDEPS@ +GUTENPRINTUI2_LIBS = $(top_builddir)/src/gutenprintui2/libgutenprintui2.la +GUTENPRINTUI2_VERSION = @GUTENPRINTUI2_VERSION@ +GUTENPRINTUI_BINARY_AGE = @GUTENPRINTUI_BINARY_AGE@ +GUTENPRINTUI_CFLAGS = @GUTENPRINTUI_CFLAGS@ +GUTENPRINTUI_CURRENT_INTERFACE = @GUTENPRINTUI_CURRENT_INTERFACE@ +GUTENPRINTUI_INTERFACE_AGE = @GUTENPRINTUI_INTERFACE_AGE@ +GUTENPRINTUI_LIBDEPS = @GUTENPRINTUI_LIBDEPS@ +GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la +GUTENPRINTUI_VERSION = @GUTENPRINTUI_VERSION@ +GUTENPRINT_BINARY_AGE = @GUTENPRINT_BINARY_AGE@ +GUTENPRINT_CFLAGS = @GUTENPRINT_CFLAGS@ +GUTENPRINT_CURRENT_INTERFACE = @GUTENPRINT_CURRENT_INTERFACE@ +GUTENPRINT_INTERFACE_AGE = @GUTENPRINT_INTERFACE_AGE@ +GUTENPRINT_LIBDEPS = @GUTENPRINT_LIBDEPS@ + +# Libraries +GUTENPRINT_LIBS = $(top_builddir)/src/main/libgutenprint.la +GUTENPRINT_MAJOR_VERSION = @GUTENPRINT_MAJOR_VERSION@ +GUTENPRINT_MICRO_VERSION = @GUTENPRINT_MICRO_VERSION@ +GUTENPRINT_MINOR_VERSION = @GUTENPRINT_MINOR_VERSION@ +GUTENPRINT_VERSION = @GUTENPRINT_VERSION@ +IJS_CFLAGS = @IJS_CFLAGS@ +IJS_CONFIG = @IJS_CONFIG@ +IJS_LIBS = @IJS_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SAMPLES_FALSE = @INSTALL_SAMPLES_FALSE@ +INSTALL_SAMPLES_TRUE = @INSTALL_SAMPLES_TRUE@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTALL_USER_GUIDE_FALSE = @INSTALL_USER_GUIDE_FALSE@ +INSTALL_USER_GUIDE_TRUE = @INSTALL_USER_GUIDE_TRUE@ +INTLLIBS = @INTLLIBS@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBREADLINE_DEPS = @LIBREADLINE_DEPS@ +LIBS = $(INTLLIBS) @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LN_S = @LN_S@ +LTALLOCA = @LTALLOCA@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_CFLAGS = @MAINTAINER_CFLAGS@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +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_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PLUG_IN_PATH = @PLUG_IN_PATH@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +RELEASE_DATE = @RELEASE_DATE@ +RM = @RM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TEXI2HTML = @TEXI2HTML@ +USE_LEVEL3_PS_FALSE = @USE_LEVEL3_PS_FALSE@ +USE_LEVEL3_PS_TRUE = @USE_LEVEL3_PS_TRUE@ +USE_NLS = @USE_NLS@ +USE_NLS_FALSE = @USE_NLS_FALSE@ +USE_NLS_TRUE = @USE_NLS_TRUE@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +YACC = @YACC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +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 = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +cups_bindir = @cups_bindir@ +cups_conf_datadir = @cups_conf_datadir@ +cups_conf_serverbin = @cups_conf_serverbin@ +cups_conf_serverroot = @cups_conf_serverroot@ +cups_exec_prefix = @cups_exec_prefix@ +cups_prefix = @cups_prefix@ +cups_sbindir = @cups_sbindir@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +gimp2_plug_indir = @gimp2_plug_indir@ +gimp_plug_indir = @gimp_plug_indir@ +gutenprint_cflags = @gutenprint_cflags@ +gutenprint_libs = @gutenprint_libs@ +gutenprintui2_cflags = @gutenprintui2_cflags@ +gutenprintui2_libs = @gutenprintui2_libs@ +gutenprintui_cflags = @gutenprintui_cflags@ +gutenprintui_libs = @gutenprintui_libs@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +AUTOMAKE_OPTIONS = 1.4 gnu +MAINT_CHARSET = latin1 +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS) +stpui_public_h_sources = \ + gutenprintui.h \ + curve.h \ + gammacurve.h + +stpui_built_public_sources = \ + typebuiltins.h + +@BUILD_LIBGUTENPRINTUI2_TRUE@pkginclude_HEADERS = \ +@BUILD_LIBGUTENPRINTUI2_TRUE@ $(stpui_public_h_sources) \ +@BUILD_LIBGUTENPRINTUI2_TRUE@ $(stpui_built_public_sources) + +@MAINTAINER_MODE_TRUE@typebuiltins_extra_deps = Makefile +MAINTAINERCLEANFILES = Makefile.in typebuiltins.h +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/scripts/global.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/gutenprintui2/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/gutenprintui2/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 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)" + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/../../scripts + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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 $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-pkgincludeHEADERS + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-pkgincludeHEADERS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-pkgincludeHEADERS + + +@SET_MAKE@ + +export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +export STP_DATA_PATH = $(top_srcdir)/src/main + +# Rules + +$(top_builddir)/src/main/libgutenprint.la: + cd $(top_builddir)/src/main; \ + $(MAKE) + +$(top_builddir)/src/gutenprintui/libgutenprintui.la: + cd $(top_builddir)/src/gutenprintui; \ + $(MAKE) + +$(top_builddir)/src/gutenprintui2/libgutenprintui2.la: + cd $(top_builddir)/src/gutenprintui2; \ + $(MAKE) + +$(srcdir)/typebuiltins.h: $(stpui_public_h_sources) $(typebuiltins_extra_deps) + ( cd $(srcdir) && $(GLIB_MKENUMS) \ + --fhead "#ifndef GUTENPRINTUI_TYPE_BUILTINS_H\n#define GUTENPRINTUI_TYPE_BUILTINS_H\n\n#include \n\nG_BEGIN_DECLS\n" \ + --fprod "/* enumerations from \"@filename@\" */\n" \ + --vhead "GType @enum_name@_get_type (void);\n#define STPUI_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ + --ftail "G_END_DECLS\n\n#endif /* GUTENPRINTUI_TYPE_BUILTINS_H */" \ + $(stpui_public_h_sources) ) > $@ +# 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/include/gutenprintui2/curve.h b/include/gutenprintui2/curve.h new file mode 100644 index 0000000..1c80faf --- /dev/null +++ b/include/gutenprintui2/curve.h @@ -0,0 +1,127 @@ +/* GTK - The GIMP Toolkit + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +/* + * NOTE this widget is considered too specialized/little-used for + * GTK+, and will in the future be moved to some other package. If + * your application needs this widget, feel free to use it, as the + * widget does work and is useful in some applications; it's just not + * of general interest. However, we are not accepting new features for + * the widget, and it will eventually move out of the GTK+ + * distribution. + */ + +#ifndef GUTENPRINTUI_CURVE_H +#define GUTENPRINTUI_CURVE_H + + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define STPUI_TYPE_CURVE (stpui_curve_get_type ()) +#define STPUI_CURVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STPUI_TYPE_CURVE, StpuiCurve)) +#define STPUI_CURVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STPUI_TYPE_CURVE, StpuiCurveClass)) +#define STPUI_IS_CURVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STPUI_TYPE_CURVE)) +#define STPUI_IS_CURVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STPUI_TYPE_CURVE)) +#define STPUI_CURVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STPUI_TYPE_CURVE, StpuiCurveClass)) + + +/* Curve types */ +typedef enum +{ + STPUI_CURVE_TYPE_LINEAR, /* linear interpolation */ + STPUI_CURVE_TYPE_SPLINE, /* spline interpolation */ + STPUI_CURVE_TYPE_FREE /* free form curve */ +} StpuiCurveType; + + +typedef struct _StpuiCurve StpuiCurve; +typedef struct _StpuiCurveClass StpuiCurveClass; + + +struct _StpuiCurve +{ + GtkDrawingArea graph; + + gint cursor_type; + gfloat min_x; + gfloat max_x; + gfloat min_y; + gfloat max_y; + GdkPixmap *pixmap; + StpuiCurveType curve_type; + gint height; /* (cached) graph height in pixels */ + gint grab_point; /* point currently grabbed */ + gint last; + + /* (cached) curve points: */ + gint num_points; + GdkPoint *point; + + /* control points: */ + gint num_ctlpoints; /* number of control points */ + gfloat (*ctlpoint)[2]; /* array of control points */ +}; + +struct _StpuiCurveClass +{ + GtkDrawingAreaClass parent_class; + + void (* curve_type_changed) (StpuiCurve *curve); + + /* Padding for future expansion */ + void (*_gtk_reserved1) (void); + void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); + void (*_gtk_reserved4) (void); +}; + + +GType stpui_curve_get_type (void) G_GNUC_CONST; +GtkWidget* stpui_curve_new (void); +void stpui_curve_reset (StpuiCurve *curve); +void stpui_curve_set_gamma (StpuiCurve *curve, gfloat gamma_); +void stpui_curve_set_range (StpuiCurve *curve, + gfloat min_x, gfloat max_x, + gfloat min_y, gfloat max_y); +void stpui_curve_get_vector (StpuiCurve *curve, + int veclen, gfloat vector[]); +void stpui_curve_set_vector (StpuiCurve *curve, + int veclen, const gfloat vector[]); +void stpui_curve_set_curve_type (StpuiCurve *curve, StpuiCurveType type); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* GUTENPRINTUI_CURVE_H */ diff --git a/include/gutenprintui2/gammacurve.h b/include/gutenprintui2/gammacurve.h new file mode 100644 index 0000000..b8f4dc7 --- /dev/null +++ b/include/gutenprintui2/gammacurve.h @@ -0,0 +1,85 @@ +/* GTK - The GIMP Toolkit + * Copyright (C) 1997 David Mosberger + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef GUTENPRINTUI_GAMMA_CURVE_H +#define GUTENPRINTUI_GAMMA_CURVE_H + + +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define STPUI_TYPE_GAMMA_CURVE (stpui_gamma_curve_get_type ()) +#define STPUI_GAMMA_CURVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STPUI_TYPE_GAMMA_CURVE, StpuiGammaCurve)) +#define STPUI_GAMMA_CURVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STPUI_TYPE_GAMMA_CURVE, StpuiGammaCurveClass)) +#define STPUI_IS_GAMMA_CURVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STPUI_TYPE_GAMMA_CURVE)) +#define STPUI_IS_GAMMA_CURVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STPUI_TYPE_GAMMA_CURVE)) +#define STPUI_GAMMA_CURVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STPUI_TYPE_GAMMA_CURVE, StpuiGammaCurveClass)) + +typedef struct _StpuiGammaCurve StpuiGammaCurve; +typedef struct _StpuiGammaCurveClass StpuiGammaCurveClass; + + +struct _StpuiGammaCurve +{ + GtkVBox vbox; + + GtkWidget *table; + GtkWidget *curve; + GtkWidget *button[5]; /* spline, linear, free, gamma, reset */ + + gfloat gamma; + GtkWidget *gamma_dialog; + GtkWidget *gamma_text; +}; + +struct _StpuiGammaCurveClass +{ + GtkVBoxClass parent_class; + + /* Padding for future expansion */ + void (*_gtk_reserved1) (void); + void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); + void (*_gtk_reserved4) (void); +}; + + +GType stpui_gamma_curve_get_type (void) G_GNUC_CONST; +GtkWidget* stpui_gamma_curve_new (void); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* GUTENPRINTUI_GAMMACURVE_H */ diff --git a/include/gutenprintui2/gutenprintui.h b/include/gutenprintui2/gutenprintui.h new file mode 100644 index 0000000..d0c61d9 --- /dev/null +++ b/include/gutenprintui2/gutenprintui.h @@ -0,0 +1,182 @@ +/* + * "$Id: gutenprintui.h,v 1.2 2005/01/28 03:02:18 rlk Exp $" + * + * Print plug-in for the GIMP. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com), + * Robert Krawitz (rlk@alum.mit.edu). and Steve Miller (smiller@rni.net + * + * 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 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * + * Revision History: + * + * See ChangeLog + */ + +#ifndef GUTENPRINTUI_H +#define GUTENPRINTUI_H + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifdef __GNUC__ +#define inline __inline__ +#endif + +#include + +#include + +#include +#include +#include + +/* + * All Gimp-specific code is in this file. + */ + +typedef enum +{ + ORIENT_AUTO = -1, + ORIENT_PORTRAIT = 0, + ORIENT_LANDSCAPE = 1, + ORIENT_UPSIDEDOWN = 2, + ORIENT_SEASCAPE = 3 +} orient_t; + +/* + * If this is changed, command_options[] in panel.c must be appropriately + * updated. + */ +typedef enum +{ + COMMAND_TYPE_DEFAULT, + COMMAND_TYPE_CUSTOM, + COMMAND_TYPE_FILE +} command_t; + +typedef struct /**** Printer List ****/ +{ + char *name; /* Name of printer */ + command_t command_type; + char *queue_name; + char *extra_printer_options; + char *custom_command; + char *current_standard_command; + char *output_filename; + float scaling; /* Scaling, percent of printable area */ + orient_t orientation; + int unit; /* Units for preview area 0=Inch 1=Metric */ + int auto_size_roll_feed_paper; + int invalid_mask; + stp_vars_t *v; +} stpui_plist_t; + +typedef struct stpui_image +{ + stp_image_t im; + void (*transpose)(struct stpui_image *image); + void (*hflip)(struct stpui_image *image); + void (*vflip)(struct stpui_image *image); + void (*rotate_ccw)(struct stpui_image *image); + void (*rotate_cw)(struct stpui_image *image); + void (*rotate_180)(struct stpui_image *image); + void (*crop)(struct stpui_image *image, int left, int top, + int right, int bottom); +} stpui_image_t; + +/* + * Function prototypes + */ +extern void stpui_plist_set_name(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_name_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_name(const stpui_plist_t *p); + +extern void stpui_plist_set_queue_name(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_queue_name_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_queue_name(const stpui_plist_t *p); + +extern void stpui_plist_set_output_filename(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_output_filename_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_output_filename(const stpui_plist_t *p); + +extern void stpui_plist_set_extra_printer_options(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_extra_printer_options_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_extra_printer_options(const stpui_plist_t *p); + +extern void stpui_plist_set_custom_command(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_custom_command_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_custom_command(const stpui_plist_t *p); + +extern void stpui_plist_set_copy_count(stpui_plist_t *p, gint count); +extern int stpui_plist_get_copy_count(const stpui_plist_t *p); + +extern void stpui_plist_set_current_standard_command(stpui_plist_t *p, const char *val); +extern void stpui_plist_set_current_standard_command_n(stpui_plist_t *p, const char *val, int n); +extern const char *stpui_plist_get_current_standard_command(const stpui_plist_t *p); + +extern void stpui_plist_set_command_type(stpui_plist_t *p, command_t val); +extern command_t stpui_plist_get_command_type(const stpui_plist_t *p); + +extern void stpui_set_global_parameter(const char *param, const char *value); +extern const char *stpui_get_global_parameter(const char *param); + +extern void stpui_plist_copy(stpui_plist_t *vd, const stpui_plist_t *vs); +extern int stpui_plist_add(const stpui_plist_t *key, int add_only); +extern void stpui_printer_initialize(stpui_plist_t *printer); +extern const stpui_plist_t *stpui_get_current_printer(void); + +extern char *stpui_build_standard_print_command(const stpui_plist_t *plist, + const stp_printer_t *printer); + +extern void stpui_set_printrc_file(const char *name); +extern const char * stpui_get_printrc_file(void); +extern void stpui_printrc_load (void); +extern void stpui_get_system_printers (void); +extern void stpui_printrc_save (void); +extern void stpui_set_image_filename(const char *); +extern const char *stpui_get_image_filename(void); +extern void stpui_set_errfunc(stp_outfunc_t wfunc); +extern stp_outfunc_t stpui_get_errfunc(void); +extern void stpui_set_errdata(void *errdata); +extern void *stpui_get_errdata(void); + +extern gint stpui_do_print_dialog (void); + +extern gint stpui_compute_orientation(void); +extern void stpui_set_image_dimensions(gint width, gint height); +extern void stpui_set_image_resolution(gdouble xres, gdouble yres); +extern void stpui_set_image_type(const char *image_type); +extern void stpui_set_image_raw_channels(gint channels); +extern void stpui_set_image_channel_depth(gint bit_depth); + +typedef guchar *(*get_thumbnail_func_t)(void *data, gint *width, gint *height, + gint *bpp, gint page); +extern void stpui_set_thumbnail_func(get_thumbnail_func_t); +extern get_thumbnail_func_t stpui_get_thumbnail_func(void); +extern void stpui_set_thumbnail_data(void *); +extern void *stpui_get_thumbnail_data(void); + +extern int stpui_print(const stpui_plist_t *printer, stpui_image_t *im); + + +#ifdef __cplusplus + } +#endif + +#endif /* GUTENPRINTUI_H */ diff --git a/include/gutenprintui2/typebuiltins.h b/include/gutenprintui2/typebuiltins.h new file mode 100644 index 0000000..cfa8fbb --- /dev/null +++ b/include/gutenprintui2/typebuiltins.h @@ -0,0 +1,23 @@ + +/* Generated data (by glib-mkenums) */ + +#ifndef GUTENPRINTUI_TYPE_BUILTINS_H +#define GUTENPRINTUI_TYPE_BUILTINS_H + +#include + +G_BEGIN_DECLS +/* enumerations from "gutenprintui.h" */ +GType orient_t_orient_t_get_type (void); +#define STPUI_TYPE_ORIENT_T (orient_t_orient_t_get_type()) +GType command_t_command_t_get_type (void); +#define STPUI_TYPE_COMMAND_T (command_t_command_t_get_type()) +/* enumerations from "curve.h" */ +GType stpui_curve_type_get_type (void); +#define STPUI_TYPE_CURVE_TYPE (stpui_curve_type_get_type()) +G_END_DECLS + +#endif /* GUTENPRINTUI_TYPE_BUILTINS_H */ + +/* Generated data ends here */ + -- cgit v1.2.3