[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:15:53 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 23918b0ed9de81cead5ef11c910c05c94d08f9dd
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri May 31 14:35:06 2002 +0000
Remove some unused stuff; total of 1000s of lines.
* Makefile.am: Removed some strange uses of "./" and
improved stamp-related rules.
* WebCore-tests.exp: Removed QDir functions.
* khtml/Makefile.am: Removed java subdirectory.
* khtml/java/*: Removed.
* khtml/rendering/render_applet.cpp: Rearrange APPLE_CHANGES so
that we use our own KJavaAppletWidget rather than a QWidget.
* kwq/khtml/java/kjavaappletcontext.h: Added.
* kwq/khtml/java/kjavaappletwidget.h: Added.
* kwq/KWQKJavaAppletWidget.mm: Added. Replaces WCJavaAppletWidget.mm.
* kwq/KWQsignals.mm: Removed java-related signals.
* khtml/css/Makefile.am:
* khtml/misc/Makefile.am:
Improve stamp-related rules.
* khtml/misc/loader.cpp: Move around and add ifdefs so we don't
need as much KWQ code. Maybe revisit this later -- related to the
KDE implementation of animated and progressive loading images,
which we probably don't need, but it may integrate slightly better than
doing our hacks inside QPixmap.
* kwq/KWQApplication.mm:
* kwq/KWQFontInfo.mm:
* kwq/KWQInputDialog.mm:
* kwq/KWQKFileDialog.mm:
* kwq/KWQKHTMLPartBrowserExtension.mm:
* kwq/KWQKWin.mm:
* kwq/KWQKWinModule.mm:
* kwq/KWQKstddirs.mm:
* kwq/KWQPixmap.mm:
Simplified, removed unused code, minor tweaks.
* kwq/Makefile.am: Removed all the old files, added some new ones.
* kwq/KWQBitmap.mm: Removed.
* kwq/KWQBrush.mm: Removed.
* kwq/KWQDCOPClient.mm: Removed.
* kwq/KWQDataStream.h: Removed.
* kwq/KWQDir.mm: Removed.
* kwq/KWQFontDatabase.mm: Removed.
* kwq/KWQImage.mm: Removed.
* kwq/KWQKInstance.mm: Removed.
* kwq/KWQPaintDevice.mm: Removed.
* kwq/KWQPart.mm: Removed.
* kwq/KWQasyncimageio.mm: Removed.
* kwq/KWQasyncio.mm: Removed.
* kwq/KWQbrowserextension.mm: Removed.
* kwq/WCJavaAppletWidget.h: Removed.
* kwq/WCJavaAppletWidget.mm: Removed.
* kwq/qt/qdatastream.h: Removed.
* kwq/qt/qdir.h: Removed.
* kwq/qt/qlayout.h: Removed.
* kwq/KWQCursor.mm:
(QCursor::handle): Return the cursor object as an integer rather than
just returning 0; makes the code that uses handle() more likely to work
although it introduces a 64-bit cleanliness problem.
* kwq/KWQEvent.mm: Initialize event type in QEvent subclasses.
* kwq/WebCoreImageRenderer.h: Added NSObject and NSCopying protocols to
the WebCoreImageRenderer protocol.
* kwq/kwqdebug.h: Use displayableString in DEBUG_OBJECT for better logging.
* kwq/dcop/dcopclient.h:
* kwq/kdecore/kstddirs.h:
* kwq/kdecore/kwin.h:
* kwq/kdecore/kwinmodule.h:
* kwq/kfile/kfiledialog.h:
* kwq/kparts/browserextension.h:
* kwq/kparts/event.h:
* kwq/qt/qapplication.h:
* kwq/qt/qasyncimageio.h:
* kwq/qt/qasyncio.h:
* kwq/qt/qbitmap.h:
* kwq/qt/qbrush.h:
* kwq/qt/qbutton.h:
* kwq/qt/qcheckbox.h:
* kwq/qt/qcollection.h:
* kwq/qt/qcolor.h:
* kwq/qt/qcombobox.h:
* kwq/qt/qcursor.h:
* kwq/qt/qdrawutil.h:
* kwq/qt/qevent.h:
* kwq/qt/qfont.h:
* kwq/qt/qfontdatabase.h:
* kwq/qt/qfontinfo.h:
* kwq/qt/qimage.h:
* kwq/qt/qinputdialog.h:
* kwq/qt/qintcache.h:
* kwq/qt/qintdict.h:
* kwq/qt/qpaintdevice.h:
* kwq/qt/qpixmap.h:
* kwq/qt/qstring.h:
Removed lots of unused stuff, including old conditionals and the like.
* khtml/khtml_part.cpp:
(KHTMLPart::khtmlMouseMoveEvent): Add missing parenthesis.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 7d07f97..056f062 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,109 @@
+2002-05-31 Darin Adler <darin at apple.com>
+
+ Remove some unused stuff; total of 1000s of lines.
+
+ * Makefile.am: Removed some strange uses of "./" and
+ improved stamp-related rules.
+
+ * WebCore-tests.exp: Removed QDir functions.
+
+ * khtml/Makefile.am: Removed java subdirectory.
+ * khtml/java/*: Removed.
+ * khtml/rendering/render_applet.cpp: Rearrange APPLE_CHANGES so
+ that we use our own KJavaAppletWidget rather than a QWidget.
+ * kwq/khtml/java/kjavaappletcontext.h: Added.
+ * kwq/khtml/java/kjavaappletwidget.h: Added.
+ * kwq/KWQKJavaAppletWidget.mm: Added. Replaces WCJavaAppletWidget.mm.
+ * kwq/KWQsignals.mm: Removed java-related signals.
+
+ * khtml/css/Makefile.am:
+ * khtml/misc/Makefile.am:
+ Improve stamp-related rules.
+
+ * khtml/misc/loader.cpp: Move around and add ifdefs so we don't
+ need as much KWQ code. Maybe revisit this later -- related to the
+ KDE implementation of animated and progressive loading images,
+ which we probably don't need, but it may integrate slightly better than
+ doing our hacks inside QPixmap.
+
+ * kwq/KWQApplication.mm:
+ * kwq/KWQFontInfo.mm:
+ * kwq/KWQInputDialog.mm:
+ * kwq/KWQKFileDialog.mm:
+ * kwq/KWQKHTMLPartBrowserExtension.mm:
+ * kwq/KWQKWin.mm:
+ * kwq/KWQKWinModule.mm:
+ * kwq/KWQKstddirs.mm:
+ * kwq/KWQPixmap.mm:
+ Simplified, removed unused code, minor tweaks.
+
+ * kwq/Makefile.am: Removed all the old files, added some new ones.
+ * kwq/KWQBitmap.mm: Removed.
+ * kwq/KWQBrush.mm: Removed.
+ * kwq/KWQDCOPClient.mm: Removed.
+ * kwq/KWQDataStream.h: Removed.
+ * kwq/KWQDir.mm: Removed.
+ * kwq/KWQFontDatabase.mm: Removed.
+ * kwq/KWQImage.mm: Removed.
+ * kwq/KWQKInstance.mm: Removed.
+ * kwq/KWQPaintDevice.mm: Removed.
+ * kwq/KWQPart.mm: Removed.
+ * kwq/KWQasyncimageio.mm: Removed.
+ * kwq/KWQasyncio.mm: Removed.
+ * kwq/KWQbrowserextension.mm: Removed.
+ * kwq/WCJavaAppletWidget.h: Removed.
+ * kwq/WCJavaAppletWidget.mm: Removed.
+ * kwq/qt/qdatastream.h: Removed.
+ * kwq/qt/qdir.h: Removed.
+ * kwq/qt/qlayout.h: Removed.
+
+ * kwq/KWQCursor.mm:
+ (QCursor::handle): Return the cursor object as an integer rather than
+ just returning 0; makes the code that uses handle() more likely to work
+ although it introduces a 64-bit cleanliness problem.
+
+ * kwq/KWQEvent.mm: Initialize event type in QEvent subclasses.
+
+ * kwq/WebCoreImageRenderer.h: Added NSObject and NSCopying protocols to
+ the WebCoreImageRenderer protocol.
+
+ * kwq/kwqdebug.h: Use displayableString in DEBUG_OBJECT for better logging.
+
+ * kwq/dcop/dcopclient.h:
+ * kwq/kdecore/kstddirs.h:
+ * kwq/kdecore/kwin.h:
+ * kwq/kdecore/kwinmodule.h:
+ * kwq/kfile/kfiledialog.h:
+ * kwq/kparts/browserextension.h:
+ * kwq/kparts/event.h:
+ * kwq/qt/qapplication.h:
+ * kwq/qt/qasyncimageio.h:
+ * kwq/qt/qasyncio.h:
+ * kwq/qt/qbitmap.h:
+ * kwq/qt/qbrush.h:
+ * kwq/qt/qbutton.h:
+ * kwq/qt/qcheckbox.h:
+ * kwq/qt/qcollection.h:
+ * kwq/qt/qcolor.h:
+ * kwq/qt/qcombobox.h:
+ * kwq/qt/qcursor.h:
+ * kwq/qt/qdrawutil.h:
+ * kwq/qt/qevent.h:
+ * kwq/qt/qfont.h:
+ * kwq/qt/qfontdatabase.h:
+ * kwq/qt/qfontinfo.h:
+ * kwq/qt/qimage.h:
+ * kwq/qt/qinputdialog.h:
+ * kwq/qt/qintcache.h:
+ * kwq/qt/qintdict.h:
+ * kwq/qt/qpaintdevice.h:
+ * kwq/qt/qpixmap.h:
+ * kwq/qt/qstring.h:
+ Removed lots of unused stuff, including old conditionals and the like.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::khtmlMouseMoveEvent): Add missing parenthesis.
+
2002-05-30 Maciej Stachowiak <mjs at apple.com>
WebCore part of fixes for:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 7d07f97..056f062 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,109 @@
+2002-05-31 Darin Adler <darin at apple.com>
+
+ Remove some unused stuff; total of 1000s of lines.
+
+ * Makefile.am: Removed some strange uses of "./" and
+ improved stamp-related rules.
+
+ * WebCore-tests.exp: Removed QDir functions.
+
+ * khtml/Makefile.am: Removed java subdirectory.
+ * khtml/java/*: Removed.
+ * khtml/rendering/render_applet.cpp: Rearrange APPLE_CHANGES so
+ that we use our own KJavaAppletWidget rather than a QWidget.
+ * kwq/khtml/java/kjavaappletcontext.h: Added.
+ * kwq/khtml/java/kjavaappletwidget.h: Added.
+ * kwq/KWQKJavaAppletWidget.mm: Added. Replaces WCJavaAppletWidget.mm.
+ * kwq/KWQsignals.mm: Removed java-related signals.
+
+ * khtml/css/Makefile.am:
+ * khtml/misc/Makefile.am:
+ Improve stamp-related rules.
+
+ * khtml/misc/loader.cpp: Move around and add ifdefs so we don't
+ need as much KWQ code. Maybe revisit this later -- related to the
+ KDE implementation of animated and progressive loading images,
+ which we probably don't need, but it may integrate slightly better than
+ doing our hacks inside QPixmap.
+
+ * kwq/KWQApplication.mm:
+ * kwq/KWQFontInfo.mm:
+ * kwq/KWQInputDialog.mm:
+ * kwq/KWQKFileDialog.mm:
+ * kwq/KWQKHTMLPartBrowserExtension.mm:
+ * kwq/KWQKWin.mm:
+ * kwq/KWQKWinModule.mm:
+ * kwq/KWQKstddirs.mm:
+ * kwq/KWQPixmap.mm:
+ Simplified, removed unused code, minor tweaks.
+
+ * kwq/Makefile.am: Removed all the old files, added some new ones.
+ * kwq/KWQBitmap.mm: Removed.
+ * kwq/KWQBrush.mm: Removed.
+ * kwq/KWQDCOPClient.mm: Removed.
+ * kwq/KWQDataStream.h: Removed.
+ * kwq/KWQDir.mm: Removed.
+ * kwq/KWQFontDatabase.mm: Removed.
+ * kwq/KWQImage.mm: Removed.
+ * kwq/KWQKInstance.mm: Removed.
+ * kwq/KWQPaintDevice.mm: Removed.
+ * kwq/KWQPart.mm: Removed.
+ * kwq/KWQasyncimageio.mm: Removed.
+ * kwq/KWQasyncio.mm: Removed.
+ * kwq/KWQbrowserextension.mm: Removed.
+ * kwq/WCJavaAppletWidget.h: Removed.
+ * kwq/WCJavaAppletWidget.mm: Removed.
+ * kwq/qt/qdatastream.h: Removed.
+ * kwq/qt/qdir.h: Removed.
+ * kwq/qt/qlayout.h: Removed.
+
+ * kwq/KWQCursor.mm:
+ (QCursor::handle): Return the cursor object as an integer rather than
+ just returning 0; makes the code that uses handle() more likely to work
+ although it introduces a 64-bit cleanliness problem.
+
+ * kwq/KWQEvent.mm: Initialize event type in QEvent subclasses.
+
+ * kwq/WebCoreImageRenderer.h: Added NSObject and NSCopying protocols to
+ the WebCoreImageRenderer protocol.
+
+ * kwq/kwqdebug.h: Use displayableString in DEBUG_OBJECT for better logging.
+
+ * kwq/dcop/dcopclient.h:
+ * kwq/kdecore/kstddirs.h:
+ * kwq/kdecore/kwin.h:
+ * kwq/kdecore/kwinmodule.h:
+ * kwq/kfile/kfiledialog.h:
+ * kwq/kparts/browserextension.h:
+ * kwq/kparts/event.h:
+ * kwq/qt/qapplication.h:
+ * kwq/qt/qasyncimageio.h:
+ * kwq/qt/qasyncio.h:
+ * kwq/qt/qbitmap.h:
+ * kwq/qt/qbrush.h:
+ * kwq/qt/qbutton.h:
+ * kwq/qt/qcheckbox.h:
+ * kwq/qt/qcollection.h:
+ * kwq/qt/qcolor.h:
+ * kwq/qt/qcombobox.h:
+ * kwq/qt/qcursor.h:
+ * kwq/qt/qdrawutil.h:
+ * kwq/qt/qevent.h:
+ * kwq/qt/qfont.h:
+ * kwq/qt/qfontdatabase.h:
+ * kwq/qt/qfontinfo.h:
+ * kwq/qt/qimage.h:
+ * kwq/qt/qinputdialog.h:
+ * kwq/qt/qintcache.h:
+ * kwq/qt/qintdict.h:
+ * kwq/qt/qpaintdevice.h:
+ * kwq/qt/qpixmap.h:
+ * kwq/qt/qstring.h:
+ Removed lots of unused stuff, including old conditionals and the like.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::khtmlMouseMoveEvent): Add missing parenthesis.
+
2002-05-30 Maciej Stachowiak <mjs at apple.com>
WebCore part of fixes for:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7d07f97..056f062 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,109 @@
+2002-05-31 Darin Adler <darin at apple.com>
+
+ Remove some unused stuff; total of 1000s of lines.
+
+ * Makefile.am: Removed some strange uses of "./" and
+ improved stamp-related rules.
+
+ * WebCore-tests.exp: Removed QDir functions.
+
+ * khtml/Makefile.am: Removed java subdirectory.
+ * khtml/java/*: Removed.
+ * khtml/rendering/render_applet.cpp: Rearrange APPLE_CHANGES so
+ that we use our own KJavaAppletWidget rather than a QWidget.
+ * kwq/khtml/java/kjavaappletcontext.h: Added.
+ * kwq/khtml/java/kjavaappletwidget.h: Added.
+ * kwq/KWQKJavaAppletWidget.mm: Added. Replaces WCJavaAppletWidget.mm.
+ * kwq/KWQsignals.mm: Removed java-related signals.
+
+ * khtml/css/Makefile.am:
+ * khtml/misc/Makefile.am:
+ Improve stamp-related rules.
+
+ * khtml/misc/loader.cpp: Move around and add ifdefs so we don't
+ need as much KWQ code. Maybe revisit this later -- related to the
+ KDE implementation of animated and progressive loading images,
+ which we probably don't need, but it may integrate slightly better than
+ doing our hacks inside QPixmap.
+
+ * kwq/KWQApplication.mm:
+ * kwq/KWQFontInfo.mm:
+ * kwq/KWQInputDialog.mm:
+ * kwq/KWQKFileDialog.mm:
+ * kwq/KWQKHTMLPartBrowserExtension.mm:
+ * kwq/KWQKWin.mm:
+ * kwq/KWQKWinModule.mm:
+ * kwq/KWQKstddirs.mm:
+ * kwq/KWQPixmap.mm:
+ Simplified, removed unused code, minor tweaks.
+
+ * kwq/Makefile.am: Removed all the old files, added some new ones.
+ * kwq/KWQBitmap.mm: Removed.
+ * kwq/KWQBrush.mm: Removed.
+ * kwq/KWQDCOPClient.mm: Removed.
+ * kwq/KWQDataStream.h: Removed.
+ * kwq/KWQDir.mm: Removed.
+ * kwq/KWQFontDatabase.mm: Removed.
+ * kwq/KWQImage.mm: Removed.
+ * kwq/KWQKInstance.mm: Removed.
+ * kwq/KWQPaintDevice.mm: Removed.
+ * kwq/KWQPart.mm: Removed.
+ * kwq/KWQasyncimageio.mm: Removed.
+ * kwq/KWQasyncio.mm: Removed.
+ * kwq/KWQbrowserextension.mm: Removed.
+ * kwq/WCJavaAppletWidget.h: Removed.
+ * kwq/WCJavaAppletWidget.mm: Removed.
+ * kwq/qt/qdatastream.h: Removed.
+ * kwq/qt/qdir.h: Removed.
+ * kwq/qt/qlayout.h: Removed.
+
+ * kwq/KWQCursor.mm:
+ (QCursor::handle): Return the cursor object as an integer rather than
+ just returning 0; makes the code that uses handle() more likely to work
+ although it introduces a 64-bit cleanliness problem.
+
+ * kwq/KWQEvent.mm: Initialize event type in QEvent subclasses.
+
+ * kwq/WebCoreImageRenderer.h: Added NSObject and NSCopying protocols to
+ the WebCoreImageRenderer protocol.
+
+ * kwq/kwqdebug.h: Use displayableString in DEBUG_OBJECT for better logging.
+
+ * kwq/dcop/dcopclient.h:
+ * kwq/kdecore/kstddirs.h:
+ * kwq/kdecore/kwin.h:
+ * kwq/kdecore/kwinmodule.h:
+ * kwq/kfile/kfiledialog.h:
+ * kwq/kparts/browserextension.h:
+ * kwq/kparts/event.h:
+ * kwq/qt/qapplication.h:
+ * kwq/qt/qasyncimageio.h:
+ * kwq/qt/qasyncio.h:
+ * kwq/qt/qbitmap.h:
+ * kwq/qt/qbrush.h:
+ * kwq/qt/qbutton.h:
+ * kwq/qt/qcheckbox.h:
+ * kwq/qt/qcollection.h:
+ * kwq/qt/qcolor.h:
+ * kwq/qt/qcombobox.h:
+ * kwq/qt/qcursor.h:
+ * kwq/qt/qdrawutil.h:
+ * kwq/qt/qevent.h:
+ * kwq/qt/qfont.h:
+ * kwq/qt/qfontdatabase.h:
+ * kwq/qt/qfontinfo.h:
+ * kwq/qt/qimage.h:
+ * kwq/qt/qinputdialog.h:
+ * kwq/qt/qintcache.h:
+ * kwq/qt/qintdict.h:
+ * kwq/qt/qpaintdevice.h:
+ * kwq/qt/qpixmap.h:
+ * kwq/qt/qstring.h:
+ Removed lots of unused stuff, including old conditionals and the like.
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::khtmlMouseMoveEvent): Add missing parenthesis.
+
2002-05-30 Maciej Stachowiak <mjs at apple.com>
WebCore part of fixes for:
diff --git a/WebCore/Makefile.am b/WebCore/Makefile.am
index d0cc824..a05f6b4 100644
--- a/WebCore/Makefile.am
+++ b/WebCore/Makefile.am
@@ -11,8 +11,8 @@ libwebcore_dylib_SOURCES = \
$(NULL)
libwebcore_dylib_LIBADD = \
- ./khtml/libkhtml.o \
- ./kwq/libkwq.o \
+ khtml/libkhtml.o \
+ kwq/libkwq.o \
$(NULL)
WEBCORE_INSTALL_PATH = $(SYMROOTS)
@@ -53,8 +53,7 @@ FRAMEWORK_RESOURCE_DIR = $(FRAMEWORK_DIR)/Versions/$(FRAMEWORK_VERSION)/Resource
FRAMEWORK_LOCALIZED_RESOURCE_DIR = $(FRAMEWORK_RESOURCE_DIR)/English.lproj
framework-stamp: framework-dylib-stamp framework-resource-stamp framework-header-stamp
- $(MAKE) embed && \
- touch ./framework-stamp
+ $(MAKE) embed && touch $@
framework-resource-stamp: $(FRAMEWORK_RESOURCES) $(FRAMEWORK_LOCALIZED_RESOURCES)
rm -rf $(FRAMEWORK_RESOURCE_DIR)
@@ -70,14 +69,14 @@ framework-resource-stamp: $(FRAMEWORK_RESOURCES) $(FRAMEWORK_LOCALIZED_RESOURCES
echo " $(INSTALL_DATA) $$p $(FRAMEWORK_LOCALIZED_RESOURCE_DIR)/$$p"; \
$(INSTALL_DATA) $$p $(FRAMEWORK_LOCALIZED_RESOURCE_DIR); \
done
- touch ./framework-resource-stamp
+ touch $@
framework-header-stamp:
mkdir -p $(FRAMEWORK_DIR)/Versions/$(FRAMEWORK_VERSION)/Headers
mkdir -p $(FRAMEWORK_DIR)/Versions/$(FRAMEWORK_VERSION)/PrivateHeaders
ln -sf Versions/Current/Headers $(FRAMEWORK_DIR)/Headers
ln -sf Versions/Current/PrivateHeaders $(FRAMEWORK_DIR)/PrivateHeaders
- touch ./framework-header-stamp
+ touch $@
framework-dylib-stamp: $(libwebcore_dylib_OBJECTS) $(libwebcore_dylib_DEPENDENCIES) WebCore-combined.exp
mkdir -p $(FRAMEWORK_DIR)/Versions/$(FRAMEWORK_VERSION)
@@ -86,7 +85,7 @@ framework-dylib-stamp: $(libwebcore_dylib_OBJECTS) $(libwebcore_dylib_DEPENDENCI
$(OBJCXXLD) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) $(FRAMEWORK_LINKFLAGS) $(libwebcore_dylib_OBJECTS) -o $(FRAMEWORK_DYLIB)
nmedit -s WebCore-combined.exp - $(FRAMEWORK_DYLIB)
ln -sf Versions/Current/$(FRAMEWORK_NAME) $(FRAMEWORK_DIR)/$(FRAMEWORK_NAME)
- touch ./framework-dylib-stamp
+ touch $@
CLEANFILES = $(noinst_DATA)
diff --git a/WebCore/WebCore-tests.exp b/WebCore/WebCore-tests.exp
index 2458b4a..d9d030a 100644
--- a/WebCore/WebCore-tests.exp
+++ b/WebCore/WebCore-tests.exp
@@ -121,13 +121,6 @@ __ZN4KURLC1ERK7QStringi
__ZN4KURLC1ERKS_
__ZN4KURLC1ERKS_RK7QString
__ZN4KURLC1Ev
-__ZN4QDir4cdUpEv
-__ZN4QDir9entryListERK7QString
-__ZN4QDirC1ERK7QString
-__ZN4QDirC1ERKS_
-__ZN4QDirC1Ev
-__ZN4QDirD1Ev
-__ZN4QDiraSERKS_
__ZN5QDateC1Eiii
__ZN5QDateC1Ev
__ZN5QFile4openEi
@@ -242,9 +235,6 @@ __ZNK4KURL7hasPathEv
__ZNK4KURL7isEmptyEv
__ZNK4KURL8protocolEv
__ZNK4KURL9prettyURLEi
-__ZNK4QDir11absFilePathERK7QString
-__ZNK4QDir6existsERK7QString
-__ZNK4QDir7absPathEv
__ZNK5QChar16isLetterOrNumberEv
__ZNK5QChar5lowerEv
__ZNK5QChar5upperEv
diff --git a/WebCore/khtml/Makefile.am b/WebCore/khtml/Makefile.am
index 5deee42..4a156b7 100644
--- a/WebCore/khtml/Makefile.am
+++ b/WebCore/khtml/Makefile.am
@@ -6,7 +6,6 @@ SUBDIRS = \
dom \
ecma \
xml \
- java \
html \
rendering \
$(NULL)
@@ -27,7 +26,6 @@ libkhtml_o_LIBADD = \
./dom/libkhtmldom.o \
./ecma/libkhtmlecma.o \
./xml/libkhtmlxml.o \
- ./java/libkhtmljava.o \
./html/libkhtmlhtml.o \
./rendering/libkhtmlrendering.o \
$(NULL)
diff --git a/WebCore/khtml/css/Makefile.am b/WebCore/khtml/css/Makefile.am
index 78303a8..5a4eeed 100644
--- a/WebCore/khtml/css/Makefile.am
+++ b/WebCore/khtml/css/Makefile.am
@@ -46,14 +46,12 @@ INCLUDES = \
$(VALUEFILES): value-stamp
value-stamp: makevalues cssvalues.in
- sh $<
- touch $@
+ sh $< && touch $@
$(PROPFILES): prop-stamp
prop-stamp: makeprop cssproperties.in
- sh $<
- touch $@
+ sh $< && touch $@
BUILT_SOURCES = $(VALUEFILES) $(PROPFILES) value-stamp prop-stamp
diff --git a/WebCore/khtml/java/.cvsignore b/WebCore/khtml/java/.cvsignore
deleted file mode 100644
index 051d1bd..0000000
--- a/WebCore/khtml/java/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-.deps
diff --git a/WebCore/khtml/java/Makefile.am b/WebCore/khtml/java/Makefile.am
deleted file mode 100644
index bee848a..0000000
--- a/WebCore/khtml/java/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-NULL =
-
-noinst_LIBRARIES = libkhtmljava.o
-LDFLAGS = -Wl,-r -nostdlib
-libkhtmljava_o_AR = $(OBJCXXLD) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o
-
-libkhtmljava_o_SOURCES = \
- kjavaapplet.cpp \
- kjavaapplet.h \
- kjavaappletcontext.cpp \
- kjavaappletcontext.h \
- kjavaappletserver.cpp \
- kjavaappletserver.h \
- kjavaappletwidget.cpp \
- kjavaappletwidget.h \
- kjavadownloader.cpp \
- kjavadownloader.h \
- kjavaprocess.cpp \
- kjavaprocess.h \
- $(NULL)
-
-INCLUDES = \
- $(KWQ_INCLUDES) \
- $(KDELIBS_INCLUDES) \
- $(NULL)
diff --git a/WebCore/khtml/java/javaembed.h b/WebCore/khtml/java/javaembed.h
deleted file mode 100644
index 232e7de..0000000
--- a/WebCore/khtml/java/javaembed.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Wynn Wilkes <wynnw at caldera.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/****************************************************************************
- This is a modified version of QXEmbed from Troll Tech. It's been modified
- to work better with java applets.
-*****************************************************************************/
-
-#ifndef KJAVAEMBED_H
-#define KJAVAEMBED_H
-
-#include <qwidget.h>
-
-#ifdef APPLE_CHANGES
-typedef QWidget KJavaEmbed;
-#else
-
-#ifndef Q_WS_QWS // FIXME(E)? I don't think this is possible with Qt Embedded.
-class KJavaEmbedPrivate;
-class KJavaEmbed : public QWidget
-{
- Q_OBJECT
-
-public:
-
- KJavaEmbed( QWidget *parent=0, const char *name=0, WFlags f = 0 );
- ~KJavaEmbed();
-
- /**
- * Swallows the window with the given Window ID.
- */
- void embed( WId w );
-
- /**
- * Returns whether or not we have embedded our window
- */
- bool embedded() { if( window != 0 ) return true; else return false; }
-
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
- QSizePolicy sizePolicy() const;
-
- bool eventFilter( QObject *, QEvent * );
-
-protected:
- bool event( QEvent * );
-
- void focusInEvent( QFocusEvent * );
- void focusOutEvent( QFocusEvent * );
- void resizeEvent(QResizeEvent *);
-
- //void showEvent( QShowEvent * );
-
- bool x11Event( XEvent* );
-
- bool focusNextPrevChild( bool next );
-
-private:
- WId window;
- KJavaEmbedPrivate* d;
-};
-
-
-#endif
-#endif
-#endif
diff --git a/WebCore/khtml/java/kjavaapplet.cpp b/WebCore/khtml/java/kjavaapplet.cpp
deleted file mode 100644
index d89ce83..0000000
--- a/WebCore/khtml/java/kjavaapplet.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-#include "kjavaappletwidget.h"
-#include "kjavaappletcontext.h"
-
-#include <kdebug.h>
-
-class KJavaAppletPrivate
-{
-friend class KJavaApplet;
-private:
- bool reallyExists;
- QString className;
- QString appName;
- QString baseURL;
- QString codeBase;
- QString archives;
- QSize size;
- QString windowName;
-
- KJavaAppletWidget* UIwidget;
-};
-
-
-KJavaApplet::KJavaApplet( KJavaAppletWidget* _parent,
- KJavaAppletContext* _context )
- : params()
-{
- d = new KJavaAppletPrivate;
-
- d->UIwidget = _parent;
-
- if( _context )
- context = _context;
- else
- context = new KJavaAppletContext();
-
- d->reallyExists = false;
- id = -1;
-}
-
-KJavaApplet::~KJavaApplet()
-{
- if ( d->reallyExists )
- context->destroy( this );
-
- delete d;
-}
-
-bool KJavaApplet::isCreated()
-{
- return d->reallyExists;
-}
-
-void KJavaApplet::setAppletClass( const QString& _className )
-{
- d->className = _className;
-}
-
-QString& KJavaApplet::appletClass()
-{
- return d->className;
-}
-
-QString& KJavaApplet::parameter( const QString& name )
-{
- return params[ name ];
-}
-
-void KJavaApplet::setParameter( const QString& name, const QString& value )
-{
- params.insert( name, value );
-}
-
-QMap<QString,QString>& KJavaApplet::getParams()
-{
- return params;
-}
-
-void KJavaApplet::setBaseURL( const QString& baseURL )
-{
- d->baseURL = baseURL;
-}
-
-QString& KJavaApplet::baseURL()
-{
- return d->baseURL;
-}
-
-void KJavaApplet::setCodeBase( const QString& codeBase )
-{
- d->codeBase = codeBase;
-}
-
-QString& KJavaApplet::codeBase()
-{
- return d->codeBase;
-}
-
-void KJavaApplet::setSize( QSize size )
-{
- d->size = size;
-}
-
-QSize KJavaApplet::size()
-{
- return d->size;
-}
-
-void KJavaApplet::setArchives( const QString& _archives )
-{
- d->archives = _archives;
-}
-
-QString& KJavaApplet::archives()
-{
- return d->archives;
-}
-
-void KJavaApplet::resizeAppletWidget( int width, int height )
-{
- kdDebug(6100) << "KJavaApplet, id = " << id << ", ::resizeAppletWidget to " << width << ", " << height << endl;
-
- if( d->UIwidget )
- d->UIwidget->resize( width, height );
-}
-
-void KJavaApplet::setAppletName( const QString& name )
-{
- d->appName = name;
-}
-
-void KJavaApplet::setWindowName( const QString& title )
-{
- d->windowName = title;
-}
-
-QString& KJavaApplet::getWindowName()
-{
- return d->windowName;
-}
-
-QString& KJavaApplet::appletName()
-{
- return d->appName;
-}
-
-void KJavaApplet::create( )
-{
- context->create( this );
- d->reallyExists = true;
-}
-
-void KJavaApplet::init()
-{
- context->init( this );
-}
-
-void KJavaApplet::start()
-{
- context->start( this );
-}
-
-void KJavaApplet::stop()
-{
- context->stop( this );
-}
-
-int KJavaApplet::appletId()
-{
- return id;
-}
-
-void KJavaApplet::setAppletId( int _id )
-{
- id = _id;
-}
-
-#include "kjavaapplet.moc"
diff --git a/WebCore/khtml/java/kjavaapplet.h b/WebCore/khtml/java/kjavaapplet.h
deleted file mode 100644
index dfe656a..0000000
--- a/WebCore/khtml/java/kjavaapplet.h
+++ /dev/null
@@ -1,193 +0,0 @@
-// -*- c++ -*-
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Richard Moore <rich at kde.org>
- * 2000 Wynn Wilkes <wynnw at caldera.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef KJAVAAPPLET_H
-#define KJAVAAPPLET_H
-
-#include <kurl.h>
-
-#include <qobject.h>
-#include <qmap.h>
-
-
-/**
- * @short A Java applet
- *
- * This class encapsulates the data the Applet Server needs to load
- * the Applet class files, and set the proper size of the Applet. It also
- * has an interface for applets to resize themselves.
- *
- * @author Richard J. Moore, rich at kde.org
- * @author Wynn Wilkes, wynnw at kde.org
- */
-
-class KJavaAppletWidget;
-class KJavaAppletContext;
-class KJavaAppletPrivate;
-
-class KJavaApplet : public QObject
-{
-Q_OBJECT
-
-public:
- KJavaApplet( KJavaAppletWidget* _parent, KJavaAppletContext* _context = 0 );
- ~KJavaApplet();
-
- /**
- * Specify the name of the class file to run. For example 'Lake.class'.
- */
- void setAppletClass( const QString& clazzName );
-
- /**
- * Get the name of the Class file the applet should run
- */
- QString& appletClass();
-
- /**
- * Set the URL of the document embedding the applet.
- */
- void setBaseURL( const QString& base );
-
- /**
- * get the Base URL of the document embedding the applet
- */
- QString& baseURL();
-
- /**
- * Set the codebase of the applet classes.
- */
- void setCodeBase( const QString& codeBase );
-
- /**
- * Get the codebase of the applet classes
- */
- QString& codeBase();
-
- /**
- * Set the list of archives at the Applet's codebase to search in for
- * class files and other resources
- */
- void setArchives( const QString& _archives );
-
- /**
- * Get the list of Archives that should be searched for class files
- * and other resources
- */
- QString& archives();
-
- /**
- * Set the name the applet should be called in it's context
- */
- void setAppletName( const QString& name );
-
- /**
- * Get the name the applet should be called in it's context
- */
- QString& appletName();
-
- /**
- * Set the size of the applet
- */
- void setSize( QSize size );
-
- /**
- * Get the size of the applet
- */
- QSize size();
-
- /**
- * Specify a parameter to be passed to the applet.
- */
- void setParameter( const QString& name, const QString& value );
-
- /**
- * Look up the parameter value for the given Parameter. Returns
- * QString::null if the name has not been set.
- */
- QString& parameter( const QString& name );
-
- /**
- * Get a reference to the Paramaters and their values
- */
- QMap<QString,QString>& getParams();
-
- /**
- * Set the window title for swallowing
- */
- void setWindowName( const QString& title );
-
- /**
- * Get the window title this applet should use
- */
- QString& getWindowName();
-
- /**
- * Interface for applets to resize themselves
- */
- void resizeAppletWidget( int width, int height );
-
- /**
- * Send message to AppletServer to create this applet's
- * frame to be swallowed and download the applet classes
- */
- void create();
-
- /**
- * Send message to AppletServer to Initialize and show
- * this applet
- */
- void init();
-
- /**
- * Returns status of applet- whether it's been created or not
- */
- bool isCreated();
-
- /**
- * Run the applet.
- */
- void start();
-
- /**
- * Pause the applet.
- */
- void stop();
-
- /**
- * Returns the unique ID this applet is given
- */
- int appletId();
-
- /**
- * Set the applet ID.
- */
- void setAppletId( int id );
-
-private:
- KJavaAppletPrivate* d;
- QMap<QString, QString> params;
- KJavaAppletContext* context;
- int id;
-};
-
-#endif // KJAVAAPPLET_H
diff --git a/WebCore/khtml/java/kjavaapplet.moc b/WebCore/khtml/java/kjavaapplet.moc
deleted file mode 100644
index e69de29..0000000
diff --git a/WebCore/khtml/java/kjavaappletcontext.cpp b/WebCore/khtml/java/kjavaappletcontext.cpp
deleted file mode 100644
index 34c96f5..0000000
--- a/WebCore/khtml/java/kjavaappletcontext.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-#include "kjavaappletcontext.h"
-
-#include <kjavaappletserver.h>
-#include <kjavaapplet.h>
-#include <kdebug.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-
-// For future expansion
-class KJavaAppletContextPrivate
-{
-friend class KJavaAppletContext;
-private:
- QMap< int, QGuardedPtr<KJavaApplet> > applets;
-};
-
-
-// Static Factory Functions
-int KJavaAppletContext::contextCount = 0;
-
-/* Class Implementation
- */
-KJavaAppletContext::KJavaAppletContext()
- : QObject()
-{
- d = new KJavaAppletContextPrivate;
- server = KJavaAppletServer::allocateJavaServer();
-
- id = contextCount;
- server->createContext( id, this );
-
- contextCount++;
-}
-
-KJavaAppletContext::~KJavaAppletContext()
-{
- server->destroyContext( id );
- KJavaAppletServer::freeJavaServer();
- delete d;
-}
-
-int KJavaAppletContext::contextId()
-{
- return id;
-}
-
-void KJavaAppletContext::setContextId( int _id )
-{
- id = _id;
-}
-
-void KJavaAppletContext::create( KJavaApplet* applet )
-{
- static int appletId = 0;
-
- server->createApplet( id, appletId,
- applet->appletName(),
- applet->appletClass(),
- applet->baseURL(),
- applet->codeBase(),
- applet->archives(),
- applet->size(),
- applet->getParams(),
- applet->getWindowName() );
-
- applet->setAppletId( appletId );
- d->applets.insert( appletId, applet );
- appletId++;
-}
-
-void KJavaAppletContext::destroy( KJavaApplet* applet )
-{
- int appletId = applet->appletId();
- d->applets.remove( appletId );
-
- server->destroyApplet( id, appletId );
-}
-
-void KJavaAppletContext::init( KJavaApplet* applet )
-{
- server->initApplet( id, applet->appletId() );
-}
-
-void KJavaAppletContext::start( KJavaApplet* applet )
-{
- server->startApplet( id, applet->appletId() );
-}
-
-void KJavaAppletContext::stop( KJavaApplet* applet )
-{
- server->stopApplet( id, applet->appletId() );
-}
-
-void KJavaAppletContext::processCmd( QString cmd, QStringList args )
-{
- received( cmd, args );
-}
-
-void KJavaAppletContext::received( const QString& cmd, const QStringList& arg )
-{
- kdDebug(6100) << "KJavaAppletContext::received, cmd = >>" << cmd << "<<" << endl;
- kdDebug(6100) << "arg count = " << arg.count() << endl;
-
- if ( cmd == QString::fromLatin1("showstatus")
- && arg.count() > 0 )
- {
- QString tmp = arg[0];
- tmp.replace(QRegExp("[\n\r]"), "");
- kdDebug(6100) << "status message = " << tmp << endl;
- emit showStatus( tmp );
- }
- else if ( cmd == QString::fromLatin1( "showurlinframe" )
- && arg.count() > 1 )
- {
- kdDebug(6100) << "url = " << arg[0] << ", frame = " << arg[1] << endl;
- emit showDocument( arg[0], arg[1] );
- }
- else if ( cmd == QString::fromLatin1( "showdocument" )
- && arg.count() > 0 )
- {
- kdDebug(6100) << "url = " << arg[0] << endl;
- emit showDocument( arg[0], "_top" );
- }
- else if ( cmd == QString::fromLatin1( "resizeapplet" )
- && arg.count() > 0 )
- {
- //arg[1] should be appletID
- //arg[2] should be new width
- //arg[3] should be new height
- bool ok;
- int appletID = arg[0].toInt( &ok );
- int width = arg[1].toInt( &ok );
- int height = arg[2].toInt( &ok );
-
- if( !ok )
- {
- kdError(6002) << "could not parse out parameters for resize" << endl;
- }
- else
- {
- KJavaApplet* tmp = d->applets[appletID];
- tmp->resizeAppletWidget( width, height );
- }
- }
-}
-
-#include <kjavaappletcontext.moc>
diff --git a/WebCore/khtml/java/kjavaappletcontext.h b/WebCore/khtml/java/kjavaappletcontext.h
deleted file mode 100644
index ff6514c..0000000
--- a/WebCore/khtml/java/kjavaappletcontext.h
+++ /dev/null
@@ -1,121 +0,0 @@
-// -*- c++ -*-
-
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Richard Moore <rich at kde.org>
- * 2000 Wynn Wilkes <wynnw at caldera.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef KJAVAAPPLETCONTEXT_H
-#define KJAVAAPPLETCONTEXT_H
-
-#include <qobject.h>
-
-/**
- * @short Provides a context for KJavaAppletWidgets
- *
- * Applets run in a context- (see the Java documentation for more information
- * on contexts). Currently, each document in KHTML creates one context, in
- * which multiple applets can run.
- *
- * @author Richard J. Moore, rich at kde.org
- * @author Wynn Wilkes, wynnw at caldera.com
- */
-
-
-class KJavaAppletServer;
-class KJavaApplet;
-class KJavaAppletContextPrivate;
-
-class KJavaAppletContext : public QObject
-{
-Q_OBJECT
-
-public:
- KJavaAppletContext();
- ~KJavaAppletContext();
-
- /**
- * Returns the ID of this context.
- */
- int contextId();
-
- /**
- * Sets the ID of this context.
- */
- void setContextId( int id );
-
- /**
- * Sends a message to create the applet.
- */
- void create( KJavaApplet* );
-
- /**
- * Sends a message to destroy the applet.
- */
- void destroy( KJavaApplet* );
-
- /**
- * Sends a message to initialize the applet.
- */
- void init( KJavaApplet* );
-
- /**
- * Sends a message to start the applet.
- */
- void start( KJavaApplet* );
-
- /**
- * Sends a message to stop the applet.
- */
- void stop( KJavaApplet* );
-
- /**
- * use this for applet call backs, the AppletServer
- * calls this directly.
- */
- void processCmd( QString cmd, QStringList args );
-
-signals:
- /**
- * Signals the KHMTL Part to show this as the status message.
- */
- void showStatus ( const QString& txt );
-
- /**
- * Signals the KHTML Part to show a url in a given target
- */
- void showDocument( const QString& url, const QString& target );
-
-protected:
- //The counter to generate ID's for the contexts
- static int contextCount;
-
- // The applet server this context is attached to.
- KJavaAppletServer* server;
-
-protected slots:
- void received( const QString& cmd, const QStringList& arg );
-
-private:
- int id;
- KJavaAppletContextPrivate* d;
-
-};
-
-#endif // KJAVAAPPLETCONTEXT_H
diff --git a/WebCore/khtml/java/kjavaappletcontext.moc b/WebCore/khtml/java/kjavaappletcontext.moc
deleted file mode 100644
index e69de29..0000000
diff --git a/WebCore/khtml/java/kjavaappletserver.cpp b/WebCore/khtml/java/kjavaappletserver.cpp
deleted file mode 100644
index 50f6e04..0000000
--- a/WebCore/khtml/java/kjavaappletserver.cpp
+++ /dev/null
@@ -1,415 +0,0 @@
-#include "kjavaappletserver.h"
-#include "kjavaappletcontext.h"
-#include "kjavaprocess.h"
-#include "kjavadownloader.h"
-
-#include <kconfig.h>
-#include <kstandarddirs.h>
-#include <kdebug.h>
-#include <klocale.h>
-#include <kio/kprotocolmanager.h>
-#include <kio/job.h>
-
-#include <qtimer.h>
-#include <qguardedptr.h>
-#include <qdir.h>
-
-#include <stdlib.h>
-
-#define KJAS_CREATE_CONTEXT (char)1
-#define KJAS_DESTROY_CONTEXT (char)2
-#define KJAS_CREATE_APPLET (char)3
-#define KJAS_DESTROY_APPLET (char)4
-#define KJAS_START_APPLET (char)5
-#define KJAS_STOP_APPLET (char)6
-#define KJAS_INIT_APPLET (char)7
-#define KJAS_SHOW_DOCUMENT (char)8
-#define KJAS_SHOW_URLINFRAME (char)9
-#define KJAS_SHOW_STATUS (char)10
-#define KJAS_RESIZE_APPLET (char)11
-#define KJAS_GET_URLDATA (char)12
-#define KJAS_URLDATA (char)13
-#define KJAS_SHUTDOWN_SERVER (char)14
-
-// For future expansion
-class KJavaAppletServerPrivate
-{
-friend class KJavaAppletServer;
-private:
- int counter;
- QMap< int, QGuardedPtr<KJavaAppletContext> > contexts;
- QString appletLabel;
-};
-
-static KJavaAppletServer* self = 0;
-
-KJavaAppletServer::KJavaAppletServer()
-{
- d = new KJavaAppletServerPrivate;
- process = new KJavaProcess();
-
- connect( process, SIGNAL(received(const QByteArray&)),
- this, SLOT(slotJavaRequest(const QByteArray&)) );
-
- setupJava( process );
-
- if( process->startJava() )
- d->appletLabel = i18n( "Loading Applet" );
- else
- d->appletLabel = i18n( "Error: java executable not found" );
-
-}
-
-KJavaAppletServer::~KJavaAppletServer()
-{
- quit();
-
- delete process;
- delete d;
-}
-
-QString KJavaAppletServer::getAppletLabel()
-{
- if( self )
- return self->appletLabel();
- else
- return QString::null;
-}
-
-QString KJavaAppletServer::appletLabel()
-{
- return d->appletLabel;
-}
-
-KJavaAppletServer* KJavaAppletServer::allocateJavaServer()
-{
- if( self == 0 )
- {
- self = new KJavaAppletServer();
- self->d->counter = 0;
- }
-
- self->d->counter++;
- return self;
-}
-
-void KJavaAppletServer::freeJavaServer()
-{
- self->d->counter--;
-
- if( self->d->counter == 0 )
- {
- //instead of immediately quitting here, set a timer to kill us
- //if there are still no servers- give us one minute
- //this is to prevent repeated loading and unloading of the jvm
- KConfig config( "konquerorrc", true );
- config.setGroup( "Java/JavaScript Settings" );
- if( config.readBoolEntry( "ShutdownAppletServer", true ) )
- {
- int value = config.readNumEntry( "AppletServerTimeout", 60 );
- QTimer::singleShot( value*1000, self, SLOT( checkShutdown() ) );
- }
- }
-}
-
-void KJavaAppletServer::checkShutdown()
-{
- if( self->d->counter == 0 )
- {
- delete self;
- self = 0;
- }
-}
-
-void KJavaAppletServer::setupJava( KJavaProcess *p )
-{
- KConfig config ( "konquerorrc", true );
- config.setGroup( "Java/JavaScript Settings" );
-
- QString jvm_path = "java";
-
- QString jPath = config.readEntry( "JavaPath" );
- if ( !jPath.isEmpty() && jPath != "java" )
- {
- // Cut off trailing slash if any
- if( jPath[jPath.length()-1] == '/' )
- jPath.remove(jPath.length()-1, 1);
-
- QDir dir( jPath );
- if( dir.exists( "bin/java" ) )
- jvm_path = jPath + "/bin/java";
- else if( QFile::exists(jPath) ) //check here to see if they entered the whole path the java exe
- jvm_path = jPath;
- }
-
- //check to see if jvm_path is valid and set d->appletLabel accordingly
- p->setJVMPath( jvm_path );
-
- // Prepare classpath variable
- QString kjava_class = locate("data", "kjava/kjava.jar");
- kdDebug(6100) << "kjava_class = " << kjava_class << endl;
- if( kjava_class.isNull() ) // Should not happen
- return;
-
- QDir dir( kjava_class );
- dir.cdUp();
- kdDebug(6100) << "dir = " << dir.absPath() << endl;
-
- QStringList entries = dir.entryList( "*.jar" );
- kdDebug(6100) << "entries = " << entries.join( ":" ) << endl;
-
- QString classes;
- for( QStringList::Iterator it = entries.begin();
- it != entries.end(); it++ )
- {
- if( !classes.isEmpty() )
- classes += ":";
- classes += dir.absFilePath( *it );
- }
- p->setClasspath( classes );
-
- // Fix all the extra arguments
- QString extraArgs = config.readEntry( "JavaArgs", "" );
- p->setExtraArgs( extraArgs );
-
- if( config.readBoolEntry( "ShowJavaConsole", false) )
- {
- p->setSystemProperty( "kjas.showConsole", QString::null );
- }
-
- if( config.readBoolEntry( "UseSecurityManager", true ) )
- {
- QString class_file = locate( "data", "kjava/kjava.policy" );
- p->setSystemProperty( "java.security.policy", class_file );
-
- p->setSystemProperty( "java.security.manager",
- "org.kde.kjas.server.KJASSecurityManager" );
- }
-
- //check for http proxies...
- if( KProtocolManager::useProxy() )
- {
- QString httpProxy = KProtocolManager::proxyFor("http");
- kdDebug(6100) << "httpProxy is " << httpProxy << endl;
-
- KURL url( httpProxy );
- p->setSystemProperty( "http.proxyHost", url.host() );
- p->setSystemProperty( "http.proxyPort", QString::number( url.port() ) );
- }
-
- //set the main class to run
- p->setMainClass( "org.kde.kjas.server.Main" );
-}
-
-void KJavaAppletServer::createContext( int contextId, KJavaAppletContext* context )
-{
-// kdDebug(6100) << "createContext: " << contextId << endl;
- d->contexts.insert( contextId, context );
-
- QStringList args;
- args.append( QString::number( contextId ) );
- process->send( KJAS_CREATE_CONTEXT, args );
-}
-
-void KJavaAppletServer::destroyContext( int contextId )
-{
-// kdDebug(6100) << "destroyContext: " << contextId << endl;
- d->contexts.remove( contextId );
-
- QStringList args;
- args.append( QString::number( contextId ) );
- process->send( KJAS_DESTROY_CONTEXT, args );
-}
-
-void KJavaAppletServer::createApplet( int contextId, int appletId,
- const QString name, const QString clazzName,
- const QString baseURL, const QString codeBase,
- const QString jarFile, QSize size,
- const QMap<QString,QString>& params,
- const QString windowTitle )
-{
-// kdDebug(6100) << "createApplet: contextId = " << contextId << endl
-// << " appletId = " << appletId << endl
-// << " name = " << name << endl
-// << " clazzName = " << clazzName << endl
-// << " baseURL = " << baseURL << endl
-// << " codeBase = " << codeBase << endl
-// << " jarFile = " << jarFile << endl
-// << " width = " << size.width() << endl
-// << " height = " << size.height() << endl;
-
- QStringList args;
- args.append( QString::number( contextId ) );
- args.append( QString::number( appletId ) );
-
- //it's ok if these are empty strings, I take care of it later...
- args.append( name );
- args.append( clazzName );
- args.append( baseURL );
- args.append( codeBase );
- args.append( jarFile );
-
- args.append( QString::number( size.width() ) );
- args.append( QString::number( size.height() ) );
-
- args.append( windowTitle );
-
- //add on the number of parameter pairs...
- int num = params.count();
- QString num_params = QString("%1").arg( num, 8 );
- args.append( num_params );
-
- QMap< QString, QString >::ConstIterator it;
-
- for( it = params.begin(); it != params.end(); ++it )
- {
- args.append( it.key() );
- args.append( it.data() );
- }
-
- process->send( KJAS_CREATE_APPLET, args );
-}
-
-void KJavaAppletServer::initApplet( int contextId, int appletId )
-{
- QStringList args;
- args.append( QString::number( contextId ) );
- args.append( QString::number( appletId ) );
-
- process->send( KJAS_INIT_APPLET, args );
-}
-
-void KJavaAppletServer::destroyApplet( int contextId, int appletId )
-{
- QStringList args;
- args.append( QString::number(contextId) );
- args.append( QString::number(appletId) );
-
- process->send( KJAS_DESTROY_APPLET, args );
-}
-
-void KJavaAppletServer::startApplet( int contextId, int appletId )
-{
- QStringList args;
- args.append( QString::number(contextId) );
- args.append( QString::number(appletId) );
-
- process->send( KJAS_START_APPLET, args );
-}
-
-void KJavaAppletServer::stopApplet( int contextId, int appletId )
-{
- QStringList args;
- args.append( QString::number(contextId) );
- args.append( QString::number(appletId) );
-
- process->send( KJAS_STOP_APPLET, args );
-}
-
-void KJavaAppletServer::sendURLData( const QString& loaderID,
- const QString& url,
- const QByteArray& data )
-{
- QStringList args;
- args.append( loaderID );
- args.append( url );
-
- process->send( KJAS_URLDATA, args, data );
-
-}
-
-void KJavaAppletServer::quit()
-{
- QStringList args;
-
- process->send( KJAS_SHUTDOWN_SERVER, args );
-}
-
-void KJavaAppletServer::slotJavaRequest( const QByteArray& qb )
-{
- // qb should be one command only without the length string,
- // we parse out the command and it's meaning here...
- QString cmd;
- QStringList args;
- int index = 0;
- int qb_size = qb.size();
-
- //get the command code
- char cmd_code = qb[ index++ ];
- ++index; //skip the next sep
-
- //get contextID
- QString contextID;
- while( qb[index] != 0 && index < qb_size )
- {
- contextID += qb[ index++ ];
- }
- ++index; //skip the sep
-
- //now parse out the arguments
- while( index < qb_size )
- {
- QString tmp;
- while( qb[index] != 0 )
- tmp += qb[ index++ ];
-
- args.append( tmp );
-
- ++index; //skip the sep
- }
-
- //here I should find the context and call the method directly
- //instead of emitting signals
- switch( cmd_code )
- {
- case KJAS_SHOW_DOCUMENT:
- cmd = QString::fromLatin1( "showdocument" );
- break;
-
- case KJAS_SHOW_URLINFRAME:
- cmd = QString::fromLatin1( "showurlinframe" );
- break;
-
- case KJAS_SHOW_STATUS:
- cmd = QString::fromLatin1( "showstatus" );
- break;
-
- case KJAS_RESIZE_APPLET:
- cmd = QString::fromLatin1( "resizeapplet" );
- break;
-
- case KJAS_GET_URLDATA:
- //here we need to get some data for a class loader and send it back...
- kdDebug(6100) << "GetURLData from classloader: "<< contextID
- << " for url: " << args[0] << endl;
- break;
-
- default:
- return;
- break;
- }
-
- if( cmd_code == KJAS_GET_URLDATA )
- {
- new KJavaDownloader( contextID, args[0] );
- }
- else
- {
- bool ok;
- int contextID_num = contextID.toInt( &ok );
-
- if( !ok )
- {
- kdError(6100) << "could not parse out contextID to call command on" << endl;
- return;
- }
-
- KJavaAppletContext* tmp = d->contexts[ contextID_num ];
- if( tmp )
- tmp->processCmd( cmd, args );
- else
- kdError(6100) << "no context object for this id" << endl;
- }
-}
-
-#include "kjavaappletserver.moc"
diff --git a/WebCore/khtml/java/kjavaappletserver.h b/WebCore/khtml/java/kjavaappletserver.h
deleted file mode 100644
index d146f9c..0000000
--- a/WebCore/khtml/java/kjavaappletserver.h
+++ /dev/null
@@ -1,143 +0,0 @@
-// -*- c++ -*-
-
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Richard Moore <rich at kde.org>
- * 2000 Wynn Wilkes <wynnw at caldera.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef KJAVAAPPLETSERVER_H
-#define KJAVAAPPLETSERVER_H
-
-#include <kjavaprocess.h>
-#include <qobject.h>
-#include <qmap.h>
-
-
-/**
- * @short Communicates with a KJAS server to display and control Java applets.
- *
- * @author Richard J. Moore, rich at kde.org
- */
-
-class KJavaAppletContext;
-class KJavaAppletServerPrivate;
-
-class KJavaAppletServer : public QObject
-{
-Q_OBJECT
-
-public:
- /**
- * Create the applet server. These shouldn't be used directly,
- * use allocateJavaServer instead
- */
- KJavaAppletServer();
- ~KJavaAppletServer();
-
- /**
- * A factory method that returns the default server. This is the way this
- * class is usually instantiated.
- */
- static KJavaAppletServer *allocateJavaServer();
-
- /**
- * When you are done using your reference to the AppletServer, you must
- * dereference it by calling freeJavaServer().
- */
- static void freeJavaServer();
-
- /**
- * This allows the KJavaAppletWidget to display some feedback in a QLabel
- * while the applet is being loaded. If the java process could not be
- * started, an error message is displayed instead.
- */
- static QString getAppletLabel();
-
- /**
- * Create an applet context with the specified id.
- */
- void createContext( int contextId, KJavaAppletContext* context );
-
- /**
- * Destroy the applet context with the specified id. All the applets in the
- * context will be destroyed as well.
- */
- void destroyContext( int contextId );
-
- /**
- * Create an applet in the specified context with the specified id. The applet
- * name, class etc. are specified in the same way as in the HTML APPLET tag.
- */
- void createApplet( int contextId, int appletId,
- const QString name, const QString clazzName,
- const QString baseURL, const QString codeBase,
- const QString jarFile, QSize size,
- const QMap<QString, QString>& params,
- const QString windowTitle );
-
- /**
- * This should be called by the KJavaAppletWidget
- */
- void initApplet( int contextId, int appletId );
-
- /**
- * Destroy an applet in the specified context with the specified id.
- */
- void destroyApplet( int contextId, int appletId );
-
- /**
- * Start the specified applet.
- */
- void startApplet( int contextId, int appletId );
-
- /**
- * Stop the specified applet.
- */
- void stopApplet( int contextId, int appletId );
-
- /**
- * Send data we got back from a KJavaDownloader back to the appropriate
- * class loader.
- * (This is currently unimplemented on the java side.
- */
- void sendURLData( const QString& loaderID, const QString& url,
- const QByteArray& data );
-
- /**
- * Shut down the KJAS server.
- */
- void quit();
-
- QString appletLabel();
-
-protected:
- void setupJava( KJavaProcess* p );
-
- KJavaProcess* process;
-
-protected slots:
- void slotJavaRequest( const QByteArray& qb );
- void checkShutdown();
-
-private:
- KJavaAppletServerPrivate* d;
-
-};
-
-#endif // KJAVAAPPLETSERVER_H
diff --git a/WebCore/khtml/java/kjavaappletserver.moc b/WebCore/khtml/java/kjavaappletserver.moc
deleted file mode 100644
index e69de29..0000000
diff --git a/WebCore/khtml/java/kjavaappletwidget.cpp b/WebCore/khtml/java/kjavaappletwidget.cpp
deleted file mode 100644
index 559b3ed..0000000
--- a/WebCore/khtml/java/kjavaappletwidget.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-#include "kjavaappletwidget.h"
-#include "kjavaappletserver.h"
-
-#include <kwin.h>
-#include <kdebug.h>
-#include <klocale.h>
-
-#include <qlabel.h>
-
-// For future expansion
-class KJavaAppletWidgetPrivate
-{
-friend class KJavaAppletWidget;
-private:
- QLabel* tmplabel;
-};
-
-int KJavaAppletWidget::appletCount = 0;
-
-KJavaAppletWidget::KJavaAppletWidget( KJavaAppletContext* context,
- QWidget* parent, const char* name )
- : KJavaEmbed( parent, name )
-{
- m_applet = new KJavaApplet( this, context );
- d = new KJavaAppletWidgetPrivate;
- m_kwm = new KWinModule( this );
-
- d->tmplabel = new QLabel( this );
- d->tmplabel->setText( KJavaAppletServer::getAppletLabel() );
- d->tmplabel->setAlignment( Qt::AlignCenter | Qt::WordBreak );
- d->tmplabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
- d->tmplabel->show();
-
- m_swallowTitle.sprintf( "KJAS Applet - Ticket number %u", appletCount++ );
- m_applet->setWindowName( m_swallowTitle );
-}
-
-KJavaAppletWidget::~KJavaAppletWidget()
-{
- delete m_applet;
- delete d;
-}
-
-void KJavaAppletWidget::showApplet()
-{
- connect( m_kwm, SIGNAL( windowAdded( WId ) ),
- this, SLOT( setWindow( WId ) ) );
- m_kwm->doNotManage( m_swallowTitle );
-
- //Now we send applet info to the applet server
- if ( !m_applet->isCreated() )
- m_applet->create();
-}
-
-#ifndef APPLE_CHANGES
-void KJavaAppletWidget::setWindow( WId w )
-{
- //make sure that this window has the right name, if so, embed it...
- KWin::Info w_info = KWin::info( w );
-
- if ( m_swallowTitle == w_info.name ||
- m_swallowTitle == w_info.visibleName )
- {
- kdDebug(6100) << "swallowing our window: " << m_swallowTitle
- << ", window id = " << w << endl;
-
- delete d->tmplabel;
- d->tmplabel = 0;
-
- // disconnect from KWM events
- disconnect( m_kwm, SIGNAL( windowAdded( WId ) ),
- this, SLOT( setWindow( WId ) ) );
-
- embed( w );
- setFocus();
- }
-}
-#endif
-
-QSize KJavaAppletWidget::sizeHint()
-{
- kdDebug(6100) << "KJavaAppletWidget::sizeHint()" << endl;
- QSize rval = KJavaEmbed::sizeHint();
-
- if( rval.width() == 0 || rval.height() == 0 )
- {
- if( width() != 0 && height() != 0 )
- {
- rval = QSize( width(), height() );
- }
- }
-
- kdDebug(6100) << "returning: (" << rval.width() << ", " << rval.height() << ")" << endl;
-
- return rval;
-}
-
-void KJavaAppletWidget::resize( int w, int h )
-{
- kdDebug(6100) << "KJavaAppletWidget, id = " << m_applet->appletId() << ", ::resize to: " << w << ", " << h << endl;
-
- if( d->tmplabel )
- {
- d->tmplabel->resize( w, h );
- m_applet->setSize( QSize( w, h ) );
- }
-
- KJavaEmbed::resize( w, h );
-}
-
-#include "kjavaappletwidget.moc"
diff --git a/WebCore/khtml/java/kjavaappletwidget.h b/WebCore/khtml/java/kjavaappletwidget.h
deleted file mode 100644
index e84e07c..0000000
--- a/WebCore/khtml/java/kjavaappletwidget.h
+++ /dev/null
@@ -1,125 +0,0 @@
-// -*- c++ -*-
-
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Richard Moore <rich at kde.org>
- * 2000 Wynn Wilkes <wynnw at caldera.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef KJAVAAPPLETWIDGET_H
-#define KJAVAAPPLETWIDGET_H
-
-#include <qwidget.h>
-#ifndef Q_WS_QWS //FIXME(?) I don't think this is possible with Qt Embedded
-#include "java/kjavaappletcontext.h"
-#include "java/kjavaapplet.h"
-#include "java/javaembed.h"
-#include <kwinmodule.h>
-
-/**
- * @short A widget for displaying Java applets
- *
- * KJavaAppletWidget provides support for the inclusion of Java applets
- * in Qt and KDE applications. To create an applet, you must first create
- * a context object in which it will run. There can be several applets and
- * contexts in operation at a given time, for example in a web browser there
- * would be one context object for each web page. Applets in the same context
- * can communicate with each other, applets in different contexts cannot.
- * Once you have created a KJavaAppletContext, you can create as many
- * applets in it as you want.
- *
- * Once you have created the applet widget, you should access the applet() method
- * to call the various setXXX methods to configure the applet,
- * They correspond to the HTML tags used to embed applets in a web page.
- * Once the applet is configured, call the create() method to set things in motion.
- * The applet is running when it first appears, but you can start or stop it
- * when you like (for example if it scrolls off the screen).
- *
- * This widget works by using the KJavaAppletServer, which fires off a
- * Java server process with which it communicates using the
- * KDE Java Applet Server (KJAS) protocol over stdin and stdout.
- * The applet windows are swallowed and attached to the QWidget, but they are
- * actually running in a different process. This has the advantage of robustness
- * and reusability. The details of the communication are hidden from the user
- * in the KJASAppletServer class. Normally only a single server process is used for
- * all of the applets in a given application, this is all sorted automatically.
- * The KJAS server is 100% pure Java, and should also prove useful for people
- * wishing to add java support to other systems (for example a perl/Tk binding
- * is perfectly feasible). All you need to do is implement the protocol and
- * (optionally) swallow the applet windows.
- *
- * The applet support in KDE is still dependent on the KWin Window Manager. The
- * applet swallowing will not work under other Window Managers. Hopefully this
- * will be fixed in the future.
- *
- * For a description of the KJAS protocol, please see the KJAS_GRAMMAR.txt file.
- *
- * @author Richard J. Moore, rich at kde.org
- * @author Wynn Wilkes, wynnw at caldera.com
- */
-
-class KJavaAppletWidgetPrivate;
-
-class KJavaAppletWidget : public KJavaEmbed
-{
- Q_OBJECT
-public:
- KJavaAppletWidget( KJavaAppletContext* context,
- QWidget* parent=0, const char* name=0 );
-
- ~KJavaAppletWidget();
-
- /**
- * Returns a pointer to the KJavaApplet. Use this to
- * configure the applet's parameters. You can also
- * use it to start and stop the Applet.
- */
- KJavaApplet* applet() { return m_applet; }
-
- /**
- * Tells the AppletServer to create, initialize, and
- * show the Applet.
- */
- void showApplet();
-
- QSize sizeHint();
- void resize( int, int );
-
-protected slots:
- /**
- * This slot is called by KWin when new windows are added. We check
- * to see if the window has the title we set. If so we embed it.
- */
- void setWindow( WId w );
-
-protected:
- //The counter to generate ID's for the applets
- static int appletCount;
-
-private:
- KJavaAppletWidgetPrivate* d;
-
- KJavaApplet* m_applet;
- KWinModule* m_kwm;
- QString m_swallowTitle;
-
-};
-
-#endif
-#endif // KJAVAAPPLETWIDGET_H
-
diff --git a/WebCore/khtml/java/kjavaappletwidget.moc b/WebCore/khtml/java/kjavaappletwidget.moc
deleted file mode 100644
index e69de29..0000000
diff --git a/WebCore/khtml/java/kjavadownloader.cpp b/WebCore/khtml/java/kjavadownloader.cpp
deleted file mode 100644
index 58587c0..0000000
--- a/WebCore/khtml/java/kjavadownloader.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-#include "kjavadownloader.h"
-#include "kjavaappletserver.h"
-
-#include <kurl.h>
-#include <kio/job.h>
-#include <kdebug.h>
-#include <qfile.h>
-
-class KJavaDownloaderPrivate
-{
-friend class KJavaDownloader;
-public:
- ~KJavaDownloaderPrivate()
- {
- if( url )
- delete url;
- }
-private:
- QString loaderID;
- KURL* url;
- QByteArray file;
- KIO::TransferJob* job;
-};
-
-
-KJavaDownloader::KJavaDownloader( QString& ID, QString& url )
-{
- kdDebug(6100) << "KJavaDownloader for ID = " << ID << " and url = " << url << endl;
-
- d = new KJavaDownloaderPrivate;
-
- d->loaderID = ID;
- d->url = new KURL( url );
-
- d->job = KIO::get( url, false, false );
- connect( d->job, SIGNAL(data( KIO::Job*, const QByteArray& )),
- this, SLOT(slotData( KIO::Job*, const QByteArray& )) );
- connect( d->job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotResult(KIO::Job*)) );
-}
-
-KJavaDownloader::~KJavaDownloader()
-{
- delete d;
-}
-
-void KJavaDownloader::slotData( KIO::Job*, const QByteArray& qb )
-{
- kdDebug(6100) << "slotData for url = " << d->url->url() << endl;
-
- int cur_size = d->file.size();
- int qb_size = qb.size();
- d->file.resize( cur_size + qb_size );
- memcpy( d->file.data() + cur_size, qb.data(), qb_size );
-
-
-}
-
-void KJavaDownloader::slotResult( KIO::Job* )
-{
- kdDebug(6100) << "slotResult for url = " << d->url->url() << endl;
-
- if( d->job->error() )
- {
- kdDebug(6100) << "slave had an error = " << d->job->errorString() << endl;
- KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer();
- d->file.resize(0);
- server->sendURLData( d->loaderID, d->url->url(), d->file );
- KJavaAppletServer::freeJavaServer();
- }
- else
- {
- kdDebug(6100) << "slave got all its data, sending to KJAS" << endl;
- kdDebug(6100) << "size of data = " << d->file.size() << endl;
- KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer();
- server->sendURLData( d->loaderID, d->url->url(), d->file );
- KJavaAppletServer::freeJavaServer();
- }
-
- delete this;
-}
-
-#include "kjavadownloader.moc"
-
diff --git a/WebCore/khtml/java/kjavadownloader.h b/WebCore/khtml/java/kjavadownloader.h
deleted file mode 100644
index 2cdf3ac..0000000
--- a/WebCore/khtml/java/kjavadownloader.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Wynn Wilkes <wynnw at caldera.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef KJAVADOWNLOADER_H
-#define KJAVADOWNLOADER_H
-
-#include <qobject.h>
-#include <kio/jobclasses.h>
-
-/**
- * @short A class for handling downloads from KIO
- *
- * This class handles a KIO::get job and passes the data
- * back to the AppletServer.
- *
- * @author Wynn Wilkes, wynnw at calderasystems.com
- */
-
-
-class KJavaDownloaderPrivate;
-class KJavaDownloader : public QObject
-{
-Q_OBJECT
-
-public:
- KJavaDownloader( QString& ID, QString& url );
- ~KJavaDownloader();
-
-protected slots:
- void slotData( KIO::Job*, const QByteArray& );
- void slotResult( KIO::Job* );
-
-private:
- KJavaDownloaderPrivate* d;
-
-};
-
-#endif
diff --git a/WebCore/khtml/java/kjavadownloader.moc b/WebCore/khtml/java/kjavadownloader.moc
deleted file mode 100644
index e69de29..0000000
diff --git a/WebCore/khtml/java/kjavaprocess.cpp b/WebCore/khtml/java/kjavaprocess.cpp
deleted file mode 100644
index 3574f0b..0000000
--- a/WebCore/khtml/java/kjavaprocess.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-#include "kjavaprocess.h"
-
-#include <kdebug.h>
-#include <kio/kprotocolmanager.h>
-
-#include <qtextstream.h>
-#include <qmap.h>
-#include <unistd.h>
-#include <qptrlist.h>
-
-class KJavaProcessPrivate
-{
-friend class KJavaProcess;
-private:
- QString jvmPath;
- QString classPath;
- QString mainClass;
- QString extraArgs;
- QString classArgs;
- QPtrList<QByteArray> BufferList;
- QMap<QString, QString> systemProps;
-};
-
-KJavaProcess::KJavaProcess()
-{
- d = new KJavaProcessPrivate;
- d->BufferList.setAutoDelete( true );
-
- javaProcess = new KProcess();
-
- connect( javaProcess, SIGNAL( wroteStdin( KProcess * ) ),
- this, SLOT( slotWroteData() ) );
- connect( javaProcess, SIGNAL( receivedStdout( int, int& ) ),
- this, SLOT( slotReceivedData(int, int&) ) );
-
- d->jvmPath = "java";
- d->mainClass = "-help";
-}
-
-KJavaProcess::~KJavaProcess()
-{
- if ( isRunning() )
- {
- kdDebug(6100) << "stopping java process" << endl;
- stopJava();
- }
-
- delete javaProcess;
- delete d;
-}
-
-bool KJavaProcess::isRunning()
-{
- return javaProcess->isRunning();
-}
-
-bool KJavaProcess::startJava()
-{
- return invokeJVM();
-}
-
-void KJavaProcess::stopJava()
-{
- killJVM();
-}
-
-void KJavaProcess::setJVMPath( const QString& path )
-{
- d->jvmPath = path;
-}
-
-void KJavaProcess::setClasspath( const QString& classpath )
-{
- d->classPath = classpath;
-}
-
-void KJavaProcess::setSystemProperty( const QString& name,
- const QString& value )
-{
- d->systemProps.insert( name, value );
-}
-
-void KJavaProcess::setMainClass( const QString& className )
-{
- d->mainClass = className;
-}
-
-void KJavaProcess::setExtraArgs( const QString& args )
-{
- d->extraArgs = args;
-}
-
-void KJavaProcess::setClassArgs( const QString& args )
-{
- d->classArgs = args;
-}
-
-//Private Utility Functions used by the two send() methods
-QByteArray* KJavaProcess::addArgs( char cmd_code, const QStringList& args )
-{
- //the buffer to store stuff, etc.
- QByteArray* buff = new QByteArray();
- QTextOStream output( *buff );
- char sep = 0;
-
- //make space for the command size: 8 characters...
- QCString space( " " );
- output << space;
-
- //write command code
- output << cmd_code;
-
- //store the arguments...
- if( args.count() == 0 )
- {
- output << sep;
- }
- else
- {
- for( QStringList::ConstIterator it = args.begin();
- it != args.end(); ++it )
- {
- if( !(*it).isEmpty() )
- {
- output << (*it).latin1();
- }
- output << sep;
- }
- }
-
- return buff;
-}
-
-void KJavaProcess::storeSize( QByteArray* buff )
-{
- int size = buff->size() - 8; //subtract out the length of the size_str
- QString size_str = QString("%1").arg( size, 8 );
- kdDebug(6100) << "KJavaProcess::storeSize, size = " << size_str << endl;
-
- const char* size_ptr = size_str.latin1();
- for( int i = 0; i < 8; i++ )
- buff->at(i) = size_ptr[i];
-}
-
-void KJavaProcess::sendBuffer( QByteArray* buff )
-{
- d->BufferList.append( buff );
- if( d->BufferList.count() == 1 )
- {
- popBuffer();
- }
-}
-
-void KJavaProcess::send( char cmd_code, const QStringList& args )
-{
- if( isRunning() )
- {
- QByteArray* buff = addArgs( cmd_code, args );
- storeSize( buff );
- sendBuffer( buff );
- }
-}
-
-void KJavaProcess::send( char cmd_code, const QStringList& args,
- const QByteArray& data )
-{
- if( isRunning() )
- {
- kdDebug(6100) << "KJavaProcess::send, qbytearray is size = " << data.size() << endl;
-
- QByteArray* buff = addArgs( cmd_code, args );
- int cur_size = buff->size();
- int data_size = data.size();
- buff->resize( cur_size + data_size );
- memcpy( buff->data() + cur_size, data.data(), data_size );
-
- storeSize( buff );
- sendBuffer( buff );
- }
-}
-
-void KJavaProcess::popBuffer()
-{
- QByteArray* buf = d->BufferList.first();
- if( buf )
- {
-// DEBUG stuff...
-// kdDebug(6100) << "Sending buffer to java, buffer = >>";
-// for( unsigned int i = 0; i < buf->size(); i++ )
-// {
-// if( buf->at(i) == (char)0 )
-// kdDebug(6100) << "<SEP>";
-// else if( buf->at(i) > 0 && buf->at(i) < 10 )
-// kdDebug(6100) << "<CMD " << (int) buf->at(i) << ">";
-// else
-// kdDebug(6100) << buf->at(i);
-// }
-// kdDebug(6100) << "<<" << endl;
-
- //write the data
- if ( !javaProcess->writeStdin( buf->data(),
- buf->size() ) )
- {
- kdError(6100) << "Could not write command" << endl;
- }
- }
-}
-
-void KJavaProcess::slotWroteData( )
-{
- //do this here- we can't free the data until we know it went through
- d->BufferList.removeFirst(); //this should delete it since we setAutoDelete(true)
-
- if ( d->BufferList.count() >= 1 )
- {
- popBuffer();
- }
-}
-
-
-bool KJavaProcess::invokeJVM()
-{
- *javaProcess << d->jvmPath;
-
- if( !d->classPath.isEmpty() )
- {
- *javaProcess << "-classpath";
- *javaProcess << d->classPath;
- }
-
- //set the system properties, iterate through the qmap of system properties
- for( QMap<QString,QString>::Iterator it = d->systemProps.begin();
- it != d->systemProps.end(); ++it )
- {
- QString currarg;
-
- if( !it.key().isEmpty() )
- {
- currarg = "-D" + it.key();
- if( !it.data().isEmpty() )
- currarg += "=" + it.data();
- }
-
- if( !currarg.isEmpty() )
- *javaProcess << currarg;
- }
-
- //load the extra user-defined arguments
- if( !d->extraArgs.isEmpty() )
- {
- // BUG HERE: if an argument contains space (-Dname="My name")
- // this parsing will fail. Need more sophisticated parsing
- QStringList args = QStringList::split( " ", d->extraArgs );
- for ( QStringList::Iterator it = args.begin(); it != args.end(); ++it )
- *javaProcess << *it;
- }
-
- *javaProcess << d->mainClass;
-
- if ( d->classArgs != QString::null )
- *javaProcess << d->classArgs;
-
-#ifndef APPLE_CHANGES
- kdDebug(6100) << "Invoking JVM now...with arguments = " << endl;
- QString argStr;
- QTextOStream stream( &argStr );
- QValueList<QCString> args = javaProcess->args();
- qCopy( args.begin(), args.end(), QTextOStreamIterator<QCString>( stream, " " ) );
- kdDebug(6100) << argStr << endl;
-#endif
-
- KProcess::Communication flags = (KProcess::Communication)
- (KProcess::Stdin | KProcess::Stdout |
- KProcess::NoRead);
-
- bool rval = javaProcess->start( KProcess::NotifyOnExit, flags );
- if( rval )
- javaProcess->resume(); //start processing stdout on the java process
-
- return rval;
-}
-
-void KJavaProcess::killJVM()
-{
- javaProcess->kill();
-}
-
-/* In this method, read one command and send it to the d->appletServer
- * then return, so we don't block the event handling
- */
-void KJavaProcess::slotReceivedData( int fd, int& )
-{
- //read out the length of the message,
- //read the message and send it to the applet server
- char length[9] = { 0 };
- int num_bytes = ::read( fd, length, 8 );
- if( num_bytes == -1 )
- {
- kdError(6100) << "could not read 8 characters for the message length!!!!" << endl;
- return;
- }
-
- QString lengthstr( length );
- bool ok;
- int num_len = lengthstr.toInt( &ok );
- if( !ok )
- {
- kdError(6100) << "could not parse length out of: " << lengthstr << endl;
- return;
- }
-
- //now parse out the rest of the message.
- char* msg = new char[num_len];
- num_bytes = ::read( fd, msg, num_len );
- if( num_bytes == -1 || num_bytes != num_len )
- {
- kdError(6100) << "could not read the msg, num_bytes = " << num_bytes << endl;
- delete[] msg;
- return;
- }
-
- QByteArray qb;
- emit received( qb.duplicate( msg, num_len ) );
- delete[] msg;
-}
-
-
-#include "kjavaprocess.moc"
diff --git a/WebCore/khtml/java/kjavaprocess.h b/WebCore/khtml/java/kjavaprocess.h
deleted file mode 100644
index 7b18ec2..0000000
--- a/WebCore/khtml/java/kjavaprocess.h
+++ /dev/null
@@ -1,157 +0,0 @@
-// -*- c++ -*-
-
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Richard Moore <rich at kde.org>
- * 2000 Wynn Wilkes <wynnw at caldera.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef KJAVAPROCESS_H
-#define KJAVAPROCESS_H
-
-#include <kprocess.h>
-#include <qcstring.h>
-#ifdef APPLE_CHANGES
-#include <qlist.h>
-#endif /* APPLE_CHANGES */
-
-/**
- * @short A class for invoking a Java VM
- *
- * This class is a general tool for invoking a Java interpreter. It allows you
- * to specifiy some of the standard options that should be understood by all
- * JVMs.
- *
- * @author Richard J. Moore, rich at kde.org
- * @author Wynn Wilkes, wynnw at calderasystems.com
- */
-
-class KJavaProcessPrivate;
-class KJavaProcess : public QObject
-{
-Q_OBJECT
-
-public:
- /**
- * Creates a process object, the process is NOT invoked at this point.
- * You should first set the process's parameters, and then call startJava.
- */
- KJavaProcess();
- virtual ~KJavaProcess();
-
- /**
- * Invoke the JVM with the parameters that have been set. The Java process
- * will start after this call.
- */
- bool startJava();
-
- /**
- * Stop the JVM (if it's running).
- */
- void stopJava();
-
- /**
- * Returns the status of the java Process- true if it's ok, false if it has died.
- * It calls KProcess::isRunning()
- */
- bool isRunning();
-
- /**
- * Used to specify the path to the Java executable to be run.
- */
- void setJVMPath( const QString& path );
-
- /**
- * This will set the classpath the Java process will use. It's used as a the
- * -cp command line option. It adds every jar file stored in $KDEDIRS/share/apps/kjava/
- * to the classpath, and then adds the $CLASSPATH environmental variable. This allows
- * users to simply drop the JSSE (Java Secure Sockets Extension classes into that directory
- * without having to modify the jvm configuration files.
- */
- void setClasspath( const QString& classpath );
-
- /**
- * Set a property on the java command line as -Dname=value, or -Dname if value is QString::null.
- * For example, you could call setSystemProperty( "kjas.debug", "" ) to set the kjas.debug property.
- */
- void setSystemProperty( const QString& name, const QString& value );
-
- /**
- * The class to be called when startJava() is called.
- */
- void setMainClass( const QString& clazzName );
-
- /**
- * Extra flags passed to the JVM.
- */
- void setExtraArgs( const QString& args );
-
- /**
- * Arguments passed to the main class. They will be very last in the java
- * command line, after the main class.
- */
- void setClassArgs( const QString& classArgs );
-
- /**
- * Sends a command to the KJAS Applet Server by building a QByteArray
- * out of the data, and then writes it standard out.
- */
- void send( char cmd_code, const QStringList& args );
-
- /**
- * Sends a command to the KJAS Applet Server by building a QByteArray
- * out of the data, and then writes it standard out. It adds each QString
- * in the arg list, and then adds the data array.
- */
- void send( char cmd_code, const QStringList& args, const QByteArray& data );
-
-protected slots:
- /**
- * This slot is called whenever something is written to stdin of the process.
- * It's called again to make sure we keep emptying out the buffer that contains
- * the messages we need send.
- */
- void slotWroteData();
-
- /**
- * This slot is called when the Java Process writes to standard out. We then
- * process the data from the file descriptor that is passed to us and send the
- * command to the AppletServer
- */
- void slotReceivedData( int, int& );
-
-protected:
- virtual bool invokeJVM();
- virtual void killJVM();
-
- QByteArray* addArgs( char cmd_code, const QStringList& args );
- void popBuffer();
- void sendBuffer( QByteArray* buff );
- void storeSize( QByteArray* buff );
-
- KProcess* javaProcess;
-
-signals:
- void received( const QByteArray& );
-
-private:
- KJavaProcessPrivate *d;
-
-};
-
-#endif // KJAVAPROCESS_H
diff --git a/WebCore/khtml/java/kjavaprocess.moc b/WebCore/khtml/java/kjavaprocess.moc
deleted file mode 100644
index e69de29..0000000
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 6eeb7ad..de87ee7 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -4003,6 +4003,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
d->m_view->scrollBy( -diff.x(), -diff.y() );
d->m_dragLastPos = _mouse->globalPos();
}
+ }
#endif
}
}
diff --git a/WebCore/khtml/misc/Makefile.am b/WebCore/khtml/misc/Makefile.am
index a5c5d17..01542af 100644
--- a/WebCore/khtml/misc/Makefile.am
+++ b/WebCore/khtml/misc/Makefile.am
@@ -46,14 +46,12 @@ ATTRSFILES = \
$(TAGFILES): tag-stamp
tag-stamp: maketags htmltags.in
- perl $<
- touch $@
+ perl $< && touch $@
$(ATTRSFILES): attr-stamp
attr-stamp: makeattrs htmlattrs.in
- perl $<
- touch $@
+ perl $< && touch $@
BUILT_SOURCES = $(TAGFILES) $(ATTRSFILES) tag-stamp attr-stamp
diff --git a/WebCore/khtml/misc/loader.cpp b/WebCore/khtml/misc/loader.cpp
index 3eefe2d..c98a376 100644
--- a/WebCore/khtml/misc/loader.cpp
+++ b/WebCore/khtml/misc/loader.cpp
@@ -281,6 +281,8 @@ void CachedScript::error( int /*err*/, const char */*text*/ )
// ------------------------------------------------------------------------------------------
+#ifndef APPLE_CHANGES
+
namespace khtml
{
@@ -424,6 +426,8 @@ void ImageSource::cleanBuffer()
}
}
+#endif // APPLE_CHANGES
+
static QString buildAcceptHeader()
{
QString result = KImageIO::mimeTypes( KImageIO::Reading ).join(", ");
@@ -539,6 +543,7 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc)
QPainter p(bg);
if(isvalid) p.fillRect(0, 0, w, r.height(), newc);
p.drawTiledPixmap(0, 0, w, r.height(), pix);
+#ifndef APPLE_CHANGES
if(!isvalid && pix.mask())
{
// unfortunately our anti-transparency trick doesn't work here
@@ -550,6 +555,7 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc)
bgColor = bgTransparant;
}
else
+#endif
bgColor= newc.rgb();
pix = *bg;
}
@@ -560,6 +566,7 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc)
QPainter p(bg);
if(isvalid) p.fillRect(0, 0, w, h, newc);
p.drawTiledPixmap(0, 0, w, h, pix);
+#ifndef APPLE_CHANGES
if(!isvalid && pix.mask())
{
// unfortunately our anti-transparency trick doesn't work here
@@ -571,6 +578,7 @@ const QPixmap &CachedImage::tiled_pixmap(const QColor& newc)
bgColor = bgTransparant;
}
else
+#endif
bgColor= newc.rgb();
}
return *bg;
@@ -631,6 +639,7 @@ void CachedImage::do_notify(const QPixmap& p, const QRect& r)
}
}
+#ifndef APPLE_CHANGES
void CachedImage::movieUpdated( const QRect& r )
{
@@ -657,9 +666,7 @@ void CachedImage::movieStatus(int status)
if(status == QMovie::EndOfFrame)
{
const QImage& im = m->frameImage();
-#ifndef APPLE_CHANGES
monochrome = ( ( im.depth() <= 8 ) && ( im.numColors() - int( im.hasAlphaBuffer() ) <= 2 ) );
-#endif
if(im.width() < 5 && im.height() < 5 && im.hasAlphaBuffer()) // only evaluate for small images
{
QImage am = im.createAlphaMask();
@@ -701,7 +708,6 @@ void CachedImage::movieStatus(int status)
{
setShowAnimations( KHTMLSettings::KAnimationDisabled );
-#ifndef APPLE_CHANGES
// monochrome alphamasked images are usually about 10000 times
// faster to draw, so this is worth the hack
if ( p && monochrome && p->depth() > 1 )
@@ -714,7 +720,6 @@ void CachedImage::movieStatus(int status)
p = pix;
monochrome = false;
}
-#endif
}
CachedObjectClient *c;
@@ -738,9 +743,12 @@ void CachedImage::movieResize(const QSize& /*s*/)
// do_notify(m->framePixmap(), QRect());
}
+#endif // APPLE_CHANGES
+
void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimations )
{
m_showAnimations = showAnimations;
+#ifndef APPLE_CHANGES
if ( (m_showAnimations == KHTMLSettings::KAnimationDisabled) && imgSource ) {
imgSource->cleanBuffer();
delete p;
@@ -751,13 +759,18 @@ void CachedImage::setShowAnimations( KHTMLSettings::KAnimationAdvice showAnimati
QTimer::singleShot(0, this, SLOT( deleteMovie()));
imgSource = 0;
}
+#endif
}
+#ifndef APPLE_CHANGES
+
void CachedImage::deleteMovie()
{
delete m; m = 0;
}
+#endif // APPLE_CHANGES
+
void CachedImage::clear()
{
delete m; m = 0;
@@ -787,6 +800,7 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
#endif
typeChecked = true;
+#ifndef APPLE_CHANGES
if ( formatType ) // movie format exists
{
imgSource = new ImageSource( _buffer.buffer());
@@ -795,13 +809,16 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
m->connectStatus( this, SLOT( movieStatus(int)));
m->connectResize( this, SLOT( movieResize( const QSize& ) ) );
}
+#endif
}
+#ifndef APPLE_CHANGES
if ( imgSource )
{
imgSource->setEOF(eof);
imgSource->maybeReady();
}
+#endif
if(eof)
{
diff --git a/WebCore/khtml/rendering/render_applet.cpp b/WebCore/khtml/rendering/render_applet.cpp
index bd01c07..25aa213 100644
--- a/WebCore/khtml/rendering/render_applet.cpp
+++ b/WebCore/khtml/rendering/render_applet.cpp
@@ -38,9 +38,6 @@
#include "misc/htmltags.h"
#include "html/html_objectimpl.h"
-#ifdef APPLE_CHANGES
-#include <WCJavaAppletWidget.h>
-#endif /* APPLE_CHANGES */
using namespace khtml;
using namespace DOM;
@@ -51,15 +48,14 @@ RenderApplet::RenderApplet(HTMLElementImpl *applet, QMap<QString, QString> args
setInline(true);
#ifdef APPLE_CHANGES
- // FIXME:MERGE Is this needed any more?
+ // FIXME: Can we find a way to do this in layout below instead of here?
for (NodeImpl *child = element()->firstChild(); child; child = child->nextSibling()) {
if (child->id() == ID_PARAM) {
HTMLParamElementImpl *p = static_cast<HTMLParamElementImpl *>(child);
args.insert(p->name(), p->value());
}
}
- setQWidget(IFJavaAppletWidgetCreate(args));
-#else /* APPLE_CHANGES not defined */
+#endif // APPLE_CHANGES
KJavaAppletContext *context = 0;
KHTMLView *_view = applet->getDocument()->view();
if ( _view ) {
@@ -69,10 +65,13 @@ RenderApplet::RenderApplet(HTMLElementImpl *applet, QMap<QString, QString> args
if ( context ) {
//kdDebug(6100) << "RenderApplet::RenderApplet, setting QWidget" << endl;
+#ifdef APPLE_CHANGES
+ setQWidget( new KJavaAppletWidget(args) );
+#else
setQWidget( new KJavaAppletWidget(context, _view->viewport()) );
processArguments(args);
+#endif
}
-#endif /* APPLE_CHANGES not defined */
}
RenderApplet::~RenderApplet()
@@ -109,12 +108,9 @@ void RenderApplet::layout()
calcWidth();
calcHeight();
-#ifdef APPLE_CHANGES
- m_widget->resize(m_width-marginLeft()-marginRight()-paddingLeft()-paddingRight(),
- m_height-marginTop()-marginBottom()-paddingTop()-paddingBottom());
-#else /* APPLE_CHANGES not defined */
KJavaAppletWidget *tmp = static_cast<KJavaAppletWidget*>(m_widget);
if ( tmp ) {
+#ifndef APPLE_CHANGES
NodeImpl *child = element()->firstChild();
while(child) {
@@ -126,16 +122,18 @@ void RenderApplet::layout()
}
child = child->nextSibling();
}
+#endif
//kdDebug(6100) << "setting applet widget to size: " << m_width << ", " << m_height << endl;
m_widget->resize(m_width-marginLeft()-marginRight()-paddingLeft()-paddingRight(),
m_height-marginTop()-marginBottom()-paddingTop()-paddingBottom());
tmp->showApplet();
}
-#endif /* APPLE_CHANGES not defined */
setLayouted();
}
+#ifndef APPLE_CHANGES
+
void RenderApplet::processArguments(QMap<QString, QString> args)
{
KJavaAppletWidget *w = static_cast<KJavaAppletWidget*>(m_widget);
@@ -158,6 +156,8 @@ void RenderApplet::processArguments(QMap<QString, QString> args)
}
}
+#endif // APPLE_CHANGES
+
RenderEmptyApplet::RenderEmptyApplet(DOM::NodeImpl* node)
: RenderWidget(node)
{
diff --git a/WebCore/kwq/KWQApplication.h b/WebCore/kwq/KWQApplication.h
index bf35c22..b9564be 100644
--- a/WebCore/kwq/KWQApplication.h
+++ b/WebCore/kwq/KWQApplication.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,32 +26,15 @@
#ifndef QAPPLICATION_H_
#define QAPPLICATION_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
#include <qwidget.h>
#include <qpalette.h>
#include <qsize.h>
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
-#import <Cocoa/Cocoa.h>
-#endif
-
class QDesktopWidget;
-// class QApplication ==========================================================
-
class QApplication : public QObject {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static QPalette palette(const QWidget *p=0);
static QDesktopWidget *desktop();
static int startDragDistance();
@@ -61,49 +44,8 @@ public:
static bool sendEvent(QObject *, QEvent *);
static void sendPostedEvents(QObject *receiver, int event_type);
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QApplication() {}
-#endif
-
- QApplication( int &argc, char **argv);
- virtual ~QApplication();
-
- // These two functions (exec and setMainWidget) are only used by our
- // test apps.
- int exec();
- virtual void setMainWidget( QWidget * );
-
- // member functions --------------------------------------------------------
-
- QWidget *focusWidget() const;
QStyle &style() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QApplication(const QApplication &);
- QApplication &operator=(const QApplication &);
-
- void _initialize();
-
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
- NSApplication *application;
- NSAutoreleasePool *globalPool;
-#else
- void *application;
- void *globalPool;
-#endif
-
-}; // class QApplication =======================================================
+};
extern QApplication *qApp;
@@ -115,5 +57,4 @@ public:
int height() const;
};
-
#endif
diff --git a/WebCore/kwq/KWQApplication.mm b/WebCore/kwq/KWQApplication.mm
index c77c0f0..9759290 100644
--- a/WebCore/kwq/KWQApplication.mm
+++ b/WebCore/kwq/KWQApplication.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -22,10 +22,9 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <qapplication.h>
-#include <qpalette.h>
+#include <kwqdebug.h>
QPalette QApplication::palette(const QWidget *p)
{
@@ -33,7 +32,7 @@ QPalette QApplication::palette(const QWidget *p)
return pal;
}
-// Do we need to worry about multiple screens?
+// FIXME: Do we need to handle multiple screens?
int QDesktopWidget::width() const
{
@@ -58,44 +57,35 @@ QRect QDesktopWidget::screenGeometry(int screenNumber)
QDesktopWidget *QApplication::desktop()
{
- static QDesktopWidget *desktopWidget;
- if (desktopWidget == 0) {
- desktopWidget = new QDesktopWidget();
- }
- return desktopWidget;
+ static QDesktopWidget desktopWidget;
+ return &desktopWidget;
}
-
int QApplication::startDragDistance()
{
- _logNotYetImplemented();
return 2;
}
-
QSize QApplication::globalStrut()
{
_logNotYetImplemented();
return QSize(0,0);
}
-
void QApplication::setOverrideCursor(const QCursor &c)
{
_logNotYetImplemented();
}
-
void QApplication::restoreOverrideCursor()
{
_logNotYetImplemented();
}
-
bool QApplication::sendEvent(QObject *o, QEvent *e)
{
- KWQDEBUG ("received %d\n", e->type());
- return FALSE;
+ _logNotYetImplemented();
+ return false;
}
void QApplication::sendPostedEvents(QObject *receiver, int event_type)
@@ -103,109 +93,8 @@ void QApplication::sendPostedEvents(QObject *receiver, int event_type)
_logNotYetImplemented();
}
-
-QApplication::QApplication( int &argc, char **argv)
-{
-#ifdef TRANSITIONAL_CODE
- _initialize();
-#endif
-}
-
QApplication *qApp = NULL;
-#ifdef TRANSITIONAL_CODE
-void QApplication::_initialize()
-{
- NSDictionary *info;
- NSString *principalClassName;
- NSString *mainNibFile;
-
- globalPool = [[NSAutoreleasePool allocWithZone:NULL] init];
- info = [[NSBundle mainBundle] infoDictionary];
- principalClassName = [info objectForKey:@"NSPrincipalClass"];
- mainNibFile = [info objectForKey:@"NSMainNibFile"];
-
- if (principalClassName) {
- Class principalClass = NSClassFromString(principalClassName);
- if (principalClass) {
- application = [principalClass sharedApplication];
- if (![NSBundle loadNibNamed: mainNibFile owner: application]) {
- KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::_initialize() unable to load %s\n", DEBUG_OBJECT(mainNibFile));
- }
- }
- }
-
- // Force linkage
- [_KWQOwner class];
-
- if (qApp == NULL) {
- qApp = this;
- }
-}
-#endif
-
-
-QApplication::~QApplication()
-{
- [globalPool release];
-}
-
-
-void QApplication::setMainWidget(QWidget *w)
-{
-#ifdef TRANSITIONAL_CODE
- NSRect b = [((_KWQOwner *)application)->containerView bounds];
-
- if (application == nil){
- KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::setMainWidget() application not set.\n");
- return;
- }
- if (w == 0){
- KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::setMainWidget() widget not valid.\n");
- return;
- }
-
- mainWidget = w;
-
- NSScrollView *sv = [[NSScrollView alloc] initWithFrame: NSMakeRect (0,0,b.size.width,b.size.height)];
- [sv setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
- [sv setHasVerticalScroller: YES];
- [sv setHasHorizontalScroller: YES];
- [w->getView() setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
- [sv setDocumentView: w->getView()];
- [((_KWQOwner *)application)->window setOpaque: FALSE];
- //[((_KWQOwner *)application)->window setAlphaValue: (float)0.8];
-
-
- [((_KWQOwner *)application)->containerView addSubview: sv];
-#else
- [NSException raise:@"Not implemented" format:@"QApplication::setMainWidget(QWidget *) is not implemented"];
-#endif
-}
-
-
-int QApplication::exec()
-{
-#ifdef TRANSITIONAL_CODE
- if (application == nil){
- KWQDEBUGLEVEL(KWQ_LOG_ERROR, "ERROR: QApplication::exec() application not set.\n");
- return 0;
- }
- [application run];
- return 1;
-#else
- [NSException raise:@"Not implemented" format:@"QApplication::exec() is not implemented"];
- return 0;
-#endif
-}
-
-
-QWidget *QApplication::focusWidget() const
-{
- _logNeverImplemented();
- return NULL;
-}
-
QStyle &QApplication::style() const
{
static QStyle style;
diff --git a/WebCore/kwq/KWQAsyncIO.h b/WebCore/kwq/KWQAsyncIO.h
index 87543b4..ec810a5 100644
--- a/WebCore/kwq/KWQAsyncIO.h
+++ b/WebCore/kwq/KWQAsyncIO.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2002 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
@@ -23,152 +23,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef QASYNCIO_H_
-#define QASYNCIO_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <KWQDef.h>
-
-// class QAsyncIO ==============================================================
-
-class QAsyncIO {
-
-// Note : all class members in protected scope
-protected:
-
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QAsyncIO();
-#endif
-
- virtual ~QAsyncIO();
-
- // member functions --------------------------------------------------------
-
- void ready();
-
- // operators ---------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QAsyncIO(const QAsyncIO &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QAsyncIO &operator=(const QAsyncIO &);
-#endif
-
-}; // class QAsyncIO ===========================================================
-
-
-// class QDataSource ===========================================================
-
-class QDataSource : public QAsyncIO {
-public:
-
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QDataSource() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QDataSource() {}
-#endif
-
- // member functions --------------------------------------------------------
-
- virtual void rewind();
- void maybeReady();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QDataSource(const QDataSource &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QDataSource &operator=(const QDataSource &);
-#endif
-
-}; // end class QDataSource ====================================================
-
-
-// class QDataSink =============================================================
-
-class QDataSink : public QAsyncIO {
-public:
-
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QDataSink() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QDataSink() {}
-#endif
-
- // member functions --------------------------------------------------------
-
- virtual void receive(const uchar*, int count)=0;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QDataSink(const QDataSink &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QDataSink &operator=(const QDataSink &);
-#endif
-
-}; // class QDataSink ==========================================================
-
-#endif
+class QDataSource;
diff --git a/WebCore/kwq/KWQBitmap.mm b/WebCore/kwq/KWQBitmap.mm
deleted file mode 100644
index 8e2f989..0000000
--- a/WebCore/kwq/KWQBitmap.mm
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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.
- */
-
-#include <kwqdebug.h>
-#include <qbitmap.h>
-
-QBitmap::QBitmap()
-{
- _logNotYetImplemented();
-}
-
-
-QBitmap::QBitmap(int,int)
-{
- _logNotYetImplemented();
-}
diff --git a/WebCore/kwq/KWQBrush.h b/WebCore/kwq/KWQBrush.h
index 17c06bd..b655967 100644
--- a/WebCore/kwq/KWQBrush.h
+++ b/WebCore/kwq/KWQBrush.h
@@ -26,52 +26,25 @@
#ifndef QBRUSH_H_
#define QBRUSH_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qcolor.h"
-#include "qnamespace.h"
-
-class QBrushPrivate;
-
-// class QBrush ================================================================
+#include <qcolor.h>
+#include <qnamespace.h>
class QBrush : public Qt {
-friend class QPainter;
public:
+ QBrush::QBrush(const QColor &c = black, BrushStyle style = SolidPattern)
+ : brushColor(c), brushStyle(style) { }
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QBrush::QBrush(const QColor &c = Qt::black, BrushStyle style = SolidPattern);
-
- // Defaults are fine
- // QBrush(const QBrush &);
- // QBrush &operator=(const QBrush &);
- // ~QBrush();
-
- // member functions --------------------------------------------------------
-
- const QColor &color() const;
- void setColor(const QColor &);
- BrushStyle style() const;
- void setStyle(BrushStyle);
-
- // operators ---------------------------------------------------------------
+ const QColor &color() const { return brushColor; }
+ void setColor(const QColor &c) { brushColor = c; }
+ BrushStyle style() const { return brushStyle; }
+ void setStyle(BrushStyle s) { brushStyle = s; }
- bool operator==(const QBrush &) const;
- bool operator!=(const QBrush &) const;
+ bool operator==(const QBrush &b) const { return brushColor == b.brushColor && brushStyle == b.brushStyle; }
+ bool operator!=(const QBrush &b) const { return !(*this == b); }
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
QColor brushColor;
BrushStyle brushStyle;
-}; // class QBrush =============================================================
+};
#endif
diff --git a/WebCore/kwq/KWQBrush.mm b/WebCore/kwq/KWQBrush.mm
deleted file mode 100644
index a908baf..0000000
--- a/WebCore/kwq/KWQBrush.mm
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.
- */
-
-#include <qbrush.h>
-
-QBrush::QBrush(const QColor &c, BrushStyle style) : brushColor(c), brushStyle(style)
-{
-}
-
-const QColor &QBrush::color() const
-{
- return brushColor;
-}
-
-void QBrush::setColor(const QColor &c)
-{
- brushColor = c;
-}
-
-Qt::BrushStyle QBrush::style() const
-{
- return brushStyle;
-}
-
-void QBrush::setStyle(Qt::BrushStyle bs)
-{
- brushStyle = bs;
-}
-
-bool QBrush::operator==(const QBrush &compareTo) const
-{
- return compareTo.brushStyle == brushStyle &&
- compareTo.brushColor == brushColor;
-}
-
-
-bool QBrush::operator!=(const QBrush &compareTo) const
-{
- return compareTo.brushStyle != brushStyle ||
- compareTo.brushColor != brushColor;
-}
-
diff --git a/WebCore/kwq/KWQButton.h b/WebCore/kwq/KWQButton.h
index 3b4f19f..cf47346 100644
--- a/WebCore/kwq/KWQButton.h
+++ b/WebCore/kwq/KWQButton.h
@@ -26,44 +26,17 @@
#ifndef QBUTTON_H_
#define QBUTTON_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qwidget.h"
-#include "qstring.h"
+#include <qwidget.h>
+#include <qstring.h>
-// class QButton ===============================================================
-
class QButton : public QWidget {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QButton(QWidget *parent=0);
+ QButton(QWidget *parent = 0);
~QButton();
- // member functions --------------------------------------------------------
-
virtual void setText(const QString &);
QString text() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QButton(const QButton &);
- QButton &operator=(const QButton &);
-}; // class QButton ============================================================
+};
#endif
diff --git a/WebCore/kwq/KWQCheckBox.h b/WebCore/kwq/KWQCheckBox.h
index 652ec70..0a19bda 100644
--- a/WebCore/kwq/KWQCheckBox.h
+++ b/WebCore/kwq/KWQCheckBox.h
@@ -26,47 +26,14 @@
#ifndef QCHECKBOX_H_
#define QCHECKBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qbutton.h>
-// class QCheckBox =============================================================
-
class QCheckBox : public QButton {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
QCheckBox(QWidget *);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QCheckBox() {}
-#endif
-
- // member functions --------------------------------------------------------
-
void setChecked(bool);
bool isChecked();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QCheckBox(const QCheckBox &);
- QCheckBox &operator=(const QCheckBox &);
-
-}; // class QCheckBox ==========================================================
+};
#endif
diff --git a/WebCore/kwq/KWQCollection.h b/WebCore/kwq/KWQCollection.h
index 9f983ea..1311262 100644
--- a/WebCore/kwq/KWQCollection.h
+++ b/WebCore/kwq/KWQCollection.h
@@ -1,53 +1,33 @@
-/****************************************************************************
-** $Id$
-**
-** Definition of base class for all collection classes
-**
-** Created : 920629
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales at trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info at trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
+/*
+ * Copyright (C) 2001, 2002 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 QCOLLECTION_H
#define QCOLLECTION_H
-#include <config.h>
-
#include <KWQDef.h>
-#ifdef USING_BORROWED_QCOLLECTION
-
-#include <_qcollection.h>
-
-#else
-
class QPtrCollection {
public:
typedef void *Item;
@@ -63,7 +43,4 @@ class QPtrCollection {
bool del_item; // default FALSE
};
-#endif /* USING_BORROWED_QCOLLECTION */
-
#endif /* QCOLLECTION_H */
-
diff --git a/WebCore/kwq/KWQColor.h b/WebCore/kwq/KWQColor.h
index 5dd6583..b053692 100644
--- a/WebCore/kwq/KWQColor.h
+++ b/WebCore/kwq/KWQColor.h
@@ -31,7 +31,7 @@
#ifdef __OBJC__
@class NSColor;
#else
-typedef void NSColor;
+class NSColor;
#endif
typedef unsigned int QRgb; // RGB triplet
diff --git a/WebCore/kwq/KWQComboBox.h b/WebCore/kwq/KWQComboBox.h
index 6dcb390..9b5de69 100644
--- a/WebCore/kwq/KWQComboBox.h
+++ b/WebCore/kwq/KWQComboBox.h
@@ -26,35 +26,21 @@
#ifndef QCOMBOBOX_H_
#define QCOMBOBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <KWQListBox.h>
-#include "qwidget.h"
+#include <qwidget.h>
#ifdef __OBJC__
-#import <Cocoa/Cocoa.h>
+ at class NSMutableArray;
+#else
+class NSMutableArray;
#endif
-// class QComboBox =============================================================
-
class QComboBox : public QWidget {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QComboBox(QWidget *parent=0, const char *name=0);
QComboBox(bool rw, QWidget *parent=0, const char *name=0);
~QComboBox();
- // member functions --------------------------------------------------------
-
int count() const;
QListBox *listBox() const;
void popup();
@@ -63,34 +49,14 @@ public:
void clear();
int currentItem() const;
-#ifdef _KWQ_
int indexOfCurrentItem();
-#endif
virtual void setCurrentItem(int);
QSize sizeHint() const;
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
NSMutableArray *items;
-#else
- void *items;
-#endif
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QComboBox(const QComboBox &);
- QComboBox &operator=(const QComboBox &);
-
-#ifdef _KWQ_
void init(bool isEditable);
-
-#endif
-
-}; // class QComboBox ==========================================================
+};
#endif
diff --git a/WebCore/kwq/KWQCursor.h b/WebCore/kwq/KWQCursor.h
index 69c8d3f..dc8f6ce 100644
--- a/WebCore/kwq/KWQCursor.h
+++ b/WebCore/kwq/KWQCursor.h
@@ -26,53 +26,31 @@
#ifndef QCURSOR_H
#define QCURSOR_H
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qpixmap.h>
#include <qpoint.h>
#ifdef __OBJC__
-#import <AppKit/AppKit.h>
+ at class NSCursor;
+#else
+class NSCursor;
#endif
-// class QCursor ===============================================================
-
class QCursor {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
static QPoint pos();
- // constructors, copy constructors, and destructors ------------------------
-
- QCursor();
- QCursor(const QPixmap &pixmap, int hotX=1, int hotY=1);
- QCursor(const QCursor &);
-#ifdef __OBJC__
- QCursor(NSCursor *);
-#endif
- ~QCursor();
-
- // member functions --------------------------------------------------------
-
- int handle();
-
- // operators ---------------------------------------------------------------
+ QCursor();
+ QCursor(const QPixmap &);
+ QCursor(NSCursor *);
+ QCursor(const QCursor &);
+ ~QCursor();
QCursor &operator=(const QCursor &);
+
+ int handle() const;
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
-#ifdef __OBJC__
NSCursor *cursor;
-#endif
-}; // class QCursor ============================================================
+};
#endif
diff --git a/WebCore/kwq/KWQCursor.mm b/WebCore/kwq/KWQCursor.mm
index c12df20..30878df 100644
--- a/WebCore/kwq/KWQCursor.mm
+++ b/WebCore/kwq/KWQCursor.mm
@@ -42,8 +42,8 @@ QCursor::QCursor(NSCursor *cur)
{
}
-QCursor::QCursor(const QPixmap &pixmap, int hotX, int hotY)
- : cursor(nil)
+QCursor::QCursor(const QPixmap &pixmap)
+ : cursor([[NSCursor arrowCursor] retain])
{
_logNotYetImplemented();
}
@@ -51,7 +51,6 @@ QCursor::QCursor(const QPixmap &pixmap, int hotX, int hotY)
QCursor::QCursor(const QCursor &other)
: cursor([other.cursor retain])
{
-
}
QCursor::~QCursor()
@@ -73,8 +72,7 @@ QCursor &QCursor::operator=(const QCursor &other)
return *this;
}
-int QCursor::handle()
+int QCursor::handle() const
{
return (int)cursor;
- return 0;
}
diff --git a/WebCore/kwq/KWQDCOPClient.h b/WebCore/kwq/KWQDCOPClient.h
index 6169beb..fd3e6d0 100644
--- a/WebCore/kwq/KWQDCOPClient.h
+++ b/WebCore/kwq/KWQDCOPClient.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,64 +26,9 @@
#ifndef DCOPCLIENT_H_
#define DCOPCLIENT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
#include <qcstring.h>
-// class DCOPClient ============================================================
-
-class DCOPClient : public QObject {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- DCOPClient();
- virtual ~DCOPClient();
-
- // member functions --------------------------------------------------------
-
- bool call(const char *remApp, const char *remObj, const char *remFun,
- const QByteArray &data, QCString& replyType, QByteArray &replyData,
- bool useEventLoop=false, bool fast=false);
-
- bool call(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data, QCString& replyType,
- QByteArray &replyData, bool useEventLoop=false, bool fast=false);
-
- bool send(const char *remApp, const char *remObj, const char *remFun,
- const QByteArray &data, bool fast=false);
-
- bool send(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data, bool fast=false);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- DCOPClient(const DCOPClient &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- DCOPClient &operator=(const DCOPClient &);
-#endif
-
-}; // class DCOPClient =========================================================
+class DCOPClient { };
#endif
diff --git a/WebCore/kwq/KWQDCOPClient.mm b/WebCore/kwq/KWQDCOPClient.mm
deleted file mode 100644
index f6160b5..0000000
--- a/WebCore/kwq/KWQDCOPClient.mm
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.
- */
-#include <kwqdebug.h>
-
-#include <dcopclient.h>
-
-// class DCOPClient ======================================================
-
-DCOPClient::DCOPClient()
-{
- _logNeverImplemented();
-}
-
-
-DCOPClient::~DCOPClient()
-{
- _logNeverImplemented();
-}
-
-
-bool DCOPClient::call(const char *remApp, const char *remObj, const char *remFun,
- const QByteArray &data, QCString& replyType, QByteArray &replyData,
- bool useEventLoop=false, bool fast=false)
-{
- _logNeverImplemented();
- return FALSE;
-}
-
-bool DCOPClient::call(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data, QCString& replyType,
- QByteArray &replyData, bool useEventLoop=false, bool fast=false)
-{
- _logNeverImplemented();
- return FALSE;
-}
-
-bool DCOPClient::send(const char *remApp, const char *remObj, const char *remFun,
- const QByteArray &data, bool fast=false)
-{
- _logNeverImplemented();
- return FALSE;
-}
-
-bool DCOPClient::send(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data, bool fast=false)
-{
- _logNeverImplemented();
- return FALSE;
-}
-
diff --git a/WebCore/kwq/KWQDataStream.h b/WebCore/kwq/KWQDataStream.h
deleted file mode 100644
index 80db5aa..0000000
--- a/WebCore/kwq/KWQDataStream.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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 KWQDATASTREAM_H_
-#define KWQDATASTREAM_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qarray.h"
-#include "qstring.h"
-#include "qcstring.h"
-
-#define IO_ReadOnly 0x0001 // readable device
-#define IO_WriteOnly 0x0002 // writable device
-#define IO_ReadWrite 0x0003 // read+write device
-#define IO_Append 0x0004 // append
-#define IO_Truncate 0x0008 // truncate device
-#define IO_Translate 0x0010 // translate CR+LF
-#define IO_ModeMask 0x00ff
-
-// class QDataStream ===========================================================
-
-class QDataStream {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QDataStream();
- QDataStream(QByteArray, int);
- virtual ~QDataStream();
-
- // member functions --------------------------------------------------------
-
- // operators ---------------------------------------------------------------
-
- QDataStream &operator<<(long int);
- QDataStream &operator<<(const char *);
- QDataStream &operator<<(const QString &);
- QDataStream &operator<<(const QCString &);
- QDataStream &operator>>(const QString &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QDataStream(const QDataStream &);
- QDataStream &operator=(const QDataStream &);
-
-}; // class QDataStream ========================================================
-
-#endif
diff --git a/WebCore/kwq/KWQDir.mm b/WebCore/kwq/KWQDir.mm
deleted file mode 100644
index 724ef07..0000000
--- a/WebCore/kwq/KWQDir.mm
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * 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.
- */
-
-#include <qdir.h>
-
-#ifndef USING_BORROWED_QDIR
-
-#include <kwqdebug.h>
-#import <Foundation/Foundation.h>
-
-#include <qfile.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <sys/param.h>
-#include <unistd.h>
-
-class QDir::KWQDirPrivate
-{
-public:
- KWQDirPrivate(const QString &n);
- KWQDirPrivate(const KWQDirPrivate &other);
- ~KWQDirPrivate();
-
- QString name;
-};
-
-QDir::KWQDirPrivate::KWQDirPrivate(const QString &n) : name(n)
-{
-}
-
-QDir::KWQDirPrivate::KWQDirPrivate(const KWQDirPrivate &other) : name(other.name)
-{
-}
-
-QDir::KWQDirPrivate::~KWQDirPrivate()
-{
-}
-
-
-
-QDir::QDir() : d(new QDir::KWQDirPrivate(QString(".")))
-{
-}
-
-QDir::QDir(const QString &name) : d(new QDir::KWQDirPrivate(name))
-{
-}
-
-QDir::QDir(const QDir &other) : d(new QDir::KWQDirPrivate(*other.d))
-{
-}
-
-QDir::~QDir()
-{
- delete d;
-}
-
-QString QDir::absPath() const
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- QString path;
- if (d->name[0] == '/') {
- path = d->name;
- } else {
- QString cwdString = QString::fromCFString((CFStringRef)[[NSFileManager defaultManager] currentDirectoryPath]);
-
- if (cwdString[cwdString.length()-1] != '/') {
- cwdString += '/';
- }
-
- path = cwdString + d->name;
- }
-
- // Resolve . and ..
- path.replace(QRegExp("/./"), "/");
- path.replace(QRegExp("/[^/]*/../"), "/");
- path.replace(QRegExp("/[^/]*/..$"), "");
-
- [pool release];
- return path;
-}
-
-QString QDir::absFilePath(const QString &fileName) const
-{
- QString dirPath = absPath();
-
- if (dirPath[dirPath.length()-1] != '/') {
- dirPath = dirPath + "/";
- }
-
- return dirPath + fileName;
-}
-
-bool QDir::cdUp()
-{
- QString dirPath = absPath();
-
- if (dirPath[dirPath.length()-1] != '/') {
- dirPath += "/";
- }
-
- dirPath += "..";
-
- dirPath.replace(QRegExp("/[^/]*/..$"), "");
-
- if (QFile::exists(dirPath)) {
- d->name = dirPath;
- return true;
- } else {
- return false;
- }
-}
-
-bool QDir::exists(const QString &fileName) const
-{
- return QFile::exists(absFilePath(fileName));
-}
-
-QStringList QDir::entryList(const QString &nameFilter)
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- QStringList results;
- {
- QRegExp filter(nameFilter, TRUE, TRUE);
-
- NSArray *contents = [[NSFileManager defaultManager] directoryContentsAtPath:(NSString *)(absPath().getCFMutableString())];
-
- contents = [contents arrayByAddingObjectsFromArray:[NSArray arrayWithObjects:@".", @"..", nil]];
- contents = [contents sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
-
- unsigned length = [contents count];
-
- for (unsigned i = 0; i < length; i++) {
- QString item = QString::fromCFString((CFStringRef)[contents objectAtIndex:i]);
-
- if (item.find(filter) != -1 && QFile::exists(absFilePath(item))) {
- results.append(item);
- }
- }
- }
-
- [pool release];
- return results;
-}
-
-QDir &QDir::operator=(const QDir &other)
-{
- QDir tmp(other);
-
- swap (tmp);
-
- return *this;
-}
-
-void QDir::swap(QDir &other)
-{
- QDir::KWQDirPrivate *tmp;
-
- tmp = other.d;
- other.d = d;
- d = tmp;
-}
-
-#endif
-
diff --git a/WebCore/kwq/KWQDrawUtil.h b/WebCore/kwq/KWQDrawUtil.h
index 20ca608..3393e7c 100644
--- a/WebCore/kwq/KWQDrawUtil.h
+++ b/WebCore/kwq/KWQDrawUtil.h
@@ -26,10 +26,6 @@
#ifndef QDRAWUTIL_H_
#define QDRAWUTIL_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include "qpainter.h"
#include "qpalette.h"
#include "qbrush.h"
diff --git a/WebCore/kwq/KWQEvent.h b/WebCore/kwq/KWQEvent.h
index 3dbf7ba..bc8ebcc 100644
--- a/WebCore/kwq/KWQEvent.h
+++ b/WebCore/kwq/KWQEvent.h
@@ -26,22 +26,14 @@
#ifndef QEVENT_H_
#define QEVENT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qnamespace.h"
-#include "qregion.h"
-#include "qpoint.h"
-
-// class QEvent ================================================================
+#include <qnamespace.h>
+#include <qregion.h>
+#include <qpoint.h>
+#include <qstring.h>
class QEvent : public Qt {
public:
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
-
enum Type {
None,
Enter,
@@ -59,71 +51,23 @@ public:
Paint,
};
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QEvent() {}
-#endif
-
QEvent( Type t ) : _type(t) {}
virtual ~QEvent();
- // member functions --------------------------------------------------------
-
Type type() const;
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
QEvent(const QEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
QEvent &operator=(const QEvent &);
-#endif
- Type _type;
-}; // class QEvent =============================================================
-
-// class QMouseEvent ===========================================================
+ Type _type;
+};
class QMouseEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QMouseEvent() {}
-#endif
-
QMouseEvent(Type type, const QPoint &pos, int button, int state);
QMouseEvent(Type type, const QPoint &pos, const QPoint &global, int button, int state);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QMouseEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
-
int x();
int y();
int globalX();
@@ -133,89 +77,28 @@ public:
ButtonState state();
ButtonState stateAfter();
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QMouseEvent(const QMouseEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QMouseEvent &operator=(const QMouseEvent &);
-#endif
QPoint _position;
- int _button; // ### Make ushort in 3.0? Here it's an int...
- ushort _state; // ### ...and here an ushort. But both are ButtonState!
-
-}; // class QMouseEvent ========================================================
+ ButtonState _button;
+ ButtonState _state;
-
-// class QTimerEvent ===========================================================
+};
class QTimerEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QTimerEvent() {}
-#endif
-
QTimerEvent(int timerId);
-
~QTimerEvent();
- // member functions --------------------------------------------------------
-
- int timerId() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
- int _timerId;
-}; // class QTimerEvent ========================================================
+ int timerId() const { return _timerId; }
-
-// class QKeyEvent =============================================================
+private:
+ int _timerId;
+};
class QKeyEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QKeyEvent() {}
-#endif
-
QKeyEvent(Type type, int key, int ascii, int buttonState, const QString &textVal = QString::null, bool autoRepeat = FALSE, ushort countVal = 1);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QKeyEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
-
int key() const;
ButtonState state() const;
void accept();
@@ -225,314 +108,53 @@ public:
int count() const;
QString text() const;
int ascii() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QKeyEvent(const QKeyEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QKeyEvent &operator=(const QKeyEvent &);
-#endif
-
-}; // class QKeyEvent ==========================================================
-
-
-// class QFocusEvent ===========================================================
+};
class QFocusEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
-
enum Reason { Mouse, Tab, ActiveWindow, Popup, Shortcut, Other };
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QFocusEvent() {}
-#endif
-
QFocusEvent(Type);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QFocusEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
-
static Reason reason();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QFocusEvent(const QFocusEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QFocusEvent &operator=(const QFocusEvent &);
-#endif
-
-}; // class QFocusEvent ========================================================
-
-
-// class QHideEvent ============================================================
+};
class QHideEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QHideEvent() {}
-#endif
-
QHideEvent(Type);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QHideEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QHideEvent(const QHideEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QHideEvent &operator=(const QHideEvent &);
-#endif
-
-}; // class QHideEvent =========================================================
-
-
-// class QResizeEvent ==========================================================
+};
class QResizeEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QResizeEvent() {}
-#endif
-
QResizeEvent(Type);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QResizeEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QResizeEvent(const QResizeEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QResizeEvent &operator=(const QResizeEvent &);
-#endif
-
-}; // class QResizeEvent =======================================================
-
-
-// class QShowEvent ============================================================
+};
class QShowEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QShowEvent() {}
-#endif
-
QShowEvent(Type);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QShowEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QShowEvent(const QShowEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QShowEvent &operator=(const QShowEvent &);
-#endif
-
-}; // class QShowEvent =========================================================
-
-
-// class QWheelEvent ===========================================================
+};
class QWheelEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QWheelEvent() {}
-#endif
-
QWheelEvent(Type);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QWheelEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
-
void accept();
void ignore();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QWheelEvent(const QWheelEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QWheelEvent &operator=(const QWheelEvent &);
-#endif
-
-}; // class QWheelEvent ========================================================
-
-
-// class QCustomEvent ===========================================================
+};
class QCustomEvent : public QEvent {
public:
QCustomEvent( int type );
QCustomEvent( Type type, void *data )
: QEvent(type), d(data) {};
+
void *data() const { return d; }
void setData( void* data ) { d = data; }
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QCustomEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
void *d;
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QCustomEvent(const QCustomEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QCustomEvent &operator=(const QCustomEvent &);
-#endif
-
};
-// class QContextMenuEvent ========================================================
-
class QContextMenuEvent : public QEvent
{
public:
@@ -549,6 +171,6 @@ class QContextMenuEvent : public QEvent
QPoint m_pos;
QPoint m_globalPos;
ButtonState m_state;
-}; // class QContextMenuEvent ========================================================
+};
#endif
diff --git a/WebCore/kwq/KWQEvent.mm b/WebCore/kwq/KWQEvent.mm
index 60c1697..a8e107b 100644
--- a/WebCore/kwq/KWQEvent.mm
+++ b/WebCore/kwq/KWQEvent.mm
@@ -44,12 +44,12 @@ QEvent::Type QEvent::type() const
// class QMouseEvent ===========================================================
QMouseEvent::QMouseEvent( Type t, const QPoint &pos, int b, int s )
- : QEvent(t), _position(pos), _button(b), _state((ushort)s)
+ : QEvent(t), _position(pos), _button((ButtonState)b), _state((ButtonState)s)
{
}
QMouseEvent::QMouseEvent(Type t, const QPoint &pos, const QPoint &, int b, int s)
- : QEvent(t), _position(pos), _button(b), _state((ushort)s)
+ : QEvent(t), _position(pos), _button((ButtonState)b), _state((ButtonState)s)
{
}
@@ -87,27 +87,28 @@ const QPoint &QMouseEvent::pos() const
Qt::ButtonState QMouseEvent::button()
{
- return Qt::ButtonState(_button);
+ return _button;
}
Qt::ButtonState QMouseEvent::state()
{
- return Qt::ButtonState(_state);
+ return _state;
}
Qt::ButtonState QMouseEvent::stateAfter()
{
- return Qt::ButtonState(_state);
+ return _state;
}
// class QTimerEvent ===========================================================
QTimerEvent::QTimerEvent(int t)
+ : QEvent(Timer)
{
- _timerId = t;
+ _timerId = t;
}
@@ -116,15 +117,10 @@ QTimerEvent::~QTimerEvent()
}
-int QTimerEvent::timerId() const
-{
- return _timerId;
-}
-
-
// class QKeyEvent =============================================================
-QKeyEvent::QKeyEvent(Type, int, int, int, const QString &, bool, ushort)
+QKeyEvent::QKeyEvent(Type t, int, int, int, const QString &, bool, ushort)
+ : QEvent(t)
{
_logNotYetImplemented();
}
@@ -190,7 +186,8 @@ bool QKeyEvent::isAccepted(void) const
// class QFocusEvent ===========================================================
-QFocusEvent::QFocusEvent(Type)
+QFocusEvent::QFocusEvent(Type t)
+ : QEvent(t)
{
_logNotYetImplemented();
}
@@ -203,7 +200,8 @@ QFocusEvent::Reason QFocusEvent::reason()
// class QHideEvent ============================================================
-QHideEvent::QHideEvent(Type)
+QHideEvent::QHideEvent(Type t)
+ : QEvent(t)
{
_logNotYetImplemented();
}
@@ -211,7 +209,8 @@ QHideEvent::QHideEvent(Type)
// class QResizeEvent ==========================================================
-QResizeEvent::QResizeEvent(Type)
+QResizeEvent::QResizeEvent(Type t)
+ : QEvent(t)
{
_logNotYetImplemented();
}
@@ -219,7 +218,8 @@ QResizeEvent::QResizeEvent(Type)
// class QShowEvent ============================================================
-QShowEvent::QShowEvent(Type)
+QShowEvent::QShowEvent(Type t)
+ : QEvent(t)
{
_logNotYetImplemented();
}
@@ -227,7 +227,8 @@ QShowEvent::QShowEvent(Type)
// class QWheelEvent ===========================================================
-QWheelEvent::QWheelEvent(Type)
+QWheelEvent::QWheelEvent(Type t)
+ : QEvent(t)
{
_logNotYetImplemented();
}
@@ -255,6 +256,7 @@ QCustomEvent::QCustomEvent( int type )
// class QContextMenuEvent ======================================================
QContextMenuEvent::QContextMenuEvent(int r, const QPoint &p, const QPoint &gp, Qt::ButtonState s) :
+ QEvent(MouseButtonPress),
m_reason(r),
m_pos(p),
m_globalPos(gp),
diff --git a/WebCore/kwq/KWQFont.h b/WebCore/kwq/KWQFont.h
index ee46888..999095e 100644
--- a/WebCore/kwq/KWQFont.h
+++ b/WebCore/kwq/KWQFont.h
@@ -32,7 +32,7 @@ class QPainter;
#ifdef __OBJC__
@class NSString;
#else
-typedef void NSString;
+class NSString;
#endif
class QFont {
diff --git a/WebCore/kwq/KWQFontDatabase.mm b/WebCore/kwq/KWQFontDatabase.mm
deleted file mode 100644
index a4713c9..0000000
--- a/WebCore/kwq/KWQFontDatabase.mm
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.
- */
-
-#include <kwqdebug.h>
-#include <qfontdatabase.h>
-
-QFontDatabase::QFontDatabase()
-{
- _logNotYetImplemented();
-}
-
-
-QFont QFontDatabase::font(const QString, const QString &, int, const QString charSetName)
-{
- _logNotYetImplemented();
- return QFont();
-}
-
-
-bool QFontDatabase::isSmoothlyScalable(const QString &family, const QString &style, const QString &charSet) const
-{
- _logNotYetImplemented();
- return FALSE;
-}
-
-
-QValueList<int> QFontDatabase::smoothSizes(const QString &, const QString &, const QString &charSet)
-{
- _logNotYetImplemented();
- return QValueList<int>();
-}
-
-
-QString QFontDatabase::styleString(const QFont &)
-{
- _logNotYetImplemented();
- return QString();
-}
-
diff --git a/WebCore/kwq/KWQFontInfo.h b/WebCore/kwq/KWQFontInfo.h
index 9699903..ed1bf2c 100644
--- a/WebCore/kwq/KWQFontInfo.h
+++ b/WebCore/kwq/KWQFontInfo.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,39 +26,15 @@
#ifndef QFONTINFO_H_
#define QFONTINFO_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qfont.h"
-
-// class QFontInfo =============================================================
+#include <qfont.h>
class QFontInfo {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QFontInfo(const QFont &);
- QFontInfo(const QFontInfo &);
- ~QFontInfo();
-
- // member functions --------------------------------------------------------
-
bool fixedPitch() const;
- // operators ---------------------------------------------------------------
-
- QFontInfo &operator=(const QFontInfo &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QFontInfo ==========================================================
+private:
+ QFont font;
+};
#endif
diff --git a/WebCore/kwq/KWQFontInfo.mm b/WebCore/kwq/KWQFontInfo.mm
index b398c2e..8a34b36 100644
--- a/WebCore/kwq/KWQFontInfo.mm
+++ b/WebCore/kwq/KWQFontInfo.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -23,39 +23,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <qfontinfo.h>
+#include <kwqdebug.h>
-QFontInfo::QFontInfo(const QFont &)
-{
- _logNotYetImplemented();
-}
-
-
-QFontInfo::QFontInfo(const QFontInfo &)
-{
- _logNotYetImplemented();
-}
-
-
-QFontInfo::~QFontInfo()
+QFontInfo::QFontInfo(const QFont &f)
+ : font(f)
{
- _logNotYetImplemented();
}
-
bool QFontInfo::fixedPitch() const
{
_logNotYetImplemented();
return FALSE;
}
-
-
-// operators ---------------------------------------------------------------
-
-QFontInfo &QFontInfo::operator=(const QFontInfo &)
-{
- _logNotYetImplemented();
- return *this;
-}
-
diff --git a/WebCore/kwq/KWQImage.h b/WebCore/kwq/KWQImage.h
index bfc343e..1c23b6a 100644
--- a/WebCore/kwq/KWQImage.h
+++ b/WebCore/kwq/KWQImage.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,56 +26,6 @@
#ifndef QIMAGE_H_
#define QIMAGE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qnamespace.h"
-#include "qcolor.h"
-
-// class QImage ================================================================
-
-class QImage {
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QImage();
- QImage(const QImage &);
- ~QImage();
-
- // member functions --------------------------------------------------------
-
- bool isNull();
-
- QRgb color(int) const;
- void setColor(int, QRgb);
-
- int width() const;
- int height() const;
- int depth() const;
- int pixelIndex(int,int) const;
-
- bool create(int,int,int,int numColors=0);
-
- QImage createAlphaMask(int conversion_flags=0) const;
- bool hasAlphaBuffer() const;
-
- uchar **jumpTable() const;
- uchar *scanLine(int) const;
-
- // operators ---------------------------------------------------------------
-
- QImage &operator=(const QImage &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QImage =============================================================
+class QImage { };
#endif
diff --git a/WebCore/kwq/KWQImage.mm b/WebCore/kwq/KWQImage.mm
deleted file mode 100644
index 394d5bd..0000000
--- a/WebCore/kwq/KWQImage.mm
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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.
- */
-
-#include <kwqdebug.h>
-#include <qimage.h>
-
-
-QImage::QImage()
-{
- _logNotYetImplemented();
-}
-
-
-QImage::QImage(const QImage &)
-{
- _logNotYetImplemented();
-}
-
-
-QImage::~QImage()
-{
- _logNotYetImplemented();
-}
-
-
-bool QImage::isNull()
-{
- _logNotYetImplemented();
- return FALSE;
-}
-
-
-QRgb QImage::color(int) const
-{
- _logNotYetImplemented();
- return qRgb(0,0,0);
-}
-
-
-void QImage::setColor(int, QRgb)
-{
- _logNotYetImplemented();
-}
-
-
-int QImage::width() const
-{
- _logNotYetImplemented();
- return 0;
-}
-
-
-int QImage::height() const
-{
- _logNotYetImplemented();
- return 0;
-}
-
-
-int QImage::depth() const
-{
- _logNotYetImplemented();
- return 0;
-}
-
-
-int QImage::pixelIndex(int,int) const
-{
- _logNotYetImplemented();
- return 0;
-}
-
-
-bool QImage::create(int,int,int,int numColors=0)
-{
- _logNotYetImplemented();
- return FALSE;
-}
-
-
-QImage QImage::createAlphaMask(int conversion_flags=0) const
-{
- _logNotYetImplemented();
- return QImage();
-}
-
-
-bool QImage::hasAlphaBuffer() const
-{
- _logNotYetImplemented();
- return FALSE;
-}
-
-
-uchar **QImage::jumpTable() const
-{
- _logNotYetImplemented();
- return 0L;
-}
-
-
-uchar *QImage::scanLine(int) const
-{
- _logNotYetImplemented();
- return 0L;
-}
-
-
-QImage &QImage::operator=(const QImage &)
-{
- _logNotYetImplemented();
- return *this;
-}
-
-
diff --git a/WebCore/kwq/KWQInputDialog.mm b/WebCore/kwq/KWQInputDialog.mm
index 76d03ac..fa35ad5 100644
--- a/WebCore/kwq/KWQInputDialog.mm
+++ b/WebCore/kwq/KWQInputDialog.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -22,12 +22,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <qinputdialog.h>
+#include <kwqdebug.h>
-QString QInputDialog::getText(const QString &, const QString &, QLineEdit::EchoMode, const QString &, bool *,
- QWidget *, const char *)
+QString QInputDialog::getText(const QString &, const QString &, QLineEdit::EchoMode, const QString &, bool *)
{
_logNeverImplemented();
return QString();
diff --git a/WebCore/kwq/KWQKFileDialog.h b/WebCore/kwq/KWQKFileDialog.h
index 607c05e..101b15e 100644
--- a/WebCore/kwq/KWQKFileDialog.h
+++ b/WebCore/kwq/KWQKFileDialog.h
@@ -26,46 +26,14 @@
#ifndef KFILEDIALOG_H_
#define KFILEDIALOG_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
#include <qwidget.h>
-// class KFileDialog ===========================================================
-
class KFileDialog {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static QString getOpenFileName(const QString &startDir=QString::null,
const QString &filter=QString::null, QWidget *parent=0,
const QString &caption=QString::null);
-
- // constructors, copy constructors, and destructors ------------------------
-
- KFileDialog();
- ~KFileDialog();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- KFileDialog(const KFileDialog &);
- KFileDialog &operator=(const KFileDialog &);
-
-}; // class KFileDialog ========================================================
+};
#endif
diff --git a/WebCore/kwq/KWQKFileDialog.mm b/WebCore/kwq/KWQKFileDialog.mm
index 49fe027..625a9d1 100644
--- a/WebCore/kwq/KWQKFileDialog.mm
+++ b/WebCore/kwq/KWQKFileDialog.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <kfiledialog.h>
+#include <kwqdebug.h>
QString KFileDialog::getOpenFileName(const QString &startDir,
const QString &filter, QWidget *parent, const QString &caption)
@@ -32,16 +32,3 @@ QString KFileDialog::getOpenFileName(const QString &startDir,
_logNotYetImplemented();
return QString();
}
-
-
-KFileDialog::KFileDialog()
-{
- _logNotYetImplemented();
-}
-
-
-KFileDialog::~KFileDialog()
-{
- _logNotYetImplemented();
-}
-
diff --git a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
index cf2c769..3074544 100644
--- a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
+++ b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
@@ -1,4 +1,3 @@
-// -*- c-basic-offset: 2 -*-
/*
* Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
@@ -40,7 +39,6 @@ void KHTMLPartBrowserExtension::openURLRequest(const KURL &url,
m_part->openURLInFrame(url, args);
}
-
void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
const KParts::URLArgs &urlArgs)
{
@@ -65,4 +63,3 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
*part = [[[newController mainFrame] provisionalDataSource] _part];
}
}
-
diff --git a/WebCore/kwq/KWQKInstance.mm b/WebCore/kwq/KWQKInstance.mm
deleted file mode 100644
index e69de29..0000000
diff --git a/WebCore/kwq/kdecore/klibloader.h b/WebCore/kwq/KWQKJavaAppletContext.h
similarity index 95%
copy from WebCore/kwq/kdecore/klibloader.h
copy to WebCore/kwq/KWQKJavaAppletContext.h
index e697dbd..47addd8 100644
--- a/WebCore/kwq/kdecore/klibloader.h
+++ b/WebCore/kwq/KWQKJavaAppletContext.h
@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-class KLibrary
+#include <qobject.h>
+
+class KJavaAppletContext : public QObject
{
-public:
- void unload() { }
};
diff --git a/WebCore/kwq/kdecore/klibloader.h b/WebCore/kwq/KWQKJavaAppletWidget.h
similarity index 88%
copy from WebCore/kwq/kdecore/klibloader.h
copy to WebCore/kwq/KWQKJavaAppletWidget.h
index e697dbd..2949c20 100644
--- a/WebCore/kwq/kdecore/klibloader.h
+++ b/WebCore/kwq/KWQKJavaAppletWidget.h
@@ -23,8 +23,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-class KLibrary
+#include <qwidget.h>
+#include <qmap.h>
+#include <qstring.h>
+
+class KJavaAppletWidget : public QWidget
{
public:
- void unload() { }
+ KJavaAppletWidget(const QMap<QString, QString> &args);
+ void showApplet() { }
};
diff --git a/WebCore/kwq/WCJavaAppletWidget.mm b/WebCore/kwq/KWQKJavaAppletWidget.mm
similarity index 82%
rename from WebCore/kwq/WCJavaAppletWidget.mm
rename to WebCore/kwq/KWQKJavaAppletWidget.mm
index 8fa165c..31b9975 100644
--- a/WebCore/kwq/WCJavaAppletWidget.mm
+++ b/WebCore/kwq/KWQKJavaAppletWidget.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2002 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
@@ -22,18 +22,15 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-#import "WCJavaAppletWidget.h"
-#import <qwidget.h>
+
+#import <java/kjavaappletwidget.h>
#import <WebCoreViewFactory.h>
-QWidget *IFJavaAppletWidgetCreate(const QMap<QString, QString> &args)
+KJavaAppletWidget::KJavaAppletWidget(const QMap<QString, QString> &args)
{
NSMutableDictionary *argsDictionary = [NSMutableDictionary dictionaryWithCapacity:args.count()];
for (QMap<QString, QString>::ConstIterator it = args.begin(); it != args.end(); ++it) {
[argsDictionary setObject:it.data().getNSString() forKey:it.key().getNSString()];
}
- QWidget *widget = new QWidget();
- widget->setView([[WebCoreViewFactory sharedFactory] viewForJavaAppletWithArguments:argsDictionary]);
- return widget;
+ setView([[WebCoreViewFactory sharedFactory] viewForJavaAppletWithArguments:argsDictionary]);
}
diff --git a/WebCore/kwq/KWQKPartsBrowserExtension.h b/WebCore/kwq/KWQKPartsBrowserExtension.h
index 9b10811..7ac2dad 100644
--- a/WebCore/kwq/KWQKPartsBrowserExtension.h
+++ b/WebCore/kwq/KWQKPartsBrowserExtension.h
@@ -28,7 +28,6 @@
#include <qpoint.h>
#include <qevent.h>
-#include <KWQDataStream.h>
#include <kurl.h>
diff --git a/WebCore/kwq/KWQKPartsEvent.h b/WebCore/kwq/KWQKPartsEvent.h
index b2a4a4b..d4110e0 100644
--- a/WebCore/kwq/KWQKPartsEvent.h
+++ b/WebCore/kwq/KWQKPartsEvent.h
@@ -26,60 +26,19 @@
#ifndef EVENT_H_
#define EVENT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qevent.h>
class QPainter;
namespace KParts {
-// class Event =================================================================
-
class Event : public QCustomEvent {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
static bool test(const QEvent *);
static bool test(const QEvent *, const char *);
- // constructors, copy constructors, and destructors ------------------------
-
Event(const char *);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~Event() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- Event(const Event &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- Event &operator=(const Event &);
-#endif
-
-}; // class Event ==============================================================
+};
} // namespace KParts
diff --git a/WebCore/kwq/KWQKStandardDirs.h b/WebCore/kwq/KWQKStandardDirs.h
index e8a3521..da5cca7 100644
--- a/WebCore/kwq/KWQKStandardDirs.h
+++ b/WebCore/kwq/KWQKStandardDirs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,51 +26,18 @@
#ifndef KSTDDIRS_H_
#define KSTDDIRS_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
#include <kglobal.h>
-
QString locate(const char *type, const QString& filename,
const KInstance* instance=KGlobal::instance());
QString locateLocal(const char *type, const QString &filename,
const KInstance *instance=KGlobal::instance());
-// class KStandardDirs =========================================================
-
class KStandardDirs {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- KStandardDirs();
- virtual ~KStandardDirs();
-
- // member functions --------------------------------------------------------
-
- QString saveLocation(const char *, const QString &suffix = QString::null,
- bool create = true) const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- KStandardDirs(const KStandardDirs &);
- KStandardDirs &operator=(const KStandardDirs &);
-
-}; // class KStandardDirs ======================================================
+ static QString saveLocation(const char *, const QString &) { return 0; }
+};
#endif
diff --git a/WebCore/kwq/KWQKStandardDirs.mm b/WebCore/kwq/KWQKStandardDirs.mm
index 9efd381..2f205ac 100644
--- a/WebCore/kwq/KWQKStandardDirs.mm
+++ b/WebCore/kwq/KWQKStandardDirs.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -23,30 +23,24 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <kstandarddirs.h>
QString locate(const char *type, const QString& filename, const KInstance* instance)
{
- NSBundle *wkBundle = [NSBundle bundleWithIdentifier:@"com.apple.webkit"];
- NSString *subpath = QSTRING_TO_NSSTRING(filename);
- NSString *file = [subpath lastPathComponent];
+ NSString *file = [filename.getNSString() lastPathComponent];
- if([file isEqualToString:@"html4.css"]){
+ if ([file isEqualToString:@"html4.css"]) {
+ // FIXME: This logic needs to be in WebKit, not here.
+ NSBundle *wkBundle = [NSBundle bundleWithIdentifier:@"com.apple.webkit"];
return NSSTRING_TO_QSTRING([wkBundle pathForResource:@"html4" ofType:@"css"]);
- }else{
- return "/symroots/appdata/" + filename;
+ } else {
+ // FIXME: This does no good.
+ return "/symroots/appdata/" + filename;
}
}
QString locateLocal(const char *type, const QString &filename, const KInstance *instance)
{
+ // FIXME: This does no good.
return "/symroots/appdata/"+filename;
}
-
-QString KStandardDirs::saveLocation(const char *, const QString &suffix = QString::null,
- bool create = true) const
-{
- _logNotYetImplemented();
- return QString();
-}
diff --git a/WebCore/kwq/KWQKWin.h b/WebCore/kwq/KWQKWin.h
index 44f7640..bec5351 100644
--- a/WebCore/kwq/KWQKWin.h
+++ b/WebCore/kwq/KWQKWin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,67 +26,19 @@
#ifndef KWIN_H_
#define KWIN_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
#include <qrect.h>
#include <qstring.h>
-// class KWin ==================================================================
-
class KWin {
public:
-
- // structs -----------------------------------------------------------------
-
struct Info {
QRect geometry;
QString name;
QString visibleName;
};
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static Info info(int win);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KWin() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KWin() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KWin(const KWin &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KWin &operator=(const KWin &);
-#endif
-
-}; // class KWin ===============================================================
+};
#endif
diff --git a/WebCore/kwq/KWQKWin.mm b/WebCore/kwq/KWQKWin.mm
index 3c741b4..a455a52 100644
--- a/WebCore/kwq/KWQKWin.mm
+++ b/WebCore/kwq/KWQKWin.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -30,6 +30,5 @@
KWin::Info KWin::info(int win)
{
_logNotYetImplemented();
- KWin::Info result;
- return result;
+ return KWin::Info();
}
diff --git a/WebCore/kwq/KWQKWinModule.h b/WebCore/kwq/KWQKWinModule.h
index 12922d6..0e6d2e4 100644
--- a/WebCore/kwq/KWQKWinModule.h
+++ b/WebCore/kwq/KWQKWinModule.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,54 +26,11 @@
#ifndef KWINMODULE_H_
#define KWINMODULE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
-class QRect;
-
-// class KWinModule ============================================================
-
class KWinModule : public QObject {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KWinModule(QObject* parent=0);
- ~KWinModule();
-
- // member functions --------------------------------------------------------
-
- QRect workArea(int desktop=-1) const;
- void doNotManage(const QString &);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KWinModule(const KWinModule &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KWinModule &operator=(const KWinModule &);
-#endif
-
-}; // class KWinModule =========================================================
+ QRect workArea() const;
+};
#endif
diff --git a/WebCore/kwq/KWQKWinModule.mm b/WebCore/kwq/KWQKWinModule.mm
index 3e69649..4b2be0b 100644
--- a/WebCore/kwq/KWQKWinModule.mm
+++ b/WebCore/kwq/KWQKWinModule.mm
@@ -23,39 +23,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <kwinmodule.h>
+#include <kwqdebug.h>
-//FIX ME:
-static QRect *tempQRect = NULL;
-
-KWinModule::KWinModule(QObject* parent=0)
-{
- _logNotYetImplemented();
-}
-
-
-KWinModule::~KWinModule()
-{
- _logNotYetImplemented();
-}
-
-
-QRect KWinModule::workArea(int desktop=-1) const
-{
- _logNotYetImplemented();
-
- if (tempQRect == NULL) {
- tempQRect = new QRect(0,0,0,0);
- }
-
- return *tempQRect;
-}
-
-
-void KWinModule::doNotManage(const QString &)
+QRect KWinModule::workArea() const
{
_logNotYetImplemented();
+ return QRect();
}
-
-
diff --git a/WebCore/kwq/KWQKstddirs.mm b/WebCore/kwq/KWQKstddirs.mm
index 9efd381..2f205ac 100644
--- a/WebCore/kwq/KWQKstddirs.mm
+++ b/WebCore/kwq/KWQKstddirs.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -23,30 +23,24 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <kstandarddirs.h>
QString locate(const char *type, const QString& filename, const KInstance* instance)
{
- NSBundle *wkBundle = [NSBundle bundleWithIdentifier:@"com.apple.webkit"];
- NSString *subpath = QSTRING_TO_NSSTRING(filename);
- NSString *file = [subpath lastPathComponent];
+ NSString *file = [filename.getNSString() lastPathComponent];
- if([file isEqualToString:@"html4.css"]){
+ if ([file isEqualToString:@"html4.css"]) {
+ // FIXME: This logic needs to be in WebKit, not here.
+ NSBundle *wkBundle = [NSBundle bundleWithIdentifier:@"com.apple.webkit"];
return NSSTRING_TO_QSTRING([wkBundle pathForResource:@"html4" ofType:@"css"]);
- }else{
- return "/symroots/appdata/" + filename;
+ } else {
+ // FIXME: This does no good.
+ return "/symroots/appdata/" + filename;
}
}
QString locateLocal(const char *type, const QString &filename, const KInstance *instance)
{
+ // FIXME: This does no good.
return "/symroots/appdata/"+filename;
}
-
-QString KStandardDirs::saveLocation(const char *, const QString &suffix = QString::null,
- bool create = true) const
-{
- _logNotYetImplemented();
- return QString();
-}
diff --git a/WebCore/kwq/KWQPaintDevice.h b/WebCore/kwq/KWQPaintDevice.h
index a3ef57c..9635951 100644
--- a/WebCore/kwq/KWQPaintDevice.h
+++ b/WebCore/kwq/KWQPaintDevice.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,42 +26,8 @@
#ifndef QPAINTDEVICE_H_
#define QPAINTDEVICE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// class QPaintDevice ==========================================================
-
-class QPaintDevice {
-friend class QPaintDeviceMetrics;
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QPaintDevice() {}
-#endif
-
- virtual ~QPaintDevice();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QPaintDevice(const QPaintDevice &);
- QPaintDevice &operator=(const QPaintDevice &);
+class QPaintDeviceMetrics;
-}; // class QPaintDevice =======================================================
+class QPaintDevice { };
#endif
diff --git a/WebCore/kwq/KWQPaintDevice.mm b/WebCore/kwq/KWQPaintDevice.mm
deleted file mode 100644
index 925ffbc..0000000
--- a/WebCore/kwq/KWQPaintDevice.mm
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-#include <qpaintdevice.h>
-#include <kwqdebug.h>
-
-#include <Cocoa/Cocoa.h>
-
-
-QPaintDevice::~QPaintDevice()
-{
- // This space intentionally left blank.
-}
-
-
diff --git a/WebCore/kwq/KWQPart.mm b/WebCore/kwq/KWQPart.mm
deleted file mode 100644
index e69de29..0000000
diff --git a/WebCore/kwq/KWQPixmap.h b/WebCore/kwq/KWQPixmap.h
index 44f44c5..9d0853c 100644
--- a/WebCore/kwq/KWQPixmap.h
+++ b/WebCore/kwq/KWQPixmap.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -37,24 +37,16 @@
#ifdef __OBJC__
@protocol WebCoreImageRenderer;
+typedef id <WebCoreImageRenderer> WebCoreImageRendererPtr;
+#else
+class WebCoreImageRenderer;
+typedef WebCoreImageRenderer *WebCoreImageRendererPtr;
#endif
-class QBitmap;
class QWMatrix;
-// class QPixmap ===============================================================
-
class QPixmap : public QPaintDevice, public Qt {
-friend class QPainter;
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QPixmap();
QPixmap(const QSize&);
QPixmap(const QByteArray&);
@@ -62,11 +54,6 @@ public:
QPixmap(const QPixmap &);
~QPixmap();
- // member functions --------------------------------------------------------
-
- void setMask(const QBitmap &);
- const QBitmap *mask() const;
-
bool isNull() const;
QSize size() const;
@@ -78,23 +65,19 @@ public:
QPixmap xForm(const QWMatrix &) const;
QImage convertToImage() const;
-
- // operators ---------------------------------------------------------------
+
+ bool mask() const;
QPixmap &operator=(const QPixmap &);
-#ifdef __OBJC__
- const id <WebCoreImageRenderer>getImageRenderer() const { return imageRenderer; }
-#endif
+ WebCoreImageRendererPtr getImageRenderer() const { return imageRenderer; }
private:
-#ifdef __OBJC__
- id <WebCoreImageRenderer>imageRenderer;
-#else
- void *imageRenderer;
-#endif
+ WebCoreImageRendererPtr imageRenderer;
bool needCopyOnWrite;
-}; // class QPixmap ============================================================
+ friend class QPainter;
+
+};
#endif
diff --git a/WebCore/kwq/KWQPixmap.mm b/WebCore/kwq/KWQPixmap.mm
index 9a98303..d0239e1 100644
--- a/WebCore/kwq/KWQPixmap.mm
+++ b/WebCore/kwq/KWQPixmap.mm
@@ -38,43 +38,38 @@ QPixmap::QPixmap()
QPixmap::QPixmap(const QSize &sz)
{
- imageRenderer = [(id)[[WebCoreImageRendererFactory sharedFactory] imageRendererWithSize: NSMakeSize((float)sz.width(), (float)sz.height())] retain];
+ imageRenderer = [[[WebCoreImageRendererFactory sharedFactory] imageRendererWithSize: NSMakeSize((float)sz.width(), (float)sz.height())] retain];
needCopyOnWrite = false;
}
QPixmap::QPixmap(const QByteArray &bytes)
{
- imageRenderer = [(id)[[WebCoreImageRendererFactory sharedFactory] imageRendererWithBytes: bytes.data() length: bytes.size()] retain];
+ imageRenderer = [[[WebCoreImageRendererFactory sharedFactory] imageRendererWithBytes: bytes.data() length: bytes.size()] retain];
needCopyOnWrite = false;
}
QPixmap::QPixmap(int w, int h)
{
- imageRenderer = [(id)[[WebCoreImageRendererFactory sharedFactory] imageRendererWithSize: NSMakeSize(w, h)] retain];
+ imageRenderer = [[[WebCoreImageRendererFactory sharedFactory] imageRendererWithSize: NSMakeSize(w, h)] retain];
needCopyOnWrite = false;
}
QPixmap::QPixmap(const QPixmap ©From)
- : QPaintDevice()
+ : QPaintDevice(copyFrom)
{
- imageRenderer = [(id)copyFrom.imageRenderer retain];
+ imageRenderer = [copyFrom.imageRenderer retain];
needCopyOnWrite = true;
}
QPixmap::~QPixmap()
{
- [(id)imageRenderer stopAnimation];
- [(id)imageRenderer release];
+ [imageRenderer stopAnimation];
+ [imageRenderer release];
}
-void QPixmap::setMask(const QBitmap &)
+bool QPixmap::mask() const
{
- _logNotYetImplemented();
-}
-
-const QBitmap *QPixmap::mask() const
-{
- return 0;
+ return false;
}
bool QPixmap::isNull() const
@@ -112,8 +107,8 @@ void QPixmap::resize(const QSize &sz)
void QPixmap::resize(int w, int h)
{
if (needCopyOnWrite) {
- id <WebCoreImageRenderer>newImageRenderer = [(id)imageRenderer copy];
- [(id)imageRenderer release];
+ id <WebCoreImageRenderer> newImageRenderer = [imageRenderer copyWithZone:NULL];
+ [imageRenderer release];
imageRenderer = newImageRenderer;
needCopyOnWrite = false;
}
@@ -139,8 +134,8 @@ QImage QPixmap::convertToImage() const
QPixmap &QPixmap::operator=(const QPixmap &assignFrom)
{
- [(id)assignFrom.imageRenderer retain];
- [(id)imageRenderer release];
+ [assignFrom.imageRenderer retain];
+ [imageRenderer release];
imageRenderer = assignFrom.imageRenderer;
needCopyOnWrite = true;
return *this;
diff --git a/WebCore/kwq/KWQSignalStubs.mm b/WebCore/kwq/KWQSignalStubs.mm
index e5790c5..5893408 100644
--- a/WebCore/kwq/KWQSignalStubs.mm
+++ b/WebCore/kwq/KWQSignalStubs.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -23,43 +23,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <khtmlview.h>
#include <misc/loader.h>
-#include <java/kjavaappletcontext.h>
-#include <java/kjavaprocess.h>
void KHTMLView::cleared()
{
- _logNotYetImplemented();
}
-void KJavaAppletContext::showStatus ( const QString& txt )
-{
- _logNotYetImplemented();
-}
-
-
-void KJavaAppletContext::showDocument( const QString& url, const QString& target )
-{
- _logNotYetImplemented();
-}
-
-
-void KJavaProcess::received( const QByteArray& )
-{
- _logNotYetImplemented();
-}
-
-
void khtml::Loader::requestDone( khtml::DocLoader *, khtml::CachedObject *obj )
{
- _logNotYetImplemented();
}
-
void khtml::Loader::requestFailed( khtml::DocLoader *, khtml::CachedObject *obj )
{
- _logNotYetImplemented();
}
-
diff --git a/WebCore/kwq/KWQString.h b/WebCore/kwq/KWQString.h
index 1b52a70..f52f7a0 100644
--- a/WebCore/kwq/KWQString.h
+++ b/WebCore/kwq/KWQString.h
@@ -44,7 +44,7 @@ class QRegExp;
#ifdef __OBJC__
@class NSString;
#else
-typedef void NSString;
+class NSString;
#endif
// QChar class =================================================================
diff --git a/WebCore/kwq/KWQasyncimageio.mm b/WebCore/kwq/KWQasyncimageio.mm
deleted file mode 100644
index 8f844da..0000000
--- a/WebCore/kwq/KWQasyncimageio.mm
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- */
-
-#include <kwqdebug.h>
-#include <qasyncimageio.h>
-
-// FIXME
-static const char *BOGUS_FORMAT_NAME = "";
-
-// class QImageConsumer ========================================================
-
-const char *QImageConsumer::formatName(const uchar* buffer, int length)
-{
- _logNotYetImplemented();
- return BOGUS_FORMAT_NAME;
-}
-
-
-// class QImageDecoder =========================================================
-
-const char *QImageDecoder::formatName(const uchar* buffer, int length)
-{
- _logNotYetImplemented();
- return BOGUS_FORMAT_NAME;
-}
-
-
-QImageDecoder::QImageDecoder(QImageConsumer *)
-{
- _logNotYetImplemented();
-}
-
-
-QImageDecoder::~QImageDecoder()
-{
- _logNotYetImplemented();
-}
-
-
-// class QImageFormat ==========================================================
-
-QImageFormat::~QImageFormat()
-{
- _logNotYetImplemented();
-}
-
-
-// class QImageFormatType ======================================================
-
-QImageFormatType::~QImageFormatType()
-{
- _logNotYetImplemented();
-}
-
diff --git a/WebCore/kwq/KWQasyncio.mm b/WebCore/kwq/KWQasyncio.mm
deleted file mode 100644
index adbb721..0000000
--- a/WebCore/kwq/KWQasyncio.mm
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.
- */
-
-#include <kwqdebug.h>
-#include <qasyncio.h>
-
-// class QAsyncIO ==============================================================
-
-QAsyncIO::QAsyncIO()
-{
- _logNotYetImplemented();
-}
-
-
-QAsyncIO::~QAsyncIO()
-{
- _logNotYetImplemented();
-}
-
-void QAsyncIO::ready()
-{
- _logNotYetImplemented();
-}
-
-// class QDataSource ===========================================================
-
-
-void QDataSource::rewind()
-{
- _logNotYetImplemented();
-}
-
-
-void QDataSource::maybeReady()
-{
- _logNotYetImplemented();
-}
-
diff --git a/WebCore/kwq/KWQbrowserextension.mm b/WebCore/kwq/KWQbrowserextension.mm
deleted file mode 100644
index e69de29..0000000
diff --git a/WebCore/kwq/KWQsignals.mm b/WebCore/kwq/KWQsignals.mm
index e5790c5..5893408 100644
--- a/WebCore/kwq/KWQsignals.mm
+++ b/WebCore/kwq/KWQsignals.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -23,43 +23,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <kwqdebug.h>
#include <khtmlview.h>
#include <misc/loader.h>
-#include <java/kjavaappletcontext.h>
-#include <java/kjavaprocess.h>
void KHTMLView::cleared()
{
- _logNotYetImplemented();
}
-void KJavaAppletContext::showStatus ( const QString& txt )
-{
- _logNotYetImplemented();
-}
-
-
-void KJavaAppletContext::showDocument( const QString& url, const QString& target )
-{
- _logNotYetImplemented();
-}
-
-
-void KJavaProcess::received( const QByteArray& )
-{
- _logNotYetImplemented();
-}
-
-
void khtml::Loader::requestDone( khtml::DocLoader *, khtml::CachedObject *obj )
{
- _logNotYetImplemented();
}
-
void khtml::Loader::requestFailed( khtml::DocLoader *, khtml::CachedObject *obj )
{
- _logNotYetImplemented();
}
-
diff --git a/WebCore/kwq/Makefile.am b/WebCore/kwq/Makefile.am
index d435016..eb2d3eb 100644
--- a/WebCore/kwq/Makefile.am
+++ b/WebCore/kwq/Makefile.am
@@ -7,8 +7,6 @@ libkwq_o_AR = $(OBJCXXLD) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS) $(AM_LDFLAGS) $(LDFLA
libkwq_o_SOURCES = \
KWQApplication.mm \
KWQArrayImpl.mm \
- KWQBitmap.mm \
- KWQBrush.mm \
KWQBuffer.mm \
KWQButton.mm \
KWQCString.mm \
@@ -21,15 +19,12 @@ libkwq_o_SOURCES = \
KWQComboBox.mm \
KWQCompletion.mm \
KWQCursor.mm \
- KWQDCOPClient.mm \
KWQDateTime.mm \
KWQDictImpl.mm \
- KWQDir.mm \
KWQDrawUtil.mm \
KWQEvent.mm \
KWQFile.mm \
KWQFont.mm \
- KWQFontDatabase.mm \
KWQFontInfo.mm \
KWQFontMetrics.mm \
KWQFrame.mm \
@@ -41,7 +36,6 @@ libkwq_o_SOURCES = \
KWQRect.mm \
KWQSize.mm \
KWQHBox.mm \
- KWQImage.mm \
KWQInputDialog.mm \
KWQKApplication.mm \
KWQKCharsets.mm \
@@ -63,7 +57,7 @@ libkwq_o_SOURCES = \
KWQKHistoryProvider.mm \
KWQKIconLoader.mm \
KWQKImageIO.mm \
- KWQKInstance.mm \
+ KWQKJavaAppletWidget.mm \
KWQKJob.mm \
KWQKLineEdit.mm \
KWQKListBox.mm \
@@ -92,11 +86,9 @@ libkwq_o_SOURCES = \
KWQMovie.mm \
KWQNSTextField.mm \
KWQObject.mm \
- KWQPaintDevice.mm \
KWQPaintDeviceMetrics.mm \
KWQPainter.mm \
KWQPalette.mm \
- KWQPart.mm \
KWQPen.mm \
KWQPixmap.mm \
KWQPointArray.mm \
@@ -119,9 +111,6 @@ libkwq_o_SOURCES = \
KWQView.mm \
KWQWMatrix.mm \
KWQWidget.mm \
- KWQasyncimageio.mm \
- KWQasyncio.mm \
- KWQbrowserextension.mm \
KWQbrowserinterface.mm \
KWQsignals.mm \
KWQtextcodec.mm \
@@ -129,7 +118,6 @@ libkwq_o_SOURCES = \
KWQxml.mm \
kwqdebug.mm \
WCPluginWidget.mm \
- WCJavaAppletWidget.mm \
WebCoreImageRendererFactory.m \
WebCoreTextRendererFactory.m \
WebCoreViewFactory.m \
diff --git a/WebCore/kwq/WCJavaAppletWidget.h b/WebCore/kwq/WCJavaAppletWidget.h
deleted file mode 100644
index 48206fc..0000000
--- a/WebCore/kwq/WCJavaAppletWidget.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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 WCJavaAppletWidget_H_
-#define WCJavaAppletWidget_H_
-
-#include <qmap.h>
-#include <qstring.h>
-
-class QWidget;
-
-QWidget *IFJavaAppletWidgetCreate(const QMap<QString, QString> &args);
-
-#endif
diff --git a/WebCore/kwq/WebCoreImageRenderer.h b/WebCore/kwq/WebCoreImageRenderer.h
index 4906327..e71a27a 100644
--- a/WebCore/kwq/WebCoreImageRenderer.h
+++ b/WebCore/kwq/WebCoreImageRenderer.h
@@ -25,11 +25,11 @@
#import <Cocoa/Cocoa.h>
- at protocol WebCoreImageRenderer
+ at protocol WebCoreImageRenderer <NSObject, NSCopying>
- (NSSize)size;
- (void)resize: (NSSize)s;
-- (void)beginAnimationInView: (NSView *)view inRect: (NSRect)ir fromRect: (NSRect)fr;
+- (void)beginAnimationInView:(NSView *)view inRect:(NSRect)ir fromRect:(NSRect)fr;
- (void)stopAnimation;
- (void)drawInRect:(NSRect)dstRect fromRect:(NSRect)srcRect operation:(NSCompositingOperation)op fraction:(float)delta;
diff --git a/WebCore/kwq/dcop/dcopclient.h b/WebCore/kwq/dcop/dcopclient.h
index 6169beb..fd3e6d0 100644
--- a/WebCore/kwq/dcop/dcopclient.h
+++ b/WebCore/kwq/dcop/dcopclient.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,64 +26,9 @@
#ifndef DCOPCLIENT_H_
#define DCOPCLIENT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
#include <qcstring.h>
-// class DCOPClient ============================================================
-
-class DCOPClient : public QObject {
-public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- DCOPClient();
- virtual ~DCOPClient();
-
- // member functions --------------------------------------------------------
-
- bool call(const char *remApp, const char *remObj, const char *remFun,
- const QByteArray &data, QCString& replyType, QByteArray &replyData,
- bool useEventLoop=false, bool fast=false);
-
- bool call(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data, QCString& replyType,
- QByteArray &replyData, bool useEventLoop=false, bool fast=false);
-
- bool send(const char *remApp, const char *remObj, const char *remFun,
- const QByteArray &data, bool fast=false);
-
- bool send(const QCString &remApp, const QCString &remObj,
- const QCString &remFun, const QByteArray &data, bool fast=false);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- DCOPClient(const DCOPClient &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- DCOPClient &operator=(const DCOPClient &);
-#endif
-
-}; // class DCOPClient =========================================================
+class DCOPClient { };
#endif
diff --git a/WebCore/kwq/kdecore/kstddirs.h b/WebCore/kwq/kdecore/kstddirs.h
index e8a3521..da5cca7 100644
--- a/WebCore/kwq/kdecore/kstddirs.h
+++ b/WebCore/kwq/kdecore/kstddirs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,51 +26,18 @@
#ifndef KSTDDIRS_H_
#define KSTDDIRS_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
#include <kglobal.h>
-
QString locate(const char *type, const QString& filename,
const KInstance* instance=KGlobal::instance());
QString locateLocal(const char *type, const QString &filename,
const KInstance *instance=KGlobal::instance());
-// class KStandardDirs =========================================================
-
class KStandardDirs {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
- KStandardDirs();
- virtual ~KStandardDirs();
-
- // member functions --------------------------------------------------------
-
- QString saveLocation(const char *, const QString &suffix = QString::null,
- bool create = true) const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- KStandardDirs(const KStandardDirs &);
- KStandardDirs &operator=(const KStandardDirs &);
-
-}; // class KStandardDirs ======================================================
+ static QString saveLocation(const char *, const QString &) { return 0; }
+};
#endif
diff --git a/WebCore/kwq/kdecore/kwin.h b/WebCore/kwq/kdecore/kwin.h
index 44f7640..bec5351 100644
--- a/WebCore/kwq/kdecore/kwin.h
+++ b/WebCore/kwq/kdecore/kwin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,67 +26,19 @@
#ifndef KWIN_H_
#define KWIN_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
#include <qrect.h>
#include <qstring.h>
-// class KWin ==================================================================
-
class KWin {
public:
-
- // structs -----------------------------------------------------------------
-
struct Info {
QRect geometry;
QString name;
QString visibleName;
};
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static Info info(int win);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- KWin() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~KWin() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KWin(const KWin &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KWin &operator=(const KWin &);
-#endif
-
-}; // class KWin ===============================================================
+};
#endif
diff --git a/WebCore/kwq/kdecore/kwinmodule.h b/WebCore/kwq/kdecore/kwinmodule.h
index 12922d6..0e6d2e4 100644
--- a/WebCore/kwq/kdecore/kwinmodule.h
+++ b/WebCore/kwq/kdecore/kwinmodule.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,54 +26,11 @@
#ifndef KWINMODULE_H_
#define KWINMODULE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
-class QRect;
-
-// class KWinModule ============================================================
-
class KWinModule : public QObject {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- KWinModule(QObject* parent=0);
- ~KWinModule();
-
- // member functions --------------------------------------------------------
-
- QRect workArea(int desktop=-1) const;
- void doNotManage(const QString &);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- KWinModule(const KWinModule &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- KWinModule &operator=(const KWinModule &);
-#endif
-
-}; // class KWinModule =========================================================
+ QRect workArea() const;
+};
#endif
diff --git a/WebCore/kwq/kfile/kfiledialog.h b/WebCore/kwq/kfile/kfiledialog.h
index 607c05e..101b15e 100644
--- a/WebCore/kwq/kfile/kfiledialog.h
+++ b/WebCore/kwq/kfile/kfiledialog.h
@@ -26,46 +26,14 @@
#ifndef KFILEDIALOG_H_
#define KFILEDIALOG_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qstring.h>
#include <qwidget.h>
-// class KFileDialog ===========================================================
-
class KFileDialog {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static QString getOpenFileName(const QString &startDir=QString::null,
const QString &filter=QString::null, QWidget *parent=0,
const QString &caption=QString::null);
-
- // constructors, copy constructors, and destructors ------------------------
-
- KFileDialog();
- ~KFileDialog();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- KFileDialog(const KFileDialog &);
- KFileDialog &operator=(const KFileDialog &);
-
-}; // class KFileDialog ========================================================
+};
#endif
diff --git a/WebCore/kwq/kdecore/klibloader.h b/WebCore/kwq/khtml/java/kjavaappletcontext.h
similarity index 95%
copy from WebCore/kwq/kdecore/klibloader.h
copy to WebCore/kwq/khtml/java/kjavaappletcontext.h
index e697dbd..47addd8 100644
--- a/WebCore/kwq/kdecore/klibloader.h
+++ b/WebCore/kwq/khtml/java/kjavaappletcontext.h
@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-class KLibrary
+#include <qobject.h>
+
+class KJavaAppletContext : public QObject
{
-public:
- void unload() { }
};
diff --git a/WebCore/kwq/kdecore/klibloader.h b/WebCore/kwq/khtml/java/kjavaappletwidget.h
similarity index 88%
copy from WebCore/kwq/kdecore/klibloader.h
copy to WebCore/kwq/khtml/java/kjavaappletwidget.h
index e697dbd..2949c20 100644
--- a/WebCore/kwq/kdecore/klibloader.h
+++ b/WebCore/kwq/khtml/java/kjavaappletwidget.h
@@ -23,8 +23,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-class KLibrary
+#include <qwidget.h>
+#include <qmap.h>
+#include <qstring.h>
+
+class KJavaAppletWidget : public QWidget
{
public:
- void unload() { }
+ KJavaAppletWidget(const QMap<QString, QString> &args);
+ void showApplet() { }
};
diff --git a/WebCore/kwq/kparts/browserextension.h b/WebCore/kwq/kparts/browserextension.h
index 9b10811..7ac2dad 100644
--- a/WebCore/kwq/kparts/browserextension.h
+++ b/WebCore/kwq/kparts/browserextension.h
@@ -28,7 +28,6 @@
#include <qpoint.h>
#include <qevent.h>
-#include <KWQDataStream.h>
#include <kurl.h>
diff --git a/WebCore/kwq/kparts/event.h b/WebCore/kwq/kparts/event.h
index b2a4a4b..d4110e0 100644
--- a/WebCore/kwq/kparts/event.h
+++ b/WebCore/kwq/kparts/event.h
@@ -26,60 +26,19 @@
#ifndef EVENT_H_
#define EVENT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qevent.h>
class QPainter;
namespace KParts {
-// class Event =================================================================
-
class Event : public QCustomEvent {
public:
-
- // structs -----------------------------------------------------------------
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
static bool test(const QEvent *);
static bool test(const QEvent *, const char *);
- // constructors, copy constructors, and destructors ------------------------
-
Event(const char *);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~Event() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- Event(const Event &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- Event &operator=(const Event &);
-#endif
-
-}; // class Event ==============================================================
+};
} // namespace KParts
diff --git a/WebCore/kwq/kwqdebug.h b/WebCore/kwq/kwqdebug.h
index b7cc706..3c522ca 100644
--- a/WebCore/kwq/kwqdebug.h
+++ b/WebCore/kwq/kwqdebug.h
@@ -27,6 +27,7 @@
#define KWQDEBUG_H_
#import <Foundation/Foundation.h>
+#import <Foundation/NSStringPrivate.h>
#ifdef NDEBUG
@@ -75,7 +76,7 @@ void KWQLog(unsigned int level, const char *file, int line, const char *function
// __attribute__((__format__ (__printf__, 5, 6)))
;
-#define DEBUG_OBJECT(object) [[object description] lossyCString]
+#define DEBUG_OBJECT(object) [[[object description] displayableString] lossyCString]
#define KWQDEBUGLEVEL(level,format...) \
KWQLog(level, __FILE__, __LINE__, __PRETTY_FUNCTION__, format);
diff --git a/WebCore/kwq/qt/qapplication.h b/WebCore/kwq/qt/qapplication.h
index bf35c22..b9564be 100644
--- a/WebCore/kwq/qt/qapplication.h
+++ b/WebCore/kwq/qt/qapplication.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,32 +26,15 @@
#ifndef QAPPLICATION_H_
#define QAPPLICATION_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qobject.h>
#include <qwidget.h>
#include <qpalette.h>
#include <qsize.h>
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
-#import <Cocoa/Cocoa.h>
-#endif
-
class QDesktopWidget;
-// class QApplication ==========================================================
-
class QApplication : public QObject {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static QPalette palette(const QWidget *p=0);
static QDesktopWidget *desktop();
static int startDragDistance();
@@ -61,49 +44,8 @@ public:
static bool sendEvent(QObject *, QEvent *);
static void sendPostedEvents(QObject *receiver, int event_type);
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QApplication() {}
-#endif
-
- QApplication( int &argc, char **argv);
- virtual ~QApplication();
-
- // These two functions (exec and setMainWidget) are only used by our
- // test apps.
- int exec();
- virtual void setMainWidget( QWidget * );
-
- // member functions --------------------------------------------------------
-
- QWidget *focusWidget() const;
QStyle &style() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QApplication(const QApplication &);
- QApplication &operator=(const QApplication &);
-
- void _initialize();
-
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
- NSApplication *application;
- NSAutoreleasePool *globalPool;
-#else
- void *application;
- void *globalPool;
-#endif
-
-}; // class QApplication =======================================================
+};
extern QApplication *qApp;
@@ -115,5 +57,4 @@ public:
int height() const;
};
-
#endif
diff --git a/WebCore/kwq/qt/qasyncimageio.h b/WebCore/kwq/qt/qasyncimageio.h
index 45b6165..e69de29 100644
--- a/WebCore/kwq/qt/qasyncimageio.h
+++ b/WebCore/kwq/qt/qasyncimageio.h
@@ -1,239 +0,0 @@
-/*
- * 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 QASYNCIMAGEIO_H_
-#define QASYNCIMAGEIO_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// for memset
-#include <string.h>
-
-#include <KWQDef.h>
-
-#include "qimage.h"
-#include "qcolor.h"
-#include "qrect.h"
-
-// =============================================================================
-// class QImageConsumer
-
-class QImageConsumer {
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
- static const char* formatName(const uchar* buffer, int length);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QImageConsumer() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- virtual ~QImageConsumer() {}
-#endif
-
- // member functions --------------------------------------------------------
-
- virtual void changed(const QRect &)=0;
- virtual void end()=0;
- virtual void setSize(int,int)=0;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QImageConsumer(const QImageConsumer &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QImageConsumer &operator=(const QImageConsumer &);
-#endif
-
-}; // end class QImageConsumer
-
-// =============================================================================
-
-// =============================================================================
-// class QImageDecoder
-
-class QImageDecoder {
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
- static const char* formatName(const uchar* buffer, int length);
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QImageDecoder() {}
-#endif
-
- QImageDecoder(QImageConsumer *);
- ~QImageDecoder();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QImageDecoder(const QImageDecoder &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QImageDecoder &operator=(const QImageDecoder &);
-#endif
-
-}; // end class QImageDecoder
-
-// =============================================================================
-
-// =============================================================================
-// class QImageFormat
-
-class QImageFormat {
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QImageFormat() {}
-#endif
-
- virtual ~QImageFormat();
-
- // member functions --------------------------------------------------------
-
- virtual int decode(QImage &, QImageConsumer *, const uchar *, int) = 0;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QImageFormat(const QImageFormat &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QImageFormat &operator=(const QImageFormat &);
-#endif
-
-}; // end class QImageFormat
-
-// =============================================================================
-
-// =============================================================================
-// class QImageFormatType
-
-class QImageFormatType {
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QImageFormatType() {}
-#endif
-
- virtual ~QImageFormatType();
-
- // member functions --------------------------------------------------------
-
- virtual QImageFormat *decoderFor(const uchar *, int)=0;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QImageFormatType(const QImageFormatType &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QImageFormatType &operator=(const QImageFormatType &);
-#endif
-
-}; // end class QImageFormatType
-
-// =============================================================================
-
-#endif
diff --git a/WebCore/kwq/qt/qasyncio.h b/WebCore/kwq/qt/qasyncio.h
index 87543b4..ec810a5 100644
--- a/WebCore/kwq/qt/qasyncio.h
+++ b/WebCore/kwq/qt/qasyncio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2002 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
@@ -23,152 +23,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef QASYNCIO_H_
-#define QASYNCIO_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <KWQDef.h>
-
-// class QAsyncIO ==============================================================
-
-class QAsyncIO {
-
-// Note : all class members in protected scope
-protected:
-
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QAsyncIO();
-#endif
-
- virtual ~QAsyncIO();
-
- // member functions --------------------------------------------------------
-
- void ready();
-
- // operators ---------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QAsyncIO(const QAsyncIO &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QAsyncIO &operator=(const QAsyncIO &);
-#endif
-
-}; // class QAsyncIO ===========================================================
-
-
-// class QDataSource ===========================================================
-
-class QDataSource : public QAsyncIO {
-public:
-
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QDataSource() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QDataSource() {}
-#endif
-
- // member functions --------------------------------------------------------
-
- virtual void rewind();
- void maybeReady();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QDataSource(const QDataSource &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QDataSource &operator=(const QDataSource &);
-#endif
-
-}; // end class QDataSource ====================================================
-
-
-// class QDataSink =============================================================
-
-class QDataSink : public QAsyncIO {
-public:
-
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QDataSink() {}
-#endif
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QDataSink() {}
-#endif
-
- // member functions --------------------------------------------------------
-
- virtual void receive(const uchar*, int count)=0;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QDataSink(const QDataSink &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QDataSink &operator=(const QDataSink &);
-#endif
-
-}; // class QDataSink ==========================================================
-
-#endif
+class QDataSource;
diff --git a/WebCore/kwq/qt/qbitmap.h b/WebCore/kwq/qt/qbitmap.h
index fcef341..e69de29 100644
--- a/WebCore/kwq/qt/qbitmap.h
+++ b/WebCore/kwq/qt/qbitmap.h
@@ -1,68 +0,0 @@
-/*
- * 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 QBITMAP_H_
-#define QBITMAP_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qpixmap.h"
-#include "qimage.h"
-
-// class QBitmap ===============================================================
-
-class QBitmap : public QPixmap {
-public:
-
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QBitmap();
- QBitmap(int,int);
- QBitmap(const QBitmap &);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QBitmap() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
- QBitmap &operator=(const QBitmap &);
- QBitmap &operator=(const QPixmap &);
- QBitmap &operator=(const QImage &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QBitmap ============================================================
-
-#endif
diff --git a/WebCore/kwq/qt/qbrush.h b/WebCore/kwq/qt/qbrush.h
index 17c06bd..b655967 100644
--- a/WebCore/kwq/qt/qbrush.h
+++ b/WebCore/kwq/qt/qbrush.h
@@ -26,52 +26,25 @@
#ifndef QBRUSH_H_
#define QBRUSH_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qcolor.h"
-#include "qnamespace.h"
-
-class QBrushPrivate;
-
-// class QBrush ================================================================
+#include <qcolor.h>
+#include <qnamespace.h>
class QBrush : public Qt {
-friend class QPainter;
public:
+ QBrush::QBrush(const QColor &c = black, BrushStyle style = SolidPattern)
+ : brushColor(c), brushStyle(style) { }
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QBrush::QBrush(const QColor &c = Qt::black, BrushStyle style = SolidPattern);
-
- // Defaults are fine
- // QBrush(const QBrush &);
- // QBrush &operator=(const QBrush &);
- // ~QBrush();
-
- // member functions --------------------------------------------------------
-
- const QColor &color() const;
- void setColor(const QColor &);
- BrushStyle style() const;
- void setStyle(BrushStyle);
-
- // operators ---------------------------------------------------------------
+ const QColor &color() const { return brushColor; }
+ void setColor(const QColor &c) { brushColor = c; }
+ BrushStyle style() const { return brushStyle; }
+ void setStyle(BrushStyle s) { brushStyle = s; }
- bool operator==(const QBrush &) const;
- bool operator!=(const QBrush &) const;
+ bool operator==(const QBrush &b) const { return brushColor == b.brushColor && brushStyle == b.brushStyle; }
+ bool operator!=(const QBrush &b) const { return !(*this == b); }
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
QColor brushColor;
BrushStyle brushStyle;
-}; // class QBrush =============================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qbutton.h b/WebCore/kwq/qt/qbutton.h
index 3b4f19f..cf47346 100644
--- a/WebCore/kwq/qt/qbutton.h
+++ b/WebCore/kwq/qt/qbutton.h
@@ -26,44 +26,17 @@
#ifndef QBUTTON_H_
#define QBUTTON_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qwidget.h"
-#include "qstring.h"
+#include <qwidget.h>
+#include <qstring.h>
-// class QButton ===============================================================
-
class QButton : public QWidget {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QButton(QWidget *parent=0);
+ QButton(QWidget *parent = 0);
~QButton();
- // member functions --------------------------------------------------------
-
virtual void setText(const QString &);
QString text() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QButton(const QButton &);
- QButton &operator=(const QButton &);
-}; // class QButton ============================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qcheckbox.h b/WebCore/kwq/qt/qcheckbox.h
index 652ec70..0a19bda 100644
--- a/WebCore/kwq/qt/qcheckbox.h
+++ b/WebCore/kwq/qt/qcheckbox.h
@@ -26,47 +26,14 @@
#ifndef QCHECKBOX_H_
#define QCHECKBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qbutton.h>
-// class QCheckBox =============================================================
-
class QCheckBox : public QButton {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
QCheckBox(QWidget *);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QCheckBox() {}
-#endif
-
- // member functions --------------------------------------------------------
-
void setChecked(bool);
bool isChecked();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QCheckBox(const QCheckBox &);
- QCheckBox &operator=(const QCheckBox &);
-
-}; // class QCheckBox ==========================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qcollection.h b/WebCore/kwq/qt/qcollection.h
index 9f983ea..1311262 100644
--- a/WebCore/kwq/qt/qcollection.h
+++ b/WebCore/kwq/qt/qcollection.h
@@ -1,53 +1,33 @@
-/****************************************************************************
-** $Id$
-**
-** Definition of base class for all collection classes
-**
-** Created : 920629
-**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
-**
-** This file is part of the tools module of the Qt GUI Toolkit.
-**
-** This file may be distributed under the terms of the Q Public License
-** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/pricing.html or email sales at trolltech.com for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info at trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
+/*
+ * Copyright (C) 2001, 2002 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 QCOLLECTION_H
#define QCOLLECTION_H
-#include <config.h>
-
#include <KWQDef.h>
-#ifdef USING_BORROWED_QCOLLECTION
-
-#include <_qcollection.h>
-
-#else
-
class QPtrCollection {
public:
typedef void *Item;
@@ -63,7 +43,4 @@ class QPtrCollection {
bool del_item; // default FALSE
};
-#endif /* USING_BORROWED_QCOLLECTION */
-
#endif /* QCOLLECTION_H */
-
diff --git a/WebCore/kwq/qt/qcolor.h b/WebCore/kwq/qt/qcolor.h
index 5dd6583..b053692 100644
--- a/WebCore/kwq/qt/qcolor.h
+++ b/WebCore/kwq/qt/qcolor.h
@@ -31,7 +31,7 @@
#ifdef __OBJC__
@class NSColor;
#else
-typedef void NSColor;
+class NSColor;
#endif
typedef unsigned int QRgb; // RGB triplet
diff --git a/WebCore/kwq/qt/qcombobox.h b/WebCore/kwq/qt/qcombobox.h
index 6dcb390..9b5de69 100644
--- a/WebCore/kwq/qt/qcombobox.h
+++ b/WebCore/kwq/qt/qcombobox.h
@@ -26,35 +26,21 @@
#ifndef QCOMBOBOX_H_
#define QCOMBOBOX_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <KWQListBox.h>
-#include "qwidget.h"
+#include <qwidget.h>
#ifdef __OBJC__
-#import <Cocoa/Cocoa.h>
+ at class NSMutableArray;
+#else
+class NSMutableArray;
#endif
-// class QComboBox =============================================================
-
class QComboBox : public QWidget {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QComboBox(QWidget *parent=0, const char *name=0);
QComboBox(bool rw, QWidget *parent=0, const char *name=0);
~QComboBox();
- // member functions --------------------------------------------------------
-
int count() const;
QListBox *listBox() const;
void popup();
@@ -63,34 +49,14 @@ public:
void clear();
int currentItem() const;
-#ifdef _KWQ_
int indexOfCurrentItem();
-#endif
virtual void setCurrentItem(int);
QSize sizeHint() const;
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
NSMutableArray *items;
-#else
- void *items;
-#endif
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-
-// private ---------------------------------------------------------------------
private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QComboBox(const QComboBox &);
- QComboBox &operator=(const QComboBox &);
-
-#ifdef _KWQ_
void init(bool isEditable);
-
-#endif
-
-}; // class QComboBox ==========================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qcursor.h b/WebCore/kwq/qt/qcursor.h
index 69c8d3f..dc8f6ce 100644
--- a/WebCore/kwq/qt/qcursor.h
+++ b/WebCore/kwq/qt/qcursor.h
@@ -26,53 +26,31 @@
#ifndef QCURSOR_H
#define QCURSOR_H
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <qpixmap.h>
#include <qpoint.h>
#ifdef __OBJC__
-#import <AppKit/AppKit.h>
+ at class NSCursor;
+#else
+class NSCursor;
#endif
-// class QCursor ===============================================================
-
class QCursor {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
static QPoint pos();
- // constructors, copy constructors, and destructors ------------------------
-
- QCursor();
- QCursor(const QPixmap &pixmap, int hotX=1, int hotY=1);
- QCursor(const QCursor &);
-#ifdef __OBJC__
- QCursor(NSCursor *);
-#endif
- ~QCursor();
-
- // member functions --------------------------------------------------------
-
- int handle();
-
- // operators ---------------------------------------------------------------
+ QCursor();
+ QCursor(const QPixmap &);
+ QCursor(NSCursor *);
+ QCursor(const QCursor &);
+ ~QCursor();
QCursor &operator=(const QCursor &);
+
+ int handle() const;
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
private:
-#ifdef __OBJC__
NSCursor *cursor;
-#endif
-}; // class QCursor ============================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qdatastream.h b/WebCore/kwq/qt/qdatastream.h
deleted file mode 100644
index c9cbf05..0000000
--- a/WebCore/kwq/qt/qdatastream.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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 QDATASTREAM_H_
-#define QDATASTREAM_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// class QDataStream ===========================================================
-
-class QDataStream {
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QDataStream();
- virtual ~QDataStream();
-
- // member functions --------------------------------------------------------
-
- // operators ---------------------------------------------------------------
-
- QDataStream &operator<<(Q_INT8 i);
- QDataStream &operator<<(Q_INT16 i);
- QDataStream &operator<<(Q_INT32 i);
- QDataStream &operator<<(Q_INT64 i);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QDataStream ========================================================
-
-inline QDataStream &QDataStream::operator<<( Q_UINT8 i )
-{ return *this << (Q_INT8)i; }
-
-inline QDataStream &QDataStream::operator<<( Q_UINT16 i )
-{ return *this << (Q_INT16)i; }
-
-inline QDataStream &QDataStream::operator<<( Q_UINT32 i )
-{ return *this << (Q_INT32)i; }
-
-inline QDataStream &QDataStream::operator<<( Q_UINT64 i )
-{ return *this << (Q_INT64)i; }
-
-#endif
diff --git a/WebCore/kwq/qt/qdir.h b/WebCore/kwq/qt/qdir.h
deleted file mode 100644
index fcfe50b..0000000
--- a/WebCore/kwq/qt/qdir.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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 QDIR_H_
-#define QDIR_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// USING_BORROWED_QDIR =========================================================
-
-#ifdef USING_BORROWED_QDIR
-#include <_qdir.h>
-#else
-
-#include <KWQDef.h>
-#include "qstring.h"
-#include "qstringlist.h"
-#include "qfile.h"
-
-// class QDir ==================================================================
-
-class QDir {
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QDir();
- QDir(const QString &);
- QDir(const QDir &);
- ~QDir();
-
- // member functions --------------------------------------------------------
-
- QString absPath() const;
- QString absFilePath( const QString &fileName) const;
- bool cdUp();
- bool exists(const QString&) const;
- QStringList entryList(const QString &nameFilter);
-
- // operators ---------------------------------------------------------------
-
- QDir &operator=(const QDir &);
- private:
- void swap(QDir &other);
-
- class KWQDirPrivate;
-
- KWQDirPrivate *d;
-}; // class QDir ===============================================================
-
-#endif // USING_BORROWED_QDIR
-
-#endif
diff --git a/WebCore/kwq/qt/qdrawutil.h b/WebCore/kwq/qt/qdrawutil.h
index 20ca608..3393e7c 100644
--- a/WebCore/kwq/qt/qdrawutil.h
+++ b/WebCore/kwq/qt/qdrawutil.h
@@ -26,10 +26,6 @@
#ifndef QDRAWUTIL_H_
#define QDRAWUTIL_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include "qpainter.h"
#include "qpalette.h"
#include "qbrush.h"
diff --git a/WebCore/kwq/qt/qevent.h b/WebCore/kwq/qt/qevent.h
index 3dbf7ba..bc8ebcc 100644
--- a/WebCore/kwq/qt/qevent.h
+++ b/WebCore/kwq/qt/qevent.h
@@ -26,22 +26,14 @@
#ifndef QEVENT_H_
#define QEVENT_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qnamespace.h"
-#include "qregion.h"
-#include "qpoint.h"
-
-// class QEvent ================================================================
+#include <qnamespace.h>
+#include <qregion.h>
+#include <qpoint.h>
+#include <qstring.h>
class QEvent : public Qt {
public:
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
-
enum Type {
None,
Enter,
@@ -59,71 +51,23 @@ public:
Paint,
};
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QEvent() {}
-#endif
-
QEvent( Type t ) : _type(t) {}
virtual ~QEvent();
- // member functions --------------------------------------------------------
-
Type type() const;
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
QEvent(const QEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
QEvent &operator=(const QEvent &);
-#endif
- Type _type;
-}; // class QEvent =============================================================
-
-// class QMouseEvent ===========================================================
+ Type _type;
+};
class QMouseEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QMouseEvent() {}
-#endif
-
QMouseEvent(Type type, const QPoint &pos, int button, int state);
QMouseEvent(Type type, const QPoint &pos, const QPoint &global, int button, int state);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QMouseEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
-
int x();
int y();
int globalX();
@@ -133,89 +77,28 @@ public:
ButtonState state();
ButtonState stateAfter();
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QMouseEvent(const QMouseEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QMouseEvent &operator=(const QMouseEvent &);
-#endif
QPoint _position;
- int _button; // ### Make ushort in 3.0? Here it's an int...
- ushort _state; // ### ...and here an ushort. But both are ButtonState!
-
-}; // class QMouseEvent ========================================================
+ ButtonState _button;
+ ButtonState _state;
-
-// class QTimerEvent ===========================================================
+};
class QTimerEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QTimerEvent() {}
-#endif
-
QTimerEvent(int timerId);
-
~QTimerEvent();
- // member functions --------------------------------------------------------
-
- int timerId() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
- int _timerId;
-}; // class QTimerEvent ========================================================
+ int timerId() const { return _timerId; }
-
-// class QKeyEvent =============================================================
+private:
+ int _timerId;
+};
class QKeyEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QKeyEvent() {}
-#endif
-
QKeyEvent(Type type, int key, int ascii, int buttonState, const QString &textVal = QString::null, bool autoRepeat = FALSE, ushort countVal = 1);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QKeyEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
-
int key() const;
ButtonState state() const;
void accept();
@@ -225,314 +108,53 @@ public:
int count() const;
QString text() const;
int ascii() const;
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QKeyEvent(const QKeyEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QKeyEvent &operator=(const QKeyEvent &);
-#endif
-
-}; // class QKeyEvent ==========================================================
-
-
-// class QFocusEvent ===========================================================
+};
class QFocusEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
-
enum Reason { Mouse, Tab, ActiveWindow, Popup, Shortcut, Other };
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QFocusEvent() {}
-#endif
-
QFocusEvent(Type);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QFocusEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
-
static Reason reason();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QFocusEvent(const QFocusEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QFocusEvent &operator=(const QFocusEvent &);
-#endif
-
-}; // class QFocusEvent ========================================================
-
-
-// class QHideEvent ============================================================
+};
class QHideEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QHideEvent() {}
-#endif
-
QHideEvent(Type);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QHideEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QHideEvent(const QHideEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QHideEvent &operator=(const QHideEvent &);
-#endif
-
-}; // class QHideEvent =========================================================
-
-
-// class QResizeEvent ==========================================================
+};
class QResizeEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QResizeEvent() {}
-#endif
-
QResizeEvent(Type);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QResizeEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QResizeEvent(const QResizeEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QResizeEvent &operator=(const QResizeEvent &);
-#endif
-
-}; // class QResizeEvent =======================================================
-
-
-// class QShowEvent ============================================================
+};
class QShowEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QShowEvent() {}
-#endif
-
QShowEvent(Type);
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QShowEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QShowEvent(const QShowEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QShowEvent &operator=(const QShowEvent &);
-#endif
-
-}; // class QShowEvent =========================================================
-
-
-// class QWheelEvent ===========================================================
+};
class QWheelEvent : public QEvent {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QWheelEvent() {}
-#endif
-
QWheelEvent(Type);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QWheelEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
-
void accept();
void ignore();
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QWheelEvent(const QWheelEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QWheelEvent &operator=(const QWheelEvent &);
-#endif
-
-}; // class QWheelEvent ========================================================
-
-
-// class QCustomEvent ===========================================================
+};
class QCustomEvent : public QEvent {
public:
QCustomEvent( int type );
QCustomEvent( Type type, void *data )
: QEvent(type), d(data) {};
+
void *data() const { return d; }
void setData( void* data ) { d = data; }
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QCustomEvent() {}
-#endif
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
private:
void *d;
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QCustomEvent(const QCustomEvent &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QCustomEvent &operator=(const QCustomEvent &);
-#endif
-
};
-// class QContextMenuEvent ========================================================
-
class QContextMenuEvent : public QEvent
{
public:
@@ -549,6 +171,6 @@ class QContextMenuEvent : public QEvent
QPoint m_pos;
QPoint m_globalPos;
ButtonState m_state;
-}; // class QContextMenuEvent ========================================================
+};
#endif
diff --git a/WebCore/kwq/qt/qfont.h b/WebCore/kwq/qt/qfont.h
index ee46888..999095e 100644
--- a/WebCore/kwq/qt/qfont.h
+++ b/WebCore/kwq/qt/qfont.h
@@ -32,7 +32,7 @@ class QPainter;
#ifdef __OBJC__
@class NSString;
#else
-typedef void NSString;
+class NSString;
#endif
class QFont {
diff --git a/WebCore/kwq/qt/qfontdatabase.h b/WebCore/kwq/qt/qfontdatabase.h
index 1893d78..e69de29 100644
--- a/WebCore/kwq/qt/qfontdatabase.h
+++ b/WebCore/kwq/qt/qfontdatabase.h
@@ -1,88 +0,0 @@
-/*
- * 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 QFONTDATABASE_H_
-#define QFONTDATABASE_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qvaluelist.h"
-#include "qfont.h"
-#include "qstring.h"
-
-// class QFontDatabase =========================================================
-
-class QFontDatabase {
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QFontDatabase();
-
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QFontDatabase() {}
-#endif
-
- // member functions --------------------------------------------------------
-
- QFont font(const QString, const QString &, int,
- const QString charSetName = QString::null);
- bool isSmoothlyScalable(const QString &family,
- const QString &style=QString::null,
- const QString &charSet=QString::null) const;
- QValueList<int> smoothSizes(const QString &, const QString &,
- const QString &charSet = QString::null);
- QString styleString(const QFont &);
-
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
-
-// add copy constructor
-// this private declaration prevents copying
-#ifdef _KWQ_PEDANTIC_
- QFontDatabase(const QFontDatabase &);
-#endif
-
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QFontDatabase &operator=(const QFontDatabase &);
-#endif
-
-}; // class QFontDatabase ======================================================
-
-#endif
diff --git a/WebCore/kwq/qt/qfontinfo.h b/WebCore/kwq/qt/qfontinfo.h
index 9699903..ed1bf2c 100644
--- a/WebCore/kwq/qt/qfontinfo.h
+++ b/WebCore/kwq/qt/qfontinfo.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,39 +26,15 @@
#ifndef QFONTINFO_H_
#define QFONTINFO_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qfont.h"
-
-// class QFontInfo =============================================================
+#include <qfont.h>
class QFontInfo {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QFontInfo(const QFont &);
- QFontInfo(const QFontInfo &);
- ~QFontInfo();
-
- // member functions --------------------------------------------------------
-
bool fixedPitch() const;
- // operators ---------------------------------------------------------------
-
- QFontInfo &operator=(const QFontInfo &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QFontInfo ==========================================================
+private:
+ QFont font;
+};
#endif
diff --git a/WebCore/kwq/qt/qimage.h b/WebCore/kwq/qt/qimage.h
index bfc343e..1c23b6a 100644
--- a/WebCore/kwq/qt/qimage.h
+++ b/WebCore/kwq/qt/qimage.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,56 +26,6 @@
#ifndef QIMAGE_H_
#define QIMAGE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qnamespace.h"
-#include "qcolor.h"
-
-// class QImage ================================================================
-
-class QImage {
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
- QImage();
- QImage(const QImage &);
- ~QImage();
-
- // member functions --------------------------------------------------------
-
- bool isNull();
-
- QRgb color(int) const;
- void setColor(int, QRgb);
-
- int width() const;
- int height() const;
- int depth() const;
- int pixelIndex(int,int) const;
-
- bool create(int,int,int,int numColors=0);
-
- QImage createAlphaMask(int conversion_flags=0) const;
- bool hasAlphaBuffer() const;
-
- uchar **jumpTable() const;
- uchar *scanLine(int) const;
-
- // operators ---------------------------------------------------------------
-
- QImage &operator=(const QImage &);
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-}; // class QImage =============================================================
+class QImage { };
#endif
diff --git a/WebCore/kwq/qt/qinputdialog.h b/WebCore/kwq/qt/qinputdialog.h
index b639e8f..df06288 100644
--- a/WebCore/kwq/qt/qinputdialog.h
+++ b/WebCore/kwq/qt/qinputdialog.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,53 +26,15 @@
#ifndef QINPUTDIALOG_H_
#define QINPUTDIALOG_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "qstring.h"
-#include "qlabel.h"
-#include "qwidget.h"
-#include "qlineedit.h"
-
-// class QInputDialog ==========================================================
+#include <qstring.h>
+#include <qlabel.h>
+#include <qwidget.h>
+#include <qlineedit.h>
class QInputDialog {
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
-
- // static member functions -------------------------------------------------
-
static QString getText(const QString &, const QString &, QLineEdit::EchoMode,
- const QString &text=QString::null, bool *ok=0, QWidget *parent=0,
- const char *name=0);
-
- // constructors, copy constructors, and destructors ------------------------
+ const QString &text=QString::null, bool *ok=0);
+};
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QInputDialog() {}
#endif
-
- QInputDialog(const QString &label);
- ~QInputDialog() {}
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QInputDialog(const QInputDialog &);
- QInputDialog &operator=(const QInputDialog &);
-
-}; // class QInputDialog =======================================================
-
-#endif
-
diff --git a/WebCore/kwq/qt/qintcache.h b/WebCore/kwq/qt/qintcache.h
index 8ac1b75..e69de29 100644
--- a/WebCore/kwq/qt/qintcache.h
+++ b/WebCore/kwq/qt/qintcache.h
@@ -1,33 +0,0 @@
-/*
- * 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 QINTCACHE_H_
-#define QINTCACHE_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#endif
diff --git a/WebCore/kwq/qt/qintdict.h b/WebCore/kwq/qt/qintdict.h
index 998868a..e69de29 100644
--- a/WebCore/kwq/qt/qintdict.h
+++ b/WebCore/kwq/qt/qintdict.h
@@ -1,33 +0,0 @@
-/*
- * 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 QINTDICT_H_
-#define QINTDICT_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#endif
diff --git a/WebCore/kwq/qt/qlayout.h b/WebCore/kwq/qt/qlayout.h
deleted file mode 100644
index 073e191..0000000
--- a/WebCore/kwq/qt/qlayout.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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 QLAYOUT_H_
-#define QLAYOUT_H_
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#endif
diff --git a/WebCore/kwq/qt/qpaintdevice.h b/WebCore/kwq/qt/qpaintdevice.h
index a3ef57c..9635951 100644
--- a/WebCore/kwq/qt/qpaintdevice.h
+++ b/WebCore/kwq/qt/qpaintdevice.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -26,42 +26,8 @@
#ifndef QPAINTDEVICE_H_
#define QPAINTDEVICE_H_
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-// class QPaintDevice ==========================================================
-
-class QPaintDevice {
-friend class QPaintDeviceMetrics;
-public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
-// add no-arg constructor
-#ifdef _KWQ_PEDANTIC_
- QPaintDevice() {}
-#endif
-
- virtual ~QPaintDevice();
-
- // member functions --------------------------------------------------------
- // operators ---------------------------------------------------------------
-
-// protected -------------------------------------------------------------------
-// private ---------------------------------------------------------------------
-
-private:
- // no copying or assignment
- // note that these are "standard" (no pendantic stuff needed)
- QPaintDevice(const QPaintDevice &);
- QPaintDevice &operator=(const QPaintDevice &);
+class QPaintDeviceMetrics;
-}; // class QPaintDevice =======================================================
+class QPaintDevice { };
#endif
diff --git a/WebCore/kwq/qt/qpixmap.h b/WebCore/kwq/qt/qpixmap.h
index 44f44c5..9d0853c 100644
--- a/WebCore/kwq/qt/qpixmap.h
+++ b/WebCore/kwq/qt/qpixmap.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 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
@@ -37,24 +37,16 @@
#ifdef __OBJC__
@protocol WebCoreImageRenderer;
+typedef id <WebCoreImageRenderer> WebCoreImageRendererPtr;
+#else
+class WebCoreImageRenderer;
+typedef WebCoreImageRenderer *WebCoreImageRendererPtr;
#endif
-class QBitmap;
class QWMatrix;
-// class QPixmap ===============================================================
-
class QPixmap : public QPaintDevice, public Qt {
-friend class QPainter;
public:
-
- // typedefs ----------------------------------------------------------------
- // enums -------------------------------------------------------------------
- // constants ---------------------------------------------------------------
- // static member functions -------------------------------------------------
-
- // constructors, copy constructors, and destructors ------------------------
-
QPixmap();
QPixmap(const QSize&);
QPixmap(const QByteArray&);
@@ -62,11 +54,6 @@ public:
QPixmap(const QPixmap &);
~QPixmap();
- // member functions --------------------------------------------------------
-
- void setMask(const QBitmap &);
- const QBitmap *mask() const;
-
bool isNull() const;
QSize size() const;
@@ -78,23 +65,19 @@ public:
QPixmap xForm(const QWMatrix &) const;
QImage convertToImage() const;
-
- // operators ---------------------------------------------------------------
+
+ bool mask() const;
QPixmap &operator=(const QPixmap &);
-#ifdef __OBJC__
- const id <WebCoreImageRenderer>getImageRenderer() const { return imageRenderer; }
-#endif
+ WebCoreImageRendererPtr getImageRenderer() const { return imageRenderer; }
private:
-#ifdef __OBJC__
- id <WebCoreImageRenderer>imageRenderer;
-#else
- void *imageRenderer;
-#endif
+ WebCoreImageRendererPtr imageRenderer;
bool needCopyOnWrite;
-}; // class QPixmap ============================================================
+ friend class QPainter;
+
+};
#endif
diff --git a/WebCore/kwq/qt/qstring.h b/WebCore/kwq/qt/qstring.h
index 1b52a70..f52f7a0 100644
--- a/WebCore/kwq/qt/qstring.h
+++ b/WebCore/kwq/qt/qstring.h
@@ -44,7 +44,7 @@ class QRegExp;
#ifdef __OBJC__
@class NSString;
#else
-typedef void NSString;
+class NSString;
#endif
// QChar class =================================================================
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list