summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/plucker_base.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/plucker_base.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/plucker_base.h36
1 files changed, 16 insertions, 20 deletions
diff --git a/noncore/apps/opie-reader/plucker_base.h b/noncore/apps/opie-reader/plucker_base.h
index 131b999..8d74cc2 100644
--- a/noncore/apps/opie-reader/plucker_base.h
+++ b/noncore/apps/opie-reader/plucker_base.h
@@ -1,7 +1,6 @@
1#ifndef __PLUCKER_BASE_H 1#ifndef __PLUCKER_BASE_H
2#define __PLUCKER_BASE_H 2#define __PLUCKER_BASE_H
3 3
4#include "useqpe.h"
5#include "CExpander.h" 4#include "CExpander.h"
6#include <zlib.h> 5#include <zlib.h>
7#include "ztxt.h" 6#include "ztxt.h"
@@ -9,6 +8,7 @@
9#include "CBuffer.h" 8#include "CBuffer.h"
10#include "my_list.h" 9#include "my_list.h"
11#include "Navigation.h" 10#include "Navigation.h"
11#include "hrule.h"
12 12
13struct CPlucker_record0 13struct CPlucker_record0
14{ 14{
@@ -27,10 +27,12 @@ struct CPluckerbkmk
27class QScrollView; 27class QScrollView;
28class QWidget; 28class QWidget;
29#endif 29#endif
30class QString;
30 31
31class CPlucker_base : public CExpander, public Cpdb 32class CPlucker_base : public Cpdb
32{ 33{
33protected: 34protected:
35 static const UInt8 continuation_bit;
34 virtual void setbuffersize() = 0; 36 virtual void setbuffersize() = 0;
35 virtual void GetHeader(UInt16&, UInt16&, UInt32&, UInt8&, UInt8&) = 0; 37 virtual void GetHeader(UInt16&, UInt16&, UInt32&, UInt8&, UInt8&) = 0;
36 virtual int HeaderSize() = 0; 38 virtual int HeaderSize() = 0;
@@ -43,7 +45,7 @@ protected:
43 QScrollView* m_viewer; 45 QScrollView* m_viewer;
44 QWidget* m_picture; 46 QWidget* m_picture;
45#endif 47#endif
46 size_t textlength, m_lastBreak; 48 size_t textlength, m_lastBreak, m_offset;
47 UInt16 uid; 49 UInt16 uid;
48 int m_nextPara, m_nextParaIndex; 50 int m_nextPara, m_nextParaIndex;
49 CBufferFace<UInt16> m_ParaOffsets; 51 CBufferFace<UInt16> m_ParaOffsets;
@@ -59,13 +61,16 @@ protected:
59// char* urls; 61// char* urls;
60// size_t urlsize; 62// size_t urlsize;
61 size_t bufferpos; 63 size_t bufferpos;
62 UInt16 bufferrec; 64 int bufferrec;
63 CPlucker_record0 hdr0; 65 CPlucker_record0 hdr0;
64 bool m_bufferisreserved; 66 bool m_bufferisreserved;
65 size_t currentpos; 67 size_t currentpos;
66 bool expand(int); 68 bool expand(int);
67 void UnZip(UInt8*, size_t, UInt8*, size_t); 69 static void UnZip(UInt8*, size_t, UInt8*, size_t);
68 void UnDoc(UInt8*, size_t, UInt8*, size_t); 70 static void UnDoc(UInt8*, size_t, UInt8*, size_t);
71
72 void (*m_decompress)(UInt8*, size_t, UInt8*, size_t);
73 void (*getdecompressor(const QString& _s))(UInt8*, size_t, UInt8*, size_t);
69#ifdef LOCALPICTURES 74#ifdef LOCALPICTURES
70 void showimg(UInt16 tgt); 75 void showimg(UInt16 tgt);
71#endif 76#endif
@@ -75,16 +80,7 @@ protected:
75 virtual int bgetch() = 0; 80 virtual int bgetch() = 0;
76 CNavigation m_nav; 81 CNavigation m_nav;
77 public: 82 public:
78#ifdef USEQPE 83 QString about();
79 void suspend()
80 {
81 CExpander::suspend(fin);
82 }
83 void unsuspend()
84 {
85 CExpander::unsuspend(fin);
86 }
87#endif
88 QImage* getPicture(unsigned long tgt); 84 QImage* getPicture(unsigned long tgt);
89 void sizes(unsigned long& _file, unsigned long& _text); 85 void sizes(unsigned long& _file, unsigned long& _text);
90 bool hasrandomaccess() { return true; } 86 bool hasrandomaccess() { return true; }
@@ -94,19 +90,19 @@ protected:
94 virtual tchar getch(bool) = 0; 90 virtual tchar getch(bool) = 0;
95 tchar getch_base(bool); 91 tchar getch_base(bool);
96 int getch(); 92 int getch();
97 void getch(tchar&, CStyle&); 93 void getch(tchar&, CStyle&, unsigned long& pos);
98 unsigned int locate(); 94 unsigned int locate();
99 void locate(unsigned int n); 95 void locate(unsigned int n);
100 CList<Bkmk>* getbkmklist(); 96 CList<Bkmk>* getbkmklist();
101 linkType hyperlink(unsigned int n, QString&); 97 linkType hyperlink(unsigned int, unsigned int, QString&, QString&);
102 MarkupType PreferredMarkup() 98 MarkupType PreferredMarkup()
103 { 99 {
104 return cNONE; 100 return cNONE;
105 } 101 }
106 void saveposn(size_t posn) { m_nav.saveposn(posn); } 102 void saveposn(size_t posn) { m_nav.saveposn(posn); }
107 void writeposn(size_t posn) { m_nav.writeposn(posn); } 103 void writeposn(size_t posn) { m_nav.writeposn(posn); }
108 bool forward(size_t& loc) { return m_nav.forward(loc); } 104 linkType forward(size_t& loc) { return (m_nav.forward(loc)) ? eLink : eNone; }
109 bool back(size_t& loc) { return m_nav.back(loc); } 105 linkType back(size_t& loc) { return (m_nav.back(loc)) ? eLink : eNone; }
110 bool hasnavigation() { return true; } 106 bool hasnavigation() { return true; }
111 void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen); 107 void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen);
112 void putSaveData(unsigned char*& src, unsigned short& srclen); 108 void putSaveData(unsigned char*& src, unsigned short& srclen);