"Fossies" - the Fresh Open Source Software Archive

Member "ghostview-1.4.1/GhostviewP.h" (22 Sep 1992, 3844 Bytes) of package /linux/misc/old/ghost/gnu/ghostview/ghostview-1.4.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2  * GhostviewP.h -- Private header file for Ghostview widget.
    3  * Copyright (C) 1992  Timothy O. Theisen
    4  *
    5  * This program is free software; you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation; either version 2 of the License, or
    8  * (at your option) any later version.
    9  *
   10  * This program is distributed in the hope that it will be useful,
   11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13  * GNU General Public License for more details.
   14  *
   15  * You should have received a copy of the GNU General Public License
   16  * along with this program; if not, write to the Free Software
   17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   18  *
   19  *   Author: Tim Theisen           Systems Programmer
   20  * Internet: tim@cs.wisc.edu       Department of Computer Sciences
   21  *     UUCP: uwvax!tim             University of Wisconsin-Madison
   22  *    Phone: (608)262-0438         1210 West Dayton Street
   23  *      FAX: (608)262-9777         Madison, WI   53706
   24  */
   25 
   26 #ifndef _GhostviewP_h
   27 #define _GhostviewP_h
   28 
   29 #include "Ghostview.h"
   30 #include <X11/Xmu/Atoms.h>
   31 #include <X11/Xmu/CharSet.h>
   32 #include <stdio.h>
   33 
   34 typedef struct {
   35     AtomPtr ghostview;
   36     AtomPtr next;
   37     AtomPtr page;
   38     AtomPtr done;
   39 } GhostviewClassPart;
   40 
   41 typedef struct _GhostviewClassRec {
   42     CoreClassPart   core_class;
   43     GhostviewClassPart  ghostview_class;
   44 } GhostviewClassRec;
   45 
   46 extern GhostviewClassRec ghostviewClassRec;
   47 
   48 /* structure to describe section of file to send to ghostscript */
   49 struct record_list {
   50     FILE *fp;
   51     long begin;
   52     unsigned int len;
   53     Boolean seek_needed;
   54     Boolean close;
   55     struct record_list *next;
   56 };
   57 
   58 typedef struct {
   59     /* resources */
   60     Cursor      cursor;
   61     Cursor      busy_cursor;
   62     XtCallbackList  callback;
   63     XtCallbackList  message_callback;
   64     XtCallbackList  output_callback;
   65     String      interpreter;
   66     Boolean     quiet;
   67     Boolean     use_bpixmap;
   68     String      preload;
   69     String      filename;
   70     XtPageOrientation   orientation;
   71     float       xdpi;
   72     float       ydpi;
   73     int         llx;
   74     int         lly;
   75     int         urx;
   76     int         ury;
   77     int         left_margin;
   78     int         bottom_margin;
   79     int         right_margin;
   80     int         top_margin;
   81     /* private state */
   82     GC          gc;     /* GC used to clear window */
   83     Window      mwin;       /* destination of ghostsript messages */
   84     Boolean     disable_start;  /* whether to fork ghostscript */
   85     int         interpreter_pid;/* pid of ghostscript, -1 if none */
   86     struct record_list  *ps_input;  /* pointer it gs input queue */
   87     char        *input_buffer;  /* pointer to input buffer */
   88     unsigned int    bytes_left; /* bytes left in section */
   89 #ifndef VMS
   90     char        *input_buffer_ptr; /* pointer into input buffer */
   91     unsigned int    buffer_bytes_left; /* bytes left in buffer */
   92 #endif
   93     int         interpreter_input; /* fd gs stdin, -1 if None */
   94     int         interpreter_output; /* fd gs stdout, -1 if None */
   95 #ifndef VMS
   96     int         interpreter_error; /* fd gs stderr, -1 if None */
   97     XtInputId       interpreter_input_id; /* XtInputId for above */
   98     XtInputId       interpreter_output_id; /* XtInputId for above */
   99     XtInputId       interpreter_error_id; /* XtInputId for above */
  100 #else /* VMS */
  101     short       interpreter_input_iosb[4];  /* I/O Status Blocks    */
  102     short       interpreter_output_iosb[4]; /* for each mailbox     */
  103     char        *output_buffer; /* pointer to output buffer */
  104 #endif /* VMS */
  105     Dimension       gs_width;   /* Width of window at last Setup() */
  106     Dimension       gs_height;  /* Height of window at last Setup() */
  107     Boolean     busy;       /* Is gs busy drawing? */
  108     Boolean     changed;    /* something changed since Setup()? */
  109 } GhostviewPart;
  110 
  111 typedef struct _GhostviewRec {
  112     CorePart        core;
  113     GhostviewPart   ghostview;
  114 } GhostviewRec;
  115 
  116 #endif /* _GhostviewP_h */