]> www.fi.muni.cz Git - evince.git/blob - ps/ps-document.h
Do not include ev-poppler.h when pdf is disabled.
[evince.git] / ps / ps-document.h
1 /*
2  * Ghostscript widget for GTK/GNOME
3  * 
4  * Copyright 1998 - 2005 The Free Software Foundation
5  * 
6  * Authors: Jaka Mocnik, Federico Mena (Quartic), Szekeres Istvan (Pista)
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #ifndef __PS_DOCUMENT_H__
25 #define __PS_DOCUMENT_H__
26
27 #include <sys/types.h>
28 #include <gtk/gtkwidget.h>
29
30 #include "ev-document.h"
31 #include "ps.h"
32 #include "gstypes.h"
33
34 G_BEGIN_DECLS
35
36 #define PS_TYPE_DOCUMENT         (ps_document_get_type())
37 #define PS_DOCUMENT(obj)         GTK_CHECK_CAST (obj, ps_document_get_type (), PSDocument)
38 #define PS_DOCUMENT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, ps_document_get_type (), PSDocumentClass)
39 #define PS_IS_DOCUMENT(obj)      GTK_CHECK_TYPE (obj, ps_document_get_type())
40
41 typedef struct _PSDocument PSDocument;
42 typedef struct _PSDocumentClass PSDocumentClass;
43
44 struct _PSDocument {
45   GObject object;
46
47   GtkWidget *target_window;
48   GdkWindow *pstarget;
49   GdkPixmap *bpixmap;
50   long message_window;          /* Used by ghostview to receive messages from app */
51
52   pid_t interpreter_pid;        /* PID of interpreter, -1 if none  */
53   int interpreter_input;        /* stdin of interpreter            */
54   int interpreter_output;       /* stdout of interpreter           */
55   int interpreter_err;          /* stderr of interpreter           */
56   guint interpreter_input_id;
57   guint interpreter_output_id;
58   guint interpreter_error_id;
59
60   gboolean busy;                /* Is gs busy drawing? */
61   gboolean structured_doc;
62
63   struct record_list *ps_input;
64   gchar *input_buffer_ptr;
65   guint bytes_left;
66   guint buffer_bytes_left;
67
68   FILE *gs_psfile;              /* the currently loaded FILE */
69   gchar *gs_filename;           /* the currently loaded filename */
70   gchar *gs_filename_unc;       /* Uncompressed file */
71   gchar *input_buffer;
72   gboolean send_filename_to_gs; /* True if gs should read from file directly */
73   gboolean reading_from_pipe;   /* True if ggv is reading input from pipe */
74   struct document *doc;
75   
76   int *ps_export_pagelist;
77   char *ps_export_filename;
78
79   const gchar *gs_status;       /* PSDocument status */
80 };
81
82 struct _PSDocumentClass {
83   GObjectClass parent_class;
84
85   GdkAtom gs_atom;
86   GdkAtom next_atom;
87   GdkAtom page_atom;
88   GdkAtom string_atom;
89 };
90
91 GType ps_document_get_type(void);
92
93 G_END_DECLS
94
95 #endif /* __PS_DOCUMENT_H__ */