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 = \ ...@@ -27,6 +27,7 @@ SUBDIRS = \
src/kdelibs/khtml/java \ src/kdelibs/khtml/java \
src/kdelibs/khtml/html \ src/kdelibs/khtml/html \
src/kdelibs/khtml/rendering \ src/kdelibs/khtml/rendering \
src/kdelibs/khtml \
src/kwq/ \ src/kwq/ \
src/kwq/qt \ src/kwq/qt \
src/kwq/kde \ src/kwq/kde \
......
...@@ -3679,6 +3679,7 @@ trap 'rm -fr `echo "Makefile ...@@ -3679,6 +3679,7 @@ trap 'rm -fr `echo "Makefile
src/kdelibs/khtml/java/Makefile src/kdelibs/khtml/java/Makefile
src/kdelibs/khtml/html/Makefile src/kdelibs/khtml/html/Makefile
src/kdelibs/khtml/rendering/Makefile src/kdelibs/khtml/rendering/Makefile
src/kdelibs/khtml/Makefile
src/kwq/Makefile src/kwq/Makefile
src/kwq/qt/Makefile src/kwq/qt/Makefile
src/kwq/kde/Makefile src/kwq/kde/Makefile
...@@ -3796,6 +3797,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile ...@@ -3796,6 +3797,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
src/kdelibs/khtml/java/Makefile src/kdelibs/khtml/java/Makefile
src/kdelibs/khtml/html/Makefile src/kdelibs/khtml/html/Makefile
src/kdelibs/khtml/rendering/Makefile src/kdelibs/khtml/rendering/Makefile
src/kdelibs/khtml/Makefile
src/kwq/Makefile src/kwq/Makefile
src/kwq/qt/Makefile src/kwq/qt/Makefile
src/kwq/kde/Makefile src/kwq/kde/Makefile
......
...@@ -719,6 +719,7 @@ AC_OUTPUT( ...@@ -719,6 +719,7 @@ AC_OUTPUT(
src/kdelibs/khtml/java/Makefile src/kdelibs/khtml/java/Makefile
src/kdelibs/khtml/html/Makefile src/kdelibs/khtml/html/Makefile
src/kdelibs/khtml/rendering/Makefile src/kdelibs/khtml/rendering/Makefile
src/kdelibs/khtml/Makefile
src/kwq/Makefile src/kwq/Makefile
src/kwq/qt/Makefile src/kwq/qt/Makefile
src/kwq/kde/Makefile src/kwq/kde/Makefile
......
...@@ -30,9 +30,10 @@ ...@@ -30,9 +30,10 @@
#include <config.h> #include <config.h>
#endif #endif
#include "qwidget.h" #include <qobject.h>
#include "qpalette.h" #include <qwidget.h>
#include "qsize.h" #include <qpalette.h>
#include <qsize.h>
#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus)) #if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
...@@ -41,7 +42,7 @@ ...@@ -41,7 +42,7 @@
// class QApplication ========================================================== // class QApplication ==========================================================
class QApplication { class QApplication : public QObject {
public: public:
// typedefs ---------------------------------------------------------------- // typedefs ----------------------------------------------------------------
...@@ -57,6 +58,7 @@ public: ...@@ -57,6 +58,7 @@ public:
static void setOverrideCursor(const QCursor &); static void setOverrideCursor(const QCursor &);
static void restoreOverrideCursor(); static void restoreOverrideCursor();
static bool sendEvent(QObject *, QEvent *); static bool sendEvent(QObject *, QEvent *);
static void sendPostedEvents(QObject *receiver, int event_type);
// constructors, copy constructors, and destructors ------------------------ // constructors, copy constructors, and destructors ------------------------
......
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qpixmap.h>
#include <qpoint.h>
// class QCursor =============================================================== // class QCursor ===============================================================
class QCursor { class QCursor {
...@@ -40,9 +43,12 @@ public: ...@@ -40,9 +43,12 @@ public:
// constants --------------------------------------------------------------- // constants ---------------------------------------------------------------
// static member functions ------------------------------------------------- // static member functions -------------------------------------------------
static QPoint pos();
// constructors, copy constructors, and destructors ------------------------ // constructors, copy constructors, and destructors ------------------------
QCursor(); QCursor();
QCursor(const QPixmap &pixmap, int hotX=1, int hotY=1);
QCursor(const QCursor &); QCursor(const QCursor &);
~QCursor(); ~QCursor();
......
...@@ -52,6 +52,7 @@ public: ...@@ -52,6 +52,7 @@ public:
FocusOut, FocusOut,
AccelAvailable, AccelAvailable,
KeyPress, KeyPress,
Paint,
}; };
// constants --------------------------------------------------------------- // constants ---------------------------------------------------------------
...@@ -125,6 +126,7 @@ public: ...@@ -125,6 +126,7 @@ public:
const QPoint &pos() const; const QPoint &pos() const;
ButtonState button(); ButtonState button();
ButtonState state(); ButtonState state();
ButtonState stateAfter();
// operators --------------------------------------------------------------- // operators ---------------------------------------------------------------
...@@ -223,6 +225,7 @@ public: ...@@ -223,6 +225,7 @@ public:
int key() const; int key() const;
ButtonState state() const; ButtonState state() const;
void accept(); void accept();
void ignore();
// operators --------------------------------------------------------------- // operators ---------------------------------------------------------------
...@@ -459,6 +462,10 @@ public: ...@@ -459,6 +462,10 @@ public:
#endif #endif
// member functions -------------------------------------------------------- // member functions --------------------------------------------------------
void accept();
void ignore();
// operators --------------------------------------------------------------- // operators ---------------------------------------------------------------
// protected ------------------------------------------------------------------- // protected -------------------------------------------------------------------
...@@ -480,4 +487,50 @@ private: ...@@ -480,4 +487,50 @@ private:
}; // class QWheelEvent ======================================================== }; // 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 #endif
...@@ -61,6 +61,10 @@ public: ...@@ -61,6 +61,10 @@ public:
void setGroup(const QString &pGroup); 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, QString readEntry(const char *pKey,
const QString& aDefault=QString::null) const; const QString& aDefault=QString::null) const;
...@@ -73,6 +77,8 @@ public: ...@@ -73,6 +77,8 @@ public:
QColor readColorEntry(const char *pKey, const QColor *pDefault=0L) const; QColor readColorEntry(const char *pKey, const QColor *pDefault=0L) const;
QStringList readListEntry(const QString &pKey, char sep=',') const;
// operators --------------------------------------------------------------- // operators ---------------------------------------------------------------
// protected ------------------------------------------------------------------- // protected -------------------------------------------------------------------
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
#include <qwidget.h> #include <qwidget.h>
static const QCursor &arrowCursor = QCursor();
static const QCursor &waitCursor = QCursor();
// class KCursor =============================================================== // class KCursor ===============================================================
class KCursor { class KCursor {
...@@ -46,6 +49,16 @@ public: ...@@ -46,6 +49,16 @@ public:
static void setAutoHideCursor(QWidget *w, bool enable); 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 ------------------------ // constructors, copy constructors, and destructors ------------------------
KCursor(); KCursor();
......
...@@ -48,6 +48,7 @@ public: ...@@ -48,6 +48,7 @@ public:
// static member functions ------------------------------------------------- // static member functions -------------------------------------------------
static void registerFormats();
static QStringList mimeTypes(Mode mode=Writing); static QStringList mimeTypes(Mode mode=Writing);
// constructors, copy constructors, and destructors ------------------------ // constructors, copy constructors, and destructors ------------------------
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <config.h> #include <config.h>
#endif #endif
#include <kurl.h>
#include <qobject.h> #include <qobject.h>
#include <qstring.h> #include <qstring.h>
...@@ -59,7 +60,7 @@ public: ...@@ -59,7 +60,7 @@ public:
int error(); int error();
const QString & errorText(); const QString & errorText();
QString errorString(); QString errorString();
virtual void kill(bool quietly = true); virtual void kill(bool quietly=TRUE);
// operators --------------------------------------------------------------- // operators ---------------------------------------------------------------
...@@ -139,6 +140,8 @@ public: ...@@ -139,6 +140,8 @@ public:
// constructors, copy constructors, and destructors ------------------------ // constructors, copy constructors, and destructors ------------------------
TransferJob(const KURL &, bool reload=false, bool showProgressInfo=true);
// add no-arg constructor // add no-arg constructor
#ifdef _KWQ_PEDANTIC_ #ifdef _KWQ_PEDANTIC_
TransferJob() {} TransferJob() {}
...@@ -153,6 +156,7 @@ public: ...@@ -153,6 +156,7 @@ public:
bool isErrorPage() const; bool isErrorPage() const;
void addMetaData(const QString &key, const QString &value); void addMetaData(const QString &key, const QString &value);
void kill(bool quietly=TRUE);
// operators --------------------------------------------------------------- // operators ---------------------------------------------------------------
...@@ -160,6 +164,11 @@ public: ...@@ -160,6 +164,11 @@ public:
// private --------------------------------------------------------------------- // private ---------------------------------------------------------------------
private: private:
KURL _url;
bool _reload;
bool _showProgressInfo;
void doLoad();
// add copy constructor // add copy constructor
// this private declaration prevents copying // this private declaration prevents copying
......
...@@ -38,7 +38,7 @@ namespace KParts { ...@@ -38,7 +38,7 @@ namespace KParts {
// class Event ================================================================= // class Event =================================================================
class Event { class Event : public QCustomEvent {
public: public:
// structs ----------------------------------------------------------------- // structs -----------------------------------------------------------------
......
...@@ -30,4 +30,12 @@ ...@@ -30,4 +30,12 @@
#include <config.h> #include <config.h>
#endif #endif
#include <kconfig.h>
#include <qstring.h>
class KSimpleConfig : public KConfig {
public:
KSimpleConfig(const QString &, bool bReadOnly=false);
};
#endif #endif
...@@ -31,12 +31,14 @@ ...@@ -31,12 +31,14 @@
#endif #endif
#include <qstring.h> #include <qstring.h>
#include "kglobal.h" #include <kglobal.h>
QString locate(const char *type, const QString& filename, QString locate(const char *type, const QString& filename,
const KInstance* instance=KGlobal::instance()); const KInstance* instance=KGlobal::instance());
QString locateLocal(const char *type, const QString &filename,
const KInstance *instance=KGlobal::instance());
// class KStandardDirs ========================================================= // class KStandardDirs =========================================================
......
...@@ -96,10 +96,8 @@ public: ...@@ -96,10 +96,8 @@ public:
enum Key { enum Key {
Key_Escape = 0x1000, Key_Escape = 0x1000,
Key_Tab = 0x1001, Key_Tab = 0x1001,
Key_Backtab = 0x1002, Key_Backtab = 0x1002, Key_BackTab = Key_Backtab,
Key_BackTab = Key_Backtab, Key_Backspace = 0x1003, Key_BackSpace = Key_Backspace,
Key_Backspace = 0x1003,
Key_BackSpace = Key_Backspace,
Key_Return = 0x1004, Key_Return = 0x1004,
Key_Enter = 0x1005, Key_Enter = 0x1005,
Key_Insert = 0x1006, Key_Insert = 0x1006,
...@@ -113,6 +111,126 @@ public: ...@@ -113,6 +111,126 @@ public:
Key_Up = 0x1013, Key_Up = 0x1013,
Key_Right = 0x1014, Key_Right = 0x1014,
Key_Down = 0x1015, 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 enum RasterOp { // raster op mode
...@@ -121,6 +239,11 @@ public: ...@@ -121,6 +239,11 @@ public:
XorROP, XorROP,
}; };
enum WidgetFlags {
WResizeNoErase = 0x00100000,
WRepaintNoErase = 0x00800000,
};
// constants --------------------------------------------------------------- // constants ---------------------------------------------------------------
QT_STATIC_CONST QColor &color0; QT_STATIC_CONST QColor &color0;
......
...@@ -59,6 +59,8 @@ public: ...@@ -59,6 +59,8 @@ public:
int logicalDpiY() const; int logicalDpiY() const;
int depth() const; int depth() const;
int width() const;
int height() const;
// operators --------------------------------------------------------------- // operators ---------------------------------------------------------------
......
...@@ -30,15 +30,16 @@ ...@@ -30,15 +30,16 @@
#include <config.h> #include <config.h>
#endif #endif
#include "qnamespace.h" #include <qnamespace.h>
#include "qpaintdevice.h" #include <qpaintdevice.h>
#include "qcolor.h" #include <qcolor.h>
#include "qpen.h" #include <qpen.h>
#include "qbrush.h" #include <qbrush.h>
#include "qregion.h"