"Fossies" - the Fresh Open Source Software Archive

Member "ghostview-1.5/Ghostview.h" (24 Jul 1993, 6262 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  * Ghostview.h -- Public 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 _Ghostview_h
   27 #define _Ghostview_h
   28 /* Be sure that FILE* is defined */
   29 #include <stdio.h>
   30 
   31 /****************************************************************
   32  *
   33  * Ghostview widget
   34  *
   35  ****************************************************************/
   36 
   37 /* Resources:
   38 
   39  Name            Class      RepType     Default Value
   40  ----            -----      -------     -------------
   41  arguments       Arguments      String      NULL
   42  background      Background     Pixel       XtDefaultBackground
   43  border          BorderColor    Pixel       XtDefaultForeground
   44  borderWidth         BorderWidth    Dimension   1
   45  bottomMargin        Margin     int     0
   46  busyCursor      Cursor     Cursor      watch
   47  callback        Callback       Pointer     NULL
   48  cursor          Cursor     Cursor      crosshair
   49  destroyCallback     Callback       Pointer     NULL
   50  filename        Filename       String      "-"
   51  foreground      Foreground     Pixel       XtDefaultForeground
   52  height          Height     Dimension   0
   53  interpreter         Interpreter    String      "gs"
   54  leftMargin      Margin     int     0
   55  llx             BoundingBox    Int     0
   56  lly             BoundingBox    Int     0
   57  mappedWhenManaged   MappedWhenManaged  Boolean     True
   58  messageCallback     Callback       Pointer     NULL
   59  orientation         Orientation    PageOrientation Portrait
   60  outputCallback      Callback       Pointer     NULL
   61  palette         Palette        Palette     Color
   62  quiet           Quiet      Boolean     True
   63  rightMargin         Margin     int     0
   64  safer           Safer      Boolean     True
   65  topMargin       Margin     int     0
   66  urx             BoundingBox    Int     612
   67  ury             BoundingBox    Int     792
   68  useBackingPixmap    UseBackingPixmap   Boolean     True
   69  width           Width      Dimension   0
   70  x           Position       Position    0
   71  xdpi            Resolution     Float       **
   72  y           Position       Position    0
   73  ydpi            Resolution     Float       **
   74 
   75  ** automatically calculated from display parameters if width and
   76     height are not set.
   77 
   78 */
   79 
   80 /* define any special resource names here that are not in <X11/StringDefs.h> */
   81 
   82 #define XtNbusyCursor "busyCursor"
   83 #define XtNcursor "cursor"
   84 #define XtNfilename "filename"
   85 #define XtNinterpreter "interpreter"
   86 #define XtNmessageCallback "messageCallback"
   87 #define XtNoutputCallback "outputCallback"
   88 #define XtNpalette "palette"
   89 #define XtNarguments "arguments"
   90 #define XtNquiet "quiet"
   91 #define XtNsafer "safer"
   92 #define XtNllx "llx"
   93 #define XtNlly "lly"
   94 #define XtNurx "urx"
   95 #define XtNury "ury"
   96 #define XtNuseBackingPixmap "useBackingPixmap"
   97 #define XtNxdpi "xdpi"
   98 #define XtNydpi "ydpi"
   99 #define XtNrightMargin "rightMargin"
  100 #define XtNleftMargin "leftMargin"
  101 #define XtNbottomMargin "bottomMargin"
  102 #define XtNtopMargin "topMargin"
  103 
  104 #define XtCBoundingBox "BoundingBox"
  105 #define XtCFilename "Filename"
  106 #define XtCInterpreter "Interpreter"
  107 #define XtCPalette "Palette"
  108 #define XtCArguments "Arguments"
  109 #define XtCQuiet "Quiet"
  110 #define XtCSafer "Safer"
  111 #define XtCResolution "Resolution"
  112 #define XtCUseBackingPixmap "UseBackingPixmap"
  113 
  114 /******************************************************************************
  115  * XmuCvtStringToPageOrientation
  116  */
  117 /* Number represents clockwise rotation of the paper in degrees */
  118 typedef enum {
  119     XtPageOrientationPortrait   =   0,  /* Normal portrait orientation */
  120     XtPageOrientationLandscape  =  90,  /* Normal landscape orientation */
  121     XtPageOrientationUpsideDown = 180,  /* Don't think this will be used much */
  122     XtPageOrientationSeascape   = 270   /* Landscape rotated the other way */
  123 } XtPageOrientation;
  124 #define XtEportrait "portrait"
  125 #define XtElandscape "landscape"
  126 #define XtEupsideDown "upside-down"
  127 #define XtEseascape "seascape"
  128 #define XtRPageOrientation "PageOrientation"
  129 extern Boolean XmuCvtStringToPageOrientation();
  130 
  131 /******************************************************************************
  132  * XmuCvtStringToPalette
  133  */
  134 typedef enum {
  135     XtPaletteMonochrome,
  136     XtPaletteGrayscale,
  137     XtPaletteColor
  138 } XtPalette;
  139 #define XtEmonochrome "monochrome"
  140 #define XtEgrayscale "grayscale"
  141 #define XtEcolor "color"
  142 #define XtRPalette "Palette"
  143 extern Boolean XmuCvtStringToPalette();
  144 
  145 /* declare specific GhostviewWidget class and instance datatypes */
  146 
  147 typedef struct _GhostviewClassRec*  GhostviewWidgetClass;
  148 typedef struct _GhostviewRec*       GhostviewWidget;
  149 
  150 /* declare the class constant */
  151 
  152 extern WidgetClass ghostviewWidgetClass;
  153 
  154 /* Public routines */
  155 
  156 extern void GhostviewEnableInterpreter(
  157 #if NeedFunctionPrototypes
  158     Widget  /* w */
  159 #endif
  160 );
  161 
  162 extern void GhostviewDisableInterpreter(
  163 #if NeedFunctionPrototypes
  164     Widget  /* w */
  165 #endif
  166 );
  167 
  168 extern Boolean GhostviewIsInterpreterReady(
  169 #if NeedFunctionPrototypes
  170     Widget  /* w */
  171 #endif
  172 );
  173 
  174 extern Boolean GhostviewIsInterpreterRunning(
  175 #if NeedFunctionPrototypes
  176     Widget  /* w */
  177 #endif
  178 );
  179 
  180 extern Pixmap GhostviewGetBackingPixmap(
  181 #if NeedFunctionPrototypes
  182     Widget  /* w */
  183 #endif
  184 );
  185 
  186 extern Boolean GhostviewSendPS(
  187 #if NeedFunctionPrototypes
  188     Widget  /* widget */,
  189     FILE*   /* fp */,
  190     long    /* begin */,
  191     unsigned int    /* len */,
  192     Bool    /* close */
  193 #endif
  194 );
  195 
  196 extern Boolean GhostviewNextPage(
  197 #if NeedFunctionPrototypes
  198     Widget  /* w */
  199 #endif
  200 );
  201 
  202 /* The structure returned by the regular callback */
  203 
  204 typedef struct _GhostviewReturnStruct {
  205     int width, height;
  206     int psx, psy;
  207     float xdpi, ydpi;
  208 } GhostviewReturnStruct;
  209 
  210 #endif /* _Ghostview_h */