]> www.fi.muni.cz Git - evince.git/commitdiff
Initial work I did on GNOME/PDF viewer -miguel
authorArturo Espinosa <unammx@src.gnome.org>
Sun, 16 May 1999 14:11:28 +0000 (14:11 +0000)
committerArturo Espinosa <unammx@src.gnome.org>
Sun, 16 May 1999 14:11:28 +0000 (14:11 +0000)
pdf/xpdf/Makefile.in
pdf/xpdf/gpdf.cc [new file with mode: 0644]

index 73934ed37c91222e0b00a20ef4c0ea655e0b821b..e5311d5fe035cf27befcc3aa1b5c3d619aca2ada 100644 (file)
@@ -14,8 +14,8 @@ GOOLIBDIR = ../goo
 LTKSRCDIR = $(srcdir)/../ltk
 LTKLIBDIR = ../ltk
 
-CXXFLAGS = @CXXFLAGS@ @DEFS@ @OPTIONS@ -I$(GOOSRCDIR) -I$(LTKSRCDIR) -I$(srcdir) @X_CFLAGS@ @Xpm_CFLAGS@
-
+#CXXFLAGS = @CXXFLAGS@ @DEFS@ @OPTIONS@ -I$(GOOSRCDIR) -I$(LTKSRCDIR) -I$(srcdir) @X_CFLAGS@ @Xpm_CFLAGS@
+CXXFLAGS = @CXXFLAGS@ @DEFS@ @OPTIONS@ `gnome-config --cflags gnomeui` -I$(srcdir) @X_CFLAGS@
 XLIBS = @Xpm_LIBS@ @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@
 
 OTHERLIBS = @LIBS@
@@ -68,6 +68,8 @@ CXX_SRC = \
 
 #------------------------------------------------------------------------
 
+all: gpdf
+
 all: xpdf$(EXE) pdftops$(EXE) pdftotext$(EXE) pdfinfo$(EXE) \
        pdftopbm$(EXE) pdfimages$(EXE)
 
@@ -77,8 +79,19 @@ XPDF_OBJS = Array.o Catalog.o Dict.o Error.o Gfx.o GfxFont.o \
        GfxState.o Lexer.o Link.o LTKOutputDev.o Object.o OutputDev.o \
        Page.o Params.o Parser.o PDFDoc.o PSOutputDev.o Stream.o \
        TextOutputDev.o XOutputDev.o XRef.o xpdf.o
+
+GPDF_OBJS = Array.o Catalog.o Dict.o Error.o Gfx.o GfxFont.o \
+       GfxState.o Lexer.o Link.o GOutputDev.o Object.o OutputDev.o \
+       Page.o Params.o Parser.o PDFDoc.o PSOutputDev.o Stream.o \
+       TextOutputDev.o XOutputDev.o XRef.o gpdf.o
+
 XPDF_LIBS = -L$(LTKLIBDIR) -lLTK -L$(GOOLIBDIR) -lGoo $(XLIBS) $(OTHERLIBS) -lm
 
+GPDF_LIBS = `gnome-config --libs gnomeui`
+
+gpdf: $(GPDF_OBJS)
+       $(CXX) $(CXXFLAGS) -o gpdf $(GPDF_OBJS) $(GPDF_LIBS)
+
 xpdf$(EXE): $(XPDF_OBJS)
        $(CXX) $(CXXFLAGS) -o xpdf$(EXE) $(XPDF_OBJS) $(XPDF_LIBS)
        $(STRIP) xpdf$(EXE)
diff --git a/pdf/xpdf/gpdf.cc b/pdf/xpdf/gpdf.cc
new file mode 100644 (file)
index 0000000..02103cb
--- /dev/null
@@ -0,0 +1,43 @@
+//========================================================================
+//
+// xpdf.cc
+//
+// Copyright 1996 Derek B. Noonburg
+// Copyright 1999 Miguel de Icaza
+//
+//========================================================================
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include <gnome.h>
+#include "gtypes.h"
+#include "GString.h"
+#include "parseargs.h"
+#include "gfile.h"
+#include "gmem.h"
+#include "Object.h"
+#include "Stream.h"
+#include "Array.h"
+#include "Dict.h"
+#include "XRef.h"
+#include "Catalog.h"
+#include "Page.h"
+#include "Link.h"
+#include "PDFDoc.h"
+#include "XOutputDev.h"
+#include "PSOutputDev.h"
+#include "TextOutputDev.h"
+#include "Params.h"
+#include "Error.h"
+#include "config.h"
+
+int
+main (int argc, char *argv [])
+{
+       gnome_init ("GPDF", "1.0", argv, argv);
+
+       gtk_main ();
+}