diff options
author | Roland Mainz <roland.mainz@nrubsig.org> | 2005-01-03 01:06:35 +0000 |
---|---|---|
committer | Roland Mainz <roland.mainz@nrubsig.org> | 2005-01-03 01:06:35 +0000 |
commit | 29c0857c0d2c373878a93b5341e7924350119abb (patch) | |
tree | 87cbda3c5d20f9cf867adc116f0e04acb73cc281 | |
parent | a579e59143c9e664b4464e791659eb879aa6ede9 (diff) |
xc/lib/XprintAppUtil/xpapputil.csco_port_update-baseXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_14XORG-6_8_99_13XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10XORG-6_8_99_1
xc/lib/XprintAppUtil/xpapputil.h
xc/lib/XprintUtil/xprintutil.c
xc/lib/XprintUtil/xprintutil.h
xc/programs/glxgears/glxgears.c
xc/programs/xdbedizzy/xdbedizzy.c
xc/programs/xedit/Xedit-xprint.ad
xc/programs/xedit/commands.c
xc/programs/xlogo/print.c
xc/programs/xlsfonts/xlsfonts.c
xc/programs/xlsfonts/xlsfonts.man
xc/programs/xlsfonts/xlsfonts.sgml
xc/programs/xman/Xman-xprint.ad
xc/programs/xman/handler.c
xc/programs/xman/print.c
xc/programs/xman/print.h
xc/programs/xmore/XMore.ad
xc/programs/xmore/print.c
xc/programs/xmore/print.h
xc/programs/xmore/printdialog.c
xc/programs/xmore/printdialog.h
xc/programs/xmore/printdialogprivates.h
xc/programs/xmore/xmore.c
xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c
xc/programs/xphelloworld/xphelloworld/xphelloworld.c
xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c
xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c
xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.c
xc/programs/xplsprinters/xplsprinters.c
//bugs.freedesktop.org/show_bug.cgi?id=1706) attachment #1615
(https://bugs.freedesktop.org/attachment.cgi?id=1615): XprintUtils
2004/Q3 update. This adds various new features to the XprintUtils
library including support for page resolutions where
X_resolution!=Y_resolution, listfonts-mode control and initial
framework for the COLORSPACE extension. Patch by Roland Mainz
<roland.mainz@nrubsig.org> and Julien Lafon <julien.lafon@gmail.com>.
-rw-r--r-- | include/X11/XprintAppUtil/xpapputil.h | 3 | ||||
-rw-r--r-- | src/xpapputil.c | 19 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/X11/XprintAppUtil/xpapputil.h b/include/X11/XprintAppUtil/xpapputil.h index 174b71d..d7159bb 100644 --- a/include/X11/XprintAppUtil/xpapputil.h +++ b/include/X11/XprintAppUtil/xpapputil.h @@ -71,7 +71,8 @@ typedef struct void *print_to_filehandle; Screen *pscreen; int pscreennumber; - long document_dpi; + long document_dpi_x, + document_dpi_y; XpuSupportedFlags supported_job_attributes; XpuSupportedFlags supported_doc_attributes; diff --git a/src/xpapputil.c b/src/xpapputil.c index 7e86f8e..afb81e4 100644 --- a/src/xpapputil.c +++ b/src/xpapputil.c @@ -131,15 +131,13 @@ XpAuErrorValue XpauParseArg( const char *arg_name, const char *arg_value, XpauCo return XpAuError_success; } else if( !strcasecmp(arg_name, "resolution") ) - { - int arg_res = atoi(arg_value); - + { if( !(context->resolution_list && (context->supported_doc_attributes & XPUATTRIBUTESUPPORTED_DEFAULT_PRINTER_RESOLUTION)) ) return XpAuError_unsupported_resolution; - docvalues->resolution = XpuFindResolution(context->resolution_list, + docvalues->resolution = XpuFindResolutionByName(context->resolution_list, context->resolution_num_list_entries, - arg_res, arg_res); + arg_value); if( !docvalues->resolution ) return XpAuError_unsupported_resolution; @@ -409,7 +407,7 @@ XpAuErrorValue XpauStartJob( XpauContext *context, const char *printerfile ) } /* Get default printer resolution */ - if( XpuGetResolution(context->pdpy, context->pcontext, &context->document_dpi) != 1 ) + if( XpuGetResolution(context->pdpy, context->pcontext, &context->document_dpi_x, &context->document_dpi_y) != 1 ) { result = XpAuError_no_dpi_set; } @@ -440,10 +438,11 @@ XpAuErrorValue XpauEndJob( XpauContext *context ) */ XFlush(context->pdpy); - context->inJob = False; - context->pscreen = NULL; - context->pscreennumber = -1; - context->document_dpi = 0L; + context->inJob = False; + context->pscreen = NULL; + context->pscreennumber = -1; + context->document_dpi_x = 0L; + context->document_dpi_y = 0L; if( context->print_to_filehandle ) { |