[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:47:47 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 87b880a88395644d8571ab48fb116e58201ce0bc
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 28 02:36:06 2001 +0000
*** empty log message ***
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/Makefile.rules.in b/WebCore/Makefile.rules.in
index e8b402d..6ff532c 100644
--- a/WebCore/Makefile.rules.in
+++ b/WebCore/Makefile.rules.in
@@ -26,13 +26,16 @@ $(filter %.cpp,$(CXXYACCOBJECTS)): %.cpp: %.y
$(filter %.o,$(COBJECTS)): %.o: %.c
$(CC) $(CFLAGS) -I$(TOPSRCDIR) -c $< -o $@
-$(filter %.o,$(COBJECTS)): %.o: %.mm
+$(filter %.o,$(CMMOBJECTS)): %.o: %.mm
+ $(CC) $(CFLAGS) -I$(TOPSRCDIR) -c $< -o $@
+
+$(filter %.o,$(CMOBJECTS)): %.o: %.m
$(CC) $(CFLAGS) -I$(TOPSRCDIR) -c $< -o $@
$(filter %.o,$(CXXOBJECTS)): %.o: %.cpp
$(CXX) $(CXXFLAGS) -I$(TOPSRCDIR) -c $< -o $@
-.SUFFIXES: .cpp .h .c .mm
+.SUFFIXES: .cpp .h .c .mm .m
.cpp.o:
$(CXX) $(CXXFLAGS) -I$(TOPSRCDIR) -c $< -o $@
@@ -40,6 +43,9 @@ $(filter %.o,$(CXXOBJECTS)): %.o: %.cpp
.mm.o:
$(CC) $(CMMFLAGS) -I$(TOPSRCDIR) -c $< -o $@
+.m.o:
+ $(CC) $(CMFLAGS) -I$(TOPSRCDIR) -c $< -o $@
+
#----------------------------------------------------------------------
# Standard subdir targets
diff --git a/WebCore/kwq/KWQApplication.h b/WebCore/kwq/KWQApplication.h
index 9970059..0b98384 100644
--- a/WebCore/kwq/KWQApplication.h
+++ b/WebCore/kwq/KWQApplication.h
@@ -34,6 +34,11 @@
#include "qpalette.h"
#include "qsize.h"
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
+
+
// class QApplication ==========================================================
class QApplication {
@@ -63,6 +68,11 @@ public:
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 --------------------------------------------------------
// operators ---------------------------------------------------------------
@@ -76,6 +86,17 @@ private:
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 =======================================================
#endif
diff --git a/WebCore/kwq/KWQBrush.h b/WebCore/kwq/KWQBrush.h
index b8367fa..774d9ae 100644
--- a/WebCore/kwq/KWQBrush.h
+++ b/WebCore/kwq/KWQBrush.h
@@ -61,7 +61,8 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
-
+ QColor qcolor;
+ BrushStyle qbrushstyle;
}; // class QBrush =============================================================
diff --git a/WebCore/kwq/KWQColor.h b/WebCore/kwq/KWQColor.h
index 5603b82..4eb5306 100644
--- a/WebCore/kwq/KWQColor.h
+++ b/WebCore/kwq/KWQColor.h
@@ -30,14 +30,15 @@
#include <config.h>
#endif
-// USING_BORROWED_QCOLOR =======================================================
+#include <qnamespace.h>
+#include <qstring.h>
-#ifdef USING_BORROWED_QCOLOR
-#include <_qcolor.h>
-#else
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
-#include "qnamespace.h"
-#include "qstring.h"
+
+typedef unsigned int QRgb; // RGB triplet
QRgb qRgb(int r, int g, int b);
QRgb qRgba(int r, int g, int b, int a);
@@ -59,10 +60,7 @@ public:
QColor(const char *);
QColor(const QColor &);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QColor() {}
-#endif
+ ~QColor();
// member functions --------------------------------------------------------
@@ -91,9 +89,26 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+ static bool globals_init;
-}; // class QColor =============================================================
+ void initGlobalColors();
+
+#ifdef _KWQ_
+ void _initialize(int,int,int);
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSColor *getNSColor();
+#else
+ void *getNSColor();
+#endif
-#endif // USING_BORROWED_QCOLOR
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSColor *color;
+#else
+ void *color;
+#endif
+#endif
+
+}; // class QColor =============================================================
#endif
diff --git a/WebCore/kwq/KWQEvent.h b/WebCore/kwq/KWQEvent.h
index ba7d057..06a3726 100644
--- a/WebCore/kwq/KWQEvent.h
+++ b/WebCore/kwq/KWQEvent.h
@@ -309,7 +309,9 @@ public:
#ifdef _KWQ_PEDANTIC_
QHideEvent() {}
#endif
-
+
+ QHideEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QHideEvent() {}
@@ -355,6 +357,8 @@ public:
QResizeEvent() {}
#endif
+ QResizeEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QResizeEvent() {}
@@ -400,6 +404,8 @@ public:
QShowEvent() {}
#endif
+ QShowEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QShowEvent() {}
@@ -445,6 +451,8 @@ public:
QWheelEvent() {}
#endif
+ QWheelEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QWheelEvent() {}
diff --git a/WebCore/kwq/KWQFont.h b/WebCore/kwq/KWQFont.h
index bc2042e..27dcb7d 100644
--- a/WebCore/kwq/KWQFont.h
+++ b/WebCore/kwq/KWQFont.h
@@ -32,6 +32,10 @@
class QString;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
+
// class QFont =================================================================
class QFont {
@@ -51,6 +55,7 @@ public:
QFont();
QFont(const QFont &);
+
~QFont();
// member functions --------------------------------------------------------
@@ -71,8 +76,32 @@ public:
bool operator==(const QFont &x) const;
bool operator!=(const QFont &x) const;
+#ifdef _KWQ_
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ static NSFont *QFont::defaultNSFont();
+#endif
+#endif
+
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+#ifdef _KWQ_
+ void _initialize();
+ void _initializeWithFont(const QFont *);
+ void _free();
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ void _setTrait (NSFontTraitMask mask);
+#endif
+
+ struct KWQFontData {
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSFont *font;
+#else
+ void *font;
+#endif
+ } *data;
+
+ void _freeWithData(struct KWQFontData *);
+#endif
}; // class QFont ==============================================================
diff --git a/WebCore/kwq/KWQFontMetrics.h b/WebCore/kwq/KWQFontMetrics.h
index b872af1..69fc51e 100644
--- a/WebCore/kwq/KWQFontMetrics.h
+++ b/WebCore/kwq/KWQFontMetrics.h
@@ -35,6 +35,10 @@
#include "qstring.h"
#include "qfont.h"
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
+
// class QFontMetrics ==========================================================
class QFontMetrics {
@@ -73,6 +77,21 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+#ifdef _KWQ_
+ void _initialize();
+ void _initializeWithFont(NSFont *);
+ void _free();
+
+ struct KWQFontMetricsData {
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSFont *font;
+#else
+ void *font;
+#endif
+ } *data;
+#endif
+
+ void _freeWithData(struct KWQFontMetricsData *);
}; // class QFontMetrics =======================================================
diff --git a/WebCore/kwq/KWQPainter.h b/WebCore/kwq/KWQPainter.h
index 2f9745c..7fdd766 100644
--- a/WebCore/kwq/KWQPainter.h
+++ b/WebCore/kwq/KWQPainter.h
@@ -42,10 +42,12 @@
class QFont;
class QPixmap;
+class QWidget;
// class QWMatrix ==============================================================
class QWMatrix {
+friend QPainter;
public:
// typedefs ----------------------------------------------------------------
@@ -79,10 +81,10 @@ private:
QWMatrix(const QWMatrix &);
#endif
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QWMatrix &operator=(const QWMatrix &);
+#ifdef _KWQ_
+ bool empty;
+ double sx;
+ double sy;
#endif
}; // class QWMatrix ===========================================================
@@ -101,7 +103,14 @@ public:
// constructors, copy constructors, and destructors ------------------------
QPainter();
+
+ // We may be able to remove this constructor and remove QPaintDevice.
QPainter(const QPaintDevice *);
+
+#ifdef _KWQ_
+ QPainter(QWidget *);
+#endif
+
~QPainter();
// member functions --------------------------------------------------------
@@ -129,8 +138,9 @@ public:
int npoints=-1);
void drawPixmap(const QPoint &, const QPixmap &);
void drawPixmap(const QPoint &, const QPixmap &, const QRect &);
- void drawTiledPixmap(int, int, int, int, const QPixmap &, int sx=0,
- int sy=0);
+ void drawPixmap( int x, int y, const QPixmap &,
+ int sx=0, int sy=0, int sw=-1, int sh=-1 );
+ void drawTiledPixmap(int, int, int, int, const QPixmap &, int sx=0, int sy=0);
void drawText(int x, int y, const QString &, int len=-1);
void drawText(int, int, int, int, AlignmentFlags, const QString &);
void drawText(int, int, int, int, int flags, const QString&, int len=-1,
@@ -156,6 +166,26 @@ private:
QPainter(const QPainter &);
QPainter &operator=(const QPainter &);
+#ifdef _KWQ_
+ void _lockFocus();
+ void _unlockFocus();
+
+ void _setColorFromBrush();
+ void _setColorFromPen();
+
+ void _initialize(QWidget *widget);
+ void _drawPoints (const QPointArray &_points, bool winding, int index, int _npoints, bool fill);
+
+ struct KWQPainterData { // QPainter data.
+ QWidget *widget; // Has a reference to a KWQView.
+ QFont qfont;
+ QBrush qbrush;
+ QPen qpen;
+ uint isFocusLocked:1;
+ void *ps_stack;
+ NSCompositingOperation compositingOperation;
+ } *data;
+#endif
}; // end class QPainter
// =============================================================================
diff --git a/WebCore/kwq/KWQPen.h b/WebCore/kwq/KWQPen.h
index 9547532..014622b 100644
--- a/WebCore/kwq/KWQPen.h
+++ b/WebCore/kwq/KWQPen.h
@@ -56,10 +56,14 @@ public:
// operators ---------------------------------------------------------------
+ bool operator==(const QPen &) const;
+ bool operator!=(const QPen &) const;
+
QPen &operator=(const QPen &);
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+ QColor qcolor;
}; // class QPen ===============================================================
diff --git a/WebCore/kwq/KWQPixmap.h b/WebCore/kwq/KWQPixmap.h
index 0519a7a..34db834 100644
--- a/WebCore/kwq/KWQPixmap.h
+++ b/WebCore/kwq/KWQPixmap.h
@@ -37,6 +37,11 @@
#include "qimage.h"
#include "qsize.h"
#include "qrect.h"
+#include "qpainter.h"
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
class QBitmap;
class QWMatrix;
@@ -44,6 +49,7 @@ class QWMatrix;
// class QPixmap ===============================================================
class QPixmap : public QPaintDevice, public Qt {
+friend class QPainter;
public:
// typedefs ----------------------------------------------------------------
@@ -82,7 +88,14 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
-
+#ifdef _KWQ_
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSImage *nsimage;
+#else
+ void *nsimage;
+#endif
+ QWMatrix xmatrix;
+#endif
}; // class QPixmap ============================================================
#endif
diff --git a/WebCore/kwq/KWQPointArray.h b/WebCore/kwq/KWQPointArray.h
index 4408964..5a05dae 100644
--- a/WebCore/kwq/KWQPointArray.h
+++ b/WebCore/kwq/KWQPointArray.h
@@ -119,19 +119,24 @@ public:
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
- QPointArray(int);
+ QPointArray() {}
+ ~QPointArray() {}
+ QPointArray(int size) : QArray<QPoint> (size){};
+
QPointArray(const QPointArray &);
QPointArray(int, const QCOORD *);
- ~QPointArray();
// member functions --------------------------------------------------------
void setPoint(uint, int, int);
bool setPoints(int, int, int, ...);
-
+ bool setPoints( int nPoints, const QCOORD *points );
+
// operators ---------------------------------------------------------------
- QPointArray &operator=(const QPointArray &);
+ //QPointArray &operator=(const QPointArray &);
+ QPointArray &operator=( const QPointArray &a )
+ { return (QPointArray&)assign( a ); }
#ifdef _KWQ_IOSTREAM_
friend ostream &operator<<(ostream &, const QPoint &);
diff --git a/WebCore/kwq/KWQString.h b/WebCore/kwq/KWQString.h
index 958682e..62310e0 100644
--- a/WebCore/kwq/KWQString.h
+++ b/WebCore/kwq/KWQString.h
@@ -30,10 +30,19 @@
#include <config.h>
#endif
-// USING_BORROWED_QSTRING ======================================================
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+// These macros are TEMPORARY hacks to convert between NSString and QString. They
+// should be replaced with correct implementations. They should only be used
+// for immutable strings.
+#define QSTRING_TO_NSSTRING(aString) [NSString stringWithCString: aString.latin1()]
+#define QSTRING_TO_NSSTRING_LENGTH(aString,l) [NSString stringWithCString: aString.latin1() length: l]
+#define NSSTRING_TO_QSTRING(aString) QString([aString cString])
+#endif
+// USING_BORROWED_QSTRING ======================================================
#ifdef USING_BORROWED_QSTRING
#include <_qstring.h>
+
#else
// FIXME: this clever hack may need to be moved into KWQDef.h or elsewhere
diff --git a/WebCore/kwq/KWQView.h b/WebCore/kwq/KWQView.h
new file mode 100644
index 0000000..978770a
--- /dev/null
+++ b/WebCore/kwq/KWQView.h
@@ -0,0 +1,11 @@
+#import <Cocoa/Cocoa.h>
+
+
+class QWidget;
+
+ at interface KWQView : NSView
+{
+ QWidget *widget;
+}
+- initWithFrame: (NSRect)r widget: (QWidget *)w;
+ at end
diff --git a/WebCore/kwq/KWQWidget.h b/WebCore/kwq/KWQWidget.h
index fc6db30..233d19a 100644
--- a/WebCore/kwq/KWQWidget.h
+++ b/WebCore/kwq/KWQWidget.h
@@ -41,8 +41,24 @@
#include "qevent.h"
#include <KWQStyle.h>
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#define Fixed MacFixed
+#define Rect MacRect
+#define Boolean MacBoolean
+
+#import <Cocoa/Cocoa.h>
+
+#import "KWQView.h"
+
+#undef Fixed
+#undef Rect
+#undef Boolean
+#endif
+
// class QWidget ===============================================================
+// FIX ME! RJW - need to check if inheritance from QPaintDevice is really necessary.
+
class QWidget : public QObject, public QPaintDevice {
public:
@@ -116,6 +132,19 @@ public:
virtual void show();
virtual void hide();
+ // Required for KWQ
+#ifdef _KWQ_
+
+ virtual void paint (void *);
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ KWQView *getView();
+#else
+ void *getView();
+#endif
+
+#endif _KWQ_
+
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
@@ -127,6 +156,26 @@ private:
QWidget(const QWidget &);
QWidget &operator=(const QWidget &);
+ void setCRect( const QRect &r );
+ void internalSetGeometry( int x, int y, int w, int h, bool isMove );
+
+ void _initialize();
+
+ struct KWQWidgetData { // Widget data.
+ QPoint pos;
+ QRect rect;
+ FocusPolicy focusPolicy;
+ QStyle *style;
+ QFont *font;
+ QCursor *cursor;
+ QPalette pal;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ KWQView *view;
+#else
+ void *view;
+#endif
+ } *data;
+
}; // class QWidget ============================================================
#endif
diff --git a/WebCore/kwq/Makefile.in b/WebCore/kwq/Makefile.in
index 6000e8a..95ab3cd 100644
--- a/WebCore/kwq/Makefile.in
+++ b/WebCore/kwq/Makefile.in
@@ -22,13 +22,23 @@ SOURCES = $(wildcard *.mm)
HEADERS = $(wildcard *.h)
MMOBJECTS = \
+ _KWQOwner.o \
KWQApplication.o \
KWQBrush.o \
+ KWQColor.o \
+ KWQColorGroup.o \
+ KWQCursor.o \
KWQFont.o \
KWQFontMetrics.o \
+ KWQObject.o \
KWQPainter.o \
+ KWQPaintDevice.o \
+ KWQPaintDeviceMetrics.o \
+ KWQPalette.o \
KWQPen.o \
KWQPixmap.o \
+ KWQPointArray.o \
+ KWQView.o \
KWQWMatrix.o \
KWQWidget.o \
KWQChar.o \
@@ -36,7 +46,10 @@ MMOBJECTS = \
KWQCString.o \
$(NULL)
-OBJECTS = $(MMOBJECTS)
+MOBJECTS = \
+ $(NULL)
+
+OBJECTS = $(MMOBJECTS) $(MOBJECTS)
LIBRARY = libkwq.a
@@ -48,6 +61,7 @@ CLEAN_FILES = $(OBJECTS) \
# Set flags for this directory
CMMFLAGS = $(BASECMMFLAGS) \
+ -g \
-I$(TOPSRCDIR) \
-I$(TOPSRCDIR)/src/kwq \
-I$(TOPSRCDIR)/src/kwq/qt \
@@ -56,13 +70,22 @@ CMMFLAGS = $(BASECMMFLAGS) \
DEPFLAGS = $(CMMFLAGS)
+CMFLAGS = $(BASECMFLAGS) \
+ -I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/src/kwq \
+ -I$(TOPSRCDIR)/src/kwq/qt \
+ -I. \
+ $(NULL)
+
+DEPFLAGS = $(CMFLAGS)
+
#----------------------------------------------------------------------
# Set targets for this directory
all: $(OBJECTS) $(LIBRARY)
-$(LIBRARY): $(MMOBJECTS)
- $(AR) $(ARFLAGS) $(LIBRARY) $(MMOBJECTS)
+$(LIBRARY): $(OBJECTS)
+ $(AR) $(ARFLAGS) $(LIBRARY) $(OBJECTS)
$(RANLIB) $(LIBRARY)
#----------------------------------------------------------------------
diff --git a/WebCore/kwq/_KWQOwner.h b/WebCore/kwq/_KWQOwner.h
new file mode 100644
index 0000000..d230024
--- /dev/null
+++ b/WebCore/kwq/_KWQOwner.h
@@ -0,0 +1,7 @@
+#import <Cocoa/Cocoa.h>
+
+ at interface _KWQOwner : NSApplication
+{
+ IBOutlet id window;
+}
+ at end
diff --git a/WebCore/kwq/_KWQOwner.m b/WebCore/kwq/_KWQOwner.m
new file mode 100644
index 0000000..3e6a27c
--- /dev/null
+++ b/WebCore/kwq/_KWQOwner.m
@@ -0,0 +1,10 @@
+#import "_KWQOwner.h"
+
+ at implementation _KWQOwner
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+ NSLog (@"Did finish launching\n", nil);
+}
+
+ at end
diff --git a/WebCore/kwq/qt/qapplication.h b/WebCore/kwq/qt/qapplication.h
index 9970059..0b98384 100644
--- a/WebCore/kwq/qt/qapplication.h
+++ b/WebCore/kwq/qt/qapplication.h
@@ -34,6 +34,11 @@
#include "qpalette.h"
#include "qsize.h"
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
+
+
// class QApplication ==========================================================
class QApplication {
@@ -63,6 +68,11 @@ public:
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 --------------------------------------------------------
// operators ---------------------------------------------------------------
@@ -76,6 +86,17 @@ private:
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 =======================================================
#endif
diff --git a/WebCore/kwq/qt/qbrush.h b/WebCore/kwq/qt/qbrush.h
index b8367fa..774d9ae 100644
--- a/WebCore/kwq/qt/qbrush.h
+++ b/WebCore/kwq/qt/qbrush.h
@@ -61,7 +61,8 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
-
+ QColor qcolor;
+ BrushStyle qbrushstyle;
}; // class QBrush =============================================================
diff --git a/WebCore/kwq/qt/qcolor.h b/WebCore/kwq/qt/qcolor.h
index 5603b82..4eb5306 100644
--- a/WebCore/kwq/qt/qcolor.h
+++ b/WebCore/kwq/qt/qcolor.h
@@ -30,14 +30,15 @@
#include <config.h>
#endif
-// USING_BORROWED_QCOLOR =======================================================
+#include <qnamespace.h>
+#include <qstring.h>
-#ifdef USING_BORROWED_QCOLOR
-#include <_qcolor.h>
-#else
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
-#include "qnamespace.h"
-#include "qstring.h"
+
+typedef unsigned int QRgb; // RGB triplet
QRgb qRgb(int r, int g, int b);
QRgb qRgba(int r, int g, int b, int a);
@@ -59,10 +60,7 @@ public:
QColor(const char *);
QColor(const QColor &);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QColor() {}
-#endif
+ ~QColor();
// member functions --------------------------------------------------------
@@ -91,9 +89,26 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+ static bool globals_init;
-}; // class QColor =============================================================
+ void initGlobalColors();
+
+#ifdef _KWQ_
+ void _initialize(int,int,int);
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSColor *getNSColor();
+#else
+ void *getNSColor();
+#endif
-#endif // USING_BORROWED_QCOLOR
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSColor *color;
+#else
+ void *color;
+#endif
+#endif
+
+}; // class QColor =============================================================
#endif
diff --git a/WebCore/kwq/qt/qevent.h b/WebCore/kwq/qt/qevent.h
index ba7d057..06a3726 100644
--- a/WebCore/kwq/qt/qevent.h
+++ b/WebCore/kwq/qt/qevent.h
@@ -309,7 +309,9 @@ public:
#ifdef _KWQ_PEDANTIC_
QHideEvent() {}
#endif
-
+
+ QHideEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QHideEvent() {}
@@ -355,6 +357,8 @@ public:
QResizeEvent() {}
#endif
+ QResizeEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QResizeEvent() {}
@@ -400,6 +404,8 @@ public:
QShowEvent() {}
#endif
+ QShowEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QShowEvent() {}
@@ -445,6 +451,8 @@ public:
QWheelEvent() {}
#endif
+ QWheelEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QWheelEvent() {}
diff --git a/WebCore/kwq/qt/qfont.h b/WebCore/kwq/qt/qfont.h
index bc2042e..27dcb7d 100644
--- a/WebCore/kwq/qt/qfont.h
+++ b/WebCore/kwq/qt/qfont.h
@@ -32,6 +32,10 @@
class QString;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
+
// class QFont =================================================================
class QFont {
@@ -51,6 +55,7 @@ public:
QFont();
QFont(const QFont &);
+
~QFont();
// member functions --------------------------------------------------------
@@ -71,8 +76,32 @@ public:
bool operator==(const QFont &x) const;
bool operator!=(const QFont &x) const;
+#ifdef _KWQ_
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ static NSFont *QFont::defaultNSFont();
+#endif
+#endif
+
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+#ifdef _KWQ_
+ void _initialize();
+ void _initializeWithFont(const QFont *);
+ void _free();
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ void _setTrait (NSFontTraitMask mask);
+#endif
+
+ struct KWQFontData {
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSFont *font;
+#else
+ void *font;
+#endif
+ } *data;
+
+ void _freeWithData(struct KWQFontData *);
+#endif
}; // class QFont ==============================================================
diff --git a/WebCore/kwq/qt/qfontmetrics.h b/WebCore/kwq/qt/qfontmetrics.h
index b872af1..69fc51e 100644
--- a/WebCore/kwq/qt/qfontmetrics.h
+++ b/WebCore/kwq/qt/qfontmetrics.h
@@ -35,6 +35,10 @@
#include "qstring.h"
#include "qfont.h"
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
+
// class QFontMetrics ==========================================================
class QFontMetrics {
@@ -73,6 +77,21 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+#ifdef _KWQ_
+ void _initialize();
+ void _initializeWithFont(NSFont *);
+ void _free();
+
+ struct KWQFontMetricsData {
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSFont *font;
+#else
+ void *font;
+#endif
+ } *data;
+#endif
+
+ void _freeWithData(struct KWQFontMetricsData *);
}; // class QFontMetrics =======================================================
diff --git a/WebCore/kwq/qt/qpainter.h b/WebCore/kwq/qt/qpainter.h
index 2f9745c..7fdd766 100644
--- a/WebCore/kwq/qt/qpainter.h
+++ b/WebCore/kwq/qt/qpainter.h
@@ -42,10 +42,12 @@
class QFont;
class QPixmap;
+class QWidget;
// class QWMatrix ==============================================================
class QWMatrix {
+friend QPainter;
public:
// typedefs ----------------------------------------------------------------
@@ -79,10 +81,10 @@ private:
QWMatrix(const QWMatrix &);
#endif
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QWMatrix &operator=(const QWMatrix &);
+#ifdef _KWQ_
+ bool empty;
+ double sx;
+ double sy;
#endif
}; // class QWMatrix ===========================================================
@@ -101,7 +103,14 @@ public:
// constructors, copy constructors, and destructors ------------------------
QPainter();
+
+ // We may be able to remove this constructor and remove QPaintDevice.
QPainter(const QPaintDevice *);
+
+#ifdef _KWQ_
+ QPainter(QWidget *);
+#endif
+
~QPainter();
// member functions --------------------------------------------------------
@@ -129,8 +138,9 @@ public:
int npoints=-1);
void drawPixmap(const QPoint &, const QPixmap &);
void drawPixmap(const QPoint &, const QPixmap &, const QRect &);
- void drawTiledPixmap(int, int, int, int, const QPixmap &, int sx=0,
- int sy=0);
+ void drawPixmap( int x, int y, const QPixmap &,
+ int sx=0, int sy=0, int sw=-1, int sh=-1 );
+ void drawTiledPixmap(int, int, int, int, const QPixmap &, int sx=0, int sy=0);
void drawText(int x, int y, const QString &, int len=-1);
void drawText(int, int, int, int, AlignmentFlags, const QString &);
void drawText(int, int, int, int, int flags, const QString&, int len=-1,
@@ -156,6 +166,26 @@ private:
QPainter(const QPainter &);
QPainter &operator=(const QPainter &);
+#ifdef _KWQ_
+ void _lockFocus();
+ void _unlockFocus();
+
+ void _setColorFromBrush();
+ void _setColorFromPen();
+
+ void _initialize(QWidget *widget);
+ void _drawPoints (const QPointArray &_points, bool winding, int index, int _npoints, bool fill);
+
+ struct KWQPainterData { // QPainter data.
+ QWidget *widget; // Has a reference to a KWQView.
+ QFont qfont;
+ QBrush qbrush;
+ QPen qpen;
+ uint isFocusLocked:1;
+ void *ps_stack;
+ NSCompositingOperation compositingOperation;
+ } *data;
+#endif
}; // end class QPainter
// =============================================================================
diff --git a/WebCore/kwq/qt/qpen.h b/WebCore/kwq/qt/qpen.h
index 9547532..014622b 100644
--- a/WebCore/kwq/qt/qpen.h
+++ b/WebCore/kwq/qt/qpen.h
@@ -56,10 +56,14 @@ public:
// operators ---------------------------------------------------------------
+ bool operator==(const QPen &) const;
+ bool operator!=(const QPen &) const;
+
QPen &operator=(const QPen &);
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+ QColor qcolor;
}; // class QPen ===============================================================
diff --git a/WebCore/kwq/qt/qpixmap.h b/WebCore/kwq/qt/qpixmap.h
index 0519a7a..34db834 100644
--- a/WebCore/kwq/qt/qpixmap.h
+++ b/WebCore/kwq/qt/qpixmap.h
@@ -37,6 +37,11 @@
#include "qimage.h"
#include "qsize.h"
#include "qrect.h"
+#include "qpainter.h"
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
class QBitmap;
class QWMatrix;
@@ -44,6 +49,7 @@ class QWMatrix;
// class QPixmap ===============================================================
class QPixmap : public QPaintDevice, public Qt {
+friend class QPainter;
public:
// typedefs ----------------------------------------------------------------
@@ -82,7 +88,14 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
-
+#ifdef _KWQ_
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSImage *nsimage;
+#else
+ void *nsimage;
+#endif
+ QWMatrix xmatrix;
+#endif
}; // class QPixmap ============================================================
#endif
diff --git a/WebCore/kwq/qt/qpoint.h b/WebCore/kwq/qt/qpoint.h
index 4408964..5a05dae 100644
--- a/WebCore/kwq/qt/qpoint.h
+++ b/WebCore/kwq/qt/qpoint.h
@@ -119,19 +119,24 @@ public:
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
- QPointArray(int);
+ QPointArray() {}
+ ~QPointArray() {}
+ QPointArray(int size) : QArray<QPoint> (size){};
+
QPointArray(const QPointArray &);
QPointArray(int, const QCOORD *);
- ~QPointArray();
// member functions --------------------------------------------------------
void setPoint(uint, int, int);
bool setPoints(int, int, int, ...);
-
+ bool setPoints( int nPoints, const QCOORD *points );
+
// operators ---------------------------------------------------------------
- QPointArray &operator=(const QPointArray &);
+ //QPointArray &operator=(const QPointArray &);
+ QPointArray &operator=( const QPointArray &a )
+ { return (QPointArray&)assign( a ); }
#ifdef _KWQ_IOSTREAM_
friend ostream &operator<<(ostream &, const QPoint &);
diff --git a/WebCore/kwq/qt/qstring.h b/WebCore/kwq/qt/qstring.h
index 958682e..62310e0 100644
--- a/WebCore/kwq/qt/qstring.h
+++ b/WebCore/kwq/qt/qstring.h
@@ -30,10 +30,19 @@
#include <config.h>
#endif
-// USING_BORROWED_QSTRING ======================================================
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+// These macros are TEMPORARY hacks to convert between NSString and QString. They
+// should be replaced with correct implementations. They should only be used
+// for immutable strings.
+#define QSTRING_TO_NSSTRING(aString) [NSString stringWithCString: aString.latin1()]
+#define QSTRING_TO_NSSTRING_LENGTH(aString,l) [NSString stringWithCString: aString.latin1() length: l]
+#define NSSTRING_TO_QSTRING(aString) QString([aString cString])
+#endif
+// USING_BORROWED_QSTRING ======================================================
#ifdef USING_BORROWED_QSTRING
#include <_qstring.h>
+
#else
// FIXME: this clever hack may need to be moved into KWQDef.h or elsewhere
diff --git a/WebCore/kwq/qt/qwidget.h b/WebCore/kwq/qt/qwidget.h
index fc6db30..233d19a 100644
--- a/WebCore/kwq/qt/qwidget.h
+++ b/WebCore/kwq/qt/qwidget.h
@@ -41,8 +41,24 @@
#include "qevent.h"
#include <KWQStyle.h>
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#define Fixed MacFixed
+#define Rect MacRect
+#define Boolean MacBoolean
+
+#import <Cocoa/Cocoa.h>
+
+#import "KWQView.h"
+
+#undef Fixed
+#undef Rect
+#undef Boolean
+#endif
+
// class QWidget ===============================================================
+// FIX ME! RJW - need to check if inheritance from QPaintDevice is really necessary.
+
class QWidget : public QObject, public QPaintDevice {
public:
@@ -116,6 +132,19 @@ public:
virtual void show();
virtual void hide();
+ // Required for KWQ
+#ifdef _KWQ_
+
+ virtual void paint (void *);
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ KWQView *getView();
+#else
+ void *getView();
+#endif
+
+#endif _KWQ_
+
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
@@ -127,6 +156,26 @@ private:
QWidget(const QWidget &);
QWidget &operator=(const QWidget &);
+ void setCRect( const QRect &r );
+ void internalSetGeometry( int x, int y, int w, int h, bool isMove );
+
+ void _initialize();
+
+ struct KWQWidgetData { // Widget data.
+ QPoint pos;
+ QRect rect;
+ FocusPolicy focusPolicy;
+ QStyle *style;
+ QFont *font;
+ QCursor *cursor;
+ QPalette pal;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ KWQView *view;
+#else
+ void *view;
+#endif
+ } *data;
+
}; // class QWidget ============================================================
#endif
diff --git a/WebCore/kwq/tests/draw/Makefile b/WebCore/kwq/tests/draw/Makefile
index a835803..0bf1b90 100644
--- a/WebCore/kwq/tests/draw/Makefile
+++ b/WebCore/kwq/tests/draw/Makefile
@@ -1,10 +1,20 @@
-draw.o: draw.mm
- cc -c -I$(QTDIR)/include -fno-exceptions -pipe -g -o draw.o draw.mm
-draw: draw.o
- cc -L$(QTDIR)/lib -o ./draw draw.o -lqt -L/usr/X11R6/lib -lz -ljpeg -lXext -lX11 -framework Cocoa
+qdraw.o: draw.mm
+ cc -c -I$(QTDIR)/include -fno-exceptions -pipe -g -o qdraw.o draw.mm
+qdraw: qdraw.o
+ cc -L$(QTDIR)/lib -o ./qdraw qdraw.o -lqt -L/usr/X11R6/lib -lz -ljpeg -lXext -lX11 -framework Cocoa
+
+#kwqdraw.o: draw.mm
+# cc -c -DQT_NO_DATASTREAM -D_KWQ_COMPLETE_ -D_KWQ_ -I../.. -I../../qt -fno-exceptions -pipe -g -o kwqdraw.o draw.mm
+
+#kwqdraw: kwqdraw.o
+# cc -L$(QTDIR)/lib -o ./kwqdraw kwqdraw.o -L../.. -L../../qt -lkwq -l_qt -lstdc++ -framework Cocoa
+
+#clean:
+# rm *.o qdraw kwqdraw
clean:
- rm *.o draw
+ rm *.o qdraw
-all: draw
+#all: qdraw kwqdraw
+all: qdraw
\ No newline at end of file
diff --git a/WebCore/kwq/tests/draw/draw.mm b/WebCore/kwq/tests/draw/draw.mm
index 9072baf..bb2b07f 100644
--- a/WebCore/kwq/tests/draw/draw.mm
+++ b/WebCore/kwq/tests/draw/draw.mm
@@ -44,14 +44,15 @@
* QString
* QWidget
* QWMatrix
- *
- * Also needs QPaintEvent. This is only used by the Qt version of the app.
-*/
+ */
#include <qwidget.h>
#include <qpainter.h>
#include <qpixmap.h>
#include <qapplication.h>
+#include <qpoint.h>
+
+#include <config.h>
// Voodoo required to get compiler to compile correctly.
#undef DEBUG
@@ -70,9 +71,12 @@ void drawColors( QPainter *p )
int x = 0, y = 0, height, r = 0, g = 255, b = 125;
p->save();
- QFont f( "helvetica", 10, QFont::Bold );
+ QFont f;
+ f.setFamily( "helvetica" );
+ f.setPixelSizeFloat ((float) 10);
+ f.setWeight ( QFont::Bold );
p->setFont( f );
- p->setPen( Qt::black );
+ p->setPen( QPen(Qt::black) );
QFontMetrics fm = p->fontMetrics();
height = fm.height();
@@ -102,14 +106,19 @@ void drawImages( QPainter *p)
{
QByteArray *byteArray[3];
QPixmap *pixmap[3];
- NSString *files[3] = { @"qt.png", @"powermac.jpg", @"yahoo.gif" };
+ NSString *files[3] = { @"qt.png", @"powermac.jpg", @"yahoo.gif" }, *filename;
NSData *data[3];
int i;
QPoint *point;
for (i = 0; i < 3; i++){
point = new QPoint (10 + 60 * i, 200);
+#ifdef _KWQ_
+ filename = [NSString stringWithFormat: @"%@/%@", [[NSBundle mainBundle] resourcePath], files[i], nil];
+ data[i] = [[NSData alloc] initWithContentsOfFile: filename];
+#else
data[i] = [[NSData alloc] initWithContentsOfFile: files[i]];
+#endif
byteArray[i] = new QByteArray();
byteArray[i]->setRawData ((const char *)[data[i] bytes], (unsigned int)[data[i] length]);
pixmap[i] = new QPixmap (*byteArray[i]);
@@ -133,7 +142,8 @@ void drawImages( QPainter *p)
QSize imageSize = pixmap[i]->size();
- p->setPen( Qt::yellow );
+ // This should draw an empty rect, as brush isn't set to any color.
+ p->setPen( QPen(Qt::yellow) );
p->drawRect (point->x(), point->y(), imageSize.width(), imageSize.height());
p->setPen( Qt::blue );
@@ -147,10 +157,15 @@ void drawImages( QPainter *p)
p->drawLine (x, y, x + w, y + h);
p->drawLine (x, y + h, x + w, y);
+ x = 530; y = 70; w = 380, h = 325;
+ p->drawTiledPixmap (x, y, w, h, *pixmap[0], 0, 0);
+ p->drawLine (x, y, x + w, y + h);
+ p->drawLine (x, y + h, x + w, y);
+
for (i = 0; i < 3; i++){
- delete byteArray[i];
+ // Problematic, as QByteArray expects ownership. It will free() the bytes set from setRawData.
+ //delete byteArray[i];
delete pixmap[i];
- // Problematic, as QByteArray expects ownership.
//[data[i] release];
}
}
@@ -183,12 +198,17 @@ void drawFonts( QPainter *p )
while ( fonts[f] ) {
int s = 0;
while ( sizes[s] ) {
- QFont font( fonts[f], sizes[s] );
+ QFont font;
+ font.setFamily ( fonts[f] );
+ font.setPixelSizeFloat ( (float)sizes[s] );
p->setFont( font );
QFontMetrics fm = p->fontMetrics();
y += fm.ascent();
p->drawText( 10, y, fonts[f] );
- p->drawText( 10 + p->fontMetrics().width(fonts[f]), y, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefhijklmnopqrstuvwxyz" );
+ QString n;
+ n.sprintf( " size = %d, h = %d, a = %d, d = %d ", sizes[s], fm.height(),fm.ascent(),fm.descent() );
+ p->drawText( 10 + p->fontMetrics().width(fonts[f]), y, n );
+ p->drawText( 10 + p->fontMetrics().width(n) + p->fontMetrics().width(fonts[f]) , y, "pqX-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefhijklmnopqrstuvwxyz" );
y += fm.descent();
s++;
}
@@ -207,9 +227,9 @@ void drawFonts( QPainter *p )
void drawShapes( QPainter *p )
{
QBrush b1( Qt::blue );
- QBrush b2( Qt::green, Qt::Dense6Pattern ); // green 12% fill
- QBrush b3( Qt::NoBrush ); // void brush
- QBrush b4( Qt::CrossPattern ); // black cross pattern
+ QBrush b2( Qt::green); // green
+ QBrush b3( Qt::lightGray ); //
+ QBrush b4( Qt::red ); // red
int y = 10;
@@ -227,9 +247,30 @@ void drawShapes( QPainter *p )
p->drawRect( 10, y, 200, 100 );
p->setBrush( b3 );
p->drawEllipse( 250, y, 200, 100 );
- p->setBrush( b4 );
- p->drawArc( 250, y+140, 200, 100, 45*16, 90*16 );
+ p->drawArc( 500, y, 200, 200, 0*16, 360*16 );
+ p->drawArc( 500, y + 20, 100, 100, 0*16, 360*16 );
+ p->setPen( Qt::white );
+ p->drawArc( 500, y, 200, 200, 45*16, 90*16 );
+ p->drawArc( 500, y + 20, 100, 100, 180*16, 45*16 );
+
+ int x = 10, offset = 40;
+ y += 110;
+ QCOORD points1[] = { x,y, x+offset,y, x+offset,y+offset, x,y+offset, x,y };
+ QPointArray a1( 5, points1 );
+
+ p->setPen( Qt::green );
+ p->drawPolyline( a1 );
+
+ x = 200, offset = 40;
+ QCOORD points2[] = { x,y, x+offset,y, x+offset*2,y+offset, x,y+offset, x-10,y };
+ QPointArray a2( 5, points2 );
+
+ p->setBrush( Qt::lightGray );
+ p->setPen( Qt::darkRed );
+ p->drawPolygon( a2 );
+
+
p->restore();
}
@@ -240,7 +281,12 @@ public:
DrawView();
~DrawView();
protected:
+
+#ifdef _KWQ_
+ void paint( void * );
+#else
void paintEvent( QPaintEvent * );
+#endif
private:
};
@@ -251,9 +297,7 @@ private:
DrawView::DrawView()
{
- setCaption( "Qt Draw Demo Application" );
- setBackgroundColor( white );
- resize( 900,900 );
+ resize( 980,980 );
}
//
@@ -267,6 +311,17 @@ DrawView::~DrawView()
// Called when the widget needs to be updated.
//
+#ifdef _KWQ_
+void DrawView::paint( void *arg )
+{
+ QPainter paint( this );
+
+ drawColors (&paint);
+ drawImages (&paint);
+ drawFonts (&paint);
+ drawShapes (&paint);
+}
+#else
void DrawView::paintEvent( QPaintEvent * )
{
QPainter paint( this );
@@ -276,6 +331,7 @@ void DrawView::paintEvent( QPaintEvent * )
drawFonts (&paint);
drawShapes (&paint);
}
+#endif
//
diff --git a/WebCore/kwq/tests/draw/drawApp/English.lproj/InfoPlist.strings b/WebCore/kwq/tests/draw/drawApp/English.lproj/InfoPlist.strings
new file mode 100644
index 0000000..c9c7ca4
Binary files /dev/null and b/WebCore/kwq/tests/draw/drawApp/English.lproj/InfoPlist.strings differ
diff --git a/WebCore/kwq/tests/draw/drawApp/drawApp.pbproj/project.pbxproj b/WebCore/kwq/tests/draw/drawApp/drawApp.pbproj/project.pbxproj
new file mode 100644
index 0000000..738ea5f
--- /dev/null
+++ b/WebCore/kwq/tests/draw/drawApp/drawApp.pbproj/project.pbxproj
@@ -0,0 +1,399 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 34;
+ objects = {
+ 080E96DCFE201CFB7F000001 = {
+ fileRef = 29B97318FDCFA39411CA2CEA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 080E96DDFE201D6D7F000001 = {
+ children = (
+ );
+ isa = PBXGroup;
+ name = Classes;
+ refType = 4;
+ };
+ 089C165CFE840E0CC02AAC07 = {
+ children = (
+ 089C165DFE840E0CC02AAC07,
+ );
+ isa = PBXVariantGroup;
+ name = InfoPlist.strings;
+ refType = 4;
+ };
+ 089C165DFE840E0CC02AAC07 = {
+ fileEncoding = 10;
+ isa = PBXFileReference;
+ name = English;
+ path = English.lproj/InfoPlist.strings;
+ refType = 4;
+ };
+ 089C165EFE840E0CC02AAC07 = {
+ fileRef = 089C165CFE840E0CC02AAC07;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+//080
+//081
+//082
+//083
+//084
+//100
+//101
+//102
+//103
+//104
+ 1058C7A0FEA54F0111CA2CBB = {
+ children = (
+ 1058C7A1FEA54F0111CA2CBB,
+ );
+ isa = PBXGroup;
+ name = "Linked Frameworks";
+ refType = 4;
+ };
+ 1058C7A1FEA54F0111CA2CBB = {
+ isa = PBXFrameworkReference;
+ name = Cocoa.framework;
+ path = /System/Library/Frameworks/Cocoa.framework;
+ refType = 0;
+ };
+ 1058C7A2FEA54F0111CA2CBB = {
+ children = (
+ 29B97325FDCFA39411CA2CEA,
+ 29B97324FDCFA39411CA2CEA,
+ );
+ isa = PBXGroup;
+ name = "Other Frameworks";
+ refType = 4;
+ };
+ 1058C7A3FEA54F0111CA2CBB = {
+ fileRef = 1058C7A1FEA54F0111CA2CBB;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+//100
+//101
+//102
+//103
+//104
+//170
+//171
+//172
+//173
+//174
+ 17587328FF379C6511CA2CBB = {
+ isa = PBXApplicationReference;
+ path = drawApp.app;
+ refType = 3;
+ };
+//170
+//171
+//172
+//173
+//174
+//190
+//191
+//192
+//193
+//194
+ 19C28FACFE9D520D11CA2CBB = {
+ children = (
+ 17587328FF379C6511CA2CBB,
+ );
+ isa = PBXGroup;
+ name = Products;
+ refType = 4;
+ };
+//190
+//191
+//192
+//193
+//194
+//290
+//291
+//292
+//293
+//294
+ 29B97313FDCFA39411CA2CEA = {
+ buildStyles = (
+ 4A9504CCFFE6A4B311CA0CBA,
+ 4A9504CDFFE6A4B311CA0CBA,
+ );
+ isa = PBXProject;
+ mainGroup = 29B97314FDCFA39411CA2CEA;
+ projectDirPath = "";
+ targets = (
+ 29B97326FDCFA39411CA2CEA,
+ );
+ };
+ 29B97314FDCFA39411CA2CEA = {
+ children = (
+ 080E96DDFE201D6D7F000001,
+ 29B97315FDCFA39411CA2CEA,
+ 29B97317FDCFA39411CA2CEA,
+ 29B97323FDCFA39411CA2CEA,
+ 19C28FACFE9D520D11CA2CBB,
+ );
+ isa = PBXGroup;
+ name = drawApp;
+ path = "";
+ refType = 4;
+ };
+ 29B97315FDCFA39411CA2CEA = {
+ children = (
+ 9C00349001601F7F0ECA16EA,
+ );
+ isa = PBXGroup;
+ name = "Other Sources";
+ path = "";
+ refType = 4;
+ };
+ 29B97317FDCFA39411CA2CEA = {
+ children = (
+ 29B97318FDCFA39411CA2CEA,
+ 089C165CFE840E0CC02AAC07,
+ 9C00349401627E910ECA16EA,
+ 9C00349501627E910ECA16EA,
+ 9C00349601627E910ECA16EA,
+ 9C6566C8016406D90ECA16EA,
+ );
+ isa = PBXGroup;
+ name = Resources;
+ path = "";
+ refType = 4;
+ };
+ 29B97318FDCFA39411CA2CEA = {
+ children = (
+ 29B97319FDCFA39411CA2CEA,
+ );
+ isa = PBXVariantGroup;
+ name = MainMenu.nib;
+ path = "";
+ refType = 4;
+ };
+ 29B97319FDCFA39411CA2CEA = {
+ isa = PBXFileReference;
+ name = English;
+ path = English.lproj/MainMenu.nib;
+ refType = 4;
+ };
+ 29B97323FDCFA39411CA2CEA = {
+ children = (
+ 1058C7A0FEA54F0111CA2CBB,
+ 1058C7A2FEA54F0111CA2CBB,
+ );
+ isa = PBXGroup;
+ name = Frameworks;
+ path = "";
+ refType = 4;
+ };
+ 29B97324FDCFA39411CA2CEA = {
+ isa = PBXFrameworkReference;
+ name = AppKit.framework;
+ path = /System/Library/Frameworks/AppKit.framework;
+ refType = 0;
+ };
+ 29B97325FDCFA39411CA2CEA = {
+ isa = PBXFrameworkReference;
+ name = Foundation.framework;
+ path = /System/Library/Frameworks/Foundation.framework;
+ refType = 0;
+ };
+ 29B97326FDCFA39411CA2CEA = {
+ buildPhases = (
+ 29B97327FDCFA39411CA2CEA,
+ 29B97328FDCFA39411CA2CEA,
+ 29B9732BFDCFA39411CA2CEA,
+ 29B9732DFDCFA39411CA2CEA,
+ );
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = "";
+ HEADER_SEARCH_PATHS = "";
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = "";
+ OTHER_CFLAGS = "-DHAVE_CONFIG_H -DQT_NO_DATASTREAM -D_KWQ_ -I../../../qt -I../../.. -I../../../../..";
+ OTHER_LDFLAGS = " -L../../.. -L../../../qt -lkwq -l_qt -lstdc++";
+ PRODUCT_NAME = drawApp;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ WRAPPER_EXTENSION = app;
+ };
+ dependencies = (
+ );
+ isa = PBXApplicationTarget;
+ name = drawApp;
+ productInstallPath = "$(HOME)/Applications";
+ productName = drawApp;
+ productReference = 17587328FF379C6511CA2CBB;
+ productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist SYSTEM \"file://localhost/System/Library/DTDs/PropertyList.dtd\">
+<plist version=\"0.9\">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>drawApp</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>0.1</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>_KWQOwner</string>
+</dict>
+</plist>
+";
+ shouldUseHeadermap = 1;
+ };
+ 29B97327FDCFA39411CA2CEA = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ name = Headers;
+ };
+ 29B97328FDCFA39411CA2CEA = {
+ buildActionMask = 2147483647;
+ files = (
+ 080E96DCFE201CFB7F000001,
+ 089C165EFE840E0CC02AAC07,
+ 9C00349701627E910ECA16EA,
+ 9C00349801627E910ECA16EA,
+ 9C00349901627E910ECA16EA,
+ 9C6566C9016406D90ECA16EA,
+ );
+ isa = PBXResourcesBuildPhase;
+ name = "Bundle Resources";
+ };
+ 29B9732BFDCFA39411CA2CEA = {
+ buildActionMask = 2147483647;
+ files = (
+ 9C00349101601F7F0ECA16EA,
+ );
+ isa = PBXSourcesBuildPhase;
+ name = Sources;
+ };
+ 29B9732DFDCFA39411CA2CEA = {
+ buildActionMask = 2147483647;
+ files = (
+ 1058C7A3FEA54F0111CA2CBB,
+ );
+ isa = PBXFrameworksBuildPhase;
+ name = "Frameworks & Libraries";
+ };
+//290
+//291
+//292
+//293
+//294
+//4A0
+//4A1
+//4A2
+//4A3
+//4A4
+ 4A9504CCFFE6A4B311CA0CBA = {
+ buildRules = (
+ );
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ OPTIMIZATION_CFLAGS = "-O0";
+ };
+ isa = PBXBuildStyle;
+ name = Development;
+ };
+ 4A9504CDFFE6A4B311CA0CBA = {
+ buildRules = (
+ );
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ };
+ isa = PBXBuildStyle;
+ name = Deployment;
+ };
+//4A0
+//4A1
+//4A2
+//4A3
+//4A4
+//9C0
+//9C1
+//9C2
+//9C3
+//9C4
+ 9C00349001601F7F0ECA16EA = {
+ isa = PBXFileReference;
+ name = draw.mm;
+ path = /Network/Servers/abel/homes/gimli/rjw/src/Labyrinth/WebPageView/src/kwq/tests/draw/draw.mm;
+ refType = 0;
+ };
+ 9C00349101601F7F0ECA16EA = {
+ fileRef = 9C00349001601F7F0ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 9C00349401627E910ECA16EA = {
+ isa = PBXFileReference;
+ name = powermac.jpg;
+ path = /Network/Servers/abel/homes/gimli/rjw/src/Labyrinth/WebPageView/src/kwq/tests/draw/powermac.jpg;
+ refType = 0;
+ };
+ 9C00349501627E910ECA16EA = {
+ isa = PBXFileReference;
+ name = qt.png;
+ path = /Network/Servers/abel/homes/gimli/rjw/src/Labyrinth/WebPageView/src/kwq/tests/draw/qt.png;
+ refType = 0;
+ };
+ 9C00349601627E910ECA16EA = {
+ isa = PBXFileReference;
+ name = yahoo.gif;
+ path = /Network/Servers/abel/homes/gimli/rjw/src/Labyrinth/WebPageView/src/kwq/tests/draw/yahoo.gif;
+ refType = 0;
+ };
+ 9C00349701627E910ECA16EA = {
+ fileRef = 9C00349401627E910ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 9C00349801627E910ECA16EA = {
+ fileRef = 9C00349501627E910ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 9C00349901627E910ECA16EA = {
+ fileRef = 9C00349601627E910ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 9C6566C8016406D90ECA16EA = {
+ isa = PBXFileReference;
+ name = foo;
+ path = /tmp/foo;
+ refType = 0;
+ };
+ 9C6566C9016406D90ECA16EA = {
+ fileRef = 9C6566C8016406D90ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA;
+}
diff --git a/WebCore/src/kwq/KWQView.h b/WebCore/src/kwq/KWQView.h
new file mode 100644
index 0000000..978770a
--- /dev/null
+++ b/WebCore/src/kwq/KWQView.h
@@ -0,0 +1,11 @@
+#import <Cocoa/Cocoa.h>
+
+
+class QWidget;
+
+ at interface KWQView : NSView
+{
+ QWidget *widget;
+}
+- initWithFrame: (NSRect)r widget: (QWidget *)w;
+ at end
diff --git a/WebCore/src/kwq/Makefile.in b/WebCore/src/kwq/Makefile.in
index 6000e8a..95ab3cd 100644
--- a/WebCore/src/kwq/Makefile.in
+++ b/WebCore/src/kwq/Makefile.in
@@ -22,13 +22,23 @@ SOURCES = $(wildcard *.mm)
HEADERS = $(wildcard *.h)
MMOBJECTS = \
+ _KWQOwner.o \
KWQApplication.o \
KWQBrush.o \
+ KWQColor.o \
+ KWQColorGroup.o \
+ KWQCursor.o \
KWQFont.o \
KWQFontMetrics.o \
+ KWQObject.o \
KWQPainter.o \
+ KWQPaintDevice.o \
+ KWQPaintDeviceMetrics.o \
+ KWQPalette.o \
KWQPen.o \
KWQPixmap.o \
+ KWQPointArray.o \
+ KWQView.o \
KWQWMatrix.o \
KWQWidget.o \
KWQChar.o \
@@ -36,7 +46,10 @@ MMOBJECTS = \
KWQCString.o \
$(NULL)
-OBJECTS = $(MMOBJECTS)
+MOBJECTS = \
+ $(NULL)
+
+OBJECTS = $(MMOBJECTS) $(MOBJECTS)
LIBRARY = libkwq.a
@@ -48,6 +61,7 @@ CLEAN_FILES = $(OBJECTS) \
# Set flags for this directory
CMMFLAGS = $(BASECMMFLAGS) \
+ -g \
-I$(TOPSRCDIR) \
-I$(TOPSRCDIR)/src/kwq \
-I$(TOPSRCDIR)/src/kwq/qt \
@@ -56,13 +70,22 @@ CMMFLAGS = $(BASECMMFLAGS) \
DEPFLAGS = $(CMMFLAGS)
+CMFLAGS = $(BASECMFLAGS) \
+ -I$(TOPSRCDIR) \
+ -I$(TOPSRCDIR)/src/kwq \
+ -I$(TOPSRCDIR)/src/kwq/qt \
+ -I. \
+ $(NULL)
+
+DEPFLAGS = $(CMFLAGS)
+
#----------------------------------------------------------------------
# Set targets for this directory
all: $(OBJECTS) $(LIBRARY)
-$(LIBRARY): $(MMOBJECTS)
- $(AR) $(ARFLAGS) $(LIBRARY) $(MMOBJECTS)
+$(LIBRARY): $(OBJECTS)
+ $(AR) $(ARFLAGS) $(LIBRARY) $(OBJECTS)
$(RANLIB) $(LIBRARY)
#----------------------------------------------------------------------
diff --git a/WebCore/src/kwq/_KWQOwner.h b/WebCore/src/kwq/_KWQOwner.h
new file mode 100644
index 0000000..d230024
--- /dev/null
+++ b/WebCore/src/kwq/_KWQOwner.h
@@ -0,0 +1,7 @@
+#import <Cocoa/Cocoa.h>
+
+ at interface _KWQOwner : NSApplication
+{
+ IBOutlet id window;
+}
+ at end
diff --git a/WebCore/src/kwq/_KWQOwner.m b/WebCore/src/kwq/_KWQOwner.m
new file mode 100644
index 0000000..3e6a27c
--- /dev/null
+++ b/WebCore/src/kwq/_KWQOwner.m
@@ -0,0 +1,10 @@
+#import "_KWQOwner.h"
+
+ at implementation _KWQOwner
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+ NSLog (@"Did finish launching\n", nil);
+}
+
+ at end
diff --git a/WebCore/src/kwq/qt/qapplication.h b/WebCore/src/kwq/qt/qapplication.h
index 9970059..0b98384 100644
--- a/WebCore/src/kwq/qt/qapplication.h
+++ b/WebCore/src/kwq/qt/qapplication.h
@@ -34,6 +34,11 @@
#include "qpalette.h"
#include "qsize.h"
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
+
+
// class QApplication ==========================================================
class QApplication {
@@ -63,6 +68,11 @@ public:
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 --------------------------------------------------------
// operators ---------------------------------------------------------------
@@ -76,6 +86,17 @@ private:
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 =======================================================
#endif
diff --git a/WebCore/src/kwq/qt/qbrush.h b/WebCore/src/kwq/qt/qbrush.h
index b8367fa..774d9ae 100644
--- a/WebCore/src/kwq/qt/qbrush.h
+++ b/WebCore/src/kwq/qt/qbrush.h
@@ -61,7 +61,8 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
-
+ QColor qcolor;
+ BrushStyle qbrushstyle;
}; // class QBrush =============================================================
diff --git a/WebCore/src/kwq/qt/qcolor.h b/WebCore/src/kwq/qt/qcolor.h
index 5603b82..4eb5306 100644
--- a/WebCore/src/kwq/qt/qcolor.h
+++ b/WebCore/src/kwq/qt/qcolor.h
@@ -30,14 +30,15 @@
#include <config.h>
#endif
-// USING_BORROWED_QCOLOR =======================================================
+#include <qnamespace.h>
+#include <qstring.h>
-#ifdef USING_BORROWED_QCOLOR
-#include <_qcolor.h>
-#else
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
-#include "qnamespace.h"
-#include "qstring.h"
+
+typedef unsigned int QRgb; // RGB triplet
QRgb qRgb(int r, int g, int b);
QRgb qRgba(int r, int g, int b, int a);
@@ -59,10 +60,7 @@ public:
QColor(const char *);
QColor(const QColor &);
-// add no-op destructor
-#ifdef _KWQ_PEDANTIC_
- ~QColor() {}
-#endif
+ ~QColor();
// member functions --------------------------------------------------------
@@ -91,9 +89,26 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+ static bool globals_init;
-}; // class QColor =============================================================
+ void initGlobalColors();
+
+#ifdef _KWQ_
+ void _initialize(int,int,int);
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSColor *getNSColor();
+#else
+ void *getNSColor();
+#endif
-#endif // USING_BORROWED_QCOLOR
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSColor *color;
+#else
+ void *color;
+#endif
+#endif
+
+}; // class QColor =============================================================
#endif
diff --git a/WebCore/src/kwq/qt/qevent.h b/WebCore/src/kwq/qt/qevent.h
index ba7d057..06a3726 100644
--- a/WebCore/src/kwq/qt/qevent.h
+++ b/WebCore/src/kwq/qt/qevent.h
@@ -309,7 +309,9 @@ public:
#ifdef _KWQ_PEDANTIC_
QHideEvent() {}
#endif
-
+
+ QHideEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QHideEvent() {}
@@ -355,6 +357,8 @@ public:
QResizeEvent() {}
#endif
+ QResizeEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QResizeEvent() {}
@@ -400,6 +404,8 @@ public:
QShowEvent() {}
#endif
+ QShowEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QShowEvent() {}
@@ -445,6 +451,8 @@ public:
QWheelEvent() {}
#endif
+ QWheelEvent(Type);
+
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QWheelEvent() {}
diff --git a/WebCore/src/kwq/qt/qfont.h b/WebCore/src/kwq/qt/qfont.h
index bc2042e..27dcb7d 100644
--- a/WebCore/src/kwq/qt/qfont.h
+++ b/WebCore/src/kwq/qt/qfont.h
@@ -32,6 +32,10 @@
class QString;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
+
// class QFont =================================================================
class QFont {
@@ -51,6 +55,7 @@ public:
QFont();
QFont(const QFont &);
+
~QFont();
// member functions --------------------------------------------------------
@@ -71,8 +76,32 @@ public:
bool operator==(const QFont &x) const;
bool operator!=(const QFont &x) const;
+#ifdef _KWQ_
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ static NSFont *QFont::defaultNSFont();
+#endif
+#endif
+
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+#ifdef _KWQ_
+ void _initialize();
+ void _initializeWithFont(const QFont *);
+ void _free();
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ void _setTrait (NSFontTraitMask mask);
+#endif
+
+ struct KWQFontData {
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSFont *font;
+#else
+ void *font;
+#endif
+ } *data;
+
+ void _freeWithData(struct KWQFontData *);
+#endif
}; // class QFont ==============================================================
diff --git a/WebCore/src/kwq/qt/qfontmetrics.h b/WebCore/src/kwq/qt/qfontmetrics.h
index b872af1..69fc51e 100644
--- a/WebCore/src/kwq/qt/qfontmetrics.h
+++ b/WebCore/src/kwq/qt/qfontmetrics.h
@@ -35,6 +35,10 @@
#include "qstring.h"
#include "qfont.h"
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
+
// class QFontMetrics ==========================================================
class QFontMetrics {
@@ -73,6 +77,21 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+#ifdef _KWQ_
+ void _initialize();
+ void _initializeWithFont(NSFont *);
+ void _free();
+
+ struct KWQFontMetricsData {
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSFont *font;
+#else
+ void *font;
+#endif
+ } *data;
+#endif
+
+ void _freeWithData(struct KWQFontMetricsData *);
}; // class QFontMetrics =======================================================
diff --git a/WebCore/src/kwq/qt/qpainter.h b/WebCore/src/kwq/qt/qpainter.h
index 2f9745c..7fdd766 100644
--- a/WebCore/src/kwq/qt/qpainter.h
+++ b/WebCore/src/kwq/qt/qpainter.h
@@ -42,10 +42,12 @@
class QFont;
class QPixmap;
+class QWidget;
// class QWMatrix ==============================================================
class QWMatrix {
+friend QPainter;
public:
// typedefs ----------------------------------------------------------------
@@ -79,10 +81,10 @@ private:
QWMatrix(const QWMatrix &);
#endif
-// add assignment operator
-// this private declaration prevents assignment
-#ifdef _KWQ_PEDANTIC_
- QWMatrix &operator=(const QWMatrix &);
+#ifdef _KWQ_
+ bool empty;
+ double sx;
+ double sy;
#endif
}; // class QWMatrix ===========================================================
@@ -101,7 +103,14 @@ public:
// constructors, copy constructors, and destructors ------------------------
QPainter();
+
+ // We may be able to remove this constructor and remove QPaintDevice.
QPainter(const QPaintDevice *);
+
+#ifdef _KWQ_
+ QPainter(QWidget *);
+#endif
+
~QPainter();
// member functions --------------------------------------------------------
@@ -129,8 +138,9 @@ public:
int npoints=-1);
void drawPixmap(const QPoint &, const QPixmap &);
void drawPixmap(const QPoint &, const QPixmap &, const QRect &);
- void drawTiledPixmap(int, int, int, int, const QPixmap &, int sx=0,
- int sy=0);
+ void drawPixmap( int x, int y, const QPixmap &,
+ int sx=0, int sy=0, int sw=-1, int sh=-1 );
+ void drawTiledPixmap(int, int, int, int, const QPixmap &, int sx=0, int sy=0);
void drawText(int x, int y, const QString &, int len=-1);
void drawText(int, int, int, int, AlignmentFlags, const QString &);
void drawText(int, int, int, int, int flags, const QString&, int len=-1,
@@ -156,6 +166,26 @@ private:
QPainter(const QPainter &);
QPainter &operator=(const QPainter &);
+#ifdef _KWQ_
+ void _lockFocus();
+ void _unlockFocus();
+
+ void _setColorFromBrush();
+ void _setColorFromPen();
+
+ void _initialize(QWidget *widget);
+ void _drawPoints (const QPointArray &_points, bool winding, int index, int _npoints, bool fill);
+
+ struct KWQPainterData { // QPainter data.
+ QWidget *widget; // Has a reference to a KWQView.
+ QFont qfont;
+ QBrush qbrush;
+ QPen qpen;
+ uint isFocusLocked:1;
+ void *ps_stack;
+ NSCompositingOperation compositingOperation;
+ } *data;
+#endif
}; // end class QPainter
// =============================================================================
diff --git a/WebCore/src/kwq/qt/qpen.h b/WebCore/src/kwq/qt/qpen.h
index 9547532..014622b 100644
--- a/WebCore/src/kwq/qt/qpen.h
+++ b/WebCore/src/kwq/qt/qpen.h
@@ -56,10 +56,14 @@ public:
// operators ---------------------------------------------------------------
+ bool operator==(const QPen &) const;
+ bool operator!=(const QPen &) const;
+
QPen &operator=(const QPen &);
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
+ QColor qcolor;
}; // class QPen ===============================================================
diff --git a/WebCore/src/kwq/qt/qpixmap.h b/WebCore/src/kwq/qt/qpixmap.h
index 0519a7a..34db834 100644
--- a/WebCore/src/kwq/qt/qpixmap.h
+++ b/WebCore/src/kwq/qt/qpixmap.h
@@ -37,6 +37,11 @@
#include "qimage.h"
#include "qsize.h"
#include "qrect.h"
+#include "qpainter.h"
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#import <Cocoa/Cocoa.h>
+#endif
class QBitmap;
class QWMatrix;
@@ -44,6 +49,7 @@ class QWMatrix;
// class QPixmap ===============================================================
class QPixmap : public QPaintDevice, public Qt {
+friend class QPainter;
public:
// typedefs ----------------------------------------------------------------
@@ -82,7 +88,14 @@ public:
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
-
+#ifdef _KWQ_
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ NSImage *nsimage;
+#else
+ void *nsimage;
+#endif
+ QWMatrix xmatrix;
+#endif
}; // class QPixmap ============================================================
#endif
diff --git a/WebCore/src/kwq/qt/qpoint.h b/WebCore/src/kwq/qt/qpoint.h
index 4408964..5a05dae 100644
--- a/WebCore/src/kwq/qt/qpoint.h
+++ b/WebCore/src/kwq/qt/qpoint.h
@@ -119,19 +119,24 @@ public:
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
- QPointArray(int);
+ QPointArray() {}
+ ~QPointArray() {}
+ QPointArray(int size) : QArray<QPoint> (size){};
+
QPointArray(const QPointArray &);
QPointArray(int, const QCOORD *);
- ~QPointArray();
// member functions --------------------------------------------------------
void setPoint(uint, int, int);
bool setPoints(int, int, int, ...);
-
+ bool setPoints( int nPoints, const QCOORD *points );
+
// operators ---------------------------------------------------------------
- QPointArray &operator=(const QPointArray &);
+ //QPointArray &operator=(const QPointArray &);
+ QPointArray &operator=( const QPointArray &a )
+ { return (QPointArray&)assign( a ); }
#ifdef _KWQ_IOSTREAM_
friend ostream &operator<<(ostream &, const QPoint &);
diff --git a/WebCore/src/kwq/qt/qstring.h b/WebCore/src/kwq/qt/qstring.h
index 958682e..62310e0 100644
--- a/WebCore/src/kwq/qt/qstring.h
+++ b/WebCore/src/kwq/qt/qstring.h
@@ -30,10 +30,19 @@
#include <config.h>
#endif
-// USING_BORROWED_QSTRING ======================================================
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+// These macros are TEMPORARY hacks to convert between NSString and QString. They
+// should be replaced with correct implementations. They should only be used
+// for immutable strings.
+#define QSTRING_TO_NSSTRING(aString) [NSString stringWithCString: aString.latin1()]
+#define QSTRING_TO_NSSTRING_LENGTH(aString,l) [NSString stringWithCString: aString.latin1() length: l]
+#define NSSTRING_TO_QSTRING(aString) QString([aString cString])
+#endif
+// USING_BORROWED_QSTRING ======================================================
#ifdef USING_BORROWED_QSTRING
#include <_qstring.h>
+
#else
// FIXME: this clever hack may need to be moved into KWQDef.h or elsewhere
diff --git a/WebCore/src/kwq/qt/qwidget.h b/WebCore/src/kwq/qt/qwidget.h
index fc6db30..233d19a 100644
--- a/WebCore/src/kwq/qt/qwidget.h
+++ b/WebCore/src/kwq/qt/qwidget.h
@@ -41,8 +41,24 @@
#include "qevent.h"
#include <KWQStyle.h>
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#define Fixed MacFixed
+#define Rect MacRect
+#define Boolean MacBoolean
+
+#import <Cocoa/Cocoa.h>
+
+#import "KWQView.h"
+
+#undef Fixed
+#undef Rect
+#undef Boolean
+#endif
+
// class QWidget ===============================================================
+// FIX ME! RJW - need to check if inheritance from QPaintDevice is really necessary.
+
class QWidget : public QObject, public QPaintDevice {
public:
@@ -116,6 +132,19 @@ public:
virtual void show();
virtual void hide();
+ // Required for KWQ
+#ifdef _KWQ_
+
+ virtual void paint (void *);
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ KWQView *getView();
+#else
+ void *getView();
+#endif
+
+#endif _KWQ_
+
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
@@ -127,6 +156,26 @@ private:
QWidget(const QWidget &);
QWidget &operator=(const QWidget &);
+ void setCRect( const QRect &r );
+ void internalSetGeometry( int x, int y, int w, int h, bool isMove );
+
+ void _initialize();
+
+ struct KWQWidgetData { // Widget data.
+ QPoint pos;
+ QRect rect;
+ FocusPolicy focusPolicy;
+ QStyle *style;
+ QFont *font;
+ QCursor *cursor;
+ QPalette pal;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ KWQView *view;
+#else
+ void *view;
+#endif
+ } *data;
+
}; // class QWidget ============================================================
#endif
diff --git a/WebCore/src/kwq/tests/draw/Makefile b/WebCore/src/kwq/tests/draw/Makefile
index a835803..0bf1b90 100644
--- a/WebCore/src/kwq/tests/draw/Makefile
+++ b/WebCore/src/kwq/tests/draw/Makefile
@@ -1,10 +1,20 @@
-draw.o: draw.mm
- cc -c -I$(QTDIR)/include -fno-exceptions -pipe -g -o draw.o draw.mm
-draw: draw.o
- cc -L$(QTDIR)/lib -o ./draw draw.o -lqt -L/usr/X11R6/lib -lz -ljpeg -lXext -lX11 -framework Cocoa
+qdraw.o: draw.mm
+ cc -c -I$(QTDIR)/include -fno-exceptions -pipe -g -o qdraw.o draw.mm
+qdraw: qdraw.o
+ cc -L$(QTDIR)/lib -o ./qdraw qdraw.o -lqt -L/usr/X11R6/lib -lz -ljpeg -lXext -lX11 -framework Cocoa
+
+#kwqdraw.o: draw.mm
+# cc -c -DQT_NO_DATASTREAM -D_KWQ_COMPLETE_ -D_KWQ_ -I../.. -I../../qt -fno-exceptions -pipe -g -o kwqdraw.o draw.mm
+
+#kwqdraw: kwqdraw.o
+# cc -L$(QTDIR)/lib -o ./kwqdraw kwqdraw.o -L../.. -L../../qt -lkwq -l_qt -lstdc++ -framework Cocoa
+
+#clean:
+# rm *.o qdraw kwqdraw
clean:
- rm *.o draw
+ rm *.o qdraw
-all: draw
+#all: qdraw kwqdraw
+all: qdraw
\ No newline at end of file
diff --git a/WebCore/src/kwq/tests/draw/draw.mm b/WebCore/src/kwq/tests/draw/draw.mm
index 9072baf..bb2b07f 100644
--- a/WebCore/src/kwq/tests/draw/draw.mm
+++ b/WebCore/src/kwq/tests/draw/draw.mm
@@ -44,14 +44,15 @@
* QString
* QWidget
* QWMatrix
- *
- * Also needs QPaintEvent. This is only used by the Qt version of the app.
-*/
+ */
#include <qwidget.h>
#include <qpainter.h>
#include <qpixmap.h>
#include <qapplication.h>
+#include <qpoint.h>
+
+#include <config.h>
// Voodoo required to get compiler to compile correctly.
#undef DEBUG
@@ -70,9 +71,12 @@ void drawColors( QPainter *p )
int x = 0, y = 0, height, r = 0, g = 255, b = 125;
p->save();
- QFont f( "helvetica", 10, QFont::Bold );
+ QFont f;
+ f.setFamily( "helvetica" );
+ f.setPixelSizeFloat ((float) 10);
+ f.setWeight ( QFont::Bold );
p->setFont( f );
- p->setPen( Qt::black );
+ p->setPen( QPen(Qt::black) );
QFontMetrics fm = p->fontMetrics();
height = fm.height();
@@ -102,14 +106,19 @@ void drawImages( QPainter *p)
{
QByteArray *byteArray[3];
QPixmap *pixmap[3];
- NSString *files[3] = { @"qt.png", @"powermac.jpg", @"yahoo.gif" };
+ NSString *files[3] = { @"qt.png", @"powermac.jpg", @"yahoo.gif" }, *filename;
NSData *data[3];
int i;
QPoint *point;
for (i = 0; i < 3; i++){
point = new QPoint (10 + 60 * i, 200);
+#ifdef _KWQ_
+ filename = [NSString stringWithFormat: @"%@/%@", [[NSBundle mainBundle] resourcePath], files[i], nil];
+ data[i] = [[NSData alloc] initWithContentsOfFile: filename];
+#else
data[i] = [[NSData alloc] initWithContentsOfFile: files[i]];
+#endif
byteArray[i] = new QByteArray();
byteArray[i]->setRawData ((const char *)[data[i] bytes], (unsigned int)[data[i] length]);
pixmap[i] = new QPixmap (*byteArray[i]);
@@ -133,7 +142,8 @@ void drawImages( QPainter *p)
QSize imageSize = pixmap[i]->size();
- p->setPen( Qt::yellow );
+ // This should draw an empty rect, as brush isn't set to any color.
+ p->setPen( QPen(Qt::yellow) );
p->drawRect (point->x(), point->y(), imageSize.width(), imageSize.height());
p->setPen( Qt::blue );
@@ -147,10 +157,15 @@ void drawImages( QPainter *p)
p->drawLine (x, y, x + w, y + h);
p->drawLine (x, y + h, x + w, y);
+ x = 530; y = 70; w = 380, h = 325;
+ p->drawTiledPixmap (x, y, w, h, *pixmap[0], 0, 0);
+ p->drawLine (x, y, x + w, y + h);
+ p->drawLine (x, y + h, x + w, y);
+
for (i = 0; i < 3; i++){
- delete byteArray[i];
+ // Problematic, as QByteArray expects ownership. It will free() the bytes set from setRawData.
+ //delete byteArray[i];
delete pixmap[i];
- // Problematic, as QByteArray expects ownership.
//[data[i] release];
}
}
@@ -183,12 +198,17 @@ void drawFonts( QPainter *p )
while ( fonts[f] ) {
int s = 0;
while ( sizes[s] ) {
- QFont font( fonts[f], sizes[s] );
+ QFont font;
+ font.setFamily ( fonts[f] );
+ font.setPixelSizeFloat ( (float)sizes[s] );
p->setFont( font );
QFontMetrics fm = p->fontMetrics();
y += fm.ascent();
p->drawText( 10, y, fonts[f] );
- p->drawText( 10 + p->fontMetrics().width(fonts[f]), y, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefhijklmnopqrstuvwxyz" );
+ QString n;
+ n.sprintf( " size = %d, h = %d, a = %d, d = %d ", sizes[s], fm.height(),fm.ascent(),fm.descent() );
+ p->drawText( 10 + p->fontMetrics().width(fonts[f]), y, n );
+ p->drawText( 10 + p->fontMetrics().width(n) + p->fontMetrics().width(fonts[f]) , y, "pqX-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefhijklmnopqrstuvwxyz" );
y += fm.descent();
s++;
}
@@ -207,9 +227,9 @@ void drawFonts( QPainter *p )
void drawShapes( QPainter *p )
{
QBrush b1( Qt::blue );
- QBrush b2( Qt::green, Qt::Dense6Pattern ); // green 12% fill
- QBrush b3( Qt::NoBrush ); // void brush
- QBrush b4( Qt::CrossPattern ); // black cross pattern
+ QBrush b2( Qt::green); // green
+ QBrush b3( Qt::lightGray ); //
+ QBrush b4( Qt::red ); // red
int y = 10;
@@ -227,9 +247,30 @@ void drawShapes( QPainter *p )
p->drawRect( 10, y, 200, 100 );
p->setBrush( b3 );
p->drawEllipse( 250, y, 200, 100 );
- p->setBrush( b4 );
- p->drawArc( 250, y+140, 200, 100, 45*16, 90*16 );
+ p->drawArc( 500, y, 200, 200, 0*16, 360*16 );
+ p->drawArc( 500, y + 20, 100, 100, 0*16, 360*16 );
+ p->setPen( Qt::white );
+ p->drawArc( 500, y, 200, 200, 45*16, 90*16 );
+ p->drawArc( 500, y + 20, 100, 100, 180*16, 45*16 );
+
+ int x = 10, offset = 40;
+ y += 110;
+ QCOORD points1[] = { x,y, x+offset,y, x+offset,y+offset, x,y+offset, x,y };
+ QPointArray a1( 5, points1 );
+
+ p->setPen( Qt::green );
+ p->drawPolyline( a1 );
+
+ x = 200, offset = 40;
+ QCOORD points2[] = { x,y, x+offset,y, x+offset*2,y+offset, x,y+offset, x-10,y };
+ QPointArray a2( 5, points2 );
+
+ p->setBrush( Qt::lightGray );
+ p->setPen( Qt::darkRed );
+ p->drawPolygon( a2 );
+
+
p->restore();
}
@@ -240,7 +281,12 @@ public:
DrawView();
~DrawView();
protected:
+
+#ifdef _KWQ_
+ void paint( void * );
+#else
void paintEvent( QPaintEvent * );
+#endif
private:
};
@@ -251,9 +297,7 @@ private:
DrawView::DrawView()
{
- setCaption( "Qt Draw Demo Application" );
- setBackgroundColor( white );
- resize( 900,900 );
+ resize( 980,980 );
}
//
@@ -267,6 +311,17 @@ DrawView::~DrawView()
// Called when the widget needs to be updated.
//
+#ifdef _KWQ_
+void DrawView::paint( void *arg )
+{
+ QPainter paint( this );
+
+ drawColors (&paint);
+ drawImages (&paint);
+ drawFonts (&paint);
+ drawShapes (&paint);
+}
+#else
void DrawView::paintEvent( QPaintEvent * )
{
QPainter paint( this );
@@ -276,6 +331,7 @@ void DrawView::paintEvent( QPaintEvent * )
drawFonts (&paint);
drawShapes (&paint);
}
+#endif
//
diff --git a/WebCore/src/kwq/tests/draw/drawApp/English.lproj/InfoPlist.strings b/WebCore/src/kwq/tests/draw/drawApp/English.lproj/InfoPlist.strings
new file mode 100644
index 0000000..c9c7ca4
Binary files /dev/null and b/WebCore/src/kwq/tests/draw/drawApp/English.lproj/InfoPlist.strings differ
diff --git a/WebCore/src/kwq/tests/draw/drawApp/drawApp.pbproj/project.pbxproj b/WebCore/src/kwq/tests/draw/drawApp/drawApp.pbproj/project.pbxproj
new file mode 100644
index 0000000..738ea5f
--- /dev/null
+++ b/WebCore/src/kwq/tests/draw/drawApp/drawApp.pbproj/project.pbxproj
@@ -0,0 +1,399 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 34;
+ objects = {
+ 080E96DCFE201CFB7F000001 = {
+ fileRef = 29B97318FDCFA39411CA2CEA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 080E96DDFE201D6D7F000001 = {
+ children = (
+ );
+ isa = PBXGroup;
+ name = Classes;
+ refType = 4;
+ };
+ 089C165CFE840E0CC02AAC07 = {
+ children = (
+ 089C165DFE840E0CC02AAC07,
+ );
+ isa = PBXVariantGroup;
+ name = InfoPlist.strings;
+ refType = 4;
+ };
+ 089C165DFE840E0CC02AAC07 = {
+ fileEncoding = 10;
+ isa = PBXFileReference;
+ name = English;
+ path = English.lproj/InfoPlist.strings;
+ refType = 4;
+ };
+ 089C165EFE840E0CC02AAC07 = {
+ fileRef = 089C165CFE840E0CC02AAC07;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+//080
+//081
+//082
+//083
+//084
+//100
+//101
+//102
+//103
+//104
+ 1058C7A0FEA54F0111CA2CBB = {
+ children = (
+ 1058C7A1FEA54F0111CA2CBB,
+ );
+ isa = PBXGroup;
+ name = "Linked Frameworks";
+ refType = 4;
+ };
+ 1058C7A1FEA54F0111CA2CBB = {
+ isa = PBXFrameworkReference;
+ name = Cocoa.framework;
+ path = /System/Library/Frameworks/Cocoa.framework;
+ refType = 0;
+ };
+ 1058C7A2FEA54F0111CA2CBB = {
+ children = (
+ 29B97325FDCFA39411CA2CEA,
+ 29B97324FDCFA39411CA2CEA,
+ );
+ isa = PBXGroup;
+ name = "Other Frameworks";
+ refType = 4;
+ };
+ 1058C7A3FEA54F0111CA2CBB = {
+ fileRef = 1058C7A1FEA54F0111CA2CBB;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+//100
+//101
+//102
+//103
+//104
+//170
+//171
+//172
+//173
+//174
+ 17587328FF379C6511CA2CBB = {
+ isa = PBXApplicationReference;
+ path = drawApp.app;
+ refType = 3;
+ };
+//170
+//171
+//172
+//173
+//174
+//190
+//191
+//192
+//193
+//194
+ 19C28FACFE9D520D11CA2CBB = {
+ children = (
+ 17587328FF379C6511CA2CBB,
+ );
+ isa = PBXGroup;
+ name = Products;
+ refType = 4;
+ };
+//190
+//191
+//192
+//193
+//194
+//290
+//291
+//292
+//293
+//294
+ 29B97313FDCFA39411CA2CEA = {
+ buildStyles = (
+ 4A9504CCFFE6A4B311CA0CBA,
+ 4A9504CDFFE6A4B311CA0CBA,
+ );
+ isa = PBXProject;
+ mainGroup = 29B97314FDCFA39411CA2CEA;
+ projectDirPath = "";
+ targets = (
+ 29B97326FDCFA39411CA2CEA,
+ );
+ };
+ 29B97314FDCFA39411CA2CEA = {
+ children = (
+ 080E96DDFE201D6D7F000001,
+ 29B97315FDCFA39411CA2CEA,
+ 29B97317FDCFA39411CA2CEA,
+ 29B97323FDCFA39411CA2CEA,
+ 19C28FACFE9D520D11CA2CBB,
+ );
+ isa = PBXGroup;
+ name = drawApp;
+ path = "";
+ refType = 4;
+ };
+ 29B97315FDCFA39411CA2CEA = {
+ children = (
+ 9C00349001601F7F0ECA16EA,
+ );
+ isa = PBXGroup;
+ name = "Other Sources";
+ path = "";
+ refType = 4;
+ };
+ 29B97317FDCFA39411CA2CEA = {
+ children = (
+ 29B97318FDCFA39411CA2CEA,
+ 089C165CFE840E0CC02AAC07,
+ 9C00349401627E910ECA16EA,
+ 9C00349501627E910ECA16EA,
+ 9C00349601627E910ECA16EA,
+ 9C6566C8016406D90ECA16EA,
+ );
+ isa = PBXGroup;
+ name = Resources;
+ path = "";
+ refType = 4;
+ };
+ 29B97318FDCFA39411CA2CEA = {
+ children = (
+ 29B97319FDCFA39411CA2CEA,
+ );
+ isa = PBXVariantGroup;
+ name = MainMenu.nib;
+ path = "";
+ refType = 4;
+ };
+ 29B97319FDCFA39411CA2CEA = {
+ isa = PBXFileReference;
+ name = English;
+ path = English.lproj/MainMenu.nib;
+ refType = 4;
+ };
+ 29B97323FDCFA39411CA2CEA = {
+ children = (
+ 1058C7A0FEA54F0111CA2CBB,
+ 1058C7A2FEA54F0111CA2CBB,
+ );
+ isa = PBXGroup;
+ name = Frameworks;
+ path = "";
+ refType = 4;
+ };
+ 29B97324FDCFA39411CA2CEA = {
+ isa = PBXFrameworkReference;
+ name = AppKit.framework;
+ path = /System/Library/Frameworks/AppKit.framework;
+ refType = 0;
+ };
+ 29B97325FDCFA39411CA2CEA = {
+ isa = PBXFrameworkReference;
+ name = Foundation.framework;
+ path = /System/Library/Frameworks/Foundation.framework;
+ refType = 0;
+ };
+ 29B97326FDCFA39411CA2CEA = {
+ buildPhases = (
+ 29B97327FDCFA39411CA2CEA,
+ 29B97328FDCFA39411CA2CEA,
+ 29B9732BFDCFA39411CA2CEA,
+ 29B9732DFDCFA39411CA2CEA,
+ );
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = "";
+ HEADER_SEARCH_PATHS = "";
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = "";
+ OTHER_CFLAGS = "-DHAVE_CONFIG_H -DQT_NO_DATASTREAM -D_KWQ_ -I../../../qt -I../../.. -I../../../../..";
+ OTHER_LDFLAGS = " -L../../.. -L../../../qt -lkwq -l_qt -lstdc++";
+ PRODUCT_NAME = drawApp;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+ WRAPPER_EXTENSION = app;
+ };
+ dependencies = (
+ );
+ isa = PBXApplicationTarget;
+ name = drawApp;
+ productInstallPath = "$(HOME)/Applications";
+ productName = drawApp;
+ productReference = 17587328FF379C6511CA2CBB;
+ productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist SYSTEM \"file://localhost/System/Library/DTDs/PropertyList.dtd\">
+<plist version=\"0.9\">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>drawApp</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>0.1</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>_KWQOwner</string>
+</dict>
+</plist>
+";
+ shouldUseHeadermap = 1;
+ };
+ 29B97327FDCFA39411CA2CEA = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXHeadersBuildPhase;
+ name = Headers;
+ };
+ 29B97328FDCFA39411CA2CEA = {
+ buildActionMask = 2147483647;
+ files = (
+ 080E96DCFE201CFB7F000001,
+ 089C165EFE840E0CC02AAC07,
+ 9C00349701627E910ECA16EA,
+ 9C00349801627E910ECA16EA,
+ 9C00349901627E910ECA16EA,
+ 9C6566C9016406D90ECA16EA,
+ );
+ isa = PBXResourcesBuildPhase;
+ name = "Bundle Resources";
+ };
+ 29B9732BFDCFA39411CA2CEA = {
+ buildActionMask = 2147483647;
+ files = (
+ 9C00349101601F7F0ECA16EA,
+ );
+ isa = PBXSourcesBuildPhase;
+ name = Sources;
+ };
+ 29B9732DFDCFA39411CA2CEA = {
+ buildActionMask = 2147483647;
+ files = (
+ 1058C7A3FEA54F0111CA2CBB,
+ );
+ isa = PBXFrameworksBuildPhase;
+ name = "Frameworks & Libraries";
+ };
+//290
+//291
+//292
+//293
+//294
+//4A0
+//4A1
+//4A2
+//4A3
+//4A4
+ 4A9504CCFFE6A4B311CA0CBA = {
+ buildRules = (
+ );
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ OPTIMIZATION_CFLAGS = "-O0";
+ };
+ isa = PBXBuildStyle;
+ name = Development;
+ };
+ 4A9504CDFFE6A4B311CA0CBA = {
+ buildRules = (
+ );
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ };
+ isa = PBXBuildStyle;
+ name = Deployment;
+ };
+//4A0
+//4A1
+//4A2
+//4A3
+//4A4
+//9C0
+//9C1
+//9C2
+//9C3
+//9C4
+ 9C00349001601F7F0ECA16EA = {
+ isa = PBXFileReference;
+ name = draw.mm;
+ path = /Network/Servers/abel/homes/gimli/rjw/src/Labyrinth/WebPageView/src/kwq/tests/draw/draw.mm;
+ refType = 0;
+ };
+ 9C00349101601F7F0ECA16EA = {
+ fileRef = 9C00349001601F7F0ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 9C00349401627E910ECA16EA = {
+ isa = PBXFileReference;
+ name = powermac.jpg;
+ path = /Network/Servers/abel/homes/gimli/rjw/src/Labyrinth/WebPageView/src/kwq/tests/draw/powermac.jpg;
+ refType = 0;
+ };
+ 9C00349501627E910ECA16EA = {
+ isa = PBXFileReference;
+ name = qt.png;
+ path = /Network/Servers/abel/homes/gimli/rjw/src/Labyrinth/WebPageView/src/kwq/tests/draw/qt.png;
+ refType = 0;
+ };
+ 9C00349601627E910ECA16EA = {
+ isa = PBXFileReference;
+ name = yahoo.gif;
+ path = /Network/Servers/abel/homes/gimli/rjw/src/Labyrinth/WebPageView/src/kwq/tests/draw/yahoo.gif;
+ refType = 0;
+ };
+ 9C00349701627E910ECA16EA = {
+ fileRef = 9C00349401627E910ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 9C00349801627E910ECA16EA = {
+ fileRef = 9C00349501627E910ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 9C00349901627E910ECA16EA = {
+ fileRef = 9C00349601627E910ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 9C6566C8016406D90ECA16EA = {
+ isa = PBXFileReference;
+ name = foo;
+ path = /tmp/foo;
+ refType = 0;
+ };
+ 9C6566C9016406D90ECA16EA = {
+ fileRef = 9C6566C8016406D90ECA16EA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA;
+}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list