Commit e49bd0e0 authored by kocienda's avatar kocienda

Finished work getting khtml/ecma to compile


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 59decd7c
......@@ -20,6 +20,7 @@ SUBDIRS = \
src/kdelibs/kjs \
src/kdelibs/khtml/css \
src/kdelibs/khtml/dom \
src/kdelibs/khtml/ecma \
src/kdelibs/khtml/xml \
$(NULL)
......
This diff is collapsed.
......@@ -42,6 +42,7 @@ SUBDIRS='
src/kdelibs/kjs
src/kdelibs/khtml/css
src/kdelibs/khtml/dom
src/kdelibs/khtml/ecma
src/kdelibs/khtml/xml
'
for subdir in $SUBDIRS; do
......@@ -185,6 +186,7 @@ AC_OUTPUT(
src/kdelibs/kjs/Makefile
src/kdelibs/khtml/css/Makefile
src/kdelibs/khtml/dom/Makefile
src/kdelibs/khtml/ecma/Makefile
src/kdelibs/khtml/xml/Makefile
)
#!/bin/sh
FILES='Makefile.am'
for file in $FILES; do
if (test -f "$file"); then
A=`grep APPLE $file`
if (test -z "$A"); then
echo "Moving KDE build file $file..."
mv $file $file.kde
fi
fi
done
if (! test -L "Makefile.in"); then
echo "Making link to Apple Makefile.in..."
ln -s Makefile.in.apple Makefile.in
fi
#======================================================================
#
# Makefile
#
# $RCSfile$
# $Revision$
# $Author$
# $Date$
#
#======================================================================
# set top source dir relative to this directory
# include make vars boilerplate
#
TOPSRCDIR = ../../../..
include $(TOPSRCDIR)/Makefile.vars
#----------------------------------------------------------------------
# Set variables for this directory
CXXOBJECTS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
OBJECTS = $(CXXOBJECTS)
LIBRARY = libkhtmlecma.a
CLEAN_FILES = $(OBJECTS) \
kjs_window.moc \
$(LIBRARY) \
$(NULL)
#----------------------------------------------------------------------
# Set flags for this directory
CXXFLAGS = -I$(TOPSRCDIR)/src/kwq \
-I$(TOPSRCDIR)/src/kwq/qt \
-I$(TOPSRCDIR)/src/kwq/kdecore \
-I$(TOPSRCDIR)/src/kwq/kdeui \
-I$(TOPSRCDIR)/src/kwq/kparts \
-I../css \
-I../dom \
-I../html \
-I../misc \
-I../xml \
-I../.. \
-I.. \
-I. \
$(NULL)
#----------------------------------------------------------------------
# Set targets for this directory
all: $(OBJECTS) $(LIBRARY)
$(LIBRARY): $(CXXOBJECTS)
$(AR) $(ARFLAGS) $(LIBRARY) $(CXXOBJECTS)
$(RANLIB) $(LIBRARY)
kjs_window.cpp: kjs_window.moc
kjs_window.moc:
touch $@
#----------------------------------------------------------------------
# include make rules boilerplate
include $(TOPSRCDIR)/Makefile.rules
#======================================================================
# end
#======================================================================
......@@ -50,12 +50,16 @@ public:
ButtonState state();
};
class QTimerEvent : public QEvent {
public:
int timerId() const;
};
class QFocusEvent : public QEvent {};
class QHideEvent : public QEvent {};
class QKeyEvent : public QEvent {};
class QResizeEvent : public QEvent {};
class QShowEvent : public QEvent {};
class QTimerEvent : public QEvent {};
class QWheelEvent : public QEvent {};
#endif
......@@ -26,4 +26,13 @@
#ifndef KCONFIG_H_
#define KCONFIG_H_
#include "kconfigbase.h"
class QString;
class KConfig : public KConfigBase {
public:
KConfig(const QString &);
};
#endif
......@@ -26,17 +26,20 @@
#ifndef KGLOBAL_H_
#define KGLOBAL_H_
// FIXME: should we use the CF MIN/MAX macros here or typesafe C++ functions?
class KInstance;
class KCharsets;
class KLocale;
class KStandardDirs;
#define kMin(a, b) ((a) < (b) ? (a) : (b))
#define kMax(a, b) ((a) > (b) ? (a) : (b))
class KCharsets;
class KInstance;
class KGlobal {
public:
static KInstance *instance();
static KCharsets *charsets();
static KLocale *locale();
static KStandardDirs *dirs();
};
#endif
......@@ -26,6 +26,13 @@
#ifndef KLOCALE_H_
#define KLOCALE_H_
class QString;
QString i18n(const char* text);
class KLocale {
public:
QString language() const;
};
#endif
......@@ -29,6 +29,11 @@
// Added for compilation of khtml/dom/html_document.cpp:184
#include <qdatastream.h>
// classes and includes added for ecma directory
#include "part.h"
#include "browserinterface.h"
class KURL;
// Added for compilation of khtml/khtml_part.h:734
class QPoint;
......@@ -39,11 +44,29 @@ namespace KParts {
// Added for compilation of khtml/khtml_part.h:695
struct URLArgs {
QString frameName;
QString serviceType;
};
class BrowserExtension {
struct WindowArgs {
int x;
int y;
int width;
int height;
bool menuBarVisible;
bool statusBarVisible;
bool toolBarsVisible;
bool resizable;
bool fullscreen;
};
class BrowserExtension {
public:
BrowserInterface *browserInterface() const;
void openURLRequest(const KURL &url, const KParts::URLArgs &args = KParts::URLArgs());
void createNewWindow(const KURL &url, const KParts::URLArgs &args, const KParts::WindowArgs &windowArgs, KParts::ReadOnlyPart *&part);
};
}; // namespace KParts
#endif
......@@ -26,4 +26,16 @@
#ifndef BROWSERINTERFACE_H_
#define BROWSERINTERFACE_H_
class QVariant;
namespace KParts {
class BrowserInterface : public QObject {
public:
BrowserInterface(QObject *parent, const char *name = 0);
void callMethod(const char *name, const QVariant &argument);
};
} // namespace KParts
#endif
......@@ -28,6 +28,9 @@
#include <kurl.h>
#include <qvariant.h>
#include <qlist.h>
#include <qstringlist.h>
#include <qvaluelist.h>
// added to help in compilation of khtml/khtml_part.h:867
namespace KIO {
......@@ -43,12 +46,19 @@ class QCursor;
// forward declaration hack to help in compilation of khtml/khtml_part.h:631
class QDataStream;
// forward declaration hack to help in compilation of khtml/ecma/kjs_binding.cpp:28
class QPainter;
namespace KParts {
class Part {
class Part : public QObject {
public:
QWidget *widget();
};
class ReadOnlyPart : public Part {
public:
virtual const KURL & url() const;
};
// hack to help in compilation of khtml/khtml_part.h:785
......
......@@ -26,4 +26,9 @@
#ifndef KSTDDIRS_H_
#define KSTDDIRS_H_
class KStandardDirs {
public:
QString saveLocation(const char *type, const QString& suffix = QString::null, bool create = true) const;
};
#endif
......@@ -31,12 +31,27 @@ class QString;
class KURL {
public:
KURL();
KURL(const char *url, int encoding_hint = 0);
KURL(const KURL& url, const QString &);
KURL(const QString& url, int encoding_hint = 0);
bool hasPath() const;
unsigned short int port() const;
QString path() const;
QString query() const;
QString ref() const;
QString user() const;
QString pass() const;
QString url() const;
QString host() const;
QString protocol() const;
void setQuery(const QString& _txt, int encoding_hint = 0);
void setProtocol(const QString&);
void setHost(const QString&);
void setRef(const QString& _txt);
void setPath(const QString& path);
void setPort(unsigned short int);
bool isEmpty() const;
QString prettyURL(int _trailing = 0) const;
};
#endif
......@@ -26,4 +26,14 @@
#ifndef KWIN_H_
#define KWIN_H_
#include <qrect.h>
class KWin {
public:
struct Info {
QRect geometry;
};
static Info info(int win);
};
#endif
......@@ -26,4 +26,11 @@
#ifndef KWINMODULE_H_
#define KWINMODULE_H_
class QRect;
class KWinModule {
public:
QRect workArea(int desktop = - 1) const;
};
#endif
......@@ -26,10 +26,16 @@
#ifndef QMAP_H_
#define QMAP_H_
template<class K, class T> class QMapIterator {
};
template <class K, class T> class QMap {
public:
typedef QMapIterator<K,T> Iterator;
Iterator insert(const K&, const T&);
void remove(const K&);
void clear();
T& operator[](const K& k);
};
#endif
......@@ -49,6 +49,9 @@ public:
static bool connect(const QObject *, const char *, const QObject *, const
char *);
bool connect(const QObject *, const char *, const char *) const;
int startTimer(int);
void killTimer(int);
void killTimers();
};
#endif
......@@ -34,6 +34,8 @@ public:
int visibleHeight() const;
int contentsX() const;
int contentsY() const;
void scrollBy(int dx, int dy);
virtual void setContentsPos(int x, int y);
// NOTE: alphabetical order
enum ScrollBarMode { AlwaysOff, AlwaysOn, Auto };
};
......
......@@ -95,6 +95,7 @@ public:
QString &replace(const QRegExp &, const QString &);
QString &insert(uint, char);
void truncate(uint pos);
bool startsWith(const QString&) const;
QString arg(const QString&, int fieldwidth = 0) const;
......
......@@ -26,11 +26,14 @@
#ifndef QVARIANT_H_
#define QVARIANT_H_
typedef unsigned int uint;
class QString;
class QVariant {
public:
enum Type {
UInt,
Bool
};
......@@ -41,6 +44,7 @@ public:
Type type() const;
bool toBool() const;
uint toUInt() const;
};
#endif
......@@ -48,6 +48,7 @@ public:
QPoint mapToGlobal(const QPoint &) const;
void setFocus();
void clearFocus();
virtual void setActiveWindow();
};
#endif
......@@ -26,4 +26,13 @@
#ifndef KCONFIG_H_
#define KCONFIG_H_
#include "kconfigbase.h"
class QString;
class KConfig : public KConfigBase {
public:
KConfig(const QString &);
};
#endif
/*
* Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef KCONFIGBASE_H_
#define KCONFIGBASE_H_
class KConfigBase {
public:
void setGroup(const QString& pGroup);
QString readEntry(const char *pKey, const QString& aDefault = QString::null) const;
int readNumEntry(const char *pKey, int nDefault = 0) const;
unsigned int readUnsignedNumEntry(const char *pKey, unsigned int nDefault = 0) const;
};
#endif
......@@ -26,17 +26,20 @@
#ifndef KGLOBAL_H_
#define KGLOBAL_H_
// FIXME: should we use the CF MIN/MAX macros here or typesafe C++ functions?
class KInstance;
class KCharsets;
class KLocale;
class KStandardDirs;
#define kMin(a, b) ((a) < (b) ? (a) : (b))
#define kMax(a, b) ((a) > (b) ? (a) : (b))
class KCharsets;
class KInstance;
class KGlobal {
public:
static KInstance *instance();
static KCharsets *charsets();
static KLocale *locale();
static KStandardDirs *dirs();
};
#endif
......@@ -26,6 +26,13 @@
#ifndef KLOCALE_H_
#define KLOCALE_H_
class QString;
QString i18n(const char* text);
class KLocale {
public:
QString language() const;
};
#endif
......@@ -26,4 +26,9 @@
#ifndef KSTDDIRS_H_
#define KSTDDIRS_H_
class KStandardDirs {
public:
QString saveLocation(const char *type, const QString& suffix = QString::null, bool create = true) const;
};
#endif
......@@ -31,12 +31,27 @@ class QString;
class KURL {
public:
KURL();
KURL(const char *url, int encoding_hint = 0);
KURL(const KURL& url, const QString &);
KURL(const QString& url, int encoding_hint = 0);
bool hasPath() const;
unsigned short int port() const;
QString path() const;
QString query() const;
QString ref() const;
QString user() const;
QString pass() const;
QString url() const;
QString host() const;
QString protocol() const;
void setQuery(const QString& _txt, int encoding_hint = 0);
void setProtocol(const QString&);
void setHost(const QString&);
void setRef(const QString& _txt);
void setPath(const QString& path);
void setPort(unsigned short int);
bool isEmpty() const;
QString prettyURL(int _trailing = 0) const;
};
#endif
......@@ -26,4 +26,14 @@
#ifndef KWIN_H_
#define KWIN_H_
#include <qrect.h>
class KWin {
public:
struct Info {
QRect geometry;
};
static Info info(int win);
};
#endif
......@@ -26,4 +26,11 @@
#ifndef KWINMODULE_H_
#define KWINMODULE_H_
class QRect;
class KWinModule {
public:
QRect workArea(int desktop = - 1) const;
};
#endif
......@@ -26,4 +26,16 @@
#ifndef KMESSAGEBOX_H_
#define KMESSAGEBOX_H_
class QWidget;
class KMessageBox {
public:
enum { Ok = 1, Cancel = 2, Yes = 3, No = 4, Continue = 5 };
static void error(QWidget *parent, const QString &text, const QString &caption = QString::null, bool notify=true);
static int warningYesNo(QWidget *parent, const QString &text, const QString &caption = QString::null,
const QString &buttonYes = QString::null, const QString &buttonNo = QString::null, bool notify=true);
static int questionYesNo(QWidget *parent, const QString &text, const QString &caption = QString::null,
const QString &buttonYes = QString::null, const QString &buttonNo = QString::null, bool notify=true);
};
#endif
/*
* Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef KPROTOCOLMANAGER_H_
#define KPROTOCOLMANAGER_H_
class QString;
class KProtocolManager {