Commit 25d4a8e9 authored by kocienda's avatar kocienda

Finished getting khtml/xml to compile


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6bab871d
This diff is collapsed.
......@@ -41,6 +41,7 @@ dnl
SUBDIRS='
src/kdelibs/kjs
src/kdelibs/khtml/dom
src/kdelibs/khtml/xml
'
for subdir in $SUBDIRS; do
if (test -f "./$subdir/MakeSystemChanges.sh"); then
......@@ -181,6 +182,7 @@ AC_OUTPUT(
Makefile.vars
Makefile.rules
src/kdelibs/kjs/Makefile
src/kdelibs/khtml/dom/Makefile
src/kdelibs/khtml/xml/Makefile
)
# Generated automatically from Makefile.in by configure.
#======================================================================
#
# Makefile
......@@ -38,6 +39,7 @@ LIBRARY = libkhtmlxml.a
CLEAN_FILES = $(OBJECTS) \
$(LIBRARY) \
*.moc \
$(NULL)
#----------------------------------------------------------------------
......@@ -45,6 +47,11 @@ CLEAN_FILES = $(OBJECTS) \
CXXFLAGS = -I$(TOPSRCDIR)/src/kwq \
-I$(TOPSRCDIR)/src/kwq/qt \
-I$(TOPSRCDIR)/src/kwq/kdecore \
-I../css \
-I../dom \
-I../html \
-I../misc \
-I.. \
-I. \
$(NULL)
......@@ -55,6 +62,13 @@ CXXFLAGS = -I$(TOPSRCDIR)/src/kwq \
all: $(OBJECTS) $(LIBRARY)
dom_docimpl.cpp: dom_docimpl.moc
dom_docimpl.moc:
touch $@
xml_tokenizer.cpp: xml_tokenizer.moc
xml_tokenizer.moc:
touch $@
$(LIBRARY): $(CXXOBJECTS)
$(AR) $(ARFLAGS) $(LIBRARY) $(CXXOBJECTS)
$(RANLIB) $(LIBRARY)
......
......@@ -35,7 +35,7 @@ typedef QArray<char> QByteArray;
class QCString {
};
inline bool operator!=( const char *s1, const QCString &s2 ) { return 0; } // FIXME
inline bool operator!=( const QCString &s1, const char *s2 ) { return 0; } // FIXME
bool operator!=(const char *s1, const QCString &s2);
bool operator!=(const QCString &s1, const char *s2);
#endif
......@@ -26,10 +26,30 @@
#ifndef QEVENT_H_
#define QEVENT_H_
#include "qnamespace.h"
#include "qregion.h"
// all the following events added to support khtmlview.h
class QEvent {};
class QEvent : public Qt {
public:
enum Type {
MouseButtonPress,
MouseButtonRelease,
MouseButtonDblClick,
MouseMove,
};
Type type() const;
};
class QMouseEvent : public QEvent {
public:
int x();
int y();
int globalX();
int globalY();
ButtonState button();
ButtonState state();
};
class QFocusEvent : public QEvent {};
class QHideEvent : public QEvent {};
class QKeyEvent : public QEvent {};
......
......@@ -34,6 +34,7 @@ typedef kdbgstream & (*KDBGFUNC)(kdbgstream &);
class kdbgstream {
public:
kdbgstream &operator<<(const char *string);
kdbgstream &operator<<(const void *p);
kdbgstream &operator<<(const QString& string);
kdbgstream &operator<<(const QCString& string);
kdbgstream &operator<<(KDBGFUNC f);
......
......@@ -26,4 +26,6 @@
#ifndef KLOCALE_H_
#define KLOCALE_H_
QString i18n(const char* text);
#endif
......@@ -27,6 +27,7 @@
#define PART_H_
#include <kurl.h>
#include <qvariant.h>
// added to help in compilation of khtml/khtml_part.h:867
namespace KIO {
......@@ -36,9 +37,6 @@ class Job;
// forward declaration hack to help in compilation of khtml/khtml_part.h:166
class QWidget;
// forward declaration hack to help in compilation of khtml/khtml_part.h:249
class QVariant;
// forward declaration hack to help in compilation of khtml/khtml_part.h:552
class QCursor;
......
......@@ -26,4 +26,16 @@
#ifndef QNAMESPACE_H_
#define QNAMESPACE_H_
class Qt {
public:
enum ButtonState {
LeftButton,
MidButton,
RightButton,
ControlButton,
AltButton,
ShiftButton,
};
};
#endif
......@@ -39,6 +39,8 @@ public:
void setAutoDelete(bool);
bool remove(const T *d);
bool removeLast();
void prepend(const T *d);
T *take(uint i);
T *first();
T *next();
T *last();
......@@ -50,6 +52,7 @@ public:
template <class T> class QListIterator {
public:
QListIterator(const QList<T> &);
T *toFirst();
T *toLast();
T *current() const;
T *operator--();
......
......@@ -27,6 +27,9 @@
#define QRECT_H_
class QRect {
public:
QRect();
QRect(int l, int t, int w, int h);
};
#endif
......@@ -32,6 +32,7 @@
#include "qcstring.h"
class QRegExp;
class QString;
class QChar {
public:
......@@ -39,14 +40,20 @@ public:
QChar(char);
QChar(const QChar &);
QChar lower() const;
QChar upper() const;
char latin1() const;
bool isNull() const;
bool isDigit() const;
bool isSpace() const;
friend int operator==(QChar, QChar);
friend int operator!=(QChar, QChar);
bool isLetterOrNumber() const;
friend inline int operator==(QChar, QChar);
friend inline int operator!=(QChar, QChar);
friend inline int operator!=(char, QChar);
friend inline int operator!=(QChar, char);
operator char() const;
static const QChar null;
enum Direction {
// NOTE: alphabetical order
DirAL, DirAN, DirB, DirBN, DirCS, DirEN, DirES, DirET, DirL, DirLRE,
......@@ -63,22 +70,34 @@ public:
int toInt(bool *) const;
bool isNull() const;
const QChar *unicode() const;
bool contains(const char *s, bool b) const;
uint length() const;
QString &sprintf(const char *format, ...);
QString lower() const;
QString stripWhiteSpace() const;
QString simplifyWhiteSpace() const;
bool isEmpty() const;
int contains(const char *) const;
int find(char c, int index) const;
int find(const char *s, int index, bool b=0) const;
int find(const QRegExp &regexp, int index, bool b=0) const;
int findRev(char c) const;
QString arg(const QString& a, int fieldwidth=0) const;
QString mid(int index, int len=0xffffffff) const;
void fill(QChar c, int len = -1);
float toFloat(bool *b=0) const;
const char* latin1() const;
const char *ascii() const;
// FIXME: is there a standard parameter type for overloaded operators?
QChar operator[](int) const;
QString &operator+(QChar c);
QString &operator+(const QString &s);
QString &operator+=(QChar c);
QString &operator+=(const QString &s);
QString &append(const char *);
QString &append(const QString &);
......@@ -94,6 +113,13 @@ public:
QString(int);
};
QString &operator+(const char *s1, const QString &s2);
QString &operator+(QChar c1, const QString &s2);
bool operator!=(const QString &s1, QChar c2);
bool operator!=(const QString &s1, const QString &s2);
bool operator!=(const QString &s1, const char *s2);
bool operator!=(const char *s1, const QString &s2);
class QConstString {
public:
QConstString(QChar *, uint);
......
......@@ -26,4 +26,13 @@
#ifndef QTEXTSTREAM_H_
#define QTEXTSTREAM_H_
class QTextStream {
};
class QTextIStream : public QTextStream {
public:
QTextIStream(QString *);
QString readLine();
};
#endif
......@@ -27,6 +27,10 @@
#define QVALUELIST_H_
template<class T> class QValueListIterator {
public:
QValueListIterator operator++();
bool operator!=(const QValueListIterator<T>& it);
T& operator*();
};
template <class T> class QValueList {
......@@ -39,6 +43,7 @@ public:
const T& first() const;
const T& last() const;
Iterator begin();
Iterator end();
T& operator[] (uint i);
};
......
......@@ -26,4 +26,7 @@
#ifndef QVARIANT_H_
#define QVARIANT_H_
class QVariant {
};
#endif
......@@ -26,14 +26,53 @@
#ifndef QXML_H_
#define QXML_H_
class QXmlDefaultHandler {
};
class QString;
class QXmlAttributes {
public:
QString value(const QString& qName) const;
int length() const;
QString localName(int index) const;
};
class QXmlParseException {
class QXmlInputSource {
public:
virtual void setData(const QString& data);
};
class QXmlDTDHandler {
};
class QXmlDeclHandler {
};
class QXmlErrorHandler {
};
class QXmlLexicalHandler {
};
class QXmlContentHandler {
};
class QXmlDefaultHandler : public QXmlContentHandler, public QXmlLexicalHandler, public QXmlErrorHandler, public QXmlDeclHandler, public QXmlDTDHandler {
};
class QXmlSimpleReader {
public:
void setContentHandler(QXmlContentHandler* handler);
bool parse(const QXmlInputSource& input);
void setLexicalHandler(QXmlLexicalHandler* handler);
void setDTDHandler(QXmlDTDHandler* handler);
void setDeclHandler(QXmlDeclHandler* handler);
void setErrorHandler(QXmlErrorHandler* handler);
};
class QXmlParseException {
public:
QString message() const;
int columnNumber() const;
int lineNumber() const;
};
#endif
......@@ -34,6 +34,7 @@ typedef kdbgstream & (*KDBGFUNC)(kdbgstream &);
class kdbgstream {
public:
kdbgstream &operator<<(const char *string);
kdbgstream &operator<<(const void *p);
kdbgstream &operator<<(const QString& string);
kdbgstream &operator<<(const QCString& string);
kdbgstream &operator<<(KDBGFUNC f);
......
......@@ -26,4 +26,6 @@
#ifndef KLOCALE_H_
#define KLOCALE_H_
QString i18n(const char* text);
#endif
......@@ -27,6 +27,7 @@
#define PART_H_
#include <kurl.h>
#include <qvariant.h>
// added to help in compilation of khtml/khtml_part.h:867
namespace KIO {
......@@ -36,9 +37,6 @@ class Job;
// forward declaration hack to help in compilation of khtml/khtml_part.h:166
class QWidget;
// forward declaration hack to help in compilation of khtml/khtml_part.h:249
class QVariant;
// forward declaration hack to help in compilation of khtml/khtml_part.h:552
class QCursor;
......
......@@ -38,4 +38,8 @@ typedef unsigned int Q_UINT32;
// "dom/css_extensions.h"
class CSS2AzimuthImpl;
#define QMAX(a,b) ((a) > (b) ? (a) : (b))
#define TRUE (1)
#define FALSE (0)
#endif
......@@ -35,7 +35,7 @@ typedef QArray<char> QByteArray;
class QCString {
};
inline bool operator!=( const char *s1, const QCString &s2 ) { return 0; } // FIXME
inline bool operator!=( const QCString &s1, const char *s2 ) { return 0; } // FIXME
bool operator!=(const char *s1, const QCString &s2);
bool operator!=(const QCString &s1, const char *s2);
#endif
......@@ -26,10 +26,30 @@
#ifndef QEVENT_H_
#define QEVENT_H_
#include "qnamespace.h"
#include "qregion.h"
// all the following events added to support khtmlview.h
class QEvent {};
class QEvent : public Qt {
public:
enum Type {
MouseButtonPress,
MouseButtonRelease,
MouseButtonDblClick,
MouseMove,
};
Type type() const;
};
class QMouseEvent : public QEvent {
public:
int x();
int y();
int globalX();
int globalY();
ButtonState button();
ButtonState state();
};
class QFocusEvent : public QEvent {};
class QHideEvent : public QEvent {};
class QKeyEvent : public QEvent {};
......
......@@ -39,6 +39,8 @@ public:
void setAutoDelete(bool);
bool remove(const T *d);
bool removeLast();
void prepend(const T *d);
T *take(uint i);
T *first();
T *next();
T *last();
......@@ -50,6 +52,7 @@ public:
template <class T> class QListIterator {
public:
QListIterator(const QList<T> &);
T *toFirst();
T *toLast();
T *current() const;
T *operator--();
......
......@@ -26,4 +26,16 @@
#ifndef QNAMESPACE_H_
#define QNAMESPACE_H_
class Qt {
public:
enum ButtonState {
LeftButton,
MidButton,
RightButton,
ControlButton,
AltButton,
ShiftButton,
};
};
#endif
......@@ -27,6 +27,9 @@
#define QRECT_H_
class QRect {
public:
QRect();
QRect(int l, int t, int w, int h);
};
#endif
......@@ -32,6 +32,7 @@
#include "qcstring.h"
class QRegExp;
class QString;
class QChar {
public:
......@@ -39,14 +40,20 @@ public:
QChar(char);
QChar(const QChar &);
QChar lower() const;
QChar upper() const;
char latin1() const;
bool isNull() const;
bool isDigit() const;
bool isSpace() const;
friend int operator==(QChar, QChar);
friend int operator!=(QChar, QChar);
bool isLetterOrNumber() const;
friend inline int operator==(QChar, QChar);
friend inline int operator!=(QChar, QChar);
friend inline int operator!=(char, QChar);
friend inline int operator!=(QChar, char);
operator char() const;
static const QChar null;
enum Direction {
// NOTE: alphabetical order
DirAL, DirAN, DirB, DirBN, DirCS, DirEN, DirES, DirET, DirL, DirLRE,
......@@ -63,22 +70,34 @@ public:
int toInt(bool *) const;
bool isNull() const;
const QChar *unicode() const;
bool contains(const char *s, bool b) const;
uint length() const;
QString &sprintf(const char *format, ...);
QString lower() const;
QString stripWhiteSpace() const;
QString simplifyWhiteSpace() const;
bool isEmpty() const;
int contains(const char *) const;
int find(char c, int index) const;
int find(const char *s, int index, bool b=0) const;
int find(const QRegExp &regexp, int index, bool b=0) const;
int findRev(char c) const;
QString arg(const QString& a, int fieldwidth=0) const;
QString mid(int index, int len=0xffffffff) const;
void fill(QChar c, int len = -1);
float toFloat(bool *b=0) const;
const char* latin1() const;
const char *ascii() const;
// FIXME: is there a standard parameter type for overloaded operators?
QChar operator[](int) const;
QString &operator+(QChar c);
QString &operator+(const QString &s);
QString &operator+=(QChar c);
QString &operator+=(const QString &s);
QString &append(const char *);
QString &append(const QString &);
......@@ -94,6 +113,13 @@ public:
QString(int);
};
QString &operator+(const char *s1, const QString &s2);
QString &operator+(QChar c1, const QString &s2);
bool operator!=(const QString &s1, QChar c2);
bool operator!=(const QString &s1, const QString &s2);
bool operator!=(const QString &s1, const char *s2);
bool operator!=(const char *s1, const QString &s2);
class QConstString {
public:
QConstString(QChar *, uint);
......
......@@ -26,4 +26,13 @@
#ifndef QTEXTSTREAM_H_
#define QTEXTSTREAM_H_
class QTextStream {
};
class QTextIStream : public QTextStream {
public:
QTextIStream(QString *);
QString readLine();
};
#endif
......@@ -27,6 +27,10 @@
#define QVALUELIST_H_
template<class T> class QValueListIterator {
public:
QValueListIterator operator++();
bool operator!=(const QValueListIterator<T>& it);
T& operator*();
};
template <class T> class QValueList {
......@@ -39,6 +43,7 @@ public:
const T& first() const;
const T& last() const;
Iterator begin();
Iterator end();
T& operator[] (uint i);
};
......
......@@ -26,4 +26,7 @@
#ifndef QVARIANT_H_
#define QVARIANT_H_
class QVariant {
};
#endif
......@@ -26,14 +26,53 @@
#ifndef QXML_H_
#define QXML_H_
class QXmlDefaultHandler {
};
class QString;
class QXmlAttributes {
public:
QString value(const QString& qName) const;
int length() const;
QString localName(int index) const;
};
class QXmlParseException {
class QXmlInputSource {
public:
virtual void setData(const QString& data);
};
class QXmlDTDHandler {
};
class QXmlDeclHandler {
};