]> www.fi.muni.cz Git - evince.git/commitdiff
Added annots display CB.
authorRemi Cohen-Scali <rcoscali@cvs.gnome.org>
Tue, 13 Jan 2004 01:24:20 +0000 (01:24 +0000)
committerRémi Cohen-Scali <rcoscali@src.gnome.org>
Tue, 13 Jan 2004 01:24:20 +0000 (01:24 +0000)
2004-01-13  Remi Cohen-Scali  <rcoscali@cvs.gnome.org>

* xpdf/PDFDoc.h:
* xpdf/PDFDoc.cc: Added annots display CB.

pdf/xpdf/PDFDoc.cc
pdf/xpdf/PDFDoc.h

index 3df947247c9c35ba790d272dae6d47cbba6ffc79..9108220db48fb0496f67919042ddbee2d1aba182 100644 (file)
@@ -206,7 +206,9 @@ void PDFDoc::checkHeader() {
 void PDFDoc::displayPage(OutputDev *out, int page, double zoom,
                         int rotate, GBool doLinks,
                         GBool (*abortCheckCbk)(void *data),
-                        void *abortCheckCbkData) {
+                        void *abortCheckCbkData,
+                         GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+                         void *annotDisplayDecideCbkData) {
   Page *p;
 
   if (globalParams->getPrintCommands()) {
@@ -220,22 +222,27 @@ void PDFDoc::displayPage(OutputDev *out, int page, double zoom,
     }
     getLinks(p);
     p->display(out, zoom, rotate, links, catalog,
-              abortCheckCbk, abortCheckCbkData);
+              abortCheckCbk, abortCheckCbkData,
+               annotDisplayDecideCbk, annotDisplayDecideCbkData);
   } else {
     p->display(out, zoom, rotate, NULL, catalog,
-              abortCheckCbk, abortCheckCbkData);
+              abortCheckCbk, abortCheckCbkData,
+               annotDisplayDecideCbk, annotDisplayDecideCbkData);
   }
 }
 
 void PDFDoc::displayPages(OutputDev *out, int firstPage, int lastPage,
                          int zoom, int rotate, GBool doLinks,
                          GBool (*abortCheckCbk)(void *data),
-                         void *abortCheckCbkData) {
+                         void *abortCheckCbkData,
+                          GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+                          void *annotDisplayDecideCbkData) {
   int page;
 
   for (page = firstPage; page <= lastPage; ++page) {
     displayPage(out, page, zoom, rotate, doLinks,
-               abortCheckCbk, abortCheckCbkData);
+               abortCheckCbk, abortCheckCbkData,
+                annotDisplayDecideCbk, annotDisplayDecideCbkData);
   }
 }
 
@@ -243,12 +250,16 @@ void PDFDoc::displayPageSlice(OutputDev *out, int page, double zoom,
                              int rotate, int sliceX, int sliceY,
                              int sliceW, int sliceH,
                              GBool (*abortCheckCbk)(void *data),
-                             void *abortCheckCbkData) {
+                             void *abortCheckCbkData,
+                              GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data),
+                              void *annotDisplayDecideCbkData) {
   Page *p;
 
   p = catalog->getPage(page);
   p->displaySlice(out, zoom, rotate, sliceX, sliceY, sliceW, sliceH,
-                 NULL, catalog, abortCheckCbk, abortCheckCbkData);
+                 NULL, catalog,
+                  abortCheckCbk, abortCheckCbkData,
+                  annotDisplayDecideCbk, annotDisplayDecideCbkData);
 }
 
 GBool PDFDoc::isLinearized() {
index 99832f81b6f688150c4d7b89e52341c8ea0ad4f3..ea73282b6437b195a550738620198117c4175864 100644 (file)
@@ -20,6 +20,7 @@
 #include "Link.h"
 #include "Catalog.h"
 #include "Page.h"
+#include "Annot.h"
 
 class GString;
 class BaseStream;
@@ -82,20 +83,26 @@ public:
   void displayPage(OutputDev *out, int page, double zoom,
                   int rotate, GBool doLinks,
                   GBool (*abortCheckCbk)(void *data) = NULL,
-                  void *abortCheckCbkData = NULL);
+                  void *abortCheckCbkData = NULL,
+                   GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
+                   void *annotDisplayDecideCbkData = NULL);
 
   // Display a range of pages.
   void displayPages(OutputDev *out, int firstPage, int lastPage,
                    int zoom, int rotate, GBool doLinks,
                    GBool (*abortCheckCbk)(void *data) = NULL,
-                   void *abortCheckCbkData = NULL);
+                   void *abortCheckCbkData = NULL,
+                    GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
+                    void *annotDisplayDecideCbkData = NULL);
 
   // Display part of a page.
   void displayPageSlice(OutputDev *out, int page, double zoom,
                        int rotate, int sliceX, int sliceY,
                        int sliceW, int sliceH,
                        GBool (*abortCheckCbk)(void *data) = NULL,
-                       void *abortCheckCbkData = NULL);
+                       void *abortCheckCbkData = NULL,
+                        GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL,
+                        void *annotDisplayDecideCbkData = NULL);
 
   // Find a page, given its object ID.  Returns page number, or 0 if
   // not found.
@@ -144,7 +151,6 @@ public:
   // Save this file with another name.
   GBool saveAs(GString *name);
 
-
 private:
 
   GBool setup(GString *ownerPassword, GString *userPassword);
@@ -162,7 +168,6 @@ private:
   Outline *outline;
 #endif
 
-
   GBool ok;
   int errCode;
 };