;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:46:20 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/gs.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`gs.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@42 The name of the Ghostscript interpreter.
(defvar gs-program "gs" (#$ . 606))
#@50 The Ghostscript device to use to produce images.
(defvar gs-device "x11" (#$ . 689))
#@171 List of command line arguments to pass to Ghostscript.
Arguments may contain place-holders `<file>' for the name of the
input file, and `<device>' for the device to use.
(defvar gs-options '("-q" "-dBATCH" "-sDEVICE=<device>" "<file>") (#$ . 781))
#@198 Return a list of command line options with place-holders replaced.
DEVICE is the value to substitute for the place-holder `<device>',
FILE is the value to substitute for the place-holder `<file>'.
(defalias 'gs-options #[(device file) "\301\302\"\207" [gs-options mapcar #[(option) "\303\304	#\303\305\n	#\211\207" [device option file replace-regexp-in-string "<device>" "<file>"] 4]] 3 (#$ . 1036)])
#@60 Return, on FRAME, pixel width PIXEL-WIDTH tranlated to pt.
(defalias 'gs-width-in-pt #[(frame pixel-width) "\303!\303\304	!!\303\305	!!\245_\306\n_\307\245)\207" [pixel-width frame mm float x-display-mm-width x-display-pixel-width 25.4 72.0] 5 (#$ . 1447)])
#@62 Return, on FRAME, pixel height PIXEL-HEIGHT tranlated to pt.
(defalias 'gs-height-in-pt #[(frame pixel-height) "\303!\303\304	!!\303\305	!!\245_\306\n_\307\245)\207" [pixel-height frame mm float x-display-mm-height x-display-pixel-height 25.4 72.0] 5 (#$ . 1713)])
#@192 Set the `GHOSTVIEW' window property of FRAME.
SPEC is a GS image specification.  IMG-WIDTH is the width of the
requested image, and IMG-HEIGHT is the height of the requested
image in pixels.
(defalias 'gs-set-ghostview-window-prop #[(frame spec img-width img-height) "\306A\307\"\211\310\234	\311\234	\312\234	\313\234\306A\314\"\206 \310\f\nZ\315\245Z\316\245\245\245\317\320\321\322\n\f&#.\n\207" [spec box llx lly urx ury plist-get :bounding-box 0 1 2 3 :rotate 72.0 72.0 x-change-window-property "GHOSTVIEW" format "0 %d %d %d %d %d %g %g" rotation in-width in-height img-width xdpi img-height ydpi frame] 12 (#$ . 1987)])
#@69 Set the `GHOSTVIEW_COLORS' environment variable depending on FRAME.
(defalias 'gs-set-ghostview-colors-window-prop #[(frame pixel-colors) "\303!\203\n \304\202 \305!\203 \306\202 \307\310\311\312\313	\n##)\207" [frame mode pixel-colors x-display-color-p "Color" x-display-grayscale-p "Grayscale" "Monochrome" x-change-window-property "GHOSTVIEW_COLORS" format "%s %s"] 6 (#$ . 2659)])
#@243 Load a PS image for display on FRAME.
SPEC is an image specification, IMG-HEIGHT and IMG-WIDTH are width
and height of the image in pixels.  WINDOW-AND-PIXMAP-ID is a string of
the form "WINDOW-ID PIXMAP-ID".  Value is non-nil if successful.
(defalias 'gs-load-image #[(frame spec img-width img-height window-and-pixmap-id pixel-colors) "\306\216\307A\310\"\306\311\312\313\314\f\"G!\204/ \312	!\204/ \315\316\317\320#\204) \321\316\322\"\210	S\202\f \323\f$\210\324\f\"\210\325\314\"\210\326\327\330\331\332 \"%\333\n!\210\n,\207" [spec timeout gs file frame img-width nil plist-get :file 40 zerop x-window-property "GHOSTVIEW" sit-for 0 100 t sleep-for 50 gs-set-ghostview-window-prop gs-set-ghostview-colors-window-prop setenv apply start-process "gs" "*GS*" gs-options process-kill-without-query img-height pixel-colors window-and-pixmap-id gs-program gs-device] 8 (#$ . 3058)])
(provide 'gs)
