"Fossies" - the Fresh Open Source Software Archive

Member "ghostview-1.5/GhostviewP.h" (24 Jul 1993, 3936 Bytes) of package /linux/misc/old/ghost/gnu/ghostview/ghostview-1.5.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 gv_colors;
   37     AtomPtr next;
   38     AtomPtr page;
   39     AtomPtr done;
   40 } GhostviewClassPart;
   41 
   42 typedef struct _GhostviewClassRec {
   43     CoreClassPart   core_class;
   44     GhostviewClassPart  ghostview_class;
   45 } GhostviewClassRec;
   46 
   47 extern GhostviewClassRec ghostviewClassRec;
   48 
   49 /* structure to describe section of file to send to ghostscript */
   50 struct record_list {
   51     FILE *fp;
   52     long begin;
   53     unsigned int len;
   54     Boolean seek_needed;
   55     Boolean close;
   56     struct record_list *next;
   57 };
   58 
   59 typedef struct {
   60     /* resources */
   61     Pixel       foreground;
   62     Cursor      cursor;
   63     Cursor      busy_cursor;
   64     XtCallbackList  callback;
   65     XtCallbackList  message_callback;
   66     XtCallbackList  output_callback;
   67     String      interpreter;
   68     Boolean     quiet;
   69     Boolean     safer;
   70     Boolean     use_bpixmap;
   71     String      arguments;
   72     String      filename;
   73     XtPageOrientation   orientation;
   74     XtPalette       palette;
   75     float       xdpi;
   76     float       ydpi;
   77     int         llx;
   78     int         lly;
   79     int         urx;
   80     int         ury;
   81     int         left_margin;
   82     int         bottom_margin;
   83     int         right_margin;
   84     int         top_margin;
   85     /* private state */
   86     GC          gc;     /* GC used to clear window */
   87     Window      mwin;       /* destination of ghostsript messages */
   88     Boolean     disable_start;  /* whether to fork ghostscript */
   89     int         interpreter_pid;/* pid of ghostscript, -1 if none */
   90     struct record_list  *ps_input;  /* pointer it gs input queue */
   91     char        *input_buffer;  /* pointer to input buffer */
   92     unsigned int    bytes_left; /* bytes left in section */
   93 #ifndef VMS
   94     char        *input_buffer_ptr; /* pointer into input buffer */
   95     unsigned int    buffer_bytes_left; /* bytes left in buffer */
   96 #endif
   97     int         interpreter_input; /* fd gs stdin, -1 if None */
   98     int         interpreter_output; /* fd gs stdout, -1 if None */
   99 #ifndef VMS
  100     int         interpreter_error; /* fd gs stderr, -1 if None */
  101     XtInputId       interpreter_input_id; /* XtInputId for above */
  102     XtInputId       interpreter_output_id; /* XtInputId for above */
  103     XtInputId       interpreter_error_id; /* XtInputId for above */
  104 #else /* VMS */
  105     short       interpreter_input_iosb[4];  /* I/O Status Blocks    */
  106     short       interpreter_output_iosb[4]; /* for each mailbox     */
  107     char        *output_buffer; /* pointer to output buffer */
  108 #endif /* VMS */
  109     Dimension       gs_width;   /* Width of window at last Setup() */
  110     Dimension       gs_height;  /* Height of window at last Setup() */
  111     Boolean     busy;       /* Is gs busy drawing? */
  112     Boolean     changed;    /* something changed since Setup()? */
  113 } GhostviewPart;
  114 
  115 typedef struct _GhostviewRec {
  116     CorePart        core;
  117     GhostviewPart   ghostview;
  118 } GhostviewRec;
  119 
  120 #endif /* _GhostviewP_h */