Commit af9202e3 authored by kocienda's avatar kocienda

Changes and additions to support compiling src/kdelibs/khtml/khtmlview.cpp


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 52dccb48
......@@ -27,6 +27,7 @@ SUBDIRS = \
src/kdelibs/khtml/java \
src/kdelibs/khtml/html \
src/kdelibs/khtml/rendering \
src/kdelibs/khtml \
src/kwq/ \
src/kwq/qt \
src/kwq/kde \
......
......@@ -3679,6 +3679,7 @@ trap 'rm -fr `echo "Makefile
src/kdelibs/khtml/java/Makefile
src/kdelibs/khtml/html/Makefile
src/kdelibs/khtml/rendering/Makefile
src/kdelibs/khtml/Makefile
src/kwq/Makefile
src/kwq/qt/Makefile
src/kwq/kde/Makefile
......@@ -3796,6 +3797,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
src/kdelibs/khtml/java/Makefile
src/kdelibs/khtml/html/Makefile
src/kdelibs/khtml/rendering/Makefile
src/kdelibs/khtml/Makefile
src/kwq/Makefile
src/kwq/qt/Makefile
src/kwq/kde/Makefile
......
......@@ -719,6 +719,7 @@ AC_OUTPUT(
src/kdelibs/khtml/java/Makefile
src/kdelibs/khtml/html/Makefile
src/kdelibs/khtml/rendering/Makefile
src/kdelibs/khtml/Makefile
src/kwq/Makefile
src/kwq/qt/Makefile
src/kwq/kde/Makefile
......
......@@ -30,9 +30,10 @@
#include <config.h>
#endif
#include "qwidget.h"
#include "qpalette.h"
#include "qsize.h"
#include <qobject.h>
#include <qwidget.h>
#include <qpalette.h>
#include <qsize.h>
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
#import <Cocoa/Cocoa.h>
......@@ -41,7 +42,7 @@
// class QApplication ==========================================================
class QApplication {
class QApplication : public QObject {
public:
// typedefs ----------------------------------------------------------------
......@@ -57,6 +58,7 @@ public:
static void setOverrideCursor(const QCursor &);
static void restoreOverrideCursor();
static bool sendEvent(QObject *, QEvent *);
static void sendPostedEvents(QObject *receiver, int event_type);
// constructors, copy constructors, and destructors ------------------------
......
......@@ -30,6 +30,9 @@
#include <config.h>
#endif
#include <qpixmap.h>
#include <qpoint.h>
// class QCursor ===============================================================
class QCursor {
......@@ -39,10 +42,13 @@ public:
// 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 &);
~QCursor();
......
......@@ -52,6 +52,7 @@ public:
FocusOut,
AccelAvailable,
KeyPress,
Paint,
};
// constants ---------------------------------------------------------------
......@@ -125,6 +126,7 @@ public:
const QPoint &pos() const;
ButtonState button();
ButtonState state();
ButtonState stateAfter();
// operators ---------------------------------------------------------------
......@@ -223,6 +225,7 @@ public:
int key() const;
ButtonState state() const;
void accept();
void ignore();
// operators ---------------------------------------------------------------
......@@ -459,6 +462,10 @@ public:
#endif
// member functions --------------------------------------------------------
void accept();
void ignore();
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
......@@ -480,4 +487,50 @@ private:
}; // class QWheelEvent ========================================================
// class QCustomEvent ===========================================================
class QCustomEvent : public QEvent {
public:
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
// add no-arg constructor
#ifdef _KWQ_PEDANTIC_
QCustomEvent() {}
#endif
QCustomEvent(Type);
// add no-op destructor
#ifdef _KWQ_PEDANTIC_
~QCustomEvent() {}
#endif
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// 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 QWheelEvent ========================================================
#endif
......@@ -61,6 +61,10 @@ public:
void setGroup(const QString &pGroup);
void writeEntry(const QString &pKey, const QStringList &rValue,
char sep=',', bool bPersistent=true, bool bGlobal=false,
bool bNLS=false);
QString readEntry(const char *pKey,
const QString& aDefault=QString::null) const;
......@@ -73,6 +77,8 @@ public:
QColor readColorEntry(const char *pKey, const QColor *pDefault=0L) const;
QStringList readListEntry(const QString &pKey, char sep=',') const;
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
......@@ -133,4 +139,4 @@ private:
}; // class KConfig ============================================================
#endif
\ No newline at end of file
#endif
......@@ -32,6 +32,9 @@
#include <qwidget.h>
static const QCursor &arrowCursor = QCursor();
static const QCursor &waitCursor = QCursor();
// class KCursor ===============================================================
class KCursor {
......@@ -46,6 +49,16 @@ public:
static void setAutoHideCursor(QWidget *w, bool enable);
static QCursor arrowCursor();
static QCursor crossCursor();
static QCursor sizeAllCursor();
static QCursor sizeHorCursor();
static QCursor sizeVerCursor();
static QCursor sizeBDiagCursor();
static QCursor sizeFDiagCursor();
static QCursor ibeamCursor();
static QCursor waitCursor();
// constructors, copy constructors, and destructors ------------------------
KCursor();
......
......@@ -48,6 +48,7 @@ public:
// static member functions -------------------------------------------------
static void registerFormats();
static QStringList mimeTypes(Mode mode=Writing);
// constructors, copy constructors, and destructors ------------------------
......
......@@ -30,6 +30,7 @@
#include <config.h>
#endif
#include <kurl.h>
#include <qobject.h>
#include <qstring.h>
......@@ -59,7 +60,7 @@ public:
int error();
const QString & errorText();
QString errorString();
virtual void kill(bool quietly = true);
virtual void kill(bool quietly=TRUE);
// operators ---------------------------------------------------------------
......@@ -138,6 +139,8 @@ public:
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
TransferJob(const KURL &, bool reload=false, bool showProgressInfo=true);
// add no-arg constructor
#ifdef _KWQ_PEDANTIC_
......@@ -153,6 +156,7 @@ public:
bool isErrorPage() const;
void addMetaData(const QString &key, const QString &value);
void kill(bool quietly=TRUE);
// operators ---------------------------------------------------------------
......@@ -160,6 +164,11 @@ public:
// private ---------------------------------------------------------------------
private:
KURL _url;
bool _reload;
bool _showProgressInfo;
void doLoad();
// add copy constructor
// this private declaration prevents copying
......
......@@ -38,7 +38,7 @@ namespace KParts {
// class Event =================================================================
class Event {
class Event : public QCustomEvent {
public:
// structs -----------------------------------------------------------------
......
......@@ -30,4 +30,12 @@
#include <config.h>
#endif
#include <kconfig.h>
#include <qstring.h>
class KSimpleConfig : public KConfig {
public:
KSimpleConfig(const QString &, bool bReadOnly=false);
};
#endif
......@@ -31,12 +31,14 @@
#endif
#include <qstring.h>
#include "kglobal.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 =========================================================
......
......@@ -96,10 +96,8 @@ public:
enum Key {
Key_Escape = 0x1000,
Key_Tab = 0x1001,
Key_Backtab = 0x1002,
Key_BackTab = Key_Backtab,
Key_Backspace = 0x1003,
Key_BackSpace = Key_Backspace,
Key_Backtab = 0x1002, Key_BackTab = Key_Backtab,
Key_Backspace = 0x1003, Key_BackSpace = Key_Backspace,
Key_Return = 0x1004,
Key_Enter = 0x1005,
Key_Insert = 0x1006,
......@@ -113,14 +111,139 @@ public:
Key_Up = 0x1013,
Key_Right = 0x1014,
Key_Down = 0x1015,
Key_Prior = 0x1016, Key_PageUp = Key_Prior,
Key_Next = 0x1017, Key_PageDown = Key_Next,
Key_Shift = 0x1020,
Key_Control = 0x1021,
Key_Meta = 0x1022,
Key_Alt = 0x1023,
Key_CapsLock = 0x1024,
Key_NumLock = 0x1025,
Key_ScrollLock = 0x1026,
Key_F1 = 0x1030,
Key_F2 = 0x1031,
Key_F3 = 0x1032,
Key_F4 = 0x1033,
Key_F5 = 0x1034,
Key_F6 = 0x1035,
Key_F7 = 0x1036,
Key_F8 = 0x1037,
Key_F9 = 0x1038,
Key_F10 = 0x1039,
Key_F11 = 0x103a,
Key_F12 = 0x103b,
Key_F13 = 0x103c,
Key_F14 = 0x103d,
Key_F15 = 0x103e,
Key_F16 = 0x103f,
Key_F17 = 0x1040,
Key_F18 = 0x1041,
Key_F19 = 0x1042,
Key_F20 = 0x1043,
Key_F21 = 0x1044,
Key_F22 = 0x1045,
Key_F23 = 0x1046,
Key_F24 = 0x1047,
Key_F25 = 0x1048,
Key_F26 = 0x1049,
Key_F27 = 0x104a,
Key_F28 = 0x104b,
Key_F29 = 0x104c,
Key_F30 = 0x104d,
Key_F31 = 0x104e,
Key_F32 = 0x104f,
Key_F33 = 0x1050,
Key_F34 = 0x1051,
Key_F35 = 0x1052,
Key_Super_L = 0x1053,
Key_Super_R = 0x1054,
Key_Menu = 0x1055,
Key_Hyper_L = 0x1056,
Key_Hyper_R = 0x1057,
Key_Help = 0x1058,
Key_Space = 0x20,
Key_Any = Key_Space,
Key_Exclam = 0x21,
Key_QuoteDbl = 0x22,
Key_NumberSign = 0x23,
Key_Dollar = 0x24,
Key_Percent = 0x25,
Key_Ampersand = 0x26,
Key_Apostrophe = 0x27,
Key_ParenLeft = 0x28,
Key_ParenRight = 0x29,
Key_Asterisk = 0x2a,
Key_Plus = 0x2b,
Key_Comma = 0x2c,
Key_Minus = 0x2d,
Key_Period = 0x2e,
Key_Slash = 0x2f,
Key_0 = 0x30,
Key_1 = 0x31,
Key_2 = 0x32,
Key_3 = 0x33,
Key_4 = 0x34,
Key_5 = 0x35,
Key_6 = 0x36,
Key_7 = 0x37,
Key_8 = 0x38,
Key_9 = 0x39,
Key_Colon = 0x3a,
Key_Semicolon = 0x3b,
Key_Less = 0x3c,
Key_Equal = 0x3d,
Key_Greater = 0x3e,
Key_Question = 0x3f,
Key_At = 0x40,
Key_A = 0x41,
Key_B = 0x42,
Key_C = 0x43,
Key_D = 0x44,
Key_E = 0x45,
Key_F = 0x46,
Key_G = 0x47,
Key_H = 0x48,
Key_I = 0x49,
Key_J = 0x4a,
Key_K = 0x4b,
Key_L = 0x4c,
Key_M = 0x4d,
Key_N = 0x4e,
Key_O = 0x4f,
Key_P = 0x50,
Key_Q = 0x51,
Key_R = 0x52,
Key_S = 0x53,
Key_T = 0x54,
Key_U = 0x55,
Key_V = 0x56,
Key_W = 0x57,
Key_X = 0x58,
Key_Y = 0x59,
Key_Z = 0x5a,
Key_BracketLeft = 0x5b,
Key_Backslash = 0x5c,
Key_BracketRight = 0x5d,
Key_AsciiCircum = 0x5e,
Key_Underscore = 0x5f,
Key_QuoteLeft = 0x60,
Key_BraceLeft = 0x7b,
Key_Bar = 0x7c,
Key_BraceRight = 0x7d,
Key_AsciiTilde = 0x7e,
};
enum RasterOp { // raster op mode
CopyROP,
OrROP,
XorROP,
};
enum WidgetFlags {
WResizeNoErase = 0x00100000,
WRepaintNoErase = 0x00800000,
};
// constants ---------------------------------------------------------------
QT_STATIC_CONST QColor &color0;
......
......@@ -59,6 +59,8 @@ public:
int logicalDpiY() const;
int depth() const;
int width() const;
int height() const;
// operators ---------------------------------------------------------------
......
......@@ -30,15 +30,16 @@
#include <config.h>
#endif
#include "qnamespace.h"
#include "qpaintdevice.h"
#include "qcolor.h"
#include "qpen.h"
#include "qbrush.h"
#include "qregion.h"
#include "qpoint.h"
#include "qstring.h"
#include "qfontmetrics.h"
#include <qnamespace.h>
#include <qpaintdevice.h>
#include <qcolor.h>
#include <qpen.h>
#include <qbrush.h>
#include <qrect.h>
#include <qregion.h>
#include <qpoint.h>
#include <qstring.h>
#include <qfontmetrics.h>
class QFont;
class QPixmap;
......@@ -148,11 +149,21 @@ public:
void setClipping(bool);
void setClipRegion(const QRegion &);
void setClipRect(const QRect &);
void setClipRect(int,int,int,int);
const QRegion &clipRegion() const;
bool hasClipping() const;
RasterOp rasterOp() const;
void setRasterOp(RasterOp);
void translate(double dx, double dy);
void scale(double dx, double dy);
bool begin(const QPaintDevice *);
bool end();
QPaintDevice *device() const;
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
......
......@@ -30,7 +30,8 @@
#include <config.h>
#endif
class QColor;
#include <qcolor.h>
#include <qbrush.h>
// class QColorGroup ===========================================================
......@@ -64,6 +65,8 @@ public:
// member functions --------------------------------------------------------
const QBrush &brush(ColorRole) const;
const QColor &color(ColorRole) const;
void setColor(ColorRole, const QColor &);
......
......@@ -78,6 +78,7 @@ public:
int width() const;
int height() const;
void resize(const QSize &);
void resize(int,int);
QPixmap xForm(const QWMatrix &) const;
QImage convertToImage() const;
......
......@@ -51,7 +51,7 @@ public:
// constructors, copy constructors, and destructors ------------------------
QScrollView();
QScrollView(QWidget *parent=0, const char *name=0, WFlags f=0);
~QScrollView();
// member functions --------------------------------------------------------
......@@ -79,6 +79,20 @@ public:
virtual void resizeContents(int w, int h);
void updateContents(int x, int y, int w, int h);
void repaintContents(int x, int y, int w, int h, bool erase=TRUE);
QPoint contentsToViewport(const QPoint &);
void viewportToContents(int vx, int vy, int& x, int& y);
virtual void viewportWheelEvent(QWheelEvent *);
QWidget *clipper() const;
void enableClipper(bool);
void setStaticBackground(bool);
void resizeEvent(QResizeEvent *);
void ensureVisible(int,int);
void ensureVisible(int,int,int,int);
// operators ---------------------------------------------------------------
......
......@@ -30,9 +30,11 @@
#include <config.h>
#endif
#include "qnamespace.h"
#include "qpalette.h"
#include "qwidget.h"
#include <qnamespace.h>
#include <qpalette.h>
#include <qwidget.h>
#include <qrect.h>
#include <qsize.h>
// class QToolTip ==============================================================
......@@ -57,6 +59,9 @@ public:
#endif
// member functions --------------------------------------------------------
void tip(const QRect &, const QString &);
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
......
......@@ -73,6 +73,8 @@ public:
StrongFocus = 0x3,
WheelFocus = 0x7
};
enum BackgroundMode { NoBackground, };
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
......@@ -104,6 +106,7 @@ public:
QWidget *topLevelWidget() const;
QPoint mapToGlobal(const QPoint &) const;
QPoint mapFromGlobal(const QPoint &) const;
void setFocus();
void clearFocus();
......@@ -132,6 +135,21 @@ public:
virtual void show();
virtual void hide();
virtual void showEvent(QShowEvent *);
virtual void hideEvent(QHideEvent *);
virtual void wheelEvent(QWheelEvent *);
virtual void keyPressEvent(QKeyEvent *);
virtual void keyReleaseEvent(QKeyEvent *);
virtual void focusOutEvent(QFocusEvent *);
virtual void setBackgroundMode(BackgroundMode);
virtual void setAcceptDrops(bool);